2023-10-09 11:06:01 +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.fuint.repository.mapper.TAccountMapper">
|
2023-10-11 13:22:16 +08:00
|
|
|
<select id="listAccount" resultType="com.fuint.repository.model.TAccount">
|
|
|
|
SELECT
|
|
|
|
ta.*,sd.dept_name
|
|
|
|
FROM
|
|
|
|
`t_account` ta
|
|
|
|
left join sys_dept sd on sd.dept_id = ta.dept_id
|
2023-12-22 15:33:38 +08:00
|
|
|
|
|
|
|
|
|
|
|
where account_status != -1
|
2023-10-11 13:22:16 +08:00
|
|
|
<if test="accountInfo.realName != null and accountInfo.realName != ''">
|
|
|
|
AND ta.real_name = like concat('%',#{accountInfo.realName},'%')
|
|
|
|
</if>
|
|
|
|
<if test="accountInfo.deptId != null">
|
|
|
|
AND ta.dept_id = #{accountInfo.deptId}
|
|
|
|
</if>
|
|
|
|
<!-- 数据范围过滤 -->
|
2023-10-11 18:37:04 +08:00
|
|
|
<if test="ancestors != null and ancestors!=''">
|
|
|
|
AND sd.ancestors like concat (#{ancestors},'%')
|
2023-10-11 13:22:16 +08:00
|
|
|
</if>
|
2023-12-22 15:33:38 +08:00
|
|
|
|
2023-10-11 13:22:16 +08:00
|
|
|
order by create_time desc
|
2023-10-09 11:06:01 +08:00
|
|
|
|
2023-10-11 13:22:16 +08:00
|
|
|
</select>
|
2023-12-27 09:11:43 +08:00
|
|
|
|
|
|
|
|
|
|
|
<select id="getStationmasterByStoreId" resultType="com.fuint.repository.model.TAccount">
|
|
|
|
select
|
|
|
|
ta.*
|
|
|
|
from
|
|
|
|
`t_account` ta
|
|
|
|
left join t_account_duty td on ta.acct_id = td.acct_id
|
|
|
|
where
|
|
|
|
ta.dept_id = #{deptId}
|
|
|
|
and td.duty_id = #{roleIds}
|
|
|
|
|
|
|
|
</select>
|
2023-10-09 11:06:01 +08:00
|
|
|
</mapper>
|