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!=''">
and (dept_code=#{query.deptCodeOrName} or dept_name=#{query.deptCodeOrName})
</if>
<if test="query.dataValidStatus!=null">
and data_valid_status=#{query.dataValidStatus}
</if>
</sql>
<select id="selectListByPage" resultType="com.nflg.mobilebroken.repository.entity.TBaseDepartment">
select *
from t_base_department
where 1 = 1 and dept_parent_id=0
<include refid="whr"/>
</select>
<update id="del">
update t_base_department set data_valid_status=0 where id in
<foreach collection="ids" item="item" open="(" close=")" separator=",">
#{item}
</foreach>
</update>
</mapper>