Browse Source

修正订单创建时间查询异常

master
xyiege 3 years ago
parent
commit
e6656ac97e
  1. 2
      src/main/java/cn/chjyj/szwh/controller/admin/AdminOrderController.java
  2. 10
      src/main/resources/mapper/szwh/OrderMapper.xml

2
src/main/java/cn/chjyj/szwh/controller/admin/AdminOrderController.java

@ -82,7 +82,7 @@ public class AdminOrderController extends BaseController {
JSONArray jarr = JSONArray.parseArray(createtime);
if(jarr.size()>0){
// 拆分
rqmap.put("o.createtime"," createtime between '"+jarr.get(0)+" 00:00:00' and '"+jarr.get(1)+" 23:59:59'");
rqmap.put("o.createtime"," og.createtime between '"+jarr.get(0)+" 00:00:00' and '"+jarr.get(1)+" 23:59:59'");
}
}

10
src/main/resources/mapper/szwh/OrderMapper.xml

@ -78,7 +78,7 @@
<!-- 查询条件封装在map中,以k-v形式进行查询-->
<foreach collection="map" item="v" index="k" separator="and">
<if test="v != null and v != '' and k!='o.id' and k!='og.goods_name'
and k!='ou.name'">
and k!='ou.name' and k!='o.createtime' ">
${k} = #{v}
</if>
<if test="k=='o.id'">
@ -87,6 +87,9 @@
<if test="k=='ou.name'">
ou.`name` like concat('%',#{v},'%')
</if>
<if test="k== 'o.createtime' ">
${v}
</if>
</foreach>
</if>
</where>
@ -105,7 +108,7 @@
<!-- 查询条件封装在map中,以k-v形式进行查询-->
<foreach collection="map" item="v" index="k" separator="and">
<if test="v != null and v != '' and k!='o.id' and k!='og.goods_name'
and k!='ou.name'">
and k!='ou.name' and k!='o.createtime' ">
${k} = #{v}
</if>
<if test="k=='o.id'">
@ -114,6 +117,9 @@
<if test="k=='ou.name'">
ou.`name` like concat('%',#{v},'%')
</if>
<if test="k== 'o.createtime' ">
${v}
</if>
</foreach>
</if>
</where>

Loading…
Cancel
Save