const system = require("../../../system");
const Dao = require("../../dao.base");
class OproductprocessDao extends Dao {
  constructor() {
    super(Dao.getModelName(OproductprocessDao));
  }

  /**
   * 根据 productId 和 status 查询 商品
   * @param {*} productId 
   * @param {*} status 
   */
  async findByProductIdAndStatus(productId,status){
    try {
      let _productProcess =await this.model.findOne({where:{
        productId:productId,
        status:status
      }});
      return _productProcess || {};
    } catch (error) {
      console.log(`系统错误 错误信息 ${error}`);
      return {};
    }
  }

}
module.exports = OproductprocessDao;