1
This commit is contained in:
@@ -46,6 +46,17 @@ public class JDOrderListController extends BaseController
|
|||||||
String orderBy = getRequest().getParameter("orderBy");
|
String orderBy = getRequest().getParameter("orderBy");
|
||||||
String isAsc = getRequest().getParameter("isAsc");
|
String isAsc = getRequest().getParameter("isAsc");
|
||||||
|
|
||||||
|
// 处理时间筛选参数
|
||||||
|
String beginTimeStr = getRequest().getParameter("beginTime");
|
||||||
|
String endTimeStr = getRequest().getParameter("endTime");
|
||||||
|
|
||||||
|
if (beginTimeStr != null && !beginTimeStr.isEmpty()) {
|
||||||
|
query.getParams().put("beginTime", beginTimeStr);
|
||||||
|
}
|
||||||
|
if (endTimeStr != null && !endTimeStr.isEmpty()) {
|
||||||
|
query.getParams().put("endTime", endTimeStr);
|
||||||
|
}
|
||||||
|
|
||||||
java.util.List<JDOrder> list;
|
java.util.List<JDOrder> list;
|
||||||
if (orderBy != null && !orderBy.isEmpty()) {
|
if (orderBy != null && !orderBy.isEmpty()) {
|
||||||
// 设置排序参数
|
// 设置排序参数
|
||||||
|
|||||||
@@ -42,10 +42,10 @@
|
|||||||
<if test="orderTime != null"> and order_time = #{orderTime}</if>
|
<if test="orderTime != null"> and order_time = #{orderTime}</if>
|
||||||
<if test="status != null and status != ''"> and status like concat('%', #{status}, '%')</if>
|
<if test="status != null and status != ''"> and status like concat('%', #{status}, '%')</if>
|
||||||
<if test="params.beginTime != null and params.beginTime != ''"><!-- 开始时间检索 -->
|
<if test="params.beginTime != null and params.beginTime != ''"><!-- 开始时间检索 -->
|
||||||
and order_time >= #{params.beginTime}
|
and date(order_time) >= #{params.beginTime}
|
||||||
</if>
|
</if>
|
||||||
<if test="params.endTime != null and params.endTime != ''"><!-- 结束时间检索 -->
|
<if test="params.endTime != null and params.endTime != ''"><!-- 结束时间检索 -->
|
||||||
and order_time <= #{params.endTime}
|
and date(order_time) <= #{params.endTime}
|
||||||
</if>
|
</if>
|
||||||
</where>
|
</where>
|
||||||
order by remark asc, order_time desc, id desc
|
order by remark asc, order_time desc, id desc
|
||||||
@@ -67,10 +67,10 @@
|
|||||||
<if test="orderTime != null"> and order_time = #{orderTime}</if>
|
<if test="orderTime != null"> and order_time = #{orderTime}</if>
|
||||||
<if test="status != null and status != ''"> and status like concat('%', #{status}, '%')</if>
|
<if test="status != null and status != ''"> and status like concat('%', #{status}, '%')</if>
|
||||||
<if test="params.beginTime != null and params.beginTime != ''"><!-- 开始时间检索 -->
|
<if test="params.beginTime != null and params.beginTime != ''"><!-- 开始时间检索 -->
|
||||||
and order_time >= #{params.beginTime}
|
and date(order_time) >= #{params.beginTime}
|
||||||
</if>
|
</if>
|
||||||
<if test="params.endTime != null and params.endTime != ''"><!-- 结束时间检索 -->
|
<if test="params.endTime != null and params.endTime != ''"><!-- 结束时间检索 -->
|
||||||
and order_time <= #{params.endTime}
|
and date(order_time) <= #{params.endTime}
|
||||||
</if>
|
</if>
|
||||||
</where>
|
</where>
|
||||||
<choose>
|
<choose>
|
||||||
|
|||||||
Reference in New Issue
Block a user