正在显示
1 个修改的文件
包含
8 行增加
和
2 行删除
@@ -763,12 +763,18 @@ func (dividendsEstimateService *DividendsEstimateService) ConfirmDividendsIncent | @@ -763,12 +763,18 @@ func (dividendsEstimateService *DividendsEstimateService) ConfirmDividendsIncent | ||
763 | // 分析成功和失败原因 | 763 | // 分析成功和失败原因 |
764 | successfullyCount := len(dividendsEstimatesSaved) | 764 | successfullyCount := len(dividendsEstimatesSaved) |
765 | // 错误原因收集,返回第一个可能的原因 | 765 | // 错误原因收集,返回第一个可能的原因 |
766 | - var failedReason []string | 766 | + failedReason := make([]string, 0) |
767 | for _, v := range estimateFailedDividendsOrders { | 767 | for _, v := range estimateFailedDividendsOrders { |
768 | failedReason = append(failedReason, v) | 768 | failedReason = append(failedReason, v) |
769 | } | 769 | } |
770 | + var failedReasonStr string | ||
771 | + if len(failedReason) > 0 { | ||
772 | + failedReasonStr = failedReason[0] | ||
773 | + } else { | ||
774 | + failedReasonStr = "无" | ||
775 | + } | ||
770 | return map[string]interface{}{ | 776 | return map[string]interface{}{ |
771 | - "report": fmt.Sprintf("已完成%d笔单订单分红预算,生成%d笔单分红预算,%d笔订单分红预算失败,失败原因:%s", len(estimateSuccessfullyDividendsOrders), successfullyCount, len(estimateFailedDividendsOrders), failedReason[0]), | 777 | + "report": fmt.Sprintf("已完成%d笔单订单分红预算,生成%d笔单分红预算,%d笔订单分红预算失败,失败原因:%s", len(estimateSuccessfullyDividendsOrders), successfullyCount, len(estimateFailedDividendsOrders), failedReasonStr), |
772 | }, nil | 778 | }, nil |
773 | } | 779 | } |
774 | } | 780 | } |
-
请 注册 或 登录 后发表评论