作者 tangxvhui

添加限制

... ... @@ -66,6 +66,7 @@ func (srv TaskService) CreateTask(transactionContext application.TransactionCont
cnt, _, err := taskRepo.Find(map[string]interface{}{
"name": param.Name,
"leaderId": strconv.Itoa(param.LeaderId),
"limit": 1,
})
if err != nil {
return application.ThrowError(application.INTERNAL_SERVER_ERROR, "查询任务失败:"+err.Error())
... ...