You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
udi-wms-java/src/main/resources/mybatis/mapper/inout/IoStatOrderDao.xml

23 lines
983 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.glxp.api.dao.inout.IoStatOrderDao">
<select id="filterList" resultType="com.glxp.api.entity.inout.IoStatOrderEntity">
select *
from io_stat_order
<where>
<if test="type != null and type != ''">
and type = #{type}
</if>
<if test="recordKey != null and recordKey != ''">
and recordKey like concat('%', #{recordKey}, '%')
</if>
<if test="startTime != null and startTime != ''">
and date_format(date, '%Y-%m-%d') >= date_format(#{startTime}, '%Y-%m-%d')
</if>
<if test="endTime != null and endTime != ''">
and date_format(date, '%Y-%m-%d') &lt;= date_format(#{endTime}, '%Y-%m-%d')
</if>
</where>
</select>
</mapper>