新增获取当前登录用户信息接口
parent
53cec84911
commit
00d9e941a7
|
|
@ -88,6 +88,11 @@ public class UserController {
|
|||
public SingleResponse<UserCO> getInfoById(@PathVariable("id") Long id) {
|
||||
return userService.getInfoById(id);
|
||||
}
|
||||
@ApiOperation("获取当前登录人信息")
|
||||
@GetMapping("/getInfo")
|
||||
public SingleResponse<UserCO> getInfo() {
|
||||
return userService.getInfoBySession();
|
||||
}
|
||||
|
||||
@ApiOperation("删除")
|
||||
@DeleteMapping("/{id}")
|
||||
|
|
|
|||
|
|
@ -42,6 +42,7 @@ public class UserUpdateExe {
|
|||
public void execute(UserUpdateCmd userUpdateCmd) {
|
||||
UserE userE = new UserE();
|
||||
BeanUtils.copyProperties(userUpdateCmd, userE);
|
||||
// 对比用户老数据与要修改数据,查看是否涉及调岗及入职
|
||||
UserDO userDO = userRepository.getInfoById(userUpdateCmd.getId());
|
||||
UserE oldUserE = new UserE();
|
||||
BeanUtils.copyProperties(userDO, oldUserE);
|
||||
|
|
@ -51,6 +52,7 @@ public class UserUpdateExe {
|
|||
boolean res = false;
|
||||
try {
|
||||
res = userGateway.update(userE);
|
||||
// 保存履职记录
|
||||
if (transferPositionFlag) {
|
||||
UserEmploymentLogE userEmploymentLogE = new UserEmploymentLogE();
|
||||
CorpInfoDO corpInfoDO = corpInfoRepository.getById(userE.getCorpinfoId());
|
||||
|
|
|
|||
|
|
@ -5,6 +5,8 @@ import com.alibaba.cola.dto.PageResponse;
|
|||
import com.alibaba.cola.dto.Response;
|
||||
import com.alibaba.cola.dto.SingleResponse;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import com.jjb.saas.framework.auth.model.SSOUser;
|
||||
import com.jjb.saas.framework.auth.utils.AuthContext;
|
||||
import com.zcloud.basic.info.command.convertor.UserCoConvertor;
|
||||
import com.zcloud.basic.info.domain.gateway.UserGateway;
|
||||
import com.zcloud.basic.info.domain.model.UserE;
|
||||
|
|
@ -127,5 +129,22 @@ public class UserQueryExe {
|
|||
UserE userE = new UserE();
|
||||
userE.exportUserTable(httpServletResponse, userExcelExportEntities);
|
||||
}
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* 详情
|
||||
*
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
public SingleResponse<UserCO> executeGetInfoBySession() {
|
||||
SSOUser ssoUser = AuthContext.getCurrentUser();
|
||||
Long id = ssoUser.getUserId();
|
||||
UserDO userDO = userRepository.getInfoById(id);
|
||||
UserCO userCO = new UserCO();
|
||||
BeanUtils.copyProperties(userDO, userCO);
|
||||
return SingleResponse.of(userCO);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -103,5 +103,10 @@ public class UserServiceImpl implements UserServiceI {
|
|||
return userQueryExe.executeVerifyUser(userVerifyQryCmd);
|
||||
}
|
||||
|
||||
@Override
|
||||
public SingleResponse<UserCO> getInfoBySession() {
|
||||
return userQueryExe.executeGetInfoBySession();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -42,7 +42,7 @@ public interface UserServiceI {
|
|||
SingleResponse<UserCO> getInfoById(Long id);
|
||||
Response verifyUser(UserVerifyQryCmd userVerifyQryCmd);
|
||||
|
||||
|
||||
SingleResponse<UserCO> getInfoBySession();
|
||||
|
||||
UserCO getInfoByUserId(Long aLong);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -23,6 +23,9 @@ public class UserEmploymentLogPageQry extends PageQuery {
|
|||
* - `le`: 小于等于比较查询
|
||||
* - `ne`: 不等比较查询,对应SQL的!=操作符
|
||||
*/
|
||||
private String likeUserEmploymentLogId;
|
||||
private Long eqUserId;
|
||||
private Long eqCorpinfoId;
|
||||
private Long eqDepartmentId;
|
||||
private Long eqPostId;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue