2024-08-01 10:56:29 +08:00
|
|
|
<?xml version="1.0" encoding="UTF-8" ?>
|
|
|
|
|
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd" >
|
|
|
|
|
<mapper namespace="com.engine.salary.mapper.auth.AuthMapper">
|
2024-09-05 17:31:01 +08:00
|
|
|
<resultMap id="getTaxEmpOptAuthMap" type="com.engine.salary.entity.auth.dto.TaxEmpOptAuth">
|
2024-08-01 16:19:23 +08:00
|
|
|
<id column="tax_agent_id" property="taxAgentId"/>
|
|
|
|
|
<collection property="emps" ofType="com.engine.salary.entity.auth.dto.EmpOpt">
|
|
|
|
|
<id column="employee_id" property="employeeId"/>
|
2024-08-28 17:55:42 +08:00
|
|
|
<collection property="opts" ofType="string">
|
|
|
|
|
<constructor>
|
|
|
|
|
<arg column="opt"/>
|
|
|
|
|
</constructor>
|
2024-08-01 16:19:23 +08:00
|
|
|
</collection>
|
2024-08-01 10:56:29 +08:00
|
|
|
</collection>
|
|
|
|
|
</resultMap>
|
|
|
|
|
|
2024-09-05 17:31:01 +08:00
|
|
|
<select id="getTaxEmpOptAuth" resultMap="getTaxEmpOptAuthMap">
|
|
|
|
|
select resource.target as tax_agent_id, d.employee_id, o.opt
|
2024-08-28 10:02:39 +08:00
|
|
|
from hrsa_auth_role_emp emp
|
2024-09-05 17:31:01 +08:00
|
|
|
left join hrsa_auth_role role on emp.role_id = role.id and emp.delete_type = 0 and role.delete_type = 0
|
|
|
|
|
left join hrsa_auth_resource resource
|
|
|
|
|
on resource.role_id = role.id and resource.target_type = 1 and resource.delete_type = 0
|
|
|
|
|
left join hrsa_auth_role_data d on emp.role_id = d.role_id and d.delete_type = 0
|
|
|
|
|
left join hrsa_auth_opt o on d.role_id = o.role_id and o.delete_type = 0
|
|
|
|
|
where emp.employee_id = #{uid}
|
|
|
|
|
and o.page = #{page}
|
|
|
|
|
</select>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<resultMap id="getTaxOptAuthMap" type="com.engine.salary.entity.auth.dto.TaxOptAuth">
|
|
|
|
|
<id column="tax_agent_id" property="taxAgentId"/>
|
|
|
|
|
<collection property="opts" ofType="string">
|
|
|
|
|
<constructor>
|
|
|
|
|
<arg column="opt"/>
|
|
|
|
|
</constructor>
|
|
|
|
|
</collection>
|
|
|
|
|
</resultMap>
|
|
|
|
|
|
|
|
|
|
<select id="getTaxOptAuth" resultMap="getTaxOptAuthMap">
|
|
|
|
|
select resource.target as tax_agent_id, o.opt
|
2024-09-12 11:50:18 +08:00
|
|
|
from hrsa_auth_role role
|
|
|
|
|
left join hrsa_auth_role_emp emp on emp.role_id = role.id and emp.delete_type = 0 and role.delete_type = 0
|
|
|
|
|
left join hrsa_auth_resource resource on resource.role_id = role.id and resource.target_type = 1 and resource.delete_type = 0
|
|
|
|
|
left join hrsa_auth_opt o on role.id = o.role_id and o.delete_type = 0
|
2024-09-05 17:31:01 +08:00
|
|
|
where emp.employee_id = #{uid}
|
2024-09-12 11:50:18 +08:00
|
|
|
<if test="page != null and page != ''">
|
|
|
|
|
AND o.page = #{page}
|
|
|
|
|
</if>
|
2024-09-05 17:31:01 +08:00
|
|
|
</select>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<resultMap id="getSobOptAuthMap" type="com.engine.salary.entity.auth.dto.SobOptAuth">
|
|
|
|
|
<id column="sob_id" property="sobId"/>
|
|
|
|
|
<collection property="opts" ofType="string">
|
|
|
|
|
<constructor>
|
|
|
|
|
<arg column="opt"/>
|
|
|
|
|
</constructor>
|
|
|
|
|
</collection>
|
|
|
|
|
</resultMap>
|
|
|
|
|
|
|
|
|
|
<select id="getSobOptAuth" resultMap="getSobOptAuthMap">
|
|
|
|
|
select resource.target as sob_id, o.opt
|
2024-09-12 11:50:18 +08:00
|
|
|
from hrsa_auth_role role
|
|
|
|
|
left join hrsa_auth_role_emp emp on emp.role_id = role.id and emp.delete_type = 0 and role.delete_type = 0
|
|
|
|
|
left join hrsa_auth_resource resource on resource.role_id = role.id and resource.target_type = 2 and resource.delete_type = 0
|
|
|
|
|
left join hrsa_auth_opt o on role.id = o.role_id and o.delete_type = 0
|
2024-09-05 17:31:01 +08:00
|
|
|
where emp.employee_id = #{uid}
|
2024-09-12 11:50:18 +08:00
|
|
|
<if test="page != null and page != ''">
|
|
|
|
|
AND o.page = #{page}
|
|
|
|
|
</if>
|
2024-08-28 10:02:39 +08:00
|
|
|
</select>
|
|
|
|
|
|
|
|
|
|
|
2024-09-04 13:59:00 +08:00
|
|
|
<select id="getLimitSobs" resultType="long">
|
|
|
|
|
select resource.target
|
|
|
|
|
from hrsa_auth_role_emp emp
|
2024-09-05 17:31:01 +08:00
|
|
|
left join hrsa_auth_role role on emp.role_id = role.id and emp.delete_type = 0 and role.delete_type = 0
|
|
|
|
|
left join hrsa_auth_resource resource
|
|
|
|
|
on resource.role_id = role.id and resource.target_type = 2 and resource.delete_type = 0
|
2024-09-04 13:59:00 +08:00
|
|
|
where emp.employee_id = #{uid}
|
|
|
|
|
</select>
|
2024-08-28 10:02:39 +08:00
|
|
|
|
2024-09-04 13:59:00 +08:00
|
|
|
<select id="getLimitTaxAgents" resultType="long">
|
|
|
|
|
select resource.target
|
|
|
|
|
from hrsa_auth_role_emp emp
|
2024-09-05 17:31:01 +08:00
|
|
|
left join hrsa_auth_role role on emp.role_id = role.id and emp.delete_type = 0 and role.delete_type = 0
|
|
|
|
|
left join hrsa_auth_resource resource
|
|
|
|
|
on resource.role_id = role.id and resource.target_type = 1 and resource.delete_type = 0
|
2024-09-04 13:59:00 +08:00
|
|
|
where emp.employee_id = #{uid}
|
2024-08-01 10:56:29 +08:00
|
|
|
</select>
|
|
|
|
|
|
|
|
|
|
|
2024-08-30 10:49:46 +08:00
|
|
|
<select id="getOptsByPage" resultType="string">
|
|
|
|
|
select o.opt
|
|
|
|
|
from hrsa_auth_role_emp emp
|
|
|
|
|
left join hrsa_auth_role role on emp.role_id = role.id
|
2024-09-05 17:31:01 +08:00
|
|
|
left join hrsa_auth_opt o on role.id = o.role_id
|
|
|
|
|
where emp.delete_type = 0
|
|
|
|
|
and role.delete_type = 0
|
|
|
|
|
and o.delete_type = 0
|
|
|
|
|
and emp.employee_id = #{uid}
|
|
|
|
|
and o.page = #{page}
|
2024-08-30 10:49:46 +08:00
|
|
|
</select>
|
|
|
|
|
|
|
|
|
|
|
2024-08-01 10:56:29 +08:00
|
|
|
</mapper>
|