|
@@ -15,6 +15,7 @@
|
|
|
<result property="createBy" column="CREATE_BY" jdbcType="VARCHAR"/>
|
|
|
<result property="dateUpdate" column="DATE_UPDATE" jdbcType="TIMESTAMP"/>
|
|
|
<result property="updateBy" column="UPDATE_BY" jdbcType="VARCHAR"/>
|
|
|
+ <result property="orgId" column="ORG_ID" jdbcType="VARCHAR"/>
|
|
|
</resultMap>
|
|
|
<resultMap type="com.huaxu.dto.RoleDto" id="RoleDtoMap">
|
|
|
<result property="id" column="ID" jdbcType="INTEGER"/>
|
|
@@ -51,7 +52,26 @@
|
|
|
<include refid="Base_Column_List"/>
|
|
|
from uims_role
|
|
|
<where>
|
|
|
- and status!=0
|
|
|
+ and status =1
|
|
|
+ <if test="items != null">
|
|
|
+ and (org_id in
|
|
|
+ <foreach item="item" index="index" collection="items" open="(" separator="," close=")">
|
|
|
+ <if test="item.orgCompanyId!= null">
|
|
|
+
|
|
|
+ #{item.orgCompanyId}
|
|
|
+ </if>
|
|
|
+
|
|
|
+ </foreach>
|
|
|
+ or org_id in
|
|
|
+ <foreach item="item" index="index" collection="items" open="(" separator="," close=")">
|
|
|
+ <if test="item.orgDeparmtmentId!= null">
|
|
|
+
|
|
|
+ #{item.orgDeparmtmentId}
|
|
|
+ </if>
|
|
|
+
|
|
|
+ </foreach>
|
|
|
+ )
|
|
|
+ </if>
|
|
|
<if test="id != null">
|
|
|
and ID = #{id}
|
|
|
</if>
|
|
@@ -93,8 +113,8 @@
|
|
|
|
|
|
<!-- 新增所有列 -->
|
|
|
<insert id="insert" keyProperty="id" useGeneratedKeys="true">
|
|
|
- insert into uims_role(ID, TENANT_ID, ROLE_NAME, DESCRIPTION, ROLE_STATE, PERMISSION_TYPE, REMARK, STATUS, DATE_CREATE, CREATE_BY, DATE_UPDATE, UPDATE_BY)
|
|
|
- values ( #{id}, #{tenantId}, #{roleName}, #{description}, #{roleState}, #{permissionType}, #{remark}, #{status}, #{dateCreate}, #{createBy}, #{dateUpdate}, #{updateBy})
|
|
|
+ insert into uims_role(ID, TENANT_ID, ROLE_NAME, DESCRIPTION, ROLE_STATE, PERMISSION_TYPE, REMARK, STATUS, DATE_CREATE, CREATE_BY, DATE_UPDATE, UPDATE_BY,ORG_ID)
|
|
|
+ values ( #{id}, #{tenantId}, #{roleName}, #{description}, #{roleState}, #{permissionType}, #{remark}, #{status}, #{dateCreate}, #{createBy}, #{dateUpdate}, #{updateBy},#{orgId})
|
|
|
</insert>
|
|
|
|
|
|
<!-- 批量新增 -->
|
|
@@ -173,7 +193,27 @@
|
|
|
group by b.ROLE_ID ) b
|
|
|
ON a.id=b.ROLE_ID
|
|
|
<where>
|
|
|
- and status!=0
|
|
|
+ and status =1
|
|
|
+ <if test="role.items != null">
|
|
|
+ and (org_id in
|
|
|
+ <foreach item="item" index="index" collection="role.items" open="(" separator="," close=")">
|
|
|
+ <if test="item.orgCompanyId!= null">
|
|
|
+
|
|
|
+ #{item.orgCompanyId}
|
|
|
+ </if>
|
|
|
+
|
|
|
+ </foreach>
|
|
|
+ or org_id in
|
|
|
+ <foreach item="item" index="index" collection="role.items" open="(" separator="," close=")">
|
|
|
+ <if test="item.orgDeparmtmentId!= null">
|
|
|
+
|
|
|
+ #{item.orgDeparmtmentId}
|
|
|
+ </if>
|
|
|
+
|
|
|
+ </foreach>
|
|
|
+ )
|
|
|
+ </if>
|
|
|
+
|
|
|
<if test="role.id != null">
|
|
|
and ID = #{role.id}
|
|
|
</if>
|