Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
C
cms
概览
概览
详情
活动
周期分析
版本库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
统计图
问题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程表
图表
维基
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
iuav
cms
Commits
df5887d9
提交
df5887d9
authored
7月 12, 2023
作者:
张小凤
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
RoleInfo(update)
上级
77fe8970
隐藏空白字符变更
内嵌
并排
正在显示
4 个修改的文件
包含
95 行增加
和
36 行删除
+95
-36
RoleInfoDTO.java
...rc/main/java/com/mmc/iuav/user/model/dto/RoleInfoDTO.java
+2
-0
RoleInfoDO.java
...er/src/main/java/com/mmc/iuav/user/entity/RoleInfoDO.java
+6
-0
BackUserAccountDao.xml
...ice-user/src/main/resources/mapper/BackUserAccountDao.xml
+78
-29
RoleDao.xml
...ce/cms-service-user/src/main/resources/mapper/RoleDao.xml
+9
-7
没有找到文件。
cms-common/cms-common-model/src/main/java/com/mmc/iuav/user/model/dto/RoleInfoDTO.java
浏览文件 @
df5887d9
...
...
@@ -29,5 +29,7 @@ public class RoleInfoDTO implements Serializable {
private
String
remark
;
@ApiModelProperty
(
value
=
"账号名称/创建人"
)
private
String
userName
;
@ApiModelProperty
(
value
=
"0不是超级管理员 1是超级管理员"
)
private
Integer
superAdmin
;
}
csm-service/cms-service-user/src/main/java/com/mmc/iuav/user/entity/RoleInfoDO.java
浏览文件 @
df5887d9
...
...
@@ -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
();
}
...
...
csm-service/cms-service-user/src/main/resources/mapper/BackUserAccountDao.xml
浏览文件 @
df5887d9
...
...
@@ -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>
csm-service/cms-service-user/src/main/resources/mapper/RoleDao.xml
浏览文件 @
df5887d9
...
...
@@ -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
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论