返回hint
This commit is contained in:
@@ -3612,10 +3612,10 @@ func GetStoreAudit(ctx *jxcontext.Context, statuss []int, keyword, applyTimeStar
|
||||
return pagedInfo, err
|
||||
}
|
||||
|
||||
func StoreAudit(ctx *jxcontext.Context, storeAudits []*model.StoreAudit, status int) (err error) {
|
||||
func StoreAudit(ctx *jxcontext.Context, storeAudits []*model.StoreAudit, status int) (hint string, err error) {
|
||||
db := dao.GetDB()
|
||||
if status != model.StoreAuditStatusCreated && status != model.StoreAuditStatusRejected {
|
||||
return fmt.Errorf("审核标志不正确!")
|
||||
return "", fmt.Errorf("审核标志不正确!")
|
||||
}
|
||||
task := tasksch.NewParallelTask("StoreAudit", tasksch.NewParallelConfig().SetParallelCount(5).SetIsContinueWhenError(true), ctx,
|
||||
func(task *tasksch.ParallelTask, batchItemList []interface{}, params ...interface{}) (retVal interface{}, err error) {
|
||||
@@ -3662,6 +3662,6 @@ func StoreAudit(ctx *jxcontext.Context, storeAudits []*model.StoreAudit, status
|
||||
return retVal, err
|
||||
}, storeAudits)
|
||||
tasksch.HandleTask(task, nil, true).Run()
|
||||
task.GetID()
|
||||
hint = task.GetID()
|
||||
return err
|
||||
}
|
||||
|
||||
@@ -898,7 +898,7 @@ func (c *StoreController) StoreAudit() {
|
||||
c.callStoreAudit(func(params *tStoreStoreAuditParams) (retVal interface{}, errCode string, err error) {
|
||||
var stores []*model.StoreAudit
|
||||
if err = utils.UnmarshalUseNumber([]byte(params.Payload), &stores); err == nil {
|
||||
err = cms.StoreAudit(params.Ctx, stores, params.Status)
|
||||
retVal, err = cms.StoreAudit(params.Ctx, stores, params.Status)
|
||||
}
|
||||
return retVal, "", err
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user