From bb58e108a9da48d84b84d30b73c01106dd642550 Mon Sep 17 00:00:00 2001
From: jiangqs <jiangqs>
Date: 星期三, 02 八月 2023 19:58:49 +0800
Subject: [PATCH] bug

---
 ruoyi-modules/ruoyi-goods/src/main/resources/mapper/goods/GoodsMapper.xml                                        |    4 
 ruoyi-modules/ruoyi-order/src/main/resources/mapper/order/OrderMapper.xml                                        |   14 +
 ruoyi-modules/ruoyi-member/src/main/java/com/ruoyi/member/service/impl/coupon/MemberCouponRecordServiceImpl.java |    4 
 ruoyi-modules/ruoyi-order/src/main/java/com/ruoyi/order/controller/business/MerTotalController.java              |    1 
 ruoyi-modules/ruoyi-member/src/main/java/com/ruoyi/member/service/impl/member/MemberSuggestServiceImpl.java      |    7 
 ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/domain/pojo/config/StaffSuggest.java                   |    3 
 ruoyi-modules/ruoyi-shop/src/main/resources/mapper/shop/ShopSuggestMapper.xml                                    |   12 
 ruoyi-modules/ruoyi-member/src/main/java/com/ruoyi/member/domain/dto/MerMemberPageDto.java                       |    8 
 ruoyi-modules/ruoyi-member/src/main/resources/mapper/member/MemberSuggestMapper.xml                              |   19 +
 ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/config/StaffSuggestServiceImpl.java       |    2 
 ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/config/CustomConfigServiceImpl.java       |   13 +
 ruoyi-modules/ruoyi-goods/src/main/resources/mapper/activity/ActivityMapper.xml                                  |    2 
 ruoyi-modules/ruoyi-member/src/main/java/com/ruoyi/member/service/impl/coupon/CouponServiceImpl.java             |    5 
 ruoyi-modules/ruoyi-shop/src/main/java/com/ruoyi/shop/service/impl/shop/ShopServiceImpl.java                     |    7 
 ruoyi-modules/ruoyi-member/src/main/java/com/ruoyi/member/service/impl/member/MemberServiceImpl.java             |   16 +
 ruoyi-modules/ruoyi-system/src/main/resources/mapper/config/StaffSuggestMapper.xml                               |    9 
 ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/controller/management/MgtConfigController.java         |    8 
 ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/service/config/CustomConfigService.java                |    9 
 ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/domain/dto/MgtStaffSuggestPageDto.java                 |    3 
 ruoyi-common/ruoyi-common-core/src/main/java/com/ruoyi/common/core/utils/DateUtils.java                          |   15 +
 ruoyi-modules/ruoyi-shop/src/main/java/com/ruoyi/shop/service/impl/shop/ShopSuggestServiceImpl.java              |    2 
 ruoyi-modules/ruoyi-member/src/main/java/com/ruoyi/member/domain/pojo/member/MemberSuggest.java                  |    6 
 ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/config/AdvertServiceImpl.java             |    1 
 ruoyi-modules/ruoyi-member/src/main/java/com/ruoyi/member/service/birthday/BirthdayCardService.java              |    9 
 ruoyi-modules/ruoyi-shop/src/main/java/com/ruoyi/shop/service/impl/task/AgencyTaskServiceImpl.java               |   14 +
 ruoyi-modules/ruoyi-order/src/main/java/com/ruoyi/order/scheduler/OrderScheduler.java                            |    2 
 ruoyi-modules/ruoyi-shop/src/main/java/com/ruoyi/shop/domain/dto/MgtShopSuggestPageDto.java                      |    5 
 ruoyi-modules/ruoyi-shop/src/main/java/com/ruoyi/shop/mapper/task/AgencyTaskMapper.java                          |   11 +
 ruoyi-modules/ruoyi-order/src/main/java/com/ruoyi/order/controller/miniapp/AppOrderController.java               |    1 
 ruoyi-modules/ruoyi-shop/src/main/java/com/ruoyi/shop/controller/business/MerTaskController.java                 |   17 +
 ruoyi-modules/ruoyi-shop/src/main/java/com/ruoyi/shop/service/task/AgencyTaskService.java                        |   13 +
 ruoyi-modules/ruoyi-system/src/main/resources/mapper/config/CustomConfigMapper.xml                               |   18 +
 ruoyi-modules/ruoyi-member/src/main/resources/mapper/member/MemberMapper.xml                                     |    9 
 ruoyi-modules/ruoyi-member/src/main/java/com/ruoyi/member/domain/dto/MgtMemberSuggestPageDto.java                |    5 
 ruoyi-modules/ruoyi-shop/src/main/resources/mapper/task/AgencyTaskMapper.xml                                     |   11 +
 ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/mapper/config/CustomConfigMapper.java                  |   11 +
 ruoyi-modules/ruoyi-member/src/main/java/com/ruoyi/member/domain/vo/MgtMemberSuggestPageVo.java                  |    3 
 ruoyi-modules/ruoyi-order/src/main/java/com/ruoyi/order/service/impl/order/UserServiceRecordServiceImpl.java     |   32 +++
 ruoyi-modules/ruoyi-shop/src/main/java/com/ruoyi/shop/domain/pojo/shop/ShopSuggest.java                          |    3 
 ruoyi-api/ruoyi-api-system/src/main/java/com/ruoyi/system/api/domain/vo/MerStaffInfoVo.java                      |    6 
 ruoyi-modules/ruoyi-order/src/main/java/com/ruoyi/order/domain/dto/MerOrderPageDto.java                          |    5 
 ruoyi-modules/ruoyi-member/src/main/java/com/ruoyi/member/service/impl/birthday/BirthdayCardServiceImpl.java     |   29 ++
 ruoyi-modules/ruoyi-shop/src/main/java/com/ruoyi/shop/domain/vo/MerAgencySimpleTaskRecordPageVo.java             |   30 +++
 ruoyi-modules/ruoyi-order/src/main/java/com/ruoyi/order/service/impl/order/ConsumerGoodsServiceImpl.java         |   54 +++-
 ruoyi-modules/ruoyi-order/src/main/java/com/ruoyi/order/service/impl/order/OrderServiceImpl.java                 |   36 ++
 ruoyi-modules/ruoyi-shop/src/main/java/com/ruoyi/shop/service/task/AgencyTaskRecordService.java                  |    1 
 ruoyi-modules/ruoyi-shop/src/main/java/com/ruoyi/shop/service/impl/shop/ShopStaffServiceImpl.java                |    2 
 ruoyi-modules/ruoyi-member/src/main/java/com/ruoyi/member/domain/vo/AppBirthdayCardVo.java                       |    3 
 ruoyi-modules/ruoyi-member/src/main/resources/mapper/coupon/CouponMapper.xml                                     |    4 
 ruoyi-modules/ruoyi-order/src/main/java/com/ruoyi/order/domain/vo/MerOrderPageVo.java                            |    3 
 ruoyi-api/ruoyi-api-system/src/main/java/com/ruoyi/system/api/domain/vo/MerHomeShopTotalVo.java                  |    6 
 ruoyi-modules/ruoyi-file/src/main/java/com/ruoyi/file/utils/ImgUtils.java                                        |   12 +
 ruoyi-modules/ruoyi-member/src/main/java/com/ruoyi/member/domain/vo/AppMemberCouponPageVo.java                   |    2 
 ruoyi-modules/ruoyi-member/src/main/java/com/ruoyi/member/controller/miniapp/AppMemberController.java            |   37 ++-
 54 files changed, 475 insertions(+), 89 deletions(-)

diff --git a/ruoyi-api/ruoyi-api-system/src/main/java/com/ruoyi/system/api/domain/vo/MerHomeShopTotalVo.java b/ruoyi-api/ruoyi-api-system/src/main/java/com/ruoyi/system/api/domain/vo/MerHomeShopTotalVo.java
index 9b7fd78..2668b19 100644
--- a/ruoyi-api/ruoyi-api-system/src/main/java/com/ruoyi/system/api/domain/vo/MerHomeShopTotalVo.java
+++ b/ruoyi-api/ruoyi-api-system/src/main/java/com/ruoyi/system/api/domain/vo/MerHomeShopTotalVo.java
@@ -39,4 +39,10 @@
     @ApiModelProperty(value = "剩余体验人数")
     private Integer explorationSurp;
 
+    @ApiModelProperty(value = "领券1开2关")
+    private Integer platformCouponFlag;
+
+    @ApiModelProperty(value = "生日卡1开2关")
+    private Integer platformBirthdayFlag;
+
 }
diff --git a/ruoyi-api/ruoyi-api-system/src/main/java/com/ruoyi/system/api/domain/vo/MerStaffInfoVo.java b/ruoyi-api/ruoyi-api-system/src/main/java/com/ruoyi/system/api/domain/vo/MerStaffInfoVo.java
index 08062b8..8617405 100644
--- a/ruoyi-api/ruoyi-api-system/src/main/java/com/ruoyi/system/api/domain/vo/MerStaffInfoVo.java
+++ b/ruoyi-api/ruoyi-api-system/src/main/java/com/ruoyi/system/api/domain/vo/MerStaffInfoVo.java
@@ -1,8 +1,5 @@
 package com.ruoyi.system.api.domain.vo;
 
-import com.baomidou.mybatisplus.annotation.IdType;
-import com.baomidou.mybatisplus.annotation.TableField;
-import com.baomidou.mybatisplus.annotation.TableId;
 import io.swagger.annotations.ApiModelProperty;
 import lombok.Data;
 
@@ -67,4 +64,7 @@
     @ApiModelProperty(value = "商户类型1.经销商2.代理商")
     private Integer shopType;
 
+    @ApiModelProperty(value = "商户二维码地址")
+    private String shopCodeUrl;
+
 }
diff --git a/ruoyi-common/ruoyi-common-core/src/main/java/com/ruoyi/common/core/utils/DateUtils.java b/ruoyi-common/ruoyi-common-core/src/main/java/com/ruoyi/common/core/utils/DateUtils.java
index 65c71f5..dee9fc5 100644
--- a/ruoyi-common/ruoyi-common-core/src/main/java/com/ruoyi/common/core/utils/DateUtils.java
+++ b/ruoyi-common/ruoyi-common-core/src/main/java/com/ruoyi/common/core/utils/DateUtils.java
@@ -6,6 +6,7 @@
 import java.text.ParseException;
 import java.text.SimpleDateFormat;
 import java.time.*;
+import java.util.Calendar;
 import java.util.Date;
 
 /**
@@ -167,6 +168,20 @@
         return day + "天" + hour + "小时" + min + "分钟";
     }
 
+    public static long diffTime(Date startTime, Date endTime){
+        // 获取Calendar实例
+        Calendar cal1 = Calendar.getInstance();
+        Calendar cal2 = Calendar.getInstance();
+        // 设置Calendar对象的时间
+        cal1.setTime(startTime);
+        cal2.setTime(endTime);
+        // 获取时间差
+        long milliseconds1 = cal1.getTimeInMillis();
+        long milliseconds2 = cal2.getTimeInMillis();
+        long diff = milliseconds2 - milliseconds1;
+        return diff;
+    }
+
     /**
      * 增加 LocalDateTime ==> Date
      */
diff --git a/ruoyi-modules/ruoyi-file/src/main/java/com/ruoyi/file/utils/ImgUtils.java b/ruoyi-modules/ruoyi-file/src/main/java/com/ruoyi/file/utils/ImgUtils.java
index fa57091..a03610b 100644
--- a/ruoyi-modules/ruoyi-file/src/main/java/com/ruoyi/file/utils/ImgUtils.java
+++ b/ruoyi-modules/ruoyi-file/src/main/java/com/ruoyi/file/utils/ImgUtils.java
@@ -4,10 +4,22 @@
 
 import java.awt.*;
 import java.io.*;
