Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
F
fill-system
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
廖旭伟
fill-system
Commits
07bf526b
Commit
07bf526b
authored
Apr 24, 2025
by
赵啸非
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
添加新的菜单权限模块
parent
02ef50a8
Pipeline
#2943
canceled with stages
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
0 additions
and
238 deletions
+0
-238
fill-manager/src/main/resources/sqlmap/base/system/roleUser.xml
...anager/src/main/resources/sqlmap/base/system/roleUser.xml
+0
-238
No files found.
fill-manager/src/main/resources/sqlmap/base/system/roleUser.xml
deleted
100644 → 0
View file @
02ef50a8
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
"mybatis-3-mapper.dtd">
<mapper
namespace=
"com.mortals.xhx.base.system.role.dao.ibatis.RoleUserDaoImpl"
>
<!-- 字段和属性映射 -->
<resultMap
type=
"RoleUserEntity"
id=
"RoleUserEntity-Map"
>
<result
property=
"id"
column=
"id"
/>
<result
property=
"roleId"
column=
"roleId"
/>
<result
property=
"userId"
column=
"userId"
/>
</resultMap>
<!-- 表所有列 -->
<sql
id=
"_columns"
>
<trim
suffixOverrides=
","
suffix=
""
>
<if
test=
"(data == null) or (data != null and ( colPickMode == 0 and !data.containsKey('id') or colPickMode == 1 and data.containsKey('id')))"
>
a.id as id,
</if>
<if
test=
"(data == null) or (data != null and ( colPickMode == 0 and !data.containsKey('roleId') or colPickMode == 1 and data.containsKey('roleId')))"
>
a.roleId as roleId,
</if>
<if
test=
"(data == null) or (data != null and ( colPickMode == 0 and !data.containsKey('userId') or colPickMode == 1 and data.containsKey('userId')))"
>
a.userId as userId,
</if>
</trim>
</sql>
<!-- 新增 -->
<insert
id=
"insert"
parameterType=
"RoleUserEntity"
useGeneratedKeys=
"true"
keyProperty=
"id"
>
insert into mortals_xhx_role_user
(roleId,userId
)VALUES(#{roleId},#{userId})
</insert>
<!-- 批量新增 -->
<insert
id=
"insertBatch"
parameterType=
"paramDto"
>
insert into mortals_xhx_role_user
(roleId,userId
)
VALUES
<foreach
collection=
"data.dataList"
item=
"item"
index=
"index"
separator=
","
>
(#{item.roleId},#{item.userId})
</foreach>
</insert>
<!-- 根据ParamDto更新 -->
<update
id=
"update"
parameterType=
"paramDto"
>
update mortals_xhx_role_user as a
set
<trim
suffixOverrides=
","
suffix=
""
>
<if
test=
"(colPickMode==0 and data.containsKey('roleId')) or (colPickMode==1 and !data.containsKey('roleId'))"
>
a.roleId=#{data.roleId},
</if>
<if
test=
"(colPickMode==0 and data.containsKey('roleIdIncrement')) or (colPickMode==1 and !data.containsKey('roleIdIncrement'))"
>
a.roleId=ifnull(a.roleId,0) + #{data.roleIdIncrement},
</if>
<if
test=
"(colPickMode==0 and data.containsKey('userId')) or (colPickMode==1 and !data.containsKey('userId'))"
>
a.userId=#{data.userId},
</if>
<if
test=
"(colPickMode==0 and data.containsKey('userIdIncrement')) or (colPickMode==1 and !data.containsKey('userIdIncrement'))"
>
a.userId=ifnull(a.userId,0) + #{data.userIdIncrement},
</if>
</trim>
<trim
suffixOverrides=
"where"
suffix=
""
>
where
<trim
prefixOverrides=
"and"
prefix=
""
>
<include
refid=
"_condition_"
/>
</trim>
</trim>
</update>
<!-- 根据主健查询 -->
<select
id=
"getByKey"
parameterType=
"paramDto"
resultMap=
"RoleUserEntity-Map"
>
select
<include
refid=
"_columns"
/>
from mortals_xhx_role_user as a
where a.id=#{condition.id}
</select>
<!-- 根据主健删除 -->
<delete
id=
"deleteByKey"
parameterType=
"paramDto"
>
delete a.* from mortals_xhx_role_user as a where a.id=#{condition.id}
</delete>
<!-- 根据主健删除一批,针对单一主健有效 -->
<delete
id=
"deleteByKeys"
>
delete from mortals_xhx_role_user where id in
<foreach
collection=
"array"
item=
"item"
index=
"index"
open=
"("
separator=
","
close=
")"
>
#{item}
</foreach>
</delete>
<!-- 根据paramDto删除一批 -->
<delete
id=
"deleteByMap"
parameterType=
"paramDto"
>
delete a.* from mortals_xhx_role_user as a
<trim
suffixOverrides=
"where"
suffix=
""
>
where
<trim
prefixOverrides=
"and"
prefix=
""
>
<include
refid=
"_condition_"
/>
</trim>
</trim>
</delete>
<!-- 获取列表 -->
<select
id=
"getList"
parameterType=
"paramDto"
resultMap=
"RoleUserEntity-Map"
>
select
<include
refid=
"_columns"
/>
from mortals_xhx_role_user as a
<trim
suffixOverrides=
"where"
suffix=
""
>
where
<trim
prefixOverrides=
"and"
prefix=
""
>
<include
refid=
"_condition_"
/>
</trim>
</trim>
<include
refid=
"_orderCols_"
/>
</select>
<!-- 获取 -->
<select
id=
"getListCount"
parameterType=
"paramDto"
resultType=
"int"
>
select count(1)
from mortals_xhx_role_user as a
<trim
suffixOverrides=
"where"
suffix=
""
>
where
<trim
prefixOverrides=
"and"
prefix=
""
>
<include
refid=
"_condition_"
/>
</trim>
</trim>
</select>
<!-- 条件映射 -->
<sql
id=
"_condition_"
>
<if
test=
"condition != null and !condition.isEmpty()"
>
<if
test=
"condition.containsKey('id')"
>
<if
test=
"condition.id != null"
>
and a.id=#{condition.id}
</if>
</if>
<if
test=
"condition.containsKey('id')"
>
<if
test=
"condition.id != null "
>
and a.id = #{condition.id}
</if>
<if
test=
"condition.id == null"
>
and a.id is null
</if>
</if>
<if
test=
"condition.containsKey('idList')"
>
and a.id in
<foreach
collection=
"condition.idList"
open=
"("
close=
")"
index=
"index"
item=
"item"
separator=
","
>
#{item}
</foreach>
</if>
<if
test=
"condition.containsKey('idStart') and condition.idStart != null"
>
<![CDATA[ and a.id >= #{condition.idStart} ]]>
</if>
<if
test=
"condition.containsKey('idEnd') and condition.idEnd != null"
>
<![CDATA[ and a.id <= #{condition.idEnd} ]]>
</if>
<if
test=
"condition.containsKey('roleId')"
>
<if
test=
"condition.roleId != null "
>
and a.roleId = #{condition.roleId}
</if>
<if
test=
"condition.roleId == null"
>
and a.roleId is null
</if>
</if>
<if
test=
"condition.containsKey('roleIdList')"
>
and a.roleId in
<foreach
collection=
"condition.roleIdList"
open=
"("
close=
")"
index=
"index"
item=
"item"
separator=
","
>
#{item}
</foreach>
</if>
<if
test=
"condition.containsKey('roleIdStart') and condition.roleIdStart != null"
>
<![CDATA[ and a.roleId >= #{condition.roleIdStart} ]]>
</if>
<if
test=
"condition.containsKey('roleIdEnd') and condition.roleIdEnd != null"
>
<![CDATA[ and a.roleId <= #{condition.roleIdEnd} ]]>
</if>
<if
test=
"condition.containsKey('userId')"
>
<if
test=
"condition.userId != null "
>
and a.userId = #{condition.userId}
</if>
<if
test=
"condition.userId == null"
>
and a.userId is null
</if>
</if>
<if
test=
"condition.containsKey('userIdList')"
>
and a.userId in
<foreach
collection=
"condition.userIdList"
open=
"("
close=
")"
index=
"index"
item=
"item"
separator=
","
>
#{item}
</foreach>
</if>
<if
test=
"condition.containsKey('userIdStart') and condition.userIdStart != null"
>
<![CDATA[ and a.userId >= #{condition.userIdStart} ]]>
</if>
<if
test=
"condition.containsKey('userIdEnd') and condition.userIdEnd != null"
>
<![CDATA[ and a.userId <= #{condition.userIdEnd} ]]>
</if>
</if>
</sql>
<sql
id=
"_orderCols_"
>
<if
test=
"orderColList != null and !orderColList.isEmpty()"
>
order by
<trim
suffixOverrides=
","
suffix=
""
>
<foreach
collection=
"orderColList"
open=
""
close=
""
index=
"index"
item=
"item"
separator=
","
>
${item.colName} ${item.sortKind}
</foreach>
</trim>
</if>
<if
test=
"(orderColList == null or orderColList.isEmpty()) and orderCol != null and !orderCol.isEmpty()"
>
order by
<trim
suffixOverrides=
","
suffix=
""
>
<if
test=
"orderCol.containsKey('id')"
>
a.id
<if
test=
"orderCol.id!= null"
>
${orderCol.id}
</if>
,
</if>
<if
test=
"orderCol.containsKey('roleId')"
>
a.roleId
<if
test=
"orderCol.roleId!= null"
>
${orderCol.roleId}
</if>
,
</if>
<if
test=
"orderCol.containsKey('userId')"
>
a.userId
<if
test=
"orderCol.userId!= null"
>
${orderCol.userId}
</if>
,
</if>
</trim>
</if>
</sql>
<sql
id=
"_group_by_"
>
<if
test=
"groupList != null and !groupList.isEmpty()"
>
GROUP BY
<trim
suffixOverrides=
","
suffix=
""
>
<foreach
collection=
"groupList"
open=
""
close=
""
index=
"index"
item=
"item"
separator=
","
>
${item}
</foreach>
</trim>
</if>
</sql>
</mapper>
\ No newline at end of file
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment