离线提醒
parent
017d3f1377
commit
4e5eb52d00
@ -0,0 +1,12 @@
|
||||
package com.zhehekeji.web.pojo.warn;
|
||||
|
||||
import com.zhehekeji.web.entity.Warn;
|
||||
import lombok.Data;
|
||||
|
||||
@Data
|
||||
public class WarnVO extends Warn {
|
||||
|
||||
private String streetName;
|
||||
|
||||
private String timeLength;
|
||||
}
|
||||
@ -0,0 +1,19 @@
|
||||
<?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 <= #{req.endTimestamp}
|
||||
</if>
|
||||
</where>
|
||||
order by t.id desc
|
||||
</select>
|
||||
|
||||
</mapper>
|
||||
@ -0,0 +1,17 @@
|
||||
<?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.WarnMapper">
|
||||
|
||||
<select id="list" parameterType="com.zhehekeji.web.pojo.warn.WarnSearch" resultType="com.zhehekeji.web.pojo.warn.WarnVO">
|
||||
select t.*,s.name as streetName
|
||||
from warn t
|
||||
left join street s on s.id = t.street_id
|
||||
<where>
|
||||
<if test="req.startTime != null and req.endTime != null">
|
||||
and t.start_time >= #{req.startTime} and t.start_time <= #{req.endTime}
|
||||
</if>
|
||||
</where>
|
||||
order by t.id desc
|
||||
</select>
|
||||
|
||||
</mapper>
|
||||
Loading…
Reference in New Issue