+import java.time.LocalDate;
+import java.time.format.DateTimeFormatter;
 
 
 public class ImgUtils {
 
+    public static void main(String[] args) {
+        LocalDate currentDate = LocalDate.now();
+        LocalDate endBirthday = currentDate.minusYears(23);
+        DateTimeFormatter formatter = DateTimeFormatter.ofPattern("yyyy-MM-dd");
+        System.out.println(endBirthday.format(formatter));
+        LocalDate currentDatea = LocalDate.now();
+        LocalDate startBirthday = currentDatea.minusYears(24);
+        DateTimeFormatter formattera = DateTimeFormatter.ofPattern("yyyy-MM-dd");
+        System.out.println(startBirthday.format(formattera));
+    }
 
     /**
      * 使用hutool 工具类
diff --git a/ruoyi-modules/ruoyi-goods/src/main/resources/mapper/activity/ActivityMapper.xml b/ruoyi-modules/ruoyi-goods/src/main/resources/mapper/activity/ActivityMapper.xml
index 368f300..44e942b 100644
--- a/ruoyi-modules/ruoyi-goods/src/main/resources/mapper/activity/ActivityMapper.xml
+++ b/ruoyi-modules/ruoyi-goods/src/main/resources/mapper/activity/ActivityMapper.xml
@@ -132,7 +132,7 @@
             ta.propaganda_poster propagandaPoster,
             ta.activity_introduce activityIntroduce
         FROM t_activity ta
-        WHERE ta.del_flag = 0 AND ta.activity_status &lt;=1 AND (ta.shop_flag = 1 OR (ta.shop_flag = 2 AND FIND_IN_SET(#{shopId}, ta.applicable_shop) &gt; 0))
+        WHERE ta.del_flag = 0 AND ta.activity_status &lt;=1 AND CURRENT_TIME &lt; ta.activity_end_time AND (ta.shop_flag = 1 OR (ta.shop_flag = 2 AND FIND_IN_SET(#{shopId}, ta.applicable_shop) &gt; 0))
         group by ta.activity_id
         ORDER BY ta.activity_status ASC,ta.create_time DESC
     </select>
diff --git a/ruoyi-modules/ruoyi-goods/src/main/resources/mapper/goods/GoodsMapper.xml b/ruoyi-modules/ruoyi-goods/src/main/resources/mapper/goods/GoodsMapper.xml
index 325a692..a3a23b6 100644
--- a/ruoyi-modules/ruoyi-goods/src/main/resources/mapper/goods/GoodsMapper.xml
+++ b/ruoyi-modules/ruoyi-goods/src/main/resources/mapper/goods/GoodsMapper.xml
@@ -330,7 +330,7 @@
         IFNULL(tsg.service_num,tg.service_num) serviceNum
         FROM t_goods tg
         LEFT JOIN t_goods_file tgf ON tg.goods_id = tgf.goods_id AND tgf.del_flag = 0 AND tgf.file_type = 1
-        LEFT JOIN t_shop_goods tsg ON tg.goods_id = tsg.goods_id AND tsg.shop_id = #{param.shopId} AND tsg.del_flag = 0
+        LEFT JOIN t_shop_goods tsg ON tg.goods_id = tsg.goods_id AND tsg.shop_id = #{shopId} AND tsg.del_flag = 0
         WHERE tg.del_flag = 0 AND tg.goods_status = 1  AND tg.goods_type = 1 AND cycle_num_flag = 1
         ORDER BY tg.create_time DESC
     </select>
@@ -476,7 +476,7 @@
         INNER JOIN t_goods tg ON tg.goods_id = tag.goods_id
         LEFT JOIN t_goods_file tgf ON tg.goods_id = tgf.goods_id AND tgf.del_flag = 0 AND tgf.file_type = 1
         LEFT JOIN t_shop_goods tsg ON tg.goods_id = tsg.goods_id AND tsg.shop_id = #{param.shopId}
-        WHERE tg.del_flag = 0 AND tg.goods_status = 1 AND tag.activity_id = #{param.activityId}
+        WHERE tag.del_flag = 0 AND tg.del_flag = 0 AND tg.goods_status = 1 AND tag.activity_id = #{param.activityId}
         ORDER BY tg.create_time DESC
     </select>
 
diff --git a/ruoyi-modules/ruoyi-member/src/main/java/com/ruoyi/member/controller/miniapp/AppMemberController.java b/ruoyi-modules/ruoyi-member/src/main/java/com/ruoyi/member/controller/miniapp/AppMemberController.java
index 63a63ab..2a0ac58 100644
--- a/ruoyi-modules/ruoyi-member/src/main/java/com/ruoyi/member/controller/miniapp/AppMemberController.java
+++ b/ruoyi-modules/ruoyi-member/src/main/java/com/ruoyi/member/controller/miniapp/AppMemberController.java
@@ -105,22 +105,29 @@
         Long userId = SecurityUtils.getUserId();
         Member member = memberService.getByUserId(userId);
         AppBirthdayCardVo appBirthdayCardVo = new AppBirthdayCardVo();
-        if(StringUtils.isNotBlank(member.getBirthday())){
-            appBirthdayCardVo.setHaveBirthdayFlag(1);
-            String birthday = member.getBirthday();
-            LocalDate today = LocalDate.now();
-            int birthdayMonth = Integer.parseInt(birthday.split("-")[1]);
-            int todayMonth = today.getMonthValue();
-            if (birthdayMonth == todayMonth) {
-                appBirthdayCardVo = birthdayCardService.getUserBirthdayCard(userId,member.getRelationShopId());
-                appBirthdayCardVo.setHaveBirthdayFlag(1);
-                appBirthdayCardVo.setInBirthdayFlag(1);
-            } else {
-                appBirthdayCardVo.setHaveBirthdayFlag(1);
-                appBirthdayCardVo.setInBirthdayFlag(0);
+        appBirthdayCardVo.setCheckBirthdayCard(0);
+        if(member.getBindingFlag()==1){
+            Integer check = birthdayCardService.checkBirthdayCard(member.getRelationShopId());
+            if(check==1){
+                appBirthdayCardVo.setCheckBirthdayCard(1);
+                if(StringUtils.isNotBlank(member.getBirthday())){
+                    appBirthdayCardVo.setHaveBirthdayFlag(1);
+                    String birthday = member.getBirthday();
+                    LocalDate today = LocalDate.now();
+                    int birthdayMonth = Integer.parseInt(birthday.split("-")[1]);
+                    int todayMonth = today.getMonthValue();
+                    if (birthdayMonth == todayMonth) {
+                        appBirthdayCardVo = birthdayCardService.getUserBirthdayCard(userId,member.getRelationShopId());
+                        appBirthdayCardVo.setHaveBirthdayFlag(1);
+                        appBirthdayCardVo.setInBirthdayFlag(1);
+                    } else {
+                        appBirthdayCardVo.setHaveBirthdayFlag(1);
+                        appBirthdayCardVo.setInBirthdayFlag(0);
+                    }
+                }else{
+                    appBirthdayCardVo.setHaveBirthdayFlag(0);
+                }
             }
-        }else{
-            appBirthdayCardVo.setHaveBirthdayFlag(0);
         }
         return R.ok(appBirthdayCardVo);
     }
diff --git a/ruoyi-modules/ruoyi-member/src/main/java/com/ruoyi/member/domain/dto/MerMemberPageDto.java b/ruoyi-modules/ruoyi-member/src/main/java/com/ruoyi/member/domain/dto/MerMemberPageDto.java
index f5abee2..4a24054 100644
--- a/ruoyi-modules/ruoyi-member/src/main/java/com/ruoyi/member/domain/dto/MerMemberPageDto.java
+++ b/ruoyi-modules/ruoyi-member/src/main/java/com/ruoyi/member/domain/dto/MerMemberPageDto.java
@@ -38,9 +38,15 @@
     @ApiModelProperty(value = "用户标签")
     private String memberTag;
 
-    @ApiModelProperty(value = "剩余次数")
+    @ApiModelProperty(value = "剩余次数1.5次以下2.5-10次3.10次以上")
     private Integer surpNum;
 
+    @ApiModelProperty(value = "剩余次数")
+    private Integer surpStartNum;
+
+    @ApiModelProperty(value = "剩余次数")
+    private Integer surpEndNum;
+
     @ApiModelProperty(value = "会员等级")
     private String memberLevel;
 
diff --git a/ruoyi-modules/ruoyi-member/src/main/java/com/ruoyi/member/domain/dto/MgtMemberSuggestPageDto.java b/ruoyi-modules/ruoyi-member/src/main/java/com/ruoyi/member/domain/dto/MgtMemberSuggestPageDto.java
index d9472b7..941fae9 100644
--- a/ruoyi-modules/ruoyi-member/src/main/java/com/ruoyi/member/domain/dto/MgtMemberSuggestPageDto.java
+++ b/ruoyi-modules/ruoyi-member/src/main/java/com/ruoyi/member/domain/dto/MgtMemberSuggestPageDto.java
@@ -4,8 +4,6 @@
 import io.swagger.annotations.ApiModelProperty;
 import lombok.Data;
 
-import java.util.Date;
-
 /**
  * @ClassName MgtMemberSuggestPageDto
  * @Description TODO
@@ -60,4 +58,7 @@
 
     @ApiModelProperty(value = "商户id集合",hidden = true)
     private String shopIds;
+
+    @ApiModelProperty(value = "建议类型1平台响应正序2平台响应倒序3商户响应正序4商户响应倒序")
+    private Integer suggestSort;
 }
diff --git a/ruoyi-modules/ruoyi-member/src/main/java/com/ruoyi/member/domain/pojo/member/MemberSuggest.java b/ruoyi-modules/ruoyi-member/src/main/java/com/ruoyi/member/domain/pojo/member/MemberSuggest.java
index f638059..441727f 100644
--- a/ruoyi-modules/ruoyi-member/src/main/java/com/ruoyi/member/domain/pojo/member/MemberSuggest.java
+++ b/ruoyi-modules/ruoyi-member/src/main/java/com/ruoyi/member/domain/pojo/member/MemberSuggest.java
@@ -76,6 +76,9 @@
 
     @TableField("response_time")
     private String responseTime;
+
+    @TableField("response_timestamp")
+    private Long responseTimestamp;
     /**
      * 商户id
      */
@@ -115,6 +118,9 @@
     @TableField("shop_response_time")
     private String shopResponseTime;
 
+    @TableField("shop_response_timestamp")
+    private Long shopResponseTimestamp;
+
     /**
      * 回复标记
      */
diff --git a/ruoyi-modules/ruoyi-member/src/main/java/com/ruoyi/member/domain/vo/AppBirthdayCardVo.java b/ruoyi-modules/ruoyi-member/src/main/java/com/ruoyi/member/domain/vo/AppBirthdayCardVo.java
index a0e6600..d440bfe 100644
--- a/ruoyi-modules/ruoyi-member/src/main/java/com/ruoyi/member/domain/vo/AppBirthdayCardVo.java
+++ b/ruoyi-modules/ruoyi-member/src/main/java/com/ruoyi/member/domain/vo/AppBirthdayCardVo.java
@@ -15,6 +15,9 @@
 @Data
 public class AppBirthdayCardVo {
 
+    @ApiModelProperty(value = "生日卡是否开启0否1是")
+    private Integer checkBirthdayCard;
+
     @ApiModelProperty(value = "是否有生日0否1是")
     private Integer haveBirthdayFlag;
 
diff --git a/ruoyi-modules/ruoyi-member/src/main/java/com/ruoyi/member/domain/vo/AppMemberCouponPageVo.java b/ruoyi-modules/ruoyi-member/src/main/java/com/ruoyi/member/domain/vo/AppMemberCouponPageVo.java
index fb5da35..64b383a 100644
--- a/ruoyi-modules/ruoyi-member/src/main/java/com/ruoyi/member/domain/vo/AppMemberCouponPageVo.java
+++ b/ruoyi-modules/ruoyi-member/src/main/java/com/ruoyi/member/domain/vo/AppMemberCouponPageVo.java
@@ -55,7 +55,7 @@
     private Date deadlineTime;
 
     @ApiModelProperty(value = "使用时间")
-    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
+    @JsonFormat(pattern = "yyyy.MM.dd HH:mm:ss")
     private Date useTime;
 
     @ApiModelProperty(value = "核销店铺")
diff --git a/ruoyi-modules/ruoyi-member/src/main/java/com/ruoyi/member/domain/vo/MgtMemberSuggestPageVo.java b/ruoyi-modules/ruoyi-member/src/main/java/com/ruoyi/member/domain/vo/MgtMemberSuggestPageVo.java
index a2c2791..382db9b 100644
--- a/ruoyi-modules/ruoyi-member/src/main/java/com/ruoyi/member/domain/vo/MgtMemberSuggestPageVo.java
+++ b/ruoyi-modules/ruoyi-member/src/main/java/com/ruoyi/member/domain/vo/MgtMemberSuggestPageVo.java
@@ -61,6 +61,9 @@
     @Excel(name = "平台响应时间", width = 30)
     @ApiModelProperty(value = "平台响应时间")
     private String responseTime;
+    @Excel(name = "回复商户名", width = 30)
+    @ApiModelProperty(value = "回复商户名")
+    private String replayShopName;
     @Excel(name = "商户回复人姓名", width = 30)
     @ApiModelProperty(value = "商户回复人姓名")
     private String shopReplayUserName;
diff --git a/ruoyi-modules/ruoyi-member/src/main/java/com/ruoyi/member/service/birthday/BirthdayCardService.java b/ruoyi-modules/ruoyi-member/src/main/java/com/ruoyi/member/service/birthday/BirthdayCardService.java
index 5f5fd5a..5ab8201 100644
--- a/ruoyi-modules/ruoyi-member/src/main/java/com/ruoyi/member/service/birthday/BirthdayCardService.java
+++ b/ruoyi-modules/ruoyi-member/src/main/java/com/ruoyi/member/service/birthday/BirthdayCardService.java
@@ -112,4 +112,13 @@
      * @return  List<AppMemberPrizePageVo>
      */
     List<AppMemberPrizePageVo> pageAppMemberPrize(Page page, Long userId);
+
+    /**
+     * @description  判断生日卡开启状态
+     * @author  jqs
+     * @date    2023/8/1 15:43
+     * @param
+     * @return  void
+     */
+    Integer checkBirthdayCard(Long shopId);
 }
diff --git a/ruoyi-modules/ruoyi-member/src/main/java/com/ruoyi/member/service/impl/birthday/BirthdayCardServiceImpl.java b/ruoyi-modules/ruoyi-member/src/main/java/com/ruoyi/member/service/impl/birthday/BirthdayCardServiceImpl.java
index 110f774..b223bc4 100644
--- a/ruoyi-modules/ruoyi-member/src/main/java/com/ruoyi/member/service/impl/birthday/BirthdayCardServiceImpl.java
+++ b/ruoyi-modules/ruoyi-member/src/main/java/com/ruoyi/member/service/impl/birthday/BirthdayCardServiceImpl.java
@@ -381,7 +381,7 @@
                 birthdayGift.setGiftName(dto.getGiftName());
                 birthdayGift.setGiftNumber(dto.getGiftNumber());
                 birthdayGift.setMoney(dto.getMoney());
-                birthdayGift.setWinningProbability(dto.getWinningProbability());
+                birthdayGift.setWinningProbability(new BigDecimal("100.00"));
                 birthdayGiftList.add(birthdayGift);
             });
             // 批量保存生日礼物
