feat(domain): 添加企业信息字段到部门用户关联对象

master
zhaokai 2026-03-16 11:09:05 +08:00
parent 01af3b1305
commit 05c27803c5
3 changed files with 20 additions and 2 deletions

View File

@ -1,6 +1,7 @@
package com.zcloud.domain.dto.clientobject; package com.zcloud.domain.dto.clientobject;
import com.alibaba.cola.dto.ClientObject; import com.alibaba.cola.dto.ClientObject;
import com.baomidou.mybatisplus.annotation.TableField;
import io.swagger.annotations.ApiModelProperty; import io.swagger.annotations.ApiModelProperty;
import lombok.Data; import lombok.Data;
@ -35,5 +36,12 @@ public class DomainDepartmentUserCO {
@ApiModelProperty(value = "人员名称") @ApiModelProperty(value = "人员名称")
private String userName; private String userName;
//企业id
@ApiModelProperty(value = "企业id")
private Long corpinfoId;
//企业名称
@ApiModelProperty(value = "企业名称")
private String corpinfoName;
} }

View File

@ -38,6 +38,14 @@ public class DomainDepartmentUserDO extends BaseDO {
@ApiModelProperty(value = "人员名称") @ApiModelProperty(value = "人员名称")
@TableField(exist = false) @TableField(exist = false)
private String userName; private String userName;
//企业id
@ApiModelProperty(value = "企业id")
@TableField(exist = false)
private Long corpinfoId;
//企业名称
@ApiModelProperty(value = "企业名称")
@TableField(exist = false)
private String corpinfoName;
public DomainDepartmentUserDO(String domainDepartmentUserId) { public DomainDepartmentUserDO(String domainDepartmentUserId) {
this.domainDepartmentUserId = domainDepartmentUserId; this.domainDepartmentUserId = domainDepartmentUserId;

View File

@ -4,9 +4,10 @@
<mapper namespace="com.zcloud.domain.persistence.mapper.DomainDepartmentUserMapper"> <mapper namespace="com.zcloud.domain.persistence.mapper.DomainDepartmentUserMapper">
<select id="getListByDomainDepartmentId" resultType="com.zcloud.domain.persistence.dataobject.DomainDepartmentUserDO"> <select id="getListByDomainDepartmentId" resultType="com.zcloud.domain.persistence.dataobject.DomainDepartmentUserDO">
select ddu.*, d.name as departmentname, u.name as username select ddu.*, d.name as departmentname, u.name as username,c.corp_name as corpinfoName,c.id as corpinfoId
from domain_department_user ddu from domain_department_user ddu
left join department d on ddu.department_id = d.id left join department d on ddu.department_id = d.id
left join corp_info c on d.corpinfo_id = c.id
left join user u on ddu.user_id = u.id left join user u on ddu.user_id = u.id
where ddu.delete_enum = 'false' where ddu.delete_enum = 'false'
and ddu.domain_department_id = #{domainDepartmentId} and ddu.domain_department_id = #{domainDepartmentId}
@ -14,9 +15,10 @@
</select> </select>
<select id="listPage" resultType="com.zcloud.domain.persistence.dataobject.DomainDepartmentUserDO"> <select id="listPage" resultType="com.zcloud.domain.persistence.dataobject.DomainDepartmentUserDO">
select ddu.*, d.name as departmentname, u.name as username select ddu.*, d.name as departmentname, u.name as username,c.corp_name as corpinfoName,c.id as corpinfoId
from domain_department_user ddu from domain_department_user ddu
left join department d on ddu.department_id = d.id left join department d on ddu.department_id = d.id
left join corp_info c on d.corpinfo_id = c.id
left join user u on ddu.user_id = u.id left join user u on ddu.user_id = u.id
where ddu.delete_enum = 'false' where ddu.delete_enum = 'false'
and ddu.domain_department_id = #{params.domainDepartmentId} and ddu.domain_department_id = #{params.domainDepartmentId}