feat: 迁移国内标准法规部分1

This commit is contained in:
super_liu
2021-06-02 21:39:20 +08:00
parent ac33a531ec
commit 4cc558befc
140 changed files with 12514 additions and 58 deletions
@@ -387,7 +387,7 @@
where id = #{id}
</update>-->
<!--create by yangxuenan-->
<!--create by super_liu-->
<select id="getDicTypeByDicCode" parameterType="java.lang.String" resultMap="BaseResultMap">
select
dt.id,dt.parent_id,dt.dic_type_code,dt.dic_type_name,dt.dic_id
@@ -181,6 +181,40 @@
parent_id = #{pId} AND valid_flag = 0
</select>
<select id="getNamesByIds" resultType="java.lang.String" parameterType="java.util.List">
select
group_concat(org_name ORDER BY field(id,
<foreach collection="list" index="index" item="item" separator=",">
#{item}
</foreach>) separator ',')
from TS_ORG
where
id in
<foreach collection="list" index="index" item="item" open="(" separator="," close=")">
#{item}
</foreach>
order by field(id,
<foreach collection="list" index="index" item="item" separator=",">
#{item}
</foreach>)
</select>
<select id="getIdsByNames" resultType="java.lang.String" parameterType="java.util.List">
select
group_concat(id ORDER BY id separator ',')
from TS_ORG
where VALID_FLAG = '0'
and org_name in
<foreach collection="list" index="index" item="item" open="(" separator="," close=")">
#{item}
</foreach>
<if test="orgType != null">
and org_type = #{orgType}
</if>
</select>
<!--liwenxuan:判断组织机构名不重复-->
<select id="getOrgEOByorgNameAndPidAndId" resultMap="BaseResultMap">
select
@@ -94,6 +94,34 @@
where r.id = #{id}
</select>
<select id="getNamesByIds" resultType="java.lang.String" parameterType="java.util.List">
select
group_concat(name ORDER BY name separator ',')
from TS_ROLE
where
id in
<foreach collection="list" index="index" item="item" open="(" separator="," close=")">
#{item}
</foreach>
order by field(id,
<foreach collection="list" index="index" item="item" separator=",">
#{item}
</foreach>)
</select>
<select id="getIdsByNames" resultType="java.lang.String" parameterType="java.util.List">
select
group_concat(id ORDER BY id separator ',')
from TS_ROLE
where VALID_FLAG = '0'
and name in
<foreach collection="list" index="index" item="item" open="(" separator="," close=")">
#{item}
</foreach>
</select>
<select id="getRoleListByUserId" resultMap="BaseResultMap"
parameterType="java.lang.String">
select
@@ -612,4 +612,37 @@
from TS_USER where account = #{account} and VALID_FLAG != 1
</select>
<select id="getNamesByIds" resultType="java.lang.String" parameterType="java.util.List">
select
group_concat(uname ORDER BY uname separator ',')
from TS_USER
where
usid in
<foreach collection="list" index="index" item="item" open="(" separator="," close=")">
#{item}
</foreach>
order by field(usid,
<foreach collection="list" index="index" item="item" separator=",">
#{item}
</foreach>)
</select>
<select id="getIdsByNames" resultType="java.lang.String" parameterType="java.util.List">
select
group_concat(usid ORDER BY usid separator ',')
from TS_USER
left join TS_USER_ORG on TS_USER.usid = TS_USER_ORG.user_id
where TS_USER.VALID_FLAG = '0'
and uname in
<foreach collection="list" index="index" item="item" open="(" separator="," close=")">
#{item}
</foreach>
<if test="orgIdList != null">
and TS_USER_ORG.org_id in
<foreach collection="orgIdList" index="index" item="item" open="(" separator="," close=")">
#{item}
</foreach>
</if>
</select>
</mapper>