人员新增、修改、查询 添加org_id字段
This commit is contained in:
parent
9366b6fd2c
commit
0902ca2bef
|
|
@ -6,6 +6,7 @@ import com.bonus.common.core.annotation.Excel.Type;
|
||||||
import com.bonus.common.core.annotation.Excels;
|
import com.bonus.common.core.annotation.Excels;
|
||||||
import com.bonus.common.core.web.domain.BaseEntity;
|
import com.bonus.common.core.web.domain.BaseEntity;
|
||||||
import com.bonus.common.core.xss.Xss;
|
import com.bonus.common.core.xss.Xss;
|
||||||
|
import lombok.Getter;
|
||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
import org.apache.commons.lang3.builder.ToStringBuilder;
|
import org.apache.commons.lang3.builder.ToStringBuilder;
|
||||||
import org.apache.commons.lang3.builder.ToStringStyle;
|
import org.apache.commons.lang3.builder.ToStringStyle;
|
||||||
|
|
@ -41,6 +42,11 @@ public class SysUser extends BaseEntity {
|
||||||
@Excel(name = "部门编号", type = Type.IMPORT)
|
@Excel(name = "部门编号", type = Type.IMPORT)
|
||||||
private Long deptId;
|
private Long deptId;
|
||||||
|
|
||||||
|
|
||||||
|
@Getter
|
||||||
|
@Excel(name = "组织编号", type = Type.IMPORT)
|
||||||
|
private Long orgId;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 公司ID
|
* 公司ID
|
||||||
*/
|
*/
|
||||||
|
|
@ -154,7 +160,11 @@ public class SysUser extends BaseEntity {
|
||||||
|
|
||||||
/**是否内置,0内置,1非内置*/
|
/**是否内置,0内置,1非内置*/
|
||||||
private String isBuiltIn = "1";
|
private String isBuiltIn = "1";
|
||||||
private Long orgId;
|
|
||||||
|
|
||||||
|
public void setOrgId(Long orgId) {
|
||||||
|
this.orgId = orgId;
|
||||||
|
}
|
||||||
|
|
||||||
public SysUser() {
|
public SysUser() {
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -26,6 +26,7 @@
|
||||||
<result property="approvalStatus" column="approval_status"/>
|
<result property="approvalStatus" column="approval_status"/>
|
||||||
<result property="isPermanent" column="is_permanent"/>
|
<result property="isPermanent" column="is_permanent"/>
|
||||||
<result property="isBuiltIn" column="is_built_in"/>
|
<result property="isBuiltIn" column="is_built_in"/>
|
||||||
|
<result property="orgId" column="org_id"/>
|
||||||
<association property="dept" javaType="SysDept" resultMap="deptResult"/>
|
<association property="dept" javaType="SysDept" resultMap="deptResult"/>
|
||||||
<collection property="roles" javaType="java.util.List" resultMap="RoleResult"/>
|
<collection property="roles" javaType="java.util.List" resultMap="RoleResult"/>
|
||||||
|
|
||||||
|
|
@ -54,6 +55,7 @@
|
||||||
select u.user_id,
|
select u.user_id,
|
||||||
u.dept_id,
|
u.dept_id,
|
||||||
u.dept_id as companyId,
|
u.dept_id as companyId,
|
||||||
|
u.org_id,
|
||||||
u.user_name,
|
u.user_name,
|
||||||
u.nick_name,
|
u.nick_name,
|
||||||
u.phonenumber,
|
u.phonenumber,
|
||||||
|
|
@ -90,7 +92,7 @@
|
||||||
</sql>
|
</sql>
|
||||||
|
|
||||||
<select id="selectUserList" parameterType="SysUser" resultMap="SysUserResult">
|
<select id="selectUserList" parameterType="SysUser" resultMap="SysUserResult">
|
||||||
select u.user_id, u.dept_id, u.nick_name, u.user_name, -- 手机号脱敏:保留前3位和后4位,中间用****替换
|
select u.user_id, u.dept_id, u.org_id,u.nick_name, u.user_name, -- 手机号脱敏:保留前3位和后4位,中间用****替换
|
||||||
CONCAT(LEFT(u.phonenumber, 3), '****', RIGHT(u.phonenumber, 4)) AS phonenumber,u.sex, u.status,
|
CONCAT(LEFT(u.phonenumber, 3), '****', RIGHT(u.phonenumber, 4)) AS phonenumber,u.sex, u.status,
|
||||||
u.del_flag, u.login_ip, u.login_date, u.create_by, u.create_time, u.remark,u.approval_status,u.is_permanent,u.is_built_in, d.dept_name,
|
u.del_flag, u.login_ip, u.login_date, u.create_by, u.create_time, u.remark,u.approval_status,u.is_permanent,u.is_built_in, d.dept_name,
|
||||||
d.leader,r.role_id,
|
d.leader,r.role_id,
|
||||||
|
|
@ -171,7 +173,7 @@
|
||||||
<!-- </select>-->
|
<!-- </select>-->
|
||||||
|
|
||||||
<select id="selectAllocatedList" parameterType="SysUser" resultMap="SysUserResult">
|
<select id="selectAllocatedList" parameterType="SysUser" resultMap="SysUserResult">
|
||||||
select distinct u.user_id, u.dept_id, u.user_name, u.nick_name, u.phonenumber, u.status, u.create_time,u.is_built_in
|
select distinct u.user_id, u.dept_id, u.org_id,u.user_name, u.nick_name, u.phonenumber, u.status, u.create_time,u.is_built_in
|
||||||
from sys_user u
|
from sys_user u
|
||||||
left join sys_dept d on u.dept_id = d.dept_id
|
left join sys_dept d on u.dept_id = d.dept_id
|
||||||
left join sys_user_role ur on u.user_id = ur.user_id
|
left join sys_user_role ur on u.user_id = ur.user_id
|
||||||
|
|
@ -188,7 +190,7 @@
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
<select id="selectUnallocatedList" parameterType="SysUser" resultMap="SysUserResult">
|
<select id="selectUnallocatedList" parameterType="SysUser" resultMap="SysUserResult">
|
||||||
select distinct u.user_id, u.dept_id, u.user_name, u.nick_name, u.phonenumber, u.status, u.create_time,u.is_built_in
|
select distinct u.user_id, u.dept_id, u.org_id,u.user_name, u.nick_name, u.phonenumber, u.status, u.create_time,u.is_built_in
|
||||||
from sys_user u
|
from sys_user u
|
||||||
left join sys_dept d on u.dept_id = d.dept_id
|
left join sys_dept d on u.dept_id = d.dept_id
|
||||||
left join sys_user_role ur on u.user_id = ur.user_id
|
left join sys_user_role ur on u.user_id = ur.user_id
|
||||||
|
|
@ -244,7 +246,7 @@
|
||||||
|
|
||||||
|
|
||||||
<select id="getList" parameterType="SysUser" resultMap="SysUserResult">
|
<select id="getList" parameterType="SysUser" resultMap="SysUserResult">
|
||||||
select u.user_id, u.dept_id, u.nick_name, u.user_name, u.phonenumber,u.sex, u.status,
|
select u.user_id, u.dept_id, u.org_id, u.nick_name, u.user_name, u.phonenumber,u.sex, u.status,
|
||||||
u.del_flag, u.login_ip, u.login_date, u.create_by, u.create_time, u.remark,u.approval_status,u.is_permanent,u.is_built_in, d.dept_name,
|
u.del_flag, u.login_ip, u.login_date, u.create_by, u.create_time, u.remark,u.approval_status,u.is_permanent,u.is_built_in, d.dept_name,
|
||||||
d.leader,r.role_id,
|
d.leader,r.role_id,
|
||||||
r.role_name,
|
r.role_name,
|
||||||
|
|
@ -311,6 +313,7 @@
|
||||||
<if test="approvalStatus != null and approvalStatus!=''">approval_status,</if>
|
<if test="approvalStatus != null and approvalStatus!=''">approval_status,</if>
|
||||||
<if test="isPermanent != null and isPermanent!=''">is_permanent,</if>
|
<if test="isPermanent != null and isPermanent!=''">is_permanent,</if>
|
||||||
<if test="isBuiltIn != null and isBuiltIn!=''">is_built_in,</if>
|
<if test="isBuiltIn != null and isBuiltIn!=''">is_built_in,</if>
|
||||||
|
<if test="orgId != null and orgId!=''">org_id,</if>
|
||||||
create_time
|
create_time
|
||||||
)values(
|
)values(
|
||||||
<if test="userId != null and userId != ''">#{userId},</if>
|
<if test="userId != null and userId != ''">#{userId},</if>
|
||||||
|
|
@ -327,6 +330,7 @@
|
||||||
<if test="approvalStatus != null and approvalStatus!=''">#{approvalStatus},</if>
|
<if test="approvalStatus != null and approvalStatus!=''">#{approvalStatus},</if>
|
||||||
<if test="isPermanent != null and isPermanent!=''">#{isPermanent},</if>
|
<if test="isPermanent != null and isPermanent!=''">#{isPermanent},</if>
|
||||||
<if test="isBuiltIn != null and isBuiltIn!=''">#{isBuiltIn},</if>
|
<if test="isBuiltIn != null and isBuiltIn!=''">#{isBuiltIn},</if>
|
||||||
|
<if test="orgId != null and orgId!=''">#{orgId},</if>
|
||||||
sysdate()
|
sysdate()
|
||||||
)
|
)
|
||||||
</insert>
|
</insert>
|
||||||
|
|
@ -348,6 +352,7 @@
|
||||||
<if test="loginType != null and loginType!=''">login_type = #{loginType},</if>
|
<if test="loginType != null and loginType!=''">login_type = #{loginType},</if>
|
||||||
<if test="isPermanent != null and isPermanent!=''">is_permanent = #{isPermanent},</if>
|
<if test="isPermanent != null and isPermanent!=''">is_permanent = #{isPermanent},</if>
|
||||||
<if test="isBuiltIn != null and isBuiltIn!=''">is_built_in = #{isBuiltIn},</if>
|
<if test="isBuiltIn != null and isBuiltIn!=''">is_built_in = #{isBuiltIn},</if>
|
||||||
|
<if test="orgId != null and orgId!=''">org_id = #{orgId},</if>
|
||||||
update_time = sysdate()
|
update_time = sysdate()
|
||||||
</set>
|
</set>
|
||||||
where user_id = #{userId}
|
where user_id = #{userId}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue