feat: REQ-1650 角色ID查询人员列表
This commit is contained in:
parent
d9d582b117
commit
9aeb17c480
@ -1,7 +1,7 @@
|
||||
CREATE TABLE IF NOT EXISTS plat_user_role_job_change
|
||||
(
|
||||
id bigint auto_increment comment '主键',
|
||||
axzo_user_id bigint default 0 not null comment '安心筑id',
|
||||
person_id bigint default 0 not null comment '安心筑personId',
|
||||
request_id varchar(64) default 0 not null comment '请求ID',
|
||||
change_type varchar(20) default '' not null comment '变更类型',
|
||||
change_detail varchar(256) default '' not null comment '变更详情',
|
||||
@ -14,4 +14,4 @@ CREATE TABLE IF NOT EXISTS plat_user_role_job_change
|
||||
) ENGINE = InnoDB
|
||||
DEFAULT CHARSET = utf8 comment '平台账户角色岗位变动记录';
|
||||
create index idx_plat_user_role_job_change
|
||||
on plat_user_role_job_change (axzo_user_id, operator_time);
|
||||
on plat_user_role_job_change (person_id, operator_time);
|
||||
|
||||
@ -20,10 +20,10 @@ import java.util.Date;
|
||||
public class PlatAccountChangeQuery extends PageRequest {
|
||||
|
||||
/**
|
||||
* 安心筑id
|
||||
* 安心筑personId
|
||||
*/
|
||||
@NotNull(message = "axzoUserId is required")
|
||||
private Long axzoUserId;
|
||||
@NotNull(message = "personId is required")
|
||||
private Long personId;
|
||||
|
||||
|
||||
}
|
||||
@ -15,15 +15,29 @@ import java.util.List;
|
||||
@Data
|
||||
public class RoleWithUserQueryReq extends PageRequest {
|
||||
|
||||
/** 查询关键字 **/
|
||||
/**
|
||||
* 查询关键字
|
||||
**/
|
||||
private String keyword;
|
||||
|
||||
/** 企业组织ID **/
|
||||
/**
|
||||
* 企业组织ID
|
||||
**/
|
||||
private Long ouId;
|
||||
|
||||
/** 工作台ID **/
|
||||
/**
|
||||
* 工作台ID
|
||||
**/
|
||||
private Long workspaceId;
|
||||
|
||||
/** 企业工作台参建类型 **/
|
||||
/**
|
||||
* 企业工作台参建类型
|
||||
**/
|
||||
private Integer workspaceJoinType;
|
||||
|
||||
/**
|
||||
* 角色ID
|
||||
**/
|
||||
private Long roleId;
|
||||
|
||||
}
|
||||
|
||||
@ -22,9 +22,9 @@ import java.util.Date;
|
||||
public class PlatAccountChangeLogResp {
|
||||
|
||||
/**
|
||||
* 安心筑id
|
||||
* 安心筑用户personId
|
||||
*/
|
||||
private Long axzoUserId;
|
||||
private Long personId;
|
||||
|
||||
/**
|
||||
* requestId
|
||||
|
||||
@ -29,10 +29,10 @@ import java.util.Map;
|
||||
public class PlatUserAccountChangeLog extends BaseEntity<PlatUserAccountChangeLog> {
|
||||
|
||||
/**
|
||||
* 安心筑id
|
||||
* 安心筑personId
|
||||
*/
|
||||
@TableField(value = "axzo_user_id")
|
||||
private Long axzoUserId;
|
||||
@TableField(value = "person_id")
|
||||
private Long personId;
|
||||
|
||||
/**
|
||||
* 请求Id
|
||||
|
||||
@ -51,11 +51,11 @@ public class PlatUserRoleChangeService {
|
||||
}
|
||||
|
||||
public ApiPageResult<PlatAccountChangeLogResp> queryPlatUserAccountChangeLog(PlatAccountChangeQuery platAccountChangeQuery) {
|
||||
if (platAccountChangeQuery.getAxzoUserId() == null) {
|
||||
if (platAccountChangeQuery.getPersonId() == null) {
|
||||
throw new ServiceException("axzoUserId不能为空!");
|
||||
}
|
||||
IPage<PlatUserAccountChangeLog> page = userRoleChangeDao.lambdaQuery()
|
||||
.eq(PlatUserAccountChangeLog::getAxzoUserId, platAccountChangeQuery.getAxzoUserId())
|
||||
.eq(PlatUserAccountChangeLog::getPersonId, platAccountChangeQuery.getPersonId())
|
||||
.page(platAccountChangeQuery.toPage());
|
||||
List<PlatAccountChangeLogResp> list = BeanMapper.copyList(page.getRecords(), PlatAccountChangeLogResp.class);
|
||||
PageResp<PlatAccountChangeLogResp> data = PageResp.list(page.getCurrent(), page.getSize(), page.getTotal(), list);
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
Loading…
Reference in New Issue
Block a user