提交 df5887d9 作者: 张小凤

RoleInfo(update)

上级 77fe8970
......@@ -29,5 +29,7 @@ public class RoleInfoDTO implements Serializable {
private String remark;
@ApiModelProperty(value = "账号名称/创建人")
private String userName;
@ApiModelProperty(value = "0不是超级管理员 1是超级管理员")
private Integer superAdmin;
}
......@@ -71,6 +71,11 @@ public class RoleInfoDO {
List<MenuInfoDO> menuInfoDOList;
/**
* 0不是超级管理员 1是超级管理员
*/
private Integer superAdmin;
/**
* DTO转换
*
* @return
......@@ -78,6 +83,7 @@ public class RoleInfoDO {
public RoleInfoDTO buildRoleInfoDTO() {
return RoleInfoDTO.builder().id(this.id).roleNo(this.roleNo).roleName(this.roleName)
.userName(this.userName)
.superAdmin(this.superAdmin)
.remark(this.remark).build();
}
......
......@@ -21,9 +21,12 @@
<result property="updateTime" column="update_time"/>
</resultMap>
<insert id="insertBackUserAccount" parameterType="com.mmc.iuav.user.entity.BackUserAccountDO" keyProperty="id" useGeneratedKeys="true">
insert into back_user_account( account_no, pass_word, phone_num, user_name, user_sex, email, province_code, city_code, district_code, address, remark, create_time)
values(#{accountNo}, #{password}, #{phoneNum}, #{userName}, #{userSex}, #{email}, #{provinceCode}, #{cityCode}, #{districtCode}, #{address}, #{remark}, NOW())
<insert id="insertBackUserAccount" parameterType="com.mmc.iuav.user.entity.BackUserAccountDO" keyProperty="id"
useGeneratedKeys="true">
insert into back_user_account(account_no, pass_word, phone_num, user_name, user_sex, email, province_code,
city_code, district_code, address, remark, create_time)
values (#{accountNo}, #{password}, #{phoneNum}, #{userName}, #{userSex}, #{email}, #{provinceCode}, #{cityCode},
#{districtCode}, #{address}, #{remark}, NOW())
</insert>
<update id="updateBackUserAccount">
......@@ -69,64 +72,111 @@
</update>
<update id="removeBackUserAccountDO">
update back_user_account set is_deleted = 1 where is_deleted = 0 and id = #{id}
update back_user_account
set is_deleted = 1
where is_deleted = 0
and id = #{id}
</update>
<update id="updatePassword">
update back_user_account set pass_word = #{passWord} where id = #{id}
update back_user_account
set pass_word = #{passWord}
where id = #{id}
</update>
<select id="getBackUserAccountDO" resultType="com.mmc.iuav.user.entity.BackUserAccountDO">
select id, account_no, phone_num, user_name, user_sex, email, account_status, remark, province_code, city_code, district_code, address, is_deleted, create_time, update_time
select id,
account_no,
phone_num,
user_name,
user_sex,
email,
account_status,
remark,
province_code,
city_code,
district_code,
address,
is_deleted,
create_time,
update_time
from back_user_account
where id = #{id}
</select>
<select id="countListBackUserAccount" resultType="java.lang.Integer" parameterType="com.mmc.iuav.user.model.qo.BUserAccountQO">
select count(*) from back_user_account
where is_deleted = 0
<select id="countListBackUserAccount" resultType="java.lang.Integer"
parameterType="com.mmc.iuav.user.model.qo.BUserAccountQO">
select count(*) from back_user_account bua
left join user_role_rel urr on urr.user_account_id=bua.id
where bua.is_deleted = 0
<if test=" keyword != null and keyword != '' ">
and ( account_no like CONCAT("%",#{keyword},"%") or
user_name like CONCAT("%",#{keyword},"%") )
and ( bua.account_no like CONCAT("%",#{keyword},"%") or
bua.user_name like CONCAT("%",#{keyword},"%") )
</if>
<if test="provinceCode != null">
and province_code = #{provinceCode}
and bua.province_code = #{provinceCode}
</if>
<if test="cityCode != null">
and city_code = #{cityCode}
and bua.city_code = #{cityCode}
</if>
<if test="districtCode != null">
and district_code = #{districtCode}
and bua.district_code = #{districtCode}
</if>
<if test="accountStatus != null">
and account_status = #{accountStatus}
and bua.account_status = #{accountStatus}
</if>
<if test="roleId != null">
and urr.role_id = #{roleId}
</if>
</select>
<select id="listBackUserAccount" resultMap="backUserAccountResultMap" parameterType="com.mmc.iuav.user.model.qo.BUserAccountQO">
select id, account_no, phone_num, user_name, user_sex, email, account_status, province_code, city_code, district_code, address, remark, create_time, update_time
from back_user_account
where is_deleted = 0
<select id="listBackUserAccount" resultMap="backUserAccountResultMap"
parameterType="com.mmc.iuav.user.model.qo.BUserAccountQO">
SELECT
bua.id,
bua.account_no,
bua.phone_num,
bua.user_name,
bua.user_sex,
bua.email,
bua.account_status,
bua.province_code,
bua.city_code,
bua.district_code,
bua.address,
bua.remark,
bua.create_time,
bua.update_time
FROM
back_user_account bua
left join user_role_rel urr on urr.user_account_id=bua.id
WHERE
bua.is_deleted = 0
<if test=" keyword != null and keyword != '' ">
and ( account_no like CONCAT("%",#{keyword},"%") or
user_name like CONCAT("%",#{keyword},"%") )
and ( bua.account_no like CONCAT("%",#{keyword},"%") or
bua.user_name like CONCAT("%",#{keyword},"%") )
</if>
<if test="provinceCode != null">
and province_code = #{provinceCode}
and bua.province_code = #{provinceCode}
</if>
<if test="cityCode != null">
and city_code = #{cityCode}
and bua.city_code = #{cityCode}
</if>
<if test="districtCode != null">
and district_code = #{districtCode}
and bua.district_code = #{districtCode}
</if>
<if test="accountStatus != null">
and account_status = #{accountStatus}
and bua.account_status = #{accountStatus}
</if>
<if test="roleId != null">
and urr.role_id = #{roleId}
</if>
</select>
<select id="feignListBackUserAccount" resultMap="backUserAccountResultMap" parameterType="com.mmc.iuav.user.model.qo.BUserAccountQO">
select ua.id, ua.account_no, ua.phone_num, ua.user_name, ua.user_sex, ua.email, ua.account_status, ua.remark, ua.is_deleted as deleted, ua.create_time, ua.update_time
<select id="feignListBackUserAccount" resultMap="backUserAccountResultMap"
parameterType="com.mmc.iuav.user.model.qo.BUserAccountQO">
select ua.id, ua.account_no, ua.phone_num, ua.user_name, ua.user_sex, ua.email, ua.account_status, ua.remark,
ua.is_deleted as deleted, ua.create_time, ua.update_time
from back_user_account ua
where ua.is_deleted = 0
<if test=" userIds != null ">
......@@ -181,4 +231,4 @@
</if>
</select>
</mapper>
\ No newline at end of file
</mapper>
......@@ -18,6 +18,7 @@
<result property="userName" column="user_name"/>
<result property="updateTime" column="update_time"/>
<result property="userName" column="user_name"/>
<result property="superAdmin" column="super_admin"/>
</resultMap>
......@@ -133,7 +134,7 @@
SELECT count(*)
FROM
role_info r
INNER JOIN user_account ua ON r.user_account_id = ua.id
INNER JOIN back_user_account ua ON r.user_account_id = ua.id
WHERE
r.is_deleted =0
<if test=" NumberOrName != null and NumberOrName != '' ">
......@@ -152,11 +153,12 @@
r.remark,
r.create_time,
r.user_account_id,
r.super_admin,
ua.user_name,
r.update_time
FROM
role_info r
INNER JOIN user_account ua ON r.user_account_id = ua.id
INNER JOIN back_user_account ua ON r.user_account_id = ua.id
WHERE
r.is_deleted =0
<if test=" NumberOrName != null and NumberOrName != '' ">
......@@ -176,11 +178,11 @@
</select>
<select id="listRoleMenuInfo" resultType="com.mmc.iuav.user.entity.MenuInfoDO">
select m.id,m.pid,m.menu_name,m.dom_type,m.path_info
from menu_info m
inner join menu_role_rel mr on mr.menu_id=m.id
where mr.role_id = #{roleId}
order by m.sort ASC
select m.id, m.pid, m.menu_name, m.dom_type, m.path_info
from menu_info m
inner join menu_role_rel mr on mr.menu_id = m.id
where mr.role_id = #{roleId}
order by m.sort ASC
</select>
<select id="findList" resultType="java.lang.String">
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论