wms/nflg-wms-repository/src/main/resources/mapper/WmsOutAssistanceMapper.xml

31 lines
1.2 KiB
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.wms.repository.mapper.WmsOutAssistanceMapper">
<select id="search" resultType="com.nflg.wms.repository.entity.WmsOutAssistance">
SELECT *
FROM wms_out_assistance
<where>
<if test="request.no != null and request.no!=''">
AND "no" LIKE CONCAT('%', #{request.no}, '%')
</if>
<if test="request.ebeln!=null and request.ebeln!=''">
and ebeln like concat('%', #{request.ebeln}, '%')
</if>
<if test="request.werks!=null and request.werks!=''">
and werks like concat('%', #{request.werks}, '%')
</if>
<if test="request.lifnr!=null and request.lifnr!=''">
and lifnr like concat('%', #{request.lifnr}, '%')
</if>
<if test="request.startDate!=null">
and create_time >= #{request.startDate}
</if>
<if test="request.endDate!=null">
and create_time &lt;= #{request.endDate}
</if>
</where>
order by id desc
</select>
</mapper>