作者 陈志颖

fix:删除分红订单校验退货单

... ... @@ -1108,7 +1108,7 @@ func (dividendsOrderService *DividendsOrderService) BatchRemoveDividendsOrder(ba
if count > 0 {
// 校验分红订单是否有退货单关联
for _, dividendsOrder := range dividendsOrders {
if countReturnedOrder, dividendsReturnedOrders, err := dividendsReturnedOrderRepository.Find(map[string]interface{}{
if countReturnedOrder, _, err := dividendsReturnedOrderRepository.Find(map[string]interface{}{
"dividendsOrderNumber": dividendsOrder.DividendsOrderNumber,
"companyId": dividendsOrder.Company.CompanyId,
"limit": 1,
... ... @@ -1117,7 +1117,7 @@ func (dividendsOrderService *DividendsOrderService) BatchRemoveDividendsOrder(ba
return nil, application.ThrowError(application.INTERNAL_SERVER_ERROR, err.Error())
} else {
if countReturnedOrder > 0 {
return nil, application.ThrowError(application.INTERNAL_SERVER_ERROR, fmt.Sprintf("分红订单%s有关联的退货单,不可删除", dividendsReturnedOrders[0].DividendsOrderNumber))
return nil, application.ThrowError(application.INTERNAL_SERVER_ERROR, fmt.Sprintf("分红订单%s有关联的退货单,不可删除", dividendsOrder.DividendsOrderNumber))
}
}
}
... ...