@@ -545,8 +545,8 @@
                                 break;
                             case 4:
                                 // 礼物类型为4,即礼品
-                                appBirthdayGiftVo.setGiftName(birthdayGift.getCouponName());
-                                appBirthdayGiftVo.setGiftNumber(birthdayGift.getCouponNumber());
+                                appBirthdayGiftVo.setGiftName(birthdayGift.getGiftName());
+                                appBirthdayGiftVo.setGiftNumber(birthdayGift.getGiftNumber());
                                 memberGiftRecord.setGiftName(birthdayGift.getGiftName());
                                 memberGiftRecord.setGiftNumber(birthdayGift.getGiftNumber());
                                 break;
@@ -679,4 +679,27 @@
         }
         return memberPrizePageVoList;
     }
+
+
+    /**
+     * @description  判断生日卡开启状态
+     * @author  jqs
+     * @date    2023/8/1 15:43
+     * @param
+     * @return  void
+     */
+    @Override
+    public Integer checkBirthdayCard(Long shopId){
+        // 获取平台生日卡信息
+        BirthdayCard plBirthdayCard = birthdayCardMapper.getPlatformBirthdayCard(shopId);
+        // 如果生日卡存在
+        if (plBirthdayCard == null || plBirthdayCard.getCardStatus()!=1) {
+            return 0;
+        }
+        Integer marketingStatus = remoteShopService.getShopMarketingStatus(shopId).getData();
+        if(marketingStatus<=1){
+            return 0;
+        }
+        return 1;
+    }
 }
