Pārlūkot izejas kodu

备注只能输入200字

tags/v1.1.0
qiujinyang pirms 2 gadiem
vecāks
revīzija
ea51674dca
1 mainītis faili ar 5 papildinājumiem un 0 dzēšanām
  1. +5
    -0
      tuoheng-admin/src/main/java/com/tuoheng/admin/controller/MissionController.java

+ 5
- 0
tuoheng-admin/src/main/java/com/tuoheng/admin/controller/MissionController.java Parādīt failu

@@ -10,6 +10,7 @@ import com.tuoheng.admin.entity.vo.MissionVO;
import com.tuoheng.admin.service.IMissionService;
import com.tuoheng.common.exception.ServiceException;
import com.tuoheng.common.utils.JsonResult;
import com.tuoheng.common.utils.StringUtils;
import com.tuoheng.system.utils.ShiroUtils;
import io.swagger.annotations.ApiImplicitParam;
import io.swagger.annotations.ApiOperation;
@@ -70,6 +71,10 @@ public class MissionController {
if(request.getName().length()>100){
throw new ServiceException(HttpStatus.SC_BAD_REQUEST,"任务名称长度不能超过100");
}

if(StringUtils.isNotEmpty(request.getNote()) && request.getNote().length()>200){
throw new ServiceException(HttpStatus.SC_BAD_REQUEST,"备注最多输入200个字");
}
}

/**

Notiek ielāde…
Atcelt
Saglabāt