作者 唐旭辉

bug 修复

@@ -34,12 +34,12 @@ func (dao OrderBaseDao) CheckOrderExist(companyId int64, orderCode string, @@ -34,12 +34,12 @@ func (dao OrderBaseDao) CheckOrderExist(companyId int64, orderCode string,
34 tx := dao.transactionContext.GetDB() 34 tx := dao.transactionContext.GetDB()
35 query := tx.Model(&models.OrderBase{}). 35 query := tx.Model(&models.OrderBase{}).
36 Join("JOIN order_good ON order_base.id=order_good.order_id"). 36 Join("JOIN order_good ON order_base.id=order_good.order_id").
37 - Where("company_id=?", companyId).  
38 - Where("order_code=?", orderCode).  
39 - Where("delivery_code=?", deliveryCode).  
40 - Where("partner_id=?", partnerId).  
41 - Where(`partner_category @>'{"id":?}'`, partnerCategory).  
42 - Where("id<>?", notId). 37 + Where("order_base.company_id=?", companyId).
  38 + Where("order_base.order_code=?", orderCode).
  39 + Where("order_base.delivery_code=?", deliveryCode).
  40 + Where("order_base.partner_id=?", partnerId).
  41 + Where(`order_base.partner_category @>'{"id":?}'`, partnerCategory).
  42 + Where("order_base.id<>?", notId).
43 WhereIn("order_good.good_name in(?)", goodNames) 43 WhereIn("order_good.good_name in(?)", goodNames)
44 ok, err := query.Exists() 44 ok, err := query.Exists()
45 return ok, err 45 return ok, err