mobilebroken/nflg-mobilebroken-repository/src/main/resources/mapper/TBaseDepartmentMapper.xml

26 lines
1.0 KiB
XML
Raw Normal View History

2025-01-20 17:26:20 +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.nflg.mobilebroken.repository.mapper.TBaseDepartmentMapper">
<sql id="whr">
<if test="query.deptCodeOrName!=null and query.deptCodeOrName!=''">
2025-02-25 14:08:07 +08:00
and (dept_code like concat('%', #{query.deptCodeOrName},'%') or dept_name like concat('%', #{query.deptCodeOrName},'%'))
2025-01-20 17:26:20 +08:00
</if>
2025-02-09 11:30:01 +08:00
<if test="query.deptStatus!=null">
and dept_status=#{query.deptStatus}
2025-01-20 17:26:20 +08:00
</if>
</sql>
<select id="selectListByPage" resultType="com.nflg.mobilebroken.repository.entity.TBaseDepartment">
select *
from t_base_department
2025-02-06 10:36:08 +08:00
where data_valid_status=1
2025-01-20 17:26:20 +08:00
<include refid="whr"/>
</select>
2025-02-15 19:06:06 +08:00
<delete id="del">
delete from t_base_department where id in
2025-01-20 17:26:20 +08:00
<foreach collection="ids" item="item" open="(" close=")" separator=",">
#{item}
</foreach>
2025-02-15 19:06:06 +08:00
</delete>
2025-01-20 17:26:20 +08:00
</mapper>