Merge remote-tracking branch 'origin/main' into main

main
SondonYong 2025-11-10 16:19:44 +08:00
commit 8ea23c9a59
6 changed files with 36 additions and 2 deletions

View File

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

View File

@ -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());

View File

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

View File

@ -103,5 +103,10 @@ public class UserServiceImpl implements UserServiceI {
return userQueryExe.executeVerifyUser(userVerifyQryCmd);
}
@Override
public SingleResponse<UserCO> getInfoBySession() {
return userQueryExe.executeGetInfoBySession();
}
}

View File

@ -42,7 +42,7 @@ public interface UserServiceI {
SingleResponse<UserCO> getInfoById(Long id);
Response verifyUser(UserVerifyQryCmd userVerifyQryCmd);
SingleResponse<UserCO> getInfoBySession();
UserCO getInfoByUserId(Long aLong);
}

View File

@ -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;
}