合并分支 'dev' 到 'test'
fix:删除分红订单校验退货单 查看合并请求 !40
正在显示
1 个修改的文件
包含
2 行增加
和
2 行删除
@@ -1108,7 +1108,7 @@ func (dividendsOrderService *DividendsOrderService) BatchRemoveDividendsOrder(ba | @@ -1108,7 +1108,7 @@ func (dividendsOrderService *DividendsOrderService) BatchRemoveDividendsOrder(ba | ||
1108 | if count > 0 { | 1108 | if count > 0 { |
1109 | // 校验分红订单是否有退货单关联 | 1109 | // 校验分红订单是否有退货单关联 |
1110 | for _, dividendsOrder := range dividendsOrders { | 1110 | for _, dividendsOrder := range dividendsOrders { |
1111 | - if countReturnedOrder, dividendsReturnedOrders, err := dividendsReturnedOrderRepository.Find(map[string]interface{}{ | 1111 | + if countReturnedOrder, _, err := dividendsReturnedOrderRepository.Find(map[string]interface{}{ |
1112 | "dividendsOrderNumber": dividendsOrder.DividendsOrderNumber, | 1112 | "dividendsOrderNumber": dividendsOrder.DividendsOrderNumber, |
1113 | "companyId": dividendsOrder.Company.CompanyId, | 1113 | "companyId": dividendsOrder.Company.CompanyId, |
1114 | "limit": 1, | 1114 | "limit": 1, |
@@ -1117,7 +1117,7 @@ func (dividendsOrderService *DividendsOrderService) BatchRemoveDividendsOrder(ba | @@ -1117,7 +1117,7 @@ func (dividendsOrderService *DividendsOrderService) BatchRemoveDividendsOrder(ba | ||
1117 | return nil, application.ThrowError(application.INTERNAL_SERVER_ERROR, err.Error()) | 1117 | return nil, application.ThrowError(application.INTERNAL_SERVER_ERROR, err.Error()) |
1118 | } else { | 1118 | } else { |
1119 | if countReturnedOrder > 0 { | 1119 | if countReturnedOrder > 0 { |
1120 | - return nil, application.ThrowError(application.INTERNAL_SERVER_ERROR, fmt.Sprintf("分红订单%s有关联的退货单,不可删除", dividendsReturnedOrders[0].DividendsOrderNumber)) | 1120 | + return nil, application.ThrowError(application.INTERNAL_SERVER_ERROR, fmt.Sprintf("分红订单%s有关联的退货单,不可删除", dividendsOrder.DividendsOrderNumber)) |
1121 | } | 1121 | } |
1122 | } | 1122 | } |
1123 | } | 1123 | } |
-
请 注册 或 登录 后发表评论