作者 唐旭辉

Merge branch 'dev' into test

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