|
@@ -12,9 +12,9 @@ import com.fdkankan.manage.service.ISysUserService;
|
|
import com.fdkankan.manage.vo.request.SysUserParam;
|
|
import com.fdkankan.manage.vo.request.SysUserParam;
|
|
import com.fdkankan.manage.vo.response.ManageLoginResponse;
|
|
import com.fdkankan.manage.vo.response.ManageLoginResponse;
|
|
import com.fdkankan.manage.vo.response.SysUserVo;
|
|
import com.fdkankan.manage.vo.response.SysUserVo;
|
|
|
|
+import org.apache.commons.lang3.StringUtils;
|
|
import org.springframework.beans.BeanUtils;
|
|
import org.springframework.beans.BeanUtils;
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
-import org.springframework.util.StringUtils;
|
|
|
|
import org.springframework.web.bind.annotation.*;
|
|
import org.springframework.web.bind.annotation.*;
|
|
|
|
|
|
/**
|
|
/**
|
|
@@ -44,6 +44,10 @@ public class SysUserController extends BaseController{
|
|
|
|
|
|
@PostMapping("/add")
|
|
@PostMapping("/add")
|
|
public ResultData add(@RequestBody SysUserParam param){
|
|
public ResultData add(@RequestBody SysUserParam param){
|
|
|
|
+ if(StringUtils.isEmpty(param.getUserName()) || StringUtils.isEmpty(param.getPassword())
|
|
|
|
+ || StringUtils.isEmpty(param.getNickName()) || param.getRoleId() == null){
|
|
|
|
+ throw new BusinessException(ErrorCode.MISSING_REQUIRED_PARAMETERS);
|
|
|
|
+ }
|
|
param.setCreateUserId(getUserId());
|
|
param.setCreateUserId(getUserId());
|
|
sysUserService.addOrUpdate(param);
|
|
sysUserService.addOrUpdate(param);
|
|
return ResultData.ok();
|
|
return ResultData.ok();
|