diff --git a/ruoyi-modules/ruoyi-member/src/main/java/com/ruoyi/member/service/impl/coupon/CouponServiceImpl.java b/ruoyi-modules/ruoyi-member/src/main/java/com/ruoyi/member/service/impl/coupon/CouponServiceImpl.java
index bbeae66..e45d371 100644
--- a/ruoyi-modules/ruoyi-member/src/main/java/com/ruoyi/member/service/impl/coupon/CouponServiceImpl.java
+++ b/ruoyi-modules/ruoyi-member/src/main/java/com/ruoyi/member/service/impl/coupon/CouponServiceImpl.java
@@ -744,7 +744,7 @@
     public void auditMgtCoupon(MgtCouponAuditDto mgtCouponAuditDto){
         Coupon coupon = this.getById(mgtCouponAuditDto.getCouponId());
         //判断优惠券是否审核
-        if(coupon.getCouponStatus()!=1){
+        if(coupon.getAuditStatus()!=1){
             throw new ServiceException(AppErrorConstant.COUPON_AUDIT_DOUBLE);
         }
         coupon.setAuditStatus(mgtCouponAuditDto.getAuditStatus());
@@ -752,7 +752,7 @@
         coupon.setUpdateTime(new Date());
         coupon.setUpdateUserId(mgtCouponAuditDto.getUserId());
         //审核通过后判断是否立即发放
-        if(coupon.getCouponStatus()==2&&coupon.getSendTimeType()==1){
+        if(coupon.getAuditStatus()==2&&coupon.getSendTimeType()==1){
             List<CouponRelUser> couponRelUserList = couponRelUserService.list(new LambdaQueryWrapper<CouponRelUser>().eq(CouponRelUser::getDelFlag,0).eq(CouponRelUser::getCouponId,coupon.getCouponId()));
             List<Long> userIdList = new ArrayList<>();
             if(couponRelUserList!=null&&!couponRelUserList.isEmpty()){
@@ -939,6 +939,7 @@
         coupon.setValidTimeType(merCouponEditDto.getValidTimeType());
         coupon.setValidStartTime(merCouponEditDto.getValidStartTime());
         coupon.setValidEndTime(merCouponEditDto.getValidEndTime());
+        coupon.setLimitNumber(merCouponEditDto.getLimitNumber());
         coupon.setValidDay(merCouponEditDto.getValidDay());
         coupon.setUpdateTime(new Date());
         coupon.setUpdateUserId(merCouponEditDto.getUserId());
diff --git a/ruoyi-modules/ruoyi-member/src/main/java/com/ruoyi/member/service/impl/coupon/MemberCouponRecordServiceImpl.java b/ruoyi-modules/ruoyi-member/src/main/java/com/ruoyi/member/service/impl/coupon/MemberCouponRecordServiceImpl.java
index b11a98b..8223380 100644
--- a/ruoyi-modules/ruoyi-member/src/main/java/com/ruoyi/member/service/impl/coupon/MemberCouponRecordServiceImpl.java
+++ b/ruoyi-modules/ruoyi-member/src/main/java/com/ruoyi/member/service/impl/coupon/MemberCouponRecordServiceImpl.java
@@ -66,7 +66,7 @@
                 memberCouponRecord.setLimitNum(99999);
             }
             // 如果数量达到限制数量,则设置限制标志为1
-            if (memberCouponRecord.getNum()>memberCouponRecord.getLimitNum()) {
+            if (memberCouponRecord.getNum()>=memberCouponRecord.getLimitNum()) {
                 memberCouponRecord.setLimitFlag(1);
             } else {
                 memberCouponRecord.setLimitFlag(0);
@@ -84,7 +84,7 @@
                 memberCouponRecord.setLimitNum(99999);
             }
             // 根据数量是否达到限制数量设置限制标志
-            if (memberCouponRecord.getNum()>memberCouponRecord.getLimitNum()) {
+            if (memberCouponRecord.getNum()>=memberCouponRecord.getLimitNum()) {
                 memberCouponRecord.setLimitFlag(1);
             } else {
                 memberCouponRecord.setLimitFlag(0);
diff --git a/ruoyi-modules/ruoyi-member/src/main/java/com/ruoyi/member/service/impl/member/MemberServiceImpl.java b/ruoyi-modules/ruoyi-member/src/main/java/com/ruoyi/member/service/impl/member/MemberServiceImpl.java
index a39dd9c..ca03532 100644
--- a/ruoyi-modules/ruoyi-member/src/main/java/com/ruoyi/member/service/impl/member/MemberServiceImpl.java
+++ b/ruoyi-modules/ruoyi-member/src/main/java/com/ruoyi/member/service/impl/member/MemberServiceImpl.java
@@ -377,6 +377,7 @@
      */
     @Override
     public List<MerMemberPageVo> pageMerMember(Page page, MerMemberPageDto merMemberPageDto) {
+        //处理活跃度
         List<Activeness> activenessList = remoteConfigService.listActiveness().getData();
         if (StringUtils.isNotBlank(merMemberPageDto.getMemberActiveness())) {
             if(!activenessList.isEmpty()){
@@ -390,6 +391,19 @@
                         break;
                     }
                 }
+            }
+        }
+        //处理剩余次数
+        if(merMemberPageDto.getSurpNum()!=null){
+            if(merMemberPageDto.getSurpNum()==1){
+                merMemberPageDto.setSurpStartNum(0);
+                merMemberPageDto.setSurpEndNum(5);
+            }else if(merMemberPageDto.getSurpNum()==2){
+                merMemberPageDto.setSurpStartNum(5);
+                merMemberPageDto.setSurpEndNum(10);
+            }else if(merMemberPageDto.getSurpNum()==3){
+                merMemberPageDto.setSurpStartNum(10);
+                merMemberPageDto.setSurpEndNum(999999999);
             }
         }
         List<MerMemberPageVo> merMemberPageVoList = memberMapper.pageMerMember(page, merMemberPageDto);
@@ -881,7 +895,7 @@
         }
         if(merMemberPageDto.getEndAge()!=null){
             LocalDate currentDate = LocalDate.now();
-            LocalDate startBirthday = currentDate.minusYears(merMemberPageDto.getEndAge());
+            LocalDate startBirthday = currentDate.minusYears(merMemberPageDto.getEndAge()+1);
             DateTimeFormatter formatter = DateTimeFormatter.ofPattern("yyyy-MM-dd");
             merMemberPageDto.setStartBirthday(startBirthday.format(formatter));
         }
diff --git a/ruoyi-modules/ruoyi-member/src/main/java/com/ruoyi/member/service/impl/member/MemberSuggestServiceImpl.java b/ruoyi-modules/ruoyi-member/src/main/java/com/ruoyi/member/service/impl/member/MemberSuggestServiceImpl.java
index 460d6f1..dea4669 100644
--- a/ruoyi-modules/ruoyi-member/src/main/java/com/ruoyi/member/service/impl/member/MemberSuggestServiceImpl.java
+++ b/ruoyi-modules/ruoyi-member/src/main/java/com/ruoyi/member/service/impl/member/MemberSuggestServiceImpl.java
@@ -104,6 +104,7 @@
     @Override
     public List<MgtMemberSuggestPageVo> pageMgtMemberSuggest(Page page,MgtMemberSuggestPageDto memberSuggestPageDto){
         //如果区域代码不为null获取对应的商户id
+        List<MgtMemberSuggestPageVo> mgtMemberSuggestPageVoList = new ArrayList<>();
         if(StringUtils.isNotBlank(memberSuggestPageDto.getKeyword())||StringUtils.isNotBlank(memberSuggestPageDto.getShopProvinceCode())||StringUtils.isNotBlank(memberSuggestPageDto.getShopCityCode())||StringUtils.isNotBlank(memberSuggestPageDto.getShopAreaCode())){
             MgtShopIdByCodeDto mgtShopIdByCodeDto = new MgtShopIdByCodeDto();
             mgtShopIdByCodeDto.setShopName(memberSuggestPageDto.getKeyword());
@@ -113,6 +114,8 @@
             MgtShopIdByCodeVo mgtShopIdByCodeVo = remoteShopService.getShopIdByCode(mgtShopIdByCodeDto).getData();
             if(StringUtils.isNotBlank(mgtShopIdByCodeVo.getShopIds())){
                 memberSuggestPageDto.setShopIds(mgtShopIdByCodeVo.getShopIds());
+            }else{
+                return mgtMemberSuggestPageVoList;
             }
         }
         //处理标签为正则方便sql判断
@@ -123,7 +126,7 @@
             memberSuggestPageDto.setSuggestStatus(0);
         }
         //获取返回结果
-        List<MgtMemberSuggestPageVo> mgtMemberSuggestPageVoList = memberSuggestMapper.pageMgtMemberSuggest(page, memberSuggestPageDto);
+        mgtMemberSuggestPageVoList = memberSuggestMapper.pageMgtMemberSuggest(page, memberSuggestPageDto);
         return mgtMemberSuggestPageVoList;
     }
 
@@ -146,6 +149,8 @@
         memberSuggest.setReplayFlag(1);
         String responseTime = DateUtils.formatDuration(memberSuggest.getCreateTime(), memberSuggest.getReplayTime());
         memberSuggest.setResponseTime(responseTime);
+        long responseTimestamp = DateUtils.diffTime(memberSuggest.getCreateTime(), memberSuggest.getReplayTime());
+        memberSuggest.setResponseTimestamp(responseTimestamp);
         this.saveOrUpdate(memberSuggest);
     }
 
diff --git a/ruoyi-modules/ruoyi-member/src/main/resources/mapper/coupon/CouponMapper.xml b/ruoyi-modules/ruoyi-member/src/main/resources/mapper/coupon/CouponMapper.xml
index 9bff2fa..c3b56f6 100644
--- a/ruoyi-modules/ruoyi-member/src/main/resources/mapper/coupon/CouponMapper.xml
+++ b/ruoyi-modules/ruoyi-member/src/main/resources/mapper/coupon/CouponMapper.xml
@@ -201,7 +201,7 @@
             coupon_id couponId,
             coupon_name couponName
         FROM t_coupon
-        WHERE del_flag = 0
+        WHERE del_flag = 0 AND coupon_status = 1 AND audit_status = 2
         <if test="param.shopId!=null and param.shopId!='' ">
             AND shop_id = #{param.shopId}
         </if>
@@ -354,7 +354,7 @@
             tc.discount_percent discountPercent,
             tc.rel_goods_ids relGoodsIds
         FROM t_coupon tc
-        WHERE tc.del_flag = 0 AND tc.coupon_status = 1 AND tc.send_type = 1 AND (tc.coupon_from = 1 OR (tc.coupon_from = 2 AND tc.shop_id = #{shopId}))
+        WHERE tc.del_flag = 0 AND tc.coupon_status = 1 AND tc.audit_status = 2 AND tc.send_type = 1 AND (tc.coupon_from = 1 OR (tc.coupon_from = 2 AND tc.shop_id = #{shopId}))
         AND (tc.send_target = 2
              <if test="memberFlag != null and memberFlag = 1">
                  OR tc.send_target = 3
diff --git a/ruoyi-modules/ruoyi-member/src/main/resources/mapper/member/MemberMapper.xml b/ruoyi-modules/ruoyi-member/src/main/resources/mapper/member/MemberMapper.xml
index 82090cd..6c6afec 100644
--- a/ruoyi-modules/ruoyi-member/src/main/resources/mapper/member/MemberMapper.xml
+++ b/ruoyi-modules/ruoyi-member/src/main/resources/mapper/member/MemberMapper.xml
@@ -189,8 +189,11 @@
         <if test="param.taskEndDate!=null and param.taskEndDate!=''">
             AND Date(tmt.next_task_time) &lt;= #{param.taskEndDate}
         </if>
-        <if test="param.surpNum != null and param.surpNum != ''">
-            AND tmt.useable_service_count = #{param.surpNum}
+        <if test="param.surpStartNum != null and param.surpStartNum != ''">
+            AND tmt.useable_service_count &gt;= #{param.surpStartNum}
+        </if>
+        <if test="param.surpEndNum != null and param.surpEndNum != ''">
+            AND tmt.useable_service_count &lt; #{param.surpEndNum}
         </if>
         <if test="param.memberNurse != null and param.memberNurse != ''">
             AND FIND_IN_SET(#{param.memberNurse},tm.member_nurse) &gt; 0
@@ -334,7 +337,7 @@
             tm.user_id userId,
             tm.real_name realName,
             tm.nick_name nickName,
-            tm.mobile mobile
+            tm.mobile userMobile
         FROM t_member tm
         WHERE tm.del_flag = 0 AND FIND_IN_SET(tm.user_id, #{userIds}) &gt; 0
     </select>
diff --git a/ruoyi-modules/ruoyi-member/src/main/resources/mapper/member/MemberSuggestMapper.xml b/ruoyi-modules/ruoyi-member/src/main/resources/mapper/member/MemberSuggestMapper.xml
index f85c6f3..7f53c05 100644
--- a/ruoyi-modules/ruoyi-member/src/main/resources/mapper/member/MemberSuggestMapper.xml
+++ b/ruoyi-modules/ruoyi-member/src/main/resources/mapper/member/MemberSuggestMapper.xml
@@ -27,7 +27,7 @@
             tm.nick_name userNickName,
             CASE tm.gender WHEN 0 THEN "男" WHEN 1 THEN "女" ELSE "未知" END gender,
             tm.mobile userMobile,
-            CASE tms.suggest_type WHEN 1 THEN "平台" WHEN 1 THEN "门店" ELSE "未知" END suggestType,
+            CASE tms.suggest_type WHEN 1 THEN "平台建议" WHEN 2 THEN "店铺建议" ELSE "未知" END suggestType,
             tms.suggest_content suggestContent,
             tms.replay_content replayContent,
             tms.shop_replay_content shopReplayContent,
@@ -78,8 +78,21 @@
             AND tms.suggest_type = #{param.suggestType}
         </if>
         <if test="param.shopIds!=null and param.shopIds!=''">
-            AND tms.shop_id IN (#{param.shopIds})
+            AND FIND_IN_SET(tms.shop_id, #{param.shopIds}) > 0
         </if>
-        ORDER BY tms.replay_flag ASC,tms.create_time DESC
+        ORDER BY
+        <if test="param.suggestSort!=null and param.suggestSort==1">
+            tms.response_timestamp ASC,
+        </if>
+        <if test="param.suggestSort!=null and param.suggestSort==2">
+            tms.response_timestamp DESC,
+        </if>
+        <if test="param.suggestSort!=null and param.suggestSort==3">
+            tms.shop_response_timestamp ASC,
+        </if>
+        <if test="param.suggestSort!=null and param.suggestSort==4">
+            tms.shop_response_timestamp DESC,
+        </if>
+            tms.replay_flag ASC,tms.create_time DESC
     </select>
 </mapper>
diff --git a/ruoyi-modules/ruoyi-order/src/main/java/com/ruoyi/order/controller/business/MerTotalController.java b/ruoyi-modules/ruoyi-order/src/main/java/com/ruoyi/order/controller/business/MerTotalController.java
index 6003f99..6f6333e 100644
--- a/ruoyi-modules/ruoyi-order/src/main/java/com/ruoyi/order/controller/business/MerTotalController.java
+++ b/ruoyi-modules/ruoyi-order/src/main/java/com/ruoyi/order/controller/business/MerTotalController.java
@@ -73,4 +73,5 @@
         MerOrderFromRankVo orderTotalVo = orderService.getMerOrderFromRank(merTotalDto);
         return R.ok(orderTotalVo);
     }
+
 }
diff --git a/ruoyi-modules/ruoyi-order/src/main/java/com/ruoyi/order/controller/miniapp/AppOrderController.java b/ruoyi-modules/ruoyi-order/src/main/java/com/ruoyi/order/controller/miniapp/AppOrderController.java
index d133b16..ff9ee11 100644
--- a/ruoyi-modules/ruoyi-order/src/main/java/com/ruoyi/order/controller/miniapp/AppOrderController.java
+++ b/ruoyi-modules/ruoyi-order/src/main/java/com/ruoyi/order/controller/miniapp/AppOrderController.java
@@ -181,6 +181,7 @@
         appPlaceOrderVo.setOrderId(order.getOrderId());
         appPlaceOrderVo.setOrderNo(order.getOrderNo());
         appPlaceOrderVo.setPayType(order.getPayType());
+        appPlaceOrderVo.setPayMoney(order.getPayMoney());
         appPlaceOrderVo.setUnpaidMoney(order.getPayMoney());
         Integer delayTime = 30;
         if(redisService.hasKey(SecurityConstant.AUTO_CANCEL_ORDER_TIME)){
diff --git a/ruoyi-modules/ruoyi-order/src/main/java/com/ruoyi/order/domain/dto/MerOrderPageDto.java b/ruoyi-modules/ruoyi-order/src/main/java/com/ruoyi/order/domain/dto/MerOrderPageDto.java
index 4c94e4a..d608eec 100644
--- a/ruoyi-modules/ruoyi-order/src/main/java/com/ruoyi/order/domain/dto/MerOrderPageDto.java
+++ b/ruoyi-modules/ruoyi-order/src/main/java/com/ruoyi/order/domain/dto/MerOrderPageDto.java
@@ -4,6 +4,8 @@
 import io.swagger.annotations.ApiModelProperty;
 import lombok.Data;
 
+import java.util.List;
+
 /**
  * @author jqs34
  * @ClassName MerMemberNoClearOrderDto
@@ -19,6 +21,9 @@
     @ApiModelProperty(value = "会员用户id")
     private Long memberUserId;
 
+    @ApiModelProperty(value = "会员用户id",hidden = true)
+    private List<Long> memberUserIdList;
+
     @ApiModelProperty(value = "搜索关键词")
     private String keyword;
 
diff --git a/ruoyi-modules/ruoyi-order/src/main/java/com/ruoyi/order/domain/vo/MerOrderPageVo.java b/ruoyi-modules/ruoyi-order/src/main/java/com/ruoyi/order/domain/vo/MerOrderPageVo.java
index 8c92c23..1915b74 100644
--- a/ruoyi-modules/ruoyi-order/src/main/java/com/ruoyi/order/domain/vo/MerOrderPageVo.java
+++ b/ruoyi-modules/ruoyi-order/src/main/java/com/ruoyi/order/domain/vo/MerOrderPageVo.java
@@ -39,6 +39,9 @@
     @ApiModelProperty(value = "订单状态0.已取消1.待支付2.待核销3.已完成")
     private Integer orderStatus;
 
+    @ApiModelProperty(value = "支付方式1.全款2.订金")
+    private Integer payType;
+
     @ApiModelProperty(value = "商品总价")
     private BigDecimal orderGoodsMoney;
 
diff --git a/ruoyi-modules/ruoyi-order/src/main/java/com/ruoyi/order/scheduler/OrderScheduler.java b/ruoyi-modules/ruoyi-order/src/main/java/com/ruoyi/order/scheduler/OrderScheduler.java
index e3985a6..afbd3d9 100644
--- a/ruoyi-modules/ruoyi-order/src/main/java/com/ruoyi/order/scheduler/OrderScheduler.java
+++ b/ruoyi-modules/ruoyi-order/src/main/java/com/ruoyi/order/scheduler/OrderScheduler.java
@@ -23,7 +23,7 @@
 
 
     /**
-     * 定时检查跟进任务状态
+     * 定时检查订单状态任务开始执行
      */
     @Scheduled(cron="0 0/15 * * * ?")
     private void timingCheckMemberCoupon(){
diff --git a/ruoyi-modules/ruoyi-order/src/main/java/com/ruoyi/order/service/impl/order/ConsumerGoodsServiceImpl.java b/ruoyi-modules/ruoyi-order/src/main/java/com/ruoyi/order/service/impl/order/ConsumerGoodsServiceImpl.java
index 40e2f7e..58c6aa5 100644
--- a/ruoyi-modules/ruoyi-order/src/main/java/com/ruoyi/order/service/impl/order/ConsumerGoodsServiceImpl.java
+++ b/ruoyi-modules/ruoyi-order/src/main/java/com/ruoyi/order/service/impl/order/ConsumerGoodsServiceImpl.java
@@ -8,6 +8,7 @@
 import com.ruoyi.common.core.utils.uuid.IdUtils;
 import com.ruoyi.order.domain.dto.*;
 import com.ruoyi.order.domain.pojo.order.ConsumerGoods;
+import com.ruoyi.order.domain.pojo.order.ServiceRecordDetail;
 import com.ruoyi.order.domain.pojo.order.UserServiceRecord;
 import com.ruoyi.order.domain.vo.AppConsumerPageVo;
 import com.ruoyi.order.domain.vo.MerConsumerGoodsListVo;
@@ -15,6 +16,7 @@
 import com.ruoyi.order.domain.vo.MerMemberConsumerGoodsTotalVo;
 import com.ruoyi.order.mapper.order.ConsumerGoodsMapper;
 import com.ruoyi.order.service.order.ConsumerGoodsService;
+import com.ruoyi.order.service.order.ServiceRecordDetailService;
 import com.ruoyi.order.service.order.UserServiceRecordService;
 import com.ruoyi.system.api.constant.AppErrorConstant;
 import com.ruoyi.system.api.domain.dto.AppShopGoodsGetDto;
@@ -60,6 +62,9 @@
 
     @Resource
     private RemoteGoodsService remoteGoodsService;
+
+    @Resource
+    private ServiceRecordDetailService serviceRecordDetailService;
 
     /**
      * 获取用户服务
@@ -213,7 +218,7 @@
     public void useMerConsumerGoods(MerSureConsumerGoodsDto merSureConsumerGoodsDto){
         List<MerSureConsumerGoodsListDto> goodsList = merSureConsumerGoodsDto.getMerSureConsumerGoodsListDtoList();
         if (goodsList != null && !goodsList.isEmpty()) {
-            ConsumerGoods goods;
+            ConsumerGoods consumerGoods;
             Integer serviceNum;
             Integer usedNum;
             Integer useNum;
@@ -231,42 +236,45 @@
             Integer experienceService = 0;
             Integer experiencePerson = 0;
             //获取会员商品总数
+            List<ServiceRecordDetail> serviceRecordDetailList = new ArrayList<>();
+            ServiceRecordDetail serviceRecordDetail;
             MerMemberConsumerGoodsTotalVo memberGoodsTotal = this.getMemberConsumerGoodsTotalVo(merSureConsumerGoodsDto.getMemberUserId(), merSureConsumerGoodsDto.getShopId());
             for (MerSureConsumerGoodsListDto goodsDto : goodsList) {
-                goods = this.getById(goodsDto.getConsumerGoodsId());
-                serviceNum = goods.getServiceNum();
-                usedNum = goods.getUsedNum();
+                consumerGoods = this.getById(goodsDto.getConsumerGoodsId());
+                serviceRecordDetail = new ServiceRecordDetail();
+                serviceNum = consumerGoods.getServiceNum();
+                usedNum = consumerGoods.getUsedNum();
                 surplusNum = serviceNum - usedNum;
                 useNum = goodsDto.getServiceNum();
                 //判断使用数量是否超过剩余数量
                 if (useNum > surplusNum) {
                     throw new ServiceException(AppErrorConstant.BEYOND_SURP_NUM);
                 }
-                goods.setUsedNum(usedNum + useNum);
-                goods.setUseTime(new Date());
+                consumerGoods.setUsedNum(usedNum + useNum);
+                consumerGoods.setUseTime(new Date());
                 //判断商品是否已使用完
-                if (goods.getUsedNum().equals(serviceNum)) {
-                    goods.setServiceStatus(2);
-                    goods.setCompleteTime(new Date());
+                if (consumerGoods.getUsedNum().equals(serviceNum)) {
+                    consumerGoods.setServiceStatus(2);
+                    consumerGoods.setCompleteTime(new Date());
                 }
-                this.saveOrUpdate(goods);
-                shopId = goods.getShopId();
-                userId = goods.getUserId();
-                serviceType = goods.getGoodsType();
+                this.saveOrUpdate(consumerGoods);
+                shopId = consumerGoods.getShopId();
+                userId = consumerGoods.getUserId();
+                serviceType = consumerGoods.getGoodsType();
                 //拼接商品ID
                 if (StringUtils.isBlank(goodsIds)) {
-                    goodsIds = goods.getConsumerGoodsId();
+                    goodsIds = consumerGoods.getConsumerGoodsId();
                 } else {
-                    goodsIds = goodsIds + "," + goods.getConsumerGoodsId();
+                    goodsIds = goodsIds + "," + consumerGoods.getConsumerGoodsId();
                 }
                 //拼接商品名称
                 if (StringUtils.isBlank(goodsNames)) {
-                    goodsNames = goods.getGoodsName();
+                    goodsNames = consumerGoods.getGoodsName();
                 } else {
-                    goodsNames = goodsNames + "、" + goods.getGoodsName();
+                    goodsNames = goodsNames + "、" + consumerGoods.getGoodsName();
                 }
                 //处理商品服务次数
-                switch (goods.getGoodsType()) {
+                switch (consumerGoods.getGoodsType()) {
                     case 1:
                         cycleService = cycleService + useNum;
                         break;
@@ -279,6 +287,12 @@
                     default:
                         break;
                 }
+                serviceRecordDetail.setDelFlag(0);
+                serviceRecordDetail.setConsumerGoodsId(consumerGoods.getConsumerGoodsId());
+                serviceRecordDetail.setConsumerGoodsName(consumerGoods.getGoodsName());
+                serviceRecordDetail.setServiceNum(consumerGoods.getServiceNum());
+                serviceRecordDetail.setSurpNum(consumerGoods.getServiceNum()-consumerGoods.getUsedNum());
+                serviceRecordDetailList.add(serviceRecordDetail);
             }
             //判断是否减人
             if (cycleService > 0 && memberGoodsTotal.getCycleOrder() - cycleService < 1) {
@@ -300,6 +314,10 @@
             serviceRecord.setConsumerGoodsIds(goodsIds);
             serviceRecord.setConsumerGoodsNames(goodsNames);
             userServiceRecordService.saveOrUpdate(serviceRecord);
+            for(ServiceRecordDetail serviceRecordDetail1 : serviceRecordDetailList){
+                serviceRecordDetail1.setRecordId(serviceRecord.getId());
+            }
+            serviceRecordDetailService.saveBatch(serviceRecordDetailList);
             //更新商户和会员服务统计
             MemberTotalChangeDto memberTotalChange = new MemberTotalChangeDto();
             memberTotalChange.setUserId(merSureConsumerGoodsDto.getMemberUserId());
diff --git a/ruoyi-modules/ruoyi-order/src/main/java/com/ruoyi/order/service/impl/order/OrderServiceImpl.java b/ruoyi-modules/ruoyi-order/src/main/java/com/ruoyi/order/service/impl/order/OrderServiceImpl.java
index 9d319da..15fa0a9 100644
--- a/ruoyi-modules/ruoyi-order/src/main/java/com/ruoyi/order/service/impl/order/OrderServiceImpl.java
+++ b/ruoyi-modules/ruoyi-order/src/main/java/com/ruoyi/order/service/impl/order/OrderServiceImpl.java
@@ -243,7 +243,7 @@
                     } else if (couponType == 2 && appMemberCouponVo.getDiscountPercent() != null) {
                         discountPercent = appMemberCouponVo.getDiscountPercent();
                         goodsRealPrice = goodsTotalPrice.multiply(discountPercent).divide(BigDecimal.TEN,2,BigDecimal.ROUND_HALF_UP);
-                        discountMoney = goodsRealPrice.subtract(goodsTotalPrice);
+                        discountMoney = goodsTotalPrice.subtract(goodsRealPrice);
                         useCoupon = 1;
                         userCouponIdSet.add(memberCouponId);
                         appSureOrderGoodsVo.setMemberCouponId(memberCouponId);
@@ -597,7 +597,7 @@
                     } else if (couponType == 2 && appMemberCouponVo.getDiscountPercent() != null) {
                         discountPercent = appMemberCouponVo.getDiscountPercent();
                         goodsRealPrice = goodsTotalPrice.multiply(discountPercent).divide(BigDecimal.TEN,2, BigDecimal.ROUND_HALF_UP);
-                        discountMoney = goodsRealPrice.subtract(goodsTotalPrice);
+                        discountMoney = goodsTotalPrice.subtract(goodsRealPrice);
                         useCoupon = 1;
                     } else if (couponType == 3 && appMemberCouponVo.getDiscountMoney() != null) {
                         discountMoney = appMemberCouponVo.getDiscountMoney();
@@ -1921,6 +1921,18 @@
      */
     @Override
     public List<MerOrderPageVo> pageMerOrder(Page page, MerOrderPageDto merOrderPageDto) {
+        if(StringUtils.isNotBlank(merOrderPageDto.getKeyword())){
+            MgtUserIdByKeywordDto userIdByKeywordDto = new MgtUserIdByKeywordDto();
+            userIdByKeywordDto.setKeyword(merOrderPageDto.getKeyword());
+            MgtUserIdByKeywordVo userIdByKeywordVo = remoteMemberService.getUserIdByKeyword(userIdByKeywordDto).getData();
+            if(StringUtils.isNotBlank(userIdByKeywordVo.getUserIds())){
+                List<Long> userIdList = Arrays.stream(userIdByKeywordVo.getUserIds().split(","))
+                        .map(Long::parseLong)
+                        .collect(Collectors.toList());
+                merOrderPageDto.setMemberUserIdList(userIdList);
+                merOrderPageDto.setMemberUserId(null);
+            }
+        }
         List<MerOrderPageVo> merOrderPageVoList = orderMapper.pageMerOrder(page, merOrderPageDto);
         if (merOrderPageVoList != null && !merOrderPageVoList.isEmpty()) {
             Long userId;
@@ -1954,9 +1966,13 @@
             Map<Long, MgtSimpleMemberVo> userMap = simpleMemberVoList.stream()
                     .collect(Collectors.toMap(MgtSimpleMemberVo::getUserId, Function.identity()));
             for (MerOrderPageVo merOrderPageVo : merOrderPageVoList) {
-                merOrderPageVo.setUserName(userMap.get(merOrderPageVo.getUserId()).getRealName());
-                merOrderPageVo.setNickName(userMap.get(merOrderPageVo.getUserId()).getNickName());
-                merOrderPageVo.setUserMobile(userMap.get(merOrderPageVo.getUserId()).getUserMobile());
+                if(merOrderPageVo.getUserId()!=null&&userMap.get(merOrderPageVo.getUserId())!=null){
+                    merOrderPageVo.setUserName(userMap.get(merOrderPageVo.getUserId()).getRealName());
+                    merOrderPageVo.setNickName(userMap.get(merOrderPageVo.getUserId()).getNickName());
+                    merOrderPageVo.setUserMobile(userMap.get(merOrderPageVo.getUserId()).getUserMobile());
+                }else{
+                    log.debug("订单merOrderPageVo"+merOrderPageVo.getOrderId()+"缺少用户");
+                }
             }
         }
         return merOrderPageVoList;
@@ -2322,7 +2338,11 @@
         mgtOrderDetailVo.setCancelTime(order.getCancelTime());
         mgtOrderDetailVo.setOrderRemark(order.getOrderRemark());
         mgtOrderDetailVo.setShopId(order.getShopId());
-        mgtOrderDetailVo.setShopName(shop.getShopName());
+        if(shop!=null){
+            mgtOrderDetailVo.setShopName(shop.getShopName());
+        }else{
+            mgtOrderDetailVo.setShopName("商户已被删除");
+        }
         mgtOrderDetailVo.setVerifyTime(order.getUseTime());
         //获取支付记录
         List<MgtOrderPayListVo> orderPayListVoList = payRecordService.listMgtOrderPayVo(orderId);
@@ -3921,14 +3941,14 @@
             delayTime = redisService.getCacheObject(SecurityConstant.AUTO_CANCEL_ORDER_TIME);
         }
         delayTime = delayTime + 5;
-        Date checkTime = DateUtils.addMinutes(new Date(),delayTime);
+        Date checkTime = DateUtils.addMinutes(new Date(),-delayTime);
         LambdaQueryWrapper<Order> queryWrapper = new LambdaQueryWrapper<>();
         queryWrapper.eq(Order::getDelFlag,0);
         queryWrapper.lt(Order::getCreateTime,checkTime);
         queryWrapper.eq(Order::getOrderStatus,1);
         List<Order> orderList = this.list(queryWrapper);
         if(orderList!=null&&!orderList.isEmpty()){
-            for(Order  order: orderList){
+            for(Order order: orderList){
                 autoTimeCancelOrder(order);
             }
         }
diff --git a/ruoyi-modules/ruoyi-order/src/main/java/com/ruoyi/order/service/impl/order/UserServiceRecordServiceImpl.java b/ruoyi-modules/ruoyi-order/src/main/java/com/ruoyi/order/service/impl/order/UserServiceRecordServiceImpl.java
index f905d5c..99e844c 100644
--- a/ruoyi-modules/ruoyi-order/src/main/java/com/ruoyi/order/service/impl/order/UserServiceRecordServiceImpl.java
+++ b/ruoyi-modules/ruoyi-order/src/main/java/com/ruoyi/order/service/impl/order/UserServiceRecordServiceImpl.java
@@ -13,10 +13,17 @@
 import com.ruoyi.order.domain.vo.MgtMemberServiceTotalVo;
 import com.ruoyi.order.mapper.order.UserServiceRecordMapper;
 import com.ruoyi.order.service.order.UserServiceRecordService;
+import com.ruoyi.system.api.domain.dto.MgtBaseBathDto;
+import com.ruoyi.system.api.domain.vo.MgtSimpleShopVo;
+import com.ruoyi.system.api.service.RemoteShopService;
 import org.springframework.stereotype.Service;
 
 import javax.annotation.Resource;
+import java.util.HashSet;
 import java.util.List;
+import java.util.Map;
+import java.util.function.Function;
+import java.util.stream.Collectors;
 
 /**
  * <p>
@@ -31,6 +38,9 @@
 
     @Resource
     private UserServiceRecordMapper userServiceRecordMapper;
+
+    @Resource
+    private RemoteShopService remoteShopService;
 
     /**
      * 分页获取用户服务记录
@@ -62,7 +72,27 @@
      */
     @Override
     public List<MgtMemberServiceRecordPageVo> pageMgtMemberServiceRecord(Page page, MgtMemberServiceRecordPageDto mgtMemberServiceRecordPageDto){
-        return userServiceRecordMapper.pageMgtMemberServiceRecord(page, mgtMemberServiceRecordPageDto);
+        List<MgtMemberServiceRecordPageVo> mgtMemberServiceRecordPageVoList = userServiceRecordMapper.pageMgtMemberServiceRecord(page, mgtMemberServiceRecordPageDto);
+        if(mgtMemberServiceRecordPageVoList!=null&&!mgtMemberServiceRecordPageVoList.isEmpty()){
+            HashSet<Long> shopIdSet = new HashSet<>();
+            for(MgtMemberServiceRecordPageVo mgtMemberServiceRecordPageVo : mgtMemberServiceRecordPageVoList){
+                if(mgtMemberServiceRecordPageVo.getShopId()!=null){
+                    shopIdSet.add(mgtMemberServiceRecordPageVo.getShopId());
+                }
+            }
+            String shopJoinedString = String.join(",", shopIdSet.stream().map(Object::toString).collect(Collectors.toList()));
+            MgtBaseBathDto mgtBaseBathDto = new MgtBaseBathDto();
+            mgtBaseBathDto.setIds(shopJoinedString);
+            List<MgtSimpleShopVo> simpleShopVoList = remoteShopService.listShopSimpleVoByIds(mgtBaseBathDto).getData();
+            Map<Long, MgtSimpleShopVo> shopMap = simpleShopVoList.stream()
+                    .collect(Collectors.toMap(MgtSimpleShopVo::getShopId, Function.identity()));
+            for(MgtMemberServiceRecordPageVo mgtMemberServiceRecordPageVo : mgtMemberServiceRecordPageVoList){
+                if(mgtMemberServiceRecordPageVo.getShopId()!=null){
+                    mgtMemberServiceRecordPageVo.setShopName(shopMap.get(mgtMemberServiceRecordPageVo.getShopId()).getShopName());
+                }
+            }
+        }
+        return mgtMemberServiceRecordPageVoList;
     }
 
     /**
diff --git a/ruoyi-modules/ruoyi-order/src/main/resources/mapper/order/OrderMapper.xml b/ruoyi-modules/ruoyi-order/src/main/resources/mapper/order/OrderMapper.xml
index 3845fc3..e77189a 100644
--- a/ruoyi-modules/ruoyi-order/src/main/resources/mapper/order/OrderMapper.xml
+++ b/ruoyi-modules/ruoyi-order/src/main/resources/mapper/order/OrderMapper.xml
@@ -55,6 +55,7 @@
         <result column="userId" property="userId"/>
         <result column="orderId" property="orderId"/>
         <result column="orderStatus" property="orderStatus"/>
+        <result column="payType" property="payType"/>
         <result column="orderNo" property="orderNo"/>
         <result column="orderGoodsMoney" property="orderGoodsMoney"/>
         <result column="couponDiscount" property="couponDiscount"/>
@@ -305,6 +306,7 @@
         toc.user_id userId,
         toc.order_id orderId,
         toc.order_no orderNo,
+        toc.pay_type payType,
         toc.order_status orderStatus,
         toc.order_money orderGoodsMoney,
         toc.coupon_money couponDiscount,
@@ -323,6 +325,12 @@
         WHERE toc.del_flag = 0 AND toc.shop_id = #{param.shopId}
         <if test="param.memberUserId != null and param.memberUserId != ''">
             AND toc.user_id = #{param.memberUserId}
+        </if>
+        <if test="param.memberUserIdList != null and param.memberUserIdList.size()>0">
+            AND toc.user_id IN
+            <foreach collection="param.memberUserIdList" item="item" open="(" separator="," close=")">
+                #{item}
+            </foreach>
         </if>
         <if test="param.type != null and param.type ==1 ">
             AND (toc.order_status = 2 OR toc.order_status = 3)
@@ -1158,6 +1166,12 @@
                 #{item}
             </foreach>
         </if>
+        <if test="param.startDate!=null and param.startDate!=''">
+            AND Date(create_time) &gt;= #{param.startDate}
+        </if>
+        <if test="param.endDate!=null and param.endDate!=''">
+            AND Date(create_time) &lt;= #{param.endDate}
+        </if>
         GROUP BY tog.goods_type
     </select>
 
diff --git a/ruoyi-modules/ruoyi-shop/src/main/java/com/ruoyi/shop/controller/business/MerTaskController.java b/ruoyi-modules/ruoyi-shop/src/main/java/com/ruoyi/shop/controller/business/MerTaskController.java
index 972a364..7ac7379 100644
--- a/ruoyi-modules/ruoyi-shop/src/main/java/com/ruoyi/shop/controller/business/MerTaskController.java
+++ b/ruoyi-modules/ruoyi-shop/src/main/java/com/ruoyi/shop/controller/business/MerTaskController.java
@@ -4,10 +4,7 @@
 import com.ruoyi.common.core.domain.R;
 import com.ruoyi.common.security.utils.SecurityUtils;
 import com.ruoyi.shop.domain.dto.*;
-import com.ruoyi.shop.domain.vo.MerAgencyTaskPageVo;
-import com.ruoyi.shop.domain.vo.MerAgencyTaskRecordPageVo;
-import com.ruoyi.shop.domain.vo.MerMemberTaskPageVo;
-import com.ruoyi.shop.domain.vo.MerMemberTaskRecordPageVo;
+import com.ruoyi.shop.domain.vo.*;
 import com.ruoyi.shop.service.task.AgencyTaskRecordService;
 import com.ruoyi.shop.service.task.AgencyTaskService;
 import com.ruoyi.shop.service.task.MemberTaskRecordService;
@@ -102,6 +99,18 @@
         return R.ok(page.setRecords(merAgencyTaskPageVoList));
     }
 
+    @RequestMapping(value = "/pageMerAgencySimpleTaskRecord", method = RequestMethod.POST)
+    @ApiOperation(value = "分页获取商户代理商简易跟进任务记录列表")
+    public R<Page<MerAgencySimpleTaskRecordPageVo>> pageMerAgencySimpleTaskRecord(@RequestBody MerAgencyTaskPageDto merAgencyTaskPageDto) {
+        Long userId = SecurityUtils.getUserId();
+        merAgencyTaskPageDto.setUserId(userId);
+        Page<MerAgencySimpleTaskRecordPageVo> page = new Page<>();
+        page.setSize(merAgencyTaskPageDto.getPageSize());
+        page.setCurrent(merAgencyTaskPageDto.getPageNum());
+        List<MerAgencySimpleTaskRecordPageVo> merAgencySimpleTaskRecordPageVos = agencyTaskService.pageMerAgencySimpleTaskRecord(page,merAgencyTaskPageDto);
+        return R.ok(page.setRecords(merAgencySimpleTaskRecordPageVos));
+    }
+
     @RequestMapping(value = "/pageMerAgencyTaskRecord", method = RequestMethod.POST)
     @ApiOperation(value = "分页获取商户代理商跟进任务记录列表")
     public R<Page<MerAgencyTaskRecordPageVo>> pageMerAgencyTaskRecord(@RequestBody MerAgencyTaskPageDto merAgencyTaskPageDto) {
diff --git a/ruoyi-modules/ruoyi-shop/src/main/java/com/ruoyi/shop/domain/dto/MgtShopSuggestPageDto.java b/ruoyi-modules/ruoyi-shop/src/main/java/com/ruoyi/shop/domain/dto/MgtShopSuggestPageDto.java
index a4dcbea..09b9530 100644
--- a/ruoyi-modules/ruoyi-shop/src/main/java/com/ruoyi/shop/domain/dto/MgtShopSuggestPageDto.java
+++ b/ruoyi-modules/ruoyi-shop/src/main/java/com/ruoyi/shop/domain/dto/MgtShopSuggestPageDto.java
@@ -4,8 +4,6 @@
 import io.swagger.annotations.ApiModelProperty;
 import lombok.Data;
 
-import java.util.Date;
-
 /**
  * @author jqs34
  * @version 1.0
@@ -38,5 +36,6 @@
     @ApiModelProperty(value = "回复结束时间")
     private String replayEndTime;
 
-
+    @ApiModelProperty(value = "建议排序1回复时间正序2回复时间倒序")
+    private Integer suggestSort;
 }
diff --git a/ruoyi-modules/ruoyi-shop/src/main/java/com/ruoyi/shop/domain/pojo/shop/ShopSuggest.java b/ruoyi-modules/ruoyi-shop/src/main/java/com/ruoyi/shop/domain/pojo/shop/ShopSuggest.java
index 61ec3d8..957affa 100644
--- a/ruoyi-modules/ruoyi-shop/src/main/java/com/ruoyi/shop/domain/pojo/shop/ShopSuggest.java
+++ b/ruoyi-modules/ruoyi-shop/src/main/java/com/ruoyi/shop/domain/pojo/shop/ShopSuggest.java
@@ -84,6 +84,9 @@
     @TableField("response_time")
     private String responseTime;
 
+    @TableField("response_timestamp")
+    private Long responseTimestamp;
+
     /**
      * 商品标签
      */
diff --git a/ruoyi-modules/ruoyi-shop/src/main/java/com/ruoyi/shop/domain/vo/MerAgencySimpleTaskRecordPageVo.java b/ruoyi-modules/ruoyi-shop/src/main/java/com/ruoyi/shop/domain/vo/MerAgencySimpleTaskRecordPageVo.java
new file mode 100644
index 0000000..67cc028
--- /dev/null
+++ b/ruoyi-modules/ruoyi-shop/src/main/java/com/ruoyi/shop/domain/vo/MerAgencySimpleTaskRecordPageVo.java
@@ -0,0 +1,30 @@
+package com.ruoyi.shop.domain.vo;
+
+import com.fasterxml.jackson.annotation.JsonFormat;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+
+import java.util.Date;
+
+/**
+ * @ClassName MerAgencySimpleTaskRecordPageVo
+ * @Description TODO
+ * @Author jqs
+ * @Date 2023/8/1 17:45
+ * @Version 1.0
+ */
+@Data
+public class MerAgencySimpleTaskRecordPageVo {
+
+    @ApiModelProperty(value="跟进时间")
+    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
+    private Date createTime;
+
+    @ApiModelProperty(value="跟踪类型1电话2手动")
+    private String followType;
+
+    @ApiModelProperty(value="跟踪内容")
+    private String followContent;
+
+
+}
diff --git a/ruoyi-modules/ruoyi-shop/src/main/java/com/ruoyi/shop/mapper/task/AgencyTaskMapper.java b/ruoyi-modules/ruoyi-shop/src/main/java/com/ruoyi/shop/mapper/task/AgencyTaskMapper.java
index 2857ae8..261628a 100644
--- a/ruoyi-modules/ruoyi-shop/src/main/java/com/ruoyi/shop/mapper/task/AgencyTaskMapper.java
+++ b/ruoyi-modules/ruoyi-shop/src/main/java/com/ruoyi/shop/mapper/task/AgencyTaskMapper.java
@@ -4,6 +4,7 @@
 import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
 import com.ruoyi.shop.domain.dto.MerAgencyTaskPageDto;
 import com.ruoyi.shop.domain.pojo.task.AgencyTask;
+import com.ruoyi.shop.domain.vo.MerAgencySimpleTaskRecordPageVo;
 import com.ruoyi.shop.domain.vo.MerAgencyTaskPageVo;
 import org.apache.ibatis.annotations.Param;
 
@@ -25,4 +26,14 @@
      * @return
      */
     List<MerAgencyTaskPageVo> pageMerAgencyTask(Page page, @Param("param") MerAgencyTaskPageDto merAgencyTaskPageDto);
+
+    /**
+     * @description
+     * @author  jqs
+     * @date    2023/8/1 18:16
+     * @param page
+     * @param merAgencyTaskPageDto
+     * @return  List<MerAgencySimpleTaskRecordPageVo>
+     */
+    List<MerAgencySimpleTaskRecordPageVo>pageMerAgencySimpleTaskRecord(Page page,@Param("param") MerAgencyTaskPageDto merAgencyTaskPageDto);
 }
diff --git a/ruoyi-modules/ruoyi-shop/src/main/java/com/ruoyi/shop/service/impl/shop/ShopServiceImpl.java b/ruoyi-modules/ruoyi-shop/src/main/java/com/ruoyi/shop/service/impl/shop/ShopServiceImpl.java
index 3505a77..eb19b56 100644
--- a/ruoyi-modules/ruoyi-shop/src/main/java/com/ruoyi/shop/service/impl/shop/ShopServiceImpl.java
+++ b/ruoyi-modules/ruoyi-shop/src/main/java/com/ruoyi/shop/service/impl/shop/ShopServiceImpl.java
@@ -22,7 +22,6 @@
 import com.ruoyi.shop.service.task.MemberTaskService;
 import com.ruoyi.shop.service.task.ShopFileService;
 import com.ruoyi.shop.service.task.ShopTaskService;
-import com.ruoyi.shop.util.WxShopUtils;
 import com.ruoyi.shop.util.dto.*;
 import com.ruoyi.system.api.constant.AppErrorConstant;
 import com.ruoyi.system.api.domain.dto.*;
@@ -780,6 +779,8 @@
         merHomeShopTotalVo.setShopId(shopId);
         Shop shop = this.getById(shopId);
         merHomeShopTotalVo.setShopType(shop.getShopType());
+        merHomeShopTotalVo.setPlatformCouponFlag(shop.getPlatformCouponFlag());
+        merHomeShopTotalVo.setPlatformBirthdayFlag(shop.getPlatformBirthdayFlag());
         MerHomeShopTotalVo orderVo = remoteOrderService.getMerHomeTotal(merHomeShopTotalVo).getData();
         ShopTotal shopTotal = shopTotalService.getById(shopId);
         merHomeShopTotalVo.setShopId(shopId);
@@ -1032,11 +1033,11 @@
         submitInfo.setBusiness_addition_pics(shopAuthentication.getBaPics());
         submitInfo.setBusiness_addition_desc(shopAuthentication.getBaDesc());
         //提交审核
-        try {
+        /*try {
             WxShopUtils.ApplymentSubMch(submitInfo);
         } catch (Exception e) {
             throw new RuntimeException(e);
-        }
+        }*/
 
     }
 
diff --git a/ruoyi-modules/ruoyi-shop/src/main/java/com/ruoyi/shop/service/impl/shop/ShopStaffServiceImpl.java b/ruoyi-modules/ruoyi-shop/src/main/java/com/ruoyi/shop/service/impl/shop/ShopStaffServiceImpl.java
index 75be0de..e5afe26 100644
--- a/ruoyi-modules/ruoyi-shop/src/main/java/com/ruoyi/shop/service/impl/shop/ShopStaffServiceImpl.java
+++ b/ruoyi-modules/ruoyi-shop/src/main/java/com/ruoyi/shop/service/impl/shop/ShopStaffServiceImpl.java
@@ -82,6 +82,8 @@
         merStaffInfoVo.setBusinessTime(shop.getBusinessStartTime()+"-"+shop.getBusinessEndTime());
         merStaffInfoVo.setShopType(shop.getShopType());
         merStaffInfoVo.setShopNumber(shop.getShopNumber());
+        String shopCodeUrl = "https://wxapp.hhhrt.cn/mini/shop?shopId="+shop.getShopId();
+        merStaffInfoVo.setShopCodeUrl(shopCodeUrl);
         return merStaffInfoVo;
     }
 
diff --git a/ruoyi-modules/ruoyi-shop/src/main/java/com/ruoyi/shop/service/impl/shop/ShopSuggestServiceImpl.java b/ruoyi-modules/ruoyi-shop/src/main/java/com/ruoyi/shop/service/impl/shop/ShopSuggestServiceImpl.java
index 0a87ee0..c9df5b0 100644
--- a/ruoyi-modules/ruoyi-shop/src/main/java/com/ruoyi/shop/service/impl/shop/ShopSuggestServiceImpl.java
+++ b/ruoyi-modules/ruoyi-shop/src/main/java/com/ruoyi/shop/service/impl/shop/ShopSuggestServiceImpl.java
@@ -129,6 +129,8 @@
         shopSuggest.setReplayFlag(1);
         String responseTime = DateUtils.formatDuration(shopSuggest.getCreateTime(), shopSuggest.getReplayTime());
         shopSuggest.setResponseTime(responseTime);
+        long responseTimestamp = DateUtils.diffTime(shopSuggest.getCreateTime(), shopSuggest.getReplayTime());
+        shopSuggest.setResponseTimestamp(responseTimestamp);
         this.saveOrUpdate(shopSuggest);
     }
 
diff --git a/ruoyi-modules/ruoyi-shop/src/main/java/com/ruoyi/shop/service/impl/task/AgencyTaskServiceImpl.java b/ruoyi-modules/ruoyi-shop/src/main/java/com/ruoyi/shop/service/impl/task/AgencyTaskServiceImpl.java
index 30e138c..e4c3f49 100644
--- a/ruoyi-modules/ruoyi-shop/src/main/java/com/ruoyi/shop/service/impl/task/AgencyTaskServiceImpl.java
+++ b/ruoyi-modules/ruoyi-shop/src/main/java/com/ruoyi/shop/service/impl/task/AgencyTaskServiceImpl.java
@@ -10,6 +10,7 @@
 import com.ruoyi.shop.domain.dto.MerFollowAgencyTaskDto;
 import com.ruoyi.shop.domain.dto.MerFollowPhoneDto;
 import com.ruoyi.shop.domain.pojo.task.*;
+import com.ruoyi.shop.domain.vo.MerAgencySimpleTaskRecordPageVo;
 import com.ruoyi.shop.domain.vo.MerAgencyTaskPageVo;
 import com.ruoyi.shop.mapper.task.AgencyTaskMapper;
 import com.ruoyi.shop.service.task.AgencyTaskRecordService;
@@ -55,6 +56,19 @@
     }
 
     /**
+     * @description
+     * @author  jqs
+     * @date    2023/8/1 18:16
+     * @param page
+     * @param merAgencyTaskPageDto
+     * @return  List<MerAgencySimpleTaskRecordPageVo>
+     */
+    @Override
+    public List<MerAgencySimpleTaskRecordPageVo>pageMerAgencySimpleTaskRecord(Page page, MerAgencyTaskPageDto merAgencyTaskPageDto){
+        return agencyTaskMapper.pageMerAgencySimpleTaskRecord(page, merAgencyTaskPageDto);
+    }
+
+    /**
      *
      * @param merCreateAgencyTaskDto
      */
diff --git a/ruoyi-modules/ruoyi-shop/src/main/java/com/ruoyi/shop/service/task/AgencyTaskRecordService.java b/ruoyi-modules/ruoyi-shop/src/main/java/com/ruoyi/shop/service/task/AgencyTaskRecordService.java
index 4ce77ea..3b1b81f 100644
--- a/ruoyi-modules/ruoyi-shop/src/main/java/com/ruoyi/shop/service/task/AgencyTaskRecordService.java
+++ b/ruoyi-modules/ruoyi-shop/src/main/java/com/ruoyi/shop/service/task/AgencyTaskRecordService.java
@@ -48,5 +48,4 @@
      */
     List<StaffAgencyTaskRecordPageVo> pageStaffAgencyTaskRecord(Page page, StaffAgencyPageDto staffAgencyPageDto);
 
-
 }
diff --git a/ruoyi-modules/ruoyi-shop/src/main/java/com/ruoyi/shop/service/task/AgencyTaskService.java b/ruoyi-modules/ruoyi-shop/src/main/java/com/ruoyi/shop/service/task/AgencyTaskService.java
index c7ceacd..ab9b2d9 100644
--- a/ruoyi-modules/ruoyi-shop/src/main/java/com/ruoyi/shop/service/task/AgencyTaskService.java
+++ b/ruoyi-modules/ruoyi-shop/src/main/java/com/ruoyi/shop/service/task/AgencyTaskService.java
@@ -6,10 +6,9 @@
 import com.ruoyi.shop.domain.dto.MerAgencyTaskPageDto;
 import com.ruoyi.shop.domain.dto.MerCreateAgencyTaskDto;
 import com.ruoyi.shop.domain.dto.MerFollowAgencyTaskDto;
-import com.ruoyi.shop.domain.dto.MerMemberTaskPageDto;
 import com.ruoyi.shop.domain.pojo.task.AgencyTask;
+import com.ruoyi.shop.domain.vo.MerAgencySimpleTaskRecordPageVo;
 import com.ruoyi.shop.domain.vo.MerAgencyTaskPageVo;
-import com.ruoyi.shop.domain.vo.MerMemberTaskPageVo;
 
 import java.util.List;
 
@@ -32,6 +31,16 @@
     List<MerAgencyTaskPageVo> pageMerAgencyTask(Page page, MerAgencyTaskPageDto merAgencyTaskPageDto);
 
     /**
+     * @description
+     * @author  jqs
+     * @date    2023/8/1 18:20
+     * @param page
+     * @param merAgencyTaskPageDto
+     * @return  List<MerAgencySimpleTaskRecordPageVo>
+     */
+    List<MerAgencySimpleTaskRecordPageVo>pageMerAgencySimpleTaskRecord(Page page, MerAgencyTaskPageDto merAgencyTaskPageDto);
+
+    /**
      *
      * @param merCreateAgencyTaskDto
      */
diff --git a/ruoyi-modules/ruoyi-shop/src/main/resources/mapper/shop/ShopSuggestMapper.xml b/ruoyi-modules/ruoyi-shop/src/main/resources/mapper/shop/ShopSuggestMapper.xml
index d4f4d9b..acd18a8 100644
--- a/ruoyi-modules/ruoyi-shop/src/main/resources/mapper/shop/ShopSuggestMapper.xml
+++ b/ruoyi-modules/ruoyi-shop/src/main/resources/mapper/shop/ShopSuggestMapper.xml
@@ -33,8 +33,7 @@
         tss.replay_time replayTime,
         tss.response_time responseTime,
         tss.suggest_tags suggestTags
-        FROM
-        t_shop_suggest tss
+        FROM t_shop_suggest tss
         LEFT JOIN t_shop ts ON tss.shop_id = ts.shop_id
         WHERE tss.del_flag = 0
         <if test="param.keyword!=null and param.keyword !=''">
@@ -58,6 +57,13 @@
         <if test="param.replayEndTime!=null and param.replayEndTime!=''">
             AND Date(tss.replay_time) &lt;= #{param.replayEndTime}
         </if>
-        ORDER BY tss.replay_flag ASC,tss.create_time DESC
+        ORDER BY
+        <if test="param.suggestSort!=null and param.suggestSort==1">
+            tss.response_timestamp ASC,
+        </if>
+        <if test="param.suggestSort!=null and param.suggestSort==2">
+            tss.response_timestamp DESC,
+        </if>
+            tss.replay_flag ASC,tss.create_time DESC
     </select>
 </mapper>
diff --git a/ruoyi-modules/ruoyi-shop/src/main/resources/mapper/task/AgencyTaskMapper.xml b/ruoyi-modules/ruoyi-shop/src/main/resources/mapper/task/AgencyTaskMapper.xml
index f6ef362..dcd12c2 100644
--- a/ruoyi-modules/ruoyi-shop/src/main/resources/mapper/task/AgencyTaskMapper.xml
+++ b/ruoyi-modules/ruoyi-shop/src/main/resources/mapper/task/AgencyTaskMapper.xml
@@ -29,4 +29,15 @@
         ORDER BY tat.task_date DESC
     </select>
 
+    <select id="pageMerAgencyTask" resultType="com.ruoyi.shop.domain.vo.MerAgencySimpleTaskRecordPageVo">
+        SELECT
+        tmtr.create_time createTime,
+        CASE tmtr.follow_type WHEN 1 THEN "电话跟进" WHEN 2 THEN "手动跟进" END followType,
+        tmtr.follow_content followContent
+        FROM t_agency_task tat
+        LEFT JOIN t_agency_task_record tmtr ON tat.task_id = tmtr.task_id
+        WHERE tat.del_flag = 0 AND tat.shop_id = #{param.shopId} AND tat.agency_id = #{param.agencyId}
+        AND tat.task_status = 2
+        ORDER BY tmtr.create_time DESC
+    </select>
 </mapper>
diff --git a/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/controller/management/MgtConfigController.java b/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/controller/management/MgtConfigController.java
index c6e98ce..38d650c 100644
--- a/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/controller/management/MgtConfigController.java
+++ b/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/controller/management/MgtConfigController.java
@@ -373,6 +373,14 @@
         return R.ok(page.setRecords(mgtOperLogPageVoList));
     }
 
+    @RequestMapping(value = "/deleteOperlog", method = RequestMethod.POST)
+    @Log(title = "日志管理", businessType = BusinessType.DELETE,operContent = "清空日志")
+    @ApiOperation(value = "清空日志")
+    public R deleteOperlog() {
+        customConfigService.deleteOperlog();
+        return R.ok();
+    }
+
     @RequestMapping(value = "/exportPageOperLog", method = RequestMethod.POST)
     @ApiOperation(value = "导出操作日志")
     public void exportPageOperLog(MgtOperLogPageDto mgtOperLogPageDto, HttpServletResponse response) {
diff --git a/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/domain/dto/MgtStaffSuggestPageDto.java b/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/domain/dto/MgtStaffSuggestPageDto.java
index 3b8f800..48ac3d2 100644
--- a/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/domain/dto/MgtStaffSuggestPageDto.java
+++ b/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/domain/dto/MgtStaffSuggestPageDto.java
@@ -39,4 +39,7 @@
     @ApiModelProperty(value = "回复结束时间")
     private String replayEndTime;
 
+    @ApiModelProperty(value = "建议排序1回复时间正序2回复时间倒序")
+    private Integer suggestSort;
+
 }
diff --git a/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/domain/pojo/config/StaffSuggest.java b/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/domain/pojo/config/StaffSuggest.java
index 2b2f842..f9aa29e 100644
--- a/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/domain/pojo/config/StaffSuggest.java
+++ b/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/domain/pojo/config/StaffSuggest.java
@@ -79,6 +79,9 @@
      */
     @TableField("response_time")
     private String responseTime;
+
+    @TableField("response_timestamp")
+    private Long responseTimestamp;
     /**
      * 商户id
      */
diff --git a/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/mapper/config/CustomConfigMapper.java b/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/mapper/config/CustomConfigMapper.java
index d486b76..12da256 100644
--- a/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/mapper/config/CustomConfigMapper.java
+++ b/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/mapper/config/CustomConfigMapper.java
@@ -36,7 +36,7 @@
      * @param mgtOperLogPageDto
      * @return  List<MgtOperLogPageVo>
      */
-    List<MgtOperLogPageVo> pageOperLog(Page page, MgtOperLogPageDto mgtOperLogPageDto);
+    List<MgtOperLogPageVo> pageOperLog(Page page, @Param("param")MgtOperLogPageDto mgtOperLogPageDto);
 
     /**
      * @description
@@ -46,4 +46,13 @@
      * @return  List<String>
      */
     List<String> listOperTitle();
+
+    /**
+     * @description  删除日志
+     * @author  jqs
+     * @date    2023/8/1 19:04
+     * @param
+     * @return  void
+     */
+    void deleteOperlog();
 }
diff --git a/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/service/config/CustomConfigService.java b/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/service/config/CustomConfigService.java
index fc7a8bf..43eb4fd 100644
--- a/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/service/config/CustomConfigService.java
+++ b/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/service/config/CustomConfigService.java
@@ -96,6 +96,15 @@
     List<MgtOperLogPageVo> pageOperLog(Page page, MgtOperLogPageDto mgtOperLogPageDto);
 
     /**
+     * @description  删除日志
+     * @author  jqs
+     * @date    2023/8/1 19:39
+     * @param
+     * @return  void
+     */
+    void deleteOperlog();
+
+    /**
      * @description
      * @author  jqs
      * @date    2023/7/13 15:53
diff --git a/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/config/AdvertServiceImpl.java b/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/config/AdvertServiceImpl.java
index 4e1b022..69abb7f 100644
--- a/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/config/AdvertServiceImpl.java
+++ b/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/config/AdvertServiceImpl.java
@@ -72,6 +72,7 @@
         advert.setAdUrl(mgtAdvertEditDto.getAdUrl());
         advert.setAdContent(mgtAdvertEditDto.getHomeSlogan());
         advert.setTargetType(mgtAdvertEditDto.getTargetType());
+        advert.setLinkType(mgtAdvertEditDto.getLinkType());
         advert.setLinkUrl(mgtAdvertEditDto.getLinkUrl());
         advert.setJumpType(mgtAdvertEditDto.getJumpType());
         advert.setJumpId(mgtAdvertEditDto.getJumpId());
diff --git a/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/config/CustomConfigServiceImpl.java b/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/config/CustomConfigServiceImpl.java
index f07fbcc..303589a 100644
--- a/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/config/CustomConfigServiceImpl.java
+++ b/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/config/CustomConfigServiceImpl.java
@@ -213,6 +213,7 @@
             mgtAllCustomConfigVo.setHomeLogo(advert.getLogoUrl());
             mgtAllCustomConfigVo.setAdUrl(advert.getAdUrl());
             mgtAllCustomConfigVo.setTargetType(advert.getTargetType());
+            mgtAllCustomConfigVo.setLinkType(advert.getLinkType());
             mgtAllCustomConfigVo.setLinkUrl(advert.getLinkUrl());
             mgtAllCustomConfigVo.setJumpType(advert.getJumpType());
             mgtAllCustomConfigVo.setJumpId(advert.getJumpId());
@@ -574,6 +575,18 @@
     }
 
     /**
+     * @description  删除日志
+     * @author  jqs
+     * @date    2023/8/1 19:39
+     * @param
+     * @return  void
+     */
+    @Override
+    public void deleteOperlog(){
+        customConfigMapper.deleteOperlog();
+    }
+
+    /**
      * @description
      * @author  jqs
      * @date    2023/7/13 15:52
diff --git a/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/config/StaffSuggestServiceImpl.java b/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/config/StaffSuggestServiceImpl.java
index a208a7a..b6fb547 100644
--- a/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/config/StaffSuggestServiceImpl.java
+++ b/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/config/StaffSuggestServiceImpl.java
@@ -101,6 +101,8 @@
         staffSuggest.setReplayFlag(1);
         String responseTime = DateUtils.formatDuration(staffSuggest.getCreateTime(), staffSuggest.getReplayTime());
         staffSuggest.setResponseTime(responseTime);
+        long responseTimestamp = DateUtils.diffTime(staffSuggest.getCreateTime(), staffSuggest.getReplayTime());
+        staffSuggest.setResponseTimestamp(responseTimestamp);
         this.saveOrUpdate(staffSuggest);
     }
 
diff --git a/ruoyi-modules/ruoyi-system/src/main/resources/mapper/config/CustomConfigMapper.xml b/ruoyi-modules/ruoyi-system/src/main/resources/mapper/config/CustomConfigMapper.xml
index 5b5d47f..266b943 100644
--- a/ruoyi-modules/ruoyi-system/src/main/resources/mapper/config/CustomConfigMapper.xml
+++ b/ruoyi-modules/ruoyi-system/src/main/resources/mapper/config/CustomConfigMapper.xml
@@ -18,10 +18,26 @@
         oper_ip operIp,
         oper_content operContent
         FROM sys_oper_log
-        WHERE operator_type = 1
+        WHERE operator_type = 1 AND del_flag = 0
+        <if test="param.operContent != null and param.operContent !=''">
+            oper_content LIKE concat('%', #{param.operContent}, '%')
+        </if>
+        <if test="param.operTitle != null and param.operTitle !=''">
+            title = #{param.operTitle}
+        </if>
+        <if test="param.operStartTime!=null and param.operStartTime!=''">
+            AND Date(oper_time) &gt;= #{param.operStartTime}
+        </if>
+        <if test="param.operEndTime!=null and param.operEndTime!=''">
+            AND Date(oper_time) &lt;= #{param.operEndTime}
+        </if>
         ORDER BY oper_time DESC
     </select>
 
+    <update id="deleteOperlog">
+        UPDATE sys_oper_log SET del_flag = 1 WHERE del_flag = 0
+    </update>
+
     <select id="listOperTitle" resultType="java.lang.String">
         SELECT DISTINCT title FROM sys_oper_log
         WHERE operator_type = 1
diff --git a/ruoyi-modules/ruoyi-system/src/main/resources/mapper/config/StaffSuggestMapper.xml b/ruoyi-modules/ruoyi-system/src/main/resources/mapper/config/StaffSuggestMapper.xml
index 68d1b5f..6ec59a4 100644
--- a/ruoyi-modules/ruoyi-system/src/main/resources/mapper/config/StaffSuggestMapper.xml
+++ b/ruoyi-modules/ruoyi-system/src/main/resources/mapper/config/StaffSuggestMapper.xml
@@ -51,7 +51,14 @@
         <if test="param.replayEndTime!=null and param.replayEndTime!=''">
             AND Date(tss.replay_time) &lt;= #{param.replayEndTime}
         </if>
-        ORDER BY tss.replay_flag ASC,tss.create_time DESC
+        ORDER BY
+        <if test="param.suggestSort!=null and param.suggestSort==1">
+            tss.response_timestamp ASC,
+        </if>
+        <if test="param.suggestSort!=null and param.suggestSort==2">
+            tss.response_timestamp DESC,
+        </if>
+        tss.replay_flag ASC,tss.create_time DESC
     </select>
 
     <select id="pageStaffShopSuggest" resultType="com.ruoyi.system.domain.vo.StaffSuggestPageVo">

--
Gitblit v1.7.1