|
@@ -14,6 +14,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
<result property="menuCheckStrictly" column="menu_check_strictly" />
|
|
<result property="menuCheckStrictly" column="menu_check_strictly" />
|
|
|
<result property="deptCheckStrictly" column="dept_check_strictly" />
|
|
<result property="deptCheckStrictly" column="dept_check_strictly" />
|
|
|
<result property="status" column="status" />
|
|
<result property="status" column="status" />
|
|
|
|
|
+ <result property="defaultRole" column="default_role" />
|
|
|
<result property="delFlag" column="del_flag" />
|
|
<result property="delFlag" column="del_flag" />
|
|
|
<result property="createBy" column="create_by" />
|
|
<result property="createBy" column="create_by" />
|
|
|
<result property="createTime" column="create_time" />
|
|
<result property="createTime" column="create_time" />
|
|
@@ -23,7 +24,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
</resultMap>
|
|
</resultMap>
|
|
|
|
|
|
|
|
<sql id="selectCompanyRoleVo">
|
|
<sql id="selectCompanyRoleVo">
|
|
|
- select role_id, company_id, role_name, role_key, role_sort, data_scope, menu_check_strictly, dept_check_strictly, status, del_flag, create_by, create_time, update_by, update_time, remark from company_role
|
|
|
|
|
|
|
+ select role_id, company_id, role_name, role_key, role_sort, data_scope, menu_check_strictly, dept_check_strictly, status, default_role, del_flag, create_by, create_time, update_by, update_time, remark from company_role
|
|
|
</sql>
|
|
</sql>
|
|
|
|
|
|
|
|
<select id="selectCompanyRoleList" parameterType="CompanyRole" resultMap="CompanyRoleResult">
|
|
<select id="selectCompanyRoleList" parameterType="CompanyRole" resultMap="CompanyRoleResult">
|
|
@@ -56,6 +57,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
<if test="menuCheckStrictly != null">menu_check_strictly,</if>
|
|
<if test="menuCheckStrictly != null">menu_check_strictly,</if>
|
|
|
<if test="deptCheckStrictly != null">dept_check_strictly,</if>
|
|
<if test="deptCheckStrictly != null">dept_check_strictly,</if>
|
|
|
<if test="status != null and status != ''">status,</if>
|
|
<if test="status != null and status != ''">status,</if>
|
|
|
|
|
+ <if test="defaultRole != null and defaultRole != ''">default_role,</if>
|
|
|
<if test="delFlag != null">del_flag,</if>
|
|
<if test="delFlag != null">del_flag,</if>
|
|
|
<if test="createBy != null">create_by,</if>
|
|
<if test="createBy != null">create_by,</if>
|
|
|
<if test="createTime != null">create_time,</if>
|
|
<if test="createTime != null">create_time,</if>
|
|
@@ -72,6 +74,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
<if test="menuCheckStrictly != null">#{menuCheckStrictly},</if>
|
|
<if test="menuCheckStrictly != null">#{menuCheckStrictly},</if>
|
|
|
<if test="deptCheckStrictly != null">#{deptCheckStrictly},</if>
|
|
<if test="deptCheckStrictly != null">#{deptCheckStrictly},</if>
|
|
|
<if test="status != null and status != ''">#{status},</if>
|
|
<if test="status != null and status != ''">#{status},</if>
|
|
|
|
|
+ <if test="defaultRole != null and defaultRole != ''">#{defaultRole},</if>
|
|
|
<if test="delFlag != null">#{delFlag},</if>
|
|
<if test="delFlag != null">#{delFlag},</if>
|
|
|
<if test="createBy != null">#{createBy},</if>
|
|
<if test="createBy != null">#{createBy},</if>
|
|
|
<if test="createTime != null">#{createTime},</if>
|
|
<if test="createTime != null">#{createTime},</if>
|
|
@@ -92,6 +95,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
<if test="menuCheckStrictly != null">menu_check_strictly = #{menuCheckStrictly},</if>
|
|
<if test="menuCheckStrictly != null">menu_check_strictly = #{menuCheckStrictly},</if>
|
|
|
<if test="deptCheckStrictly != null">dept_check_strictly = #{deptCheckStrictly},</if>
|
|
<if test="deptCheckStrictly != null">dept_check_strictly = #{deptCheckStrictly},</if>
|
|
|
<if test="status != null and status != ''">status = #{status},</if>
|
|
<if test="status != null and status != ''">status = #{status},</if>
|
|
|
|
|
+ <if test="defaultRole != null and defaultRole != ''">default_role = #{defaultRole},</if>
|
|
|
<if test="delFlag != null">del_flag = #{delFlag},</if>
|
|
<if test="delFlag != null">del_flag = #{delFlag},</if>
|
|
|
<if test="createBy != null">create_by = #{createBy},</if>
|
|
<if test="createBy != null">create_by = #{createBy},</if>
|
|
|
<if test="createTime != null">create_time = #{createTime},</if>
|
|
<if test="createTime != null">create_time = #{createTime},</if>
|
|
@@ -186,4 +190,10 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
select role_id from company_role where del_flag = '0' and status = '0' and role_name= #{roleName} and company_id = #{companyId}
|
|
select role_id from company_role where del_flag = '0' and status = '0' and role_name= #{roleName} and company_id = #{companyId}
|
|
|
</select>
|
|
</select>
|
|
|
|
|
|
|
|
|
|
+ <select id="selectDefaultRoleByCompanyId" resultType="com.fs.company.domain.CompanyRole">
|
|
|
|
|
+ select * from company_role
|
|
|
|
|
+ where del_flag = '0' and status = '0' and default_role = '1' and company_id = #{companyId}
|
|
|
|
|
+ limit 1
|
|
|
|
|
+ </select>
|
|
|
|
|
+
|
|
|
</mapper>
|
|
</mapper>
|