正在显示
1 个修改的文件
包含
12 行增加
和
12 行删除
@@ -225,11 +225,11 @@ func (service OrderInfoService) CreateNewOrder(cmd command.CreateOrderCommand) ( | @@ -225,11 +225,11 @@ func (service OrderInfoService) CreateNewOrder(cmd command.CreateOrderCommand) ( | ||
225 | return nil, lib.ThrowError(lib.TRANSACTION_ERROR, err.Error()) | 225 | return nil, lib.ThrowError(lib.TRANSACTION_ERROR, err.Error()) |
226 | } | 226 | } |
227 | //检查order_code是否重复 | 227 | //检查order_code是否重复 |
228 | - if ok, err := orderBaseDao.OrderCodeExist(cmd.OrderCode, cmd.PartnerCategory, cmd.PartnerId); err != nil { | ||
229 | - return nil, lib.ThrowError(lib.TRANSACTION_ERROR, err.Error()) | ||
230 | - } else if ok { | ||
231 | - return nil, lib.ThrowError(lib.BUSINESS_ERROR, "订单号已存在") | ||
232 | - } | 228 | + // if ok, err := orderBaseDao.OrderCodeExist(cmd.OrderCode, cmd.PartnerCategory, cmd.PartnerId); err != nil { |
229 | + // return nil, lib.ThrowError(lib.TRANSACTION_ERROR, err.Error()) | ||
230 | + // } else if ok { | ||
231 | + // return nil, lib.ThrowError(lib.BUSINESS_ERROR, "订单号已存在") | ||
232 | + // } | ||
233 | //检查delivery_code是否重复 | 233 | //检查delivery_code是否重复 |
234 | if len(cmd.DeliveryCode) > 0 { | 234 | if len(cmd.DeliveryCode) > 0 { |
235 | if ok, err := orderBaseDao.DeliveryCodeExist(cmd.DeliveryCode, cmd.CompanyId); err != nil { | 235 | if ok, err := orderBaseDao.DeliveryCodeExist(cmd.DeliveryCode, cmd.CompanyId); err != nil { |
@@ -427,13 +427,13 @@ func (service OrderInfoService) UpdateOrderData(cmd command.UpdateOrderCommand) | @@ -427,13 +427,13 @@ func (service OrderInfoService) UpdateOrderData(cmd command.UpdateOrderCommand) | ||
427 | return nil, lib.ThrowError(lib.TRANSACTION_ERROR, err.Error()) | 427 | return nil, lib.ThrowError(lib.TRANSACTION_ERROR, err.Error()) |
428 | } | 428 | } |
429 | //检查order_code是否重复 | 429 | //检查order_code是否重复 |
430 | - if oldOrderData.OrderCode != cmd.OrderCode || cmd.PartnerCategory != oldOrderData.PartnerCategory.Id { | ||
431 | - if ok, err := orderBaseDao.OrderCodeExist(cmd.OrderCode, cmd.PartnerCategory, cmd.PartnerId); err != nil { | ||
432 | - return nil, lib.ThrowError(lib.TRANSACTION_ERROR, err.Error()) | ||
433 | - } else if ok { | ||
434 | - return nil, lib.ThrowError(lib.BUSINESS_ERROR, "订单号已存在") | ||
435 | - } | ||
436 | - } | 430 | + // if oldOrderData.OrderCode != cmd.OrderCode || cmd.PartnerCategory != oldOrderData.PartnerCategory.Id { |
431 | + // if ok, err := orderBaseDao.OrderCodeExist(cmd.OrderCode, cmd.PartnerCategory, cmd.PartnerId); err != nil { | ||
432 | + // return nil, lib.ThrowError(lib.TRANSACTION_ERROR, err.Error()) | ||
433 | + // } else if ok { | ||
434 | + // return nil, lib.ThrowError(lib.BUSINESS_ERROR, "订单号已存在") | ||
435 | + // } | ||
436 | + // } | ||
437 | //检查delivery_code是否重复 | 437 | //检查delivery_code是否重复 |
438 | if cmd.DeliveryCode != oldOrderData.DeliveryCode { | 438 | if cmd.DeliveryCode != oldOrderData.DeliveryCode { |
439 | if ok, err := orderBaseDao.DeliveryCodeExist(cmd.DeliveryCode, cmd.CompanyId, cmd.Id); err != nil { | 439 | if ok, err := orderBaseDao.DeliveryCodeExist(cmd.DeliveryCode, cmd.CompanyId, cmd.Id); err != nil { |
-
请 注册 或 登录 后发表评论