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