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.
backend-duoji-monitor/web/target/classes/mapper/OrderMapper.xml

20 lines
786 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.zhehekeji.web.mapper.OrderMapper">
<select id="list" parameterType="com.zhehekeji.web.pojo.OrderSearch" resultType="com.zhehekeji.web.pojo.OrderVO">
select t.*
from `order` t
<where>
<if test="req.orderNum != null and req.orderNum != ''">
and t.order_num = #{req.orderNum}
</if>
<if test="req.startTimestamp != null and req.endTimestamp != null">
and t.start_time >= #{req.startTimestamp} and t.start_time &lt;= #{req.endTimestamp}
</if>
</where>
order by t.id desc
</select>
</mapper>