|
@@ -901,6 +901,11 @@ func (dividendsEstimateService *DividendsEstimateService) ConfirmDividendsIncent |
|
@@ -901,6 +901,11 @@ func (dividendsEstimateService *DividendsEstimateService) ConfirmDividendsIncent |
901
|
if dividendsEstimatesSaved, err := dividendsEstimateRepository.SaveMany(dividendsEstimates); err != nil {
|
901
|
if dividendsEstimatesSaved, err := dividendsEstimateRepository.SaveMany(dividendsEstimates); err != nil {
|
902
|
return nil, application.ThrowError(application.INTERNAL_SERVER_ERROR, err.Error())
|
902
|
return nil, application.ThrowError(application.INTERNAL_SERVER_ERROR, err.Error())
|
903
|
} else {
|
903
|
} else {
|
|
|
904
|
+ endSave := time.Since(startSave)
|
|
|
905
|
+ log.Logger.Info("保存预算单耗时", map[string]interface{}{
|
|
|
906
|
+ "保存预算单耗时": endSave.Seconds(),
|
|
|
907
|
+ })
|
|
|
908
|
+
|
904
|
// 获取产品ID
|
909
|
// 获取产品ID
|
905
|
orderGoodSavedIds := make([]int64, 0)
|
910
|
orderGoodSavedIds := make([]int64, 0)
|
906
|
for _, dividendsEstimate := range dividendsEstimates {
|
911
|
for _, dividendsEstimate := range dividendsEstimates {
|
|
@@ -1059,14 +1064,6 @@ func (dividendsEstimateService *DividendsEstimateService) ConfirmDividendsIncent |
|
@@ -1059,14 +1064,6 @@ func (dividendsEstimateService *DividendsEstimateService) ConfirmDividendsIncent |
1059
|
failedReasonStr = "无"
|
1064
|
failedReasonStr = "无"
|
1060
|
}
|
1065
|
}
|
1061
|
|
1066
|
|
1062
|
- elapsed := time.Since(start)
|
|
|
1063
|
- fmt.Println("该函数执行完成耗时:", elapsed)
|
|
|
1064
|
-
|
|
|
1065
|
- endSave := time.Since(startSave)
|
|
|
1066
|
- log.Logger.Info("保存预算单耗时", map[string]interface{}{
|
|
|
1067
|
- "保存预算单耗时": endSave.Seconds(),
|
|
|
1068
|
- })
|
|
|
1069
|
-
|
|
|
1070
|
return map[string]interface{}{
|
1067
|
return map[string]interface{}{
|
1071
|
"report": fmt.Sprintf("已完成%d单订单分红预算,生成%d单分红预算,%d笔订单分红预算失败,失败原因:%s", len(estimateSuccessfullyDividendsOrders), successfullyCount, len(estimateFailedDividendsOrders), failedReasonStr),
|
1068
|
"report": fmt.Sprintf("已完成%d单订单分红预算,生成%d单分红预算,%d笔订单分红预算失败,失败原因:%s", len(estimateSuccessfullyDividendsOrders), successfullyCount, len(estimateFailedDividendsOrders), failedReasonStr),
|
1072
|
}, nil
|
1069
|
}, nil
|