From 83cf3aeb3a5591f49b010696c8e5d7cca674d9fd Mon Sep 17 00:00:00 2001 From: xiaoyong931011 <15274802129@163.com> Date: Wed, 18 Aug 2021 16:31:42 +0800 Subject: [PATCH] 20210818 --- gc-shop/src/main/resources/mapper/shop/JhyOrderMapper.xml | 7 +++++-- gc-shop/src/main/java/com/xzx/gc/shop/service/JhyService.java | 11 +++++++++++ gc-shop/src/main/java/com/xzx/gc/shop/dto/QueryJhyOrderListDto.java | 3 ++- 3 files changed, 18 insertions(+), 3 deletions(-) diff --git a/gc-shop/src/main/java/com/xzx/gc/shop/dto/QueryJhyOrderListDto.java b/gc-shop/src/main/java/com/xzx/gc/shop/dto/QueryJhyOrderListDto.java index a2f1a62..b3ce0ea 100644 --- a/gc-shop/src/main/java/com/xzx/gc/shop/dto/QueryJhyOrderListDto.java +++ b/gc-shop/src/main/java/com/xzx/gc/shop/dto/QueryJhyOrderListDto.java @@ -5,6 +5,7 @@ import lombok.Data; import java.util.Date; +import java.util.List; @Data public class QueryJhyOrderListDto { @@ -22,7 +23,7 @@ private String accountPhone; @ApiModelProperty(value="状态 1-待接单2-服务中3-已收款4-待入库5-已完成6-已取消") - private Integer status; + private List<Integer> status; @JsonFormat(shape=JsonFormat.Shape.STRING,pattern = "yyyy-MM-dd HH:mm:ss",timezone = "GMT+8") @ApiModelProperty(value="预约开始时间") diff --git a/gc-shop/src/main/java/com/xzx/gc/shop/service/JhyService.java b/gc-shop/src/main/java/com/xzx/gc/shop/service/JhyService.java index 61f23c9..3cd814c 100644 --- a/gc-shop/src/main/java/com/xzx/gc/shop/service/JhyService.java +++ b/gc-shop/src/main/java/com/xzx/gc/shop/service/JhyService.java @@ -53,6 +53,17 @@ String name = model.getAccount(); model.setAccount(name); model.setAccountPhone(accountPhone); + List<Integer> status = new ArrayList<>(); + if(CollUtil.isEmpty(model.getStatus())){ + status.add(1); + status.add(2); + status.add(3); + status.add(4); + status.add(5); + status.add(6); + model.setStatus(status); + } + List<QueryJhyOrderListVo> maps = jhyOrderMapper.queryOrderList(model); if(CollUtil.isNotEmpty(maps)){ for(QueryJhyOrderListVo queryJhyOrderListVo : maps){ diff --git a/gc-shop/src/main/resources/mapper/shop/JhyOrderMapper.xml b/gc-shop/src/main/resources/mapper/shop/JhyOrderMapper.xml index 63f30d0..385b7f7 100644 --- a/gc-shop/src/main/resources/mapper/shop/JhyOrderMapper.xml +++ b/gc-shop/src/main/resources/mapper/shop/JhyOrderMapper.xml @@ -26,8 +26,11 @@ <if test="record.orderNo != null and record.orderNo != ''"> and a.order_no like concat('%',#{record.orderNo},'%') </if> - <if test="record.status != null and record.status != ''"> - and a.status = #{record.status} + <if test="record.status.size > 0"> + and a.status in + <foreach collection="record.status" item="sta" open="(" separator="," close=")"> + #{sta} + </foreach> </if> <if test="record.jwyName != null and record.jwyName != ''"> and d.username like concat('%',#{record.jwyName},'%') -- Gitblit v1.9.1