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

27 lines
1017 B
XML

<?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.TBasePositionMapper">
<sql id="whr">
<if test="query.positionCode!=null and query.positionCode!=''">
and position_code=#{query.positionCode}
</if>
<if test="query.positionName!=null and query.positionName!=''">
and position_name like concat('%',#{query.positionName},'%')
</if>
</sql>
<select id="getList" resultType="com.nflg.mobilebroken.repository.entity.TBasePosition">
select *
from t_base_position
where data_valid_state=1 <include refid="whr" />
</select>
<update id="delByIds">
update t_base_position set data_valid_state=0 where id in
<foreach collection="ids" item="item" open="(" close=")" separator=",">
#{item}
</foreach>
</update>
</mapper>