作者 tangxvhui

添加限制

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