Commit 88c2c599 by guojuxing

用户详情接口

parent 73e5ba1b
......@@ -71,4 +71,6 @@ public interface UserApiService {
* @return com.gic.api.base.commons.ServiceResponse<java.util.List<com.gic.cloud.dto.UserDTO>>


*/
ServiceResponse<List<UserDTO>> listUserByPhone(String nationCode, String phone);
ServiceResponse<UserDTO> getUser(Integer userId);
}
......@@ -88,6 +88,11 @@ public class UserApiServiceImpl implements UserApiService{
return ServiceResponse.success(Collections.emptyList());
}
@Override
public ServiceResponse<UserDTO> getUser(Integer userId) {
return ServiceResponse.success(EntityUtil.changeEntityNew(UserDTO.class, userService.getUser(userId)));
}
private ServiceResponse<Void> validParam(UserDTO dto) {
if (dto.getUserId() != null) {
TabSysUser record = userService.getUser(dto.getUserId());
......
......@@ -8,10 +8,7 @@ import com.gic.cloud.service.AccountGroupApiService;
import com.gic.cloud.service.FunctionApiService;
import com.gic.cloud.service.FunctionModuleApiService;
import com.gic.cloud.service.UserApiService;
import com.gic.cloud.web.vo.AccountGroupVO;
import com.gic.cloud.web.vo.FunctionListVO;
import com.gic.cloud.web.vo.FunctionModuleVO;
import com.gic.cloud.web.vo.UserVO;
import com.gic.cloud.web.vo.*;
import com.gic.commons.webapi.reponse.RestResponse;
import com.gic.enterprise.utils.ResultControllerUtils;
import com.gic.enterprise.utils.UserDetailUtils;
......@@ -77,6 +74,11 @@ public class UserController {
return ResultControllerUtils.commonResult(userApiService.editUser(dto));
}
@RequestMapping("/get-user-detail")
public RestResponse getUserDetail(Integer userId) {
return ResultControllerUtils.commonResult(userApiService.getUser(userId), UserDetailVO.class);
}
@RequestMapping("/delete-user")
public RestResponse deleteUser(Integer userId) {
return ResultControllerUtils.commonResult(userApiService.deleteUser(userId));
......
package com.gic.cloud.web.vo;
import java.io.Serializable;
public class UserDetailVO implements Serializable{
private static final long serialVersionUID = -8143187697602019230L;
/**
* ID
*/
private Integer userId;
/**
* 名称
*/
private String userName;
/**
* 手机号
*/
private String phone;
/**
* 手机号区号
*/
private String nationCode;
/**
* 账号分组ID
*/
private Integer accountGroupId;
/**
* 数据权限集ID
*/
private Integer dataAuthId;
/**
* 功能权限集ID
*/
private Integer functionAuthId;
public Integer getUserId() {
return userId;
}
public UserDetailVO setUserId(Integer userId) {
this.userId = userId;
return this;
}
public String getUserName() {
return userName;
}
public UserDetailVO setUserName(String userName) {
this.userName = userName;
return this;
}
public String getPhone() {
return phone;
}
public UserDetailVO setPhone(String phone) {
this.phone = phone;
return this;
}
public String getNationCode() {
return nationCode;
}
public UserDetailVO setNationCode(String nationCode) {
this.nationCode = nationCode;
return this;
}
public Integer getAccountGroupId() {
return accountGroupId;
}
public UserDetailVO setAccountGroupId(Integer accountGroupId) {
this.accountGroupId = accountGroupId;
return this;
}
public Integer getDataAuthId() {
return dataAuthId;
}
public UserDetailVO setDataAuthId(Integer dataAuthId) {
this.dataAuthId = dataAuthId;
return this;
}
public Integer getFunctionAuthId() {
return functionAuthId;
}
public UserDetailVO setFunctionAuthId(Integer functionAuthId) {
this.functionAuthId = functionAuthId;
return this;
}
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment