Browse Source

备注只能输入200字

tags/v1.1.0
qiujinyang 2 years ago
parent
commit
ea51674dca
1 changed files with 5 additions and 0 deletions
  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 View File

@@ -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个字");
}
}

/**

Loading…
Cancel
Save