|
|
|
@ -35,7 +35,7 @@
|
|
|
|
|
role_id, dept_id, effective, create_date, creater, update_date, updater, remark,dept_code
|
|
|
|
|
</sql>
|
|
|
|
|
<select id="selectByPrimaryKey" parameterType="java.lang.Integer" resultMap="BaseResultMap">
|
|
|
|
|
select
|
|
|
|
|
select
|
|
|
|
|
<include refid="Base_Column_List" />
|
|
|
|
|
from power_user
|
|
|
|
|
where user_id = #{userId,jdbcType=INTEGER}
|
|
|
|
@ -46,17 +46,17 @@
|
|
|
|
|
</delete>
|
|
|
|
|
<insert id="insert" parameterType="com.manage.entity.Power_User">
|
|
|
|
|
insert into power_user (user_id, user_name,name, user_pwd,
|
|
|
|
|
user_sex, user_age, user_tel,
|
|
|
|
|
user_email, user_position, role_id,
|
|
|
|
|
dept_id, effective, create_date,
|
|
|
|
|
creater, update_date, updater,
|
|
|
|
|
user_sex, user_age, user_tel,
|
|
|
|
|
user_email, user_position, role_id,
|
|
|
|
|
dept_id, effective, create_date,
|
|
|
|
|
creater, update_date, updater,
|
|
|
|
|
remark)
|
|
|
|
|
values (#{userId,jdbcType=INTEGER}, #{userName,jdbcType=VARCHAR},#{name,jdbcType=VARCHAR},
|
|
|
|
|
#{userPwd,jdbcType=VARCHAR},
|
|
|
|
|
#{userSex,jdbcType=INTEGER}, #{userAge,jdbcType=INTEGER}, #{userTel,jdbcType=VARCHAR},
|
|
|
|
|
#{userEmail,jdbcType=VARCHAR}, #{userPosition,jdbcType=VARCHAR}, #{roleId,jdbcType=INTEGER},
|
|
|
|
|
#{deptId,jdbcType=VARCHAR}, #{effective,jdbcType=INTEGER}, #{createDate,jdbcType=CHAR},
|
|
|
|
|
#{creater,jdbcType=VARCHAR}, #{updateDate,jdbcType=CHAR}, #{updater,jdbcType=VARCHAR},
|
|
|
|
|
#{userSex,jdbcType=INTEGER}, #{userAge,jdbcType=INTEGER}, #{userTel,jdbcType=VARCHAR},
|
|
|
|
|
#{userEmail,jdbcType=VARCHAR}, #{userPosition,jdbcType=VARCHAR}, #{roleId,jdbcType=INTEGER},
|
|
|
|
|
#{deptId,jdbcType=VARCHAR}, #{effective,jdbcType=INTEGER}, #{createDate,jdbcType=CHAR},
|
|
|
|
|
#{creater,jdbcType=VARCHAR}, #{updateDate,jdbcType=CHAR}, #{updater,jdbcType=VARCHAR},
|
|
|
|
|
#{remark,jdbcType=VARCHAR})
|
|
|
|
|
</insert>
|
|
|
|
|
<insert id="insertSelective" parameterType="com.manage.entity.Power_User">
|
|
|
|
@ -552,31 +552,24 @@
|
|
|
|
|
group by user_id
|
|
|
|
|
</select>
|
|
|
|
|
<select id="selectUserIdAndUserNameList" resultMap="BaseResultMapVo">
|
|
|
|
|
SELECT
|
|
|
|
|
power_user_dict.user_id,
|
|
|
|
|
power_user.user_name,
|
|
|
|
|
power_user.role_id,
|
|
|
|
|
power_user.dept_id,
|
|
|
|
|
power_user.dept_code,
|
|
|
|
|
power_role.role_name,
|
|
|
|
|
power_user.user_tel,
|
|
|
|
|
power_user.user_wechat,
|
|
|
|
|
name
|
|
|
|
|
FROM
|
|
|
|
|
power_user_dict
|
|
|
|
|
INNER JOIN power_user ON power_user_dict.user_id = power_user.user_id AND power_user.effective = 1 AND power_user.role_id != 0
|
|
|
|
|
LEFT JOIN power_role ON power_user.role_id = power_role.role_id AND power_role.effective = 1
|
|
|
|
|
<if test="userId != null and userId != ''">
|
|
|
|
|
WHERE
|
|
|
|
|
dict_id = (
|
|
|
|
|
SELECT
|
|
|
|
|
dict_id
|
|
|
|
|
FROM
|
|
|
|
|
power_user_dict
|
|
|
|
|
WHERE
|
|
|
|
|
user_id = #{userId}
|
|
|
|
|
)
|
|
|
|
|
</if>
|
|
|
|
|
SELECT
|
|
|
|
|
power_user.user_id,
|
|
|
|
|
power_user.user_name,
|
|
|
|
|
power_user.role_id,
|
|
|
|
|
power_user.dept_id,
|
|
|
|
|
power_user.dept_code,
|
|
|
|
|
power_role.role_name,
|
|
|
|
|
power_user.user_tel,
|
|
|
|
|
power_user.user_wechat,
|
|
|
|
|
NAME
|
|
|
|
|
FROM
|
|
|
|
|
power_user
|
|
|
|
|
LEFT JOIN power_role ON power_user.role_id = power_role.role_id
|
|
|
|
|
AND power_role.effective = 1
|
|
|
|
|
where power_user.effective = 1
|
|
|
|
|
<if test="userId != null">
|
|
|
|
|
AND user_id = #{userId}
|
|
|
|
|
</if>
|
|
|
|
|
</select>
|
|
|
|
|
<!--查询各表无效数-->
|
|
|
|
|
<select id="selectEffectiveCount" resultType="java.lang.Integer">
|
|
|
|
|