From b9da8289051937fbbbd47bbda97414ad6c769a90 Mon Sep 17 00:00:00 2001
From: hjl <1657978663@qq.com>
Date: 星期四, 18 七月 2024 14:37:00 +0800
Subject: [PATCH] feat: 代码重构

---
 ruoyi-api/ruoyi-api-order/src/main/java/com/ruoyi/order/api/entity/EvaluateInfoVO.java              |    2 
 ruoyi-common/ruoyi-common-core/src/main/java/com/ruoyi/common/core/utils/StringUtils.java           |   20 +
 ruoyi-service/ruoyi-admin/src/main/java/com/ruoyi/admin/controller/SysUserController.java           |    5 
 ruoyi-service/ruoyi-order/src/main/java/com/ruoyi/order/controller/ChangeDispatchController.java    |   31 
 ruoyi-api/ruoyi-api-order/src/main/java/com/ruoyi/order/api/factory/OrderFallbackFactory.java       |    5 
 ruoyi-service/ruoyi-user/src/main/java/com/ruoyi/user/service/impl/RegionServiceImpl.java           |   60 +-
 sql/secondary_recovery_order.sql                                                                    |  178 +++++++++
 ruoyi-service/ruoyi-order/src/main/java/com/ruoyi/order/request/OrderRequest.java                   |    2 
 ruoyi-service/ruoyi-admin/src/main/java/com/ruoyi/admin/controller/UserController.java              |   11 
 ruoyi-service/ruoyi-worker/src/main/java/com/ruoyi/worker/vo/OrderListVO.java                       |    4 
 ruoyi-service/ruoyi-order/src/main/java/com/ruoyi/order/service/impl/OrderServiceImpl.java          |   37 +
 ruoyi-common/ruoyi-common-core/src/main/java/com/ruoyi/common/core/constant/Constants.java          |   10 
 ruoyi-service/ruoyi-user/src/main/java/com/ruoyi/user/vo/RegionVo.java                              |   31 +
 ruoyi-service/ruoyi-worker/src/main/java/com/ruoyi/worker/service/impl/MasterWorkerServiceImpl.java |   12 
 ruoyi-api/ruoyi-api-order/src/main/java/com/ruoyi/order/api/entity/EvaluateOrderInfoVO.java         |    2 
 ruoyi-service/ruoyi-order/src/main/java/com/ruoyi/order/mapper/OrderMapper.java                     |   58 ++
 ruoyi-api/ruoyi-api-order/src/main/java/com/ruoyi/order/api/feignClient/OrderClient.java            |   12 
 ruoyi-service/ruoyi-order/src/main/java/com/ruoyi/order/vo/EvaluateInfoVO.java                      |    2 
 ruoyi-service/ruoyi-admin/src/main/java/com/ruoyi/admin/controller/UserManageController.java        |    8 
 ruoyi-service/ruoyi-admin/src/main/java/com/ruoyi/admin/controller/WorkerProcessController.java     |   24 +
 sql/secondary_recovery.sql                                                                          |  197 +--------
 ruoyi-service/ruoyi-admin/src/main/java/com/ruoyi/admin/controller/OrderController.java             |   45 +
 ruoyi-service/ruoyi-admin/src/main/java/com/ruoyi/admin/vo/OrderInfoVO.java                         |    2 
 ruoyi-api/ruoyi-api-order/src/main/java/com/ruoyi/order/api/entity/OrderRequest.java                |    2 
 ruoyi-service/ruoyi-order/src/main/java/com/ruoyi/order/entity/ChangeDispatch.java                  |    7 
 ruoyi-modules/ruoyi-system/src/main/resources/mapper/system/SysMenuMapper.xml                       |    2 
 ruoyi-service/ruoyi-admin/src/main/java/com/ruoyi/admin/entity/Order.java                           |    2 
 ruoyi-service/ruoyi-admin/src/main/java/com/ruoyi/admin/controller/MasterWorkerController.java      |   22 +
 ruoyi-service/ruoyi-user/src/main/java/com/ruoyi/user/entity/User.java                              |    4 
 ruoyi-service/ruoyi-admin/src/main/java/com/ruoyi/admin/entity/User.java                            |    4 
 ruoyi-service/ruoyi-order/src/main/resources/mapper/order/OrderMapper.xml                           |  133 +++++--
 ruoyi-service/ruoyi-worker/src/main/java/com/ruoyi/worker/controller/MasterWorkerController.java    |   23 
 ruoyi-api/ruoyi-api-order/src/main/java/com/ruoyi/order/api/entity/Order.java                       |    6 
 ruoyi-service/ruoyi-order/src/main/java/com/ruoyi/order/vo/WithdrawDetailVO.java                    |    8 
 ruoyi-service/ruoyi-admin/src/main/java/com/ruoyi/admin/vo/OrderByServeRecordVO.java                |    2 
 ruoyi-service/ruoyi-user/src/main/java/com/ruoyi/user/vo/OrderDetailVO.java                         |    6 
 ruoyi-service/ruoyi-worker/src/main/java/com/ruoyi/worker/entity/Evaluate.java                      |    2 
 ruoyi-api/ruoyi-api-admin/src/main/java/com/ruoyi/admin/api/entity/ChangeDispatch.java              |    4 
 ruoyi-modules/ruoyi-system/src/main/resources/mapper/system/SysUserMapper.xml                       |    2 
 ruoyi-service/ruoyi-order/src/main/java/com/ruoyi/order/controller/OrderController.java             |   15 
 ruoyi-service/ruoyi-user/src/main/java/com/ruoyi/user/service/impl/UserServiceImpl.java             |   19 
 ruoyi-service/ruoyi-admin/src/main/java/com/ruoyi/admin/service/impl/OrderServiceImpl.java          |    5 
 ruoyi-service/ruoyi-order/src/main/java/com/ruoyi/order/vo/OrderQueryRequest.java                   |    2 
 ruoyi-service/ruoyi-order/src/main/java/com/ruoyi/order/entity/Withdraw.java                        |    3 
 ruoyi-service/ruoyi-user/src/main/java/com/ruoyi/user/controller/RecoveryServeController.java       |    6 
 ruoyi-api/ruoyi-api-order/src/main/java/com/ruoyi/order/api/entity/ChangeDispatch.java              |    7 
 ruoyi-service/ruoyi-admin/src/main/java/com/ruoyi/admin/entity/ChangeDispatch.java                  |    2 
 ruoyi-api/ruoyi-api-order/src/main/java/com/ruoyi/order/api/entity/OrderQueryRequest.java           |    3 
 ruoyi-service/ruoyi-order/src/main/java/com/ruoyi/order/vo/EvaluateOrderInfoVO.java                 |    2 
 ruoyi-service/ruoyi-order/src/main/java/com/ruoyi/order/entity/Order.java                           |    6 
 ruoyi-api/ruoyi-api-order/src/main/java/com/ruoyi/order/api/entity/Withdraw.java                    |    2 
 ruoyi-service/ruoyi-admin/src/main/java/com/ruoyi/admin/controller/SendSmsController.java           |   22 +
 ruoyi-service/ruoyi-worker/src/main/java/com/ruoyi/worker/controller/OrderController.java           |    8 
 ruoyi-service/ruoyi-user/src/main/java/com/ruoyi/user/controller/UserController.java                |   38 +
 ruoyi-api/ruoyi-api-order/src/main/java/com/ruoyi/order/api/entity/WithdrawDetailVO.java            |    8 
 55 files changed, 764 insertions(+), 371 deletions(-)

diff --git a/ruoyi-api/ruoyi-api-admin/src/main/java/com/ruoyi/admin/api/entity/ChangeDispatch.java b/ruoyi-api/ruoyi-api-admin/src/main/java/com/ruoyi/admin/api/entity/ChangeDispatch.java
index d62f79c..98658f1 100644
--- a/ruoyi-api/ruoyi-api-admin/src/main/java/com/ruoyi/admin/api/entity/ChangeDispatch.java
+++ b/ruoyi-api/ruoyi-api-admin/src/main/java/com/ruoyi/admin/api/entity/ChangeDispatch.java
@@ -44,8 +44,8 @@
 
     @ApiModelProperty("申请改派时间")
     @TableField("apply_time")
-    @JsonFormat(pattern = "yyyy-MM-dd HH:ss:mm")
-    @DateTimeFormat(pattern = "yyyy-MM-dd HH:ss:mm")
+    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
+    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
     private Date applyTime;
 
     @ApiModelProperty("改派状态 (0:未改派 ;1:已改派)")
diff --git a/ruoyi-api/ruoyi-api-order/src/main/java/com/ruoyi/order/api/entity/ChangeDispatch.java b/ruoyi-api/ruoyi-api-order/src/main/java/com/ruoyi/order/api/entity/ChangeDispatch.java
index 9fde300..7b8ae3b 100644
--- a/ruoyi-api/ruoyi-api-order/src/main/java/com/ruoyi/order/api/entity/ChangeDispatch.java
+++ b/ruoyi-api/ruoyi-api-order/src/main/java/com/ruoyi/order/api/entity/ChangeDispatch.java
@@ -44,7 +44,7 @@
 
     @ApiModelProperty("申请改派时间")
     @TableField("apply_time")
-    @JsonFormat(pattern = "yyyy-MM-dd HH:ss:mm")
+    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
     private Date applyTime;
 
     @ApiModelProperty("改派状态 (0:未改派 ;1:已改派 ;2:拒绝)")
@@ -59,6 +59,11 @@
     @TableField("order_number")
     private String orderNumber;
 
+    @ApiModelProperty("下单时间")
+    @TableField(exist = false)
+    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
+    private Date orderTime;
+
     @ApiModelProperty("下单用户id")
     @TableField("user_id")
     private Integer userId;
diff --git a/ruoyi-api/ruoyi-api-order/src/main/java/com/ruoyi/order/api/entity/EvaluateInfoVO.java b/ruoyi-api/ruoyi-api-order/src/main/java/com/ruoyi/order/api/entity/EvaluateInfoVO.java
index 1d25e28..31eb2f5 100644
--- a/ruoyi-api/ruoyi-api-order/src/main/java/com/ruoyi/order/api/entity/EvaluateInfoVO.java
+++ b/ruoyi-api/ruoyi-api-order/src/main/java/com/ruoyi/order/api/entity/EvaluateInfoVO.java
@@ -21,7 +21,7 @@
     private Integer starRating;
 
     @ApiModelProperty("评价时间")
-    @JsonFormat(pattern = "yyyy-MM-dd HH:ss:mm")
+    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
     private Date evaluateTime;
 
 }
diff --git a/ruoyi-api/ruoyi-api-order/src/main/java/com/ruoyi/order/api/entity/EvaluateOrderInfoVO.java b/ruoyi-api/ruoyi-api-order/src/main/java/com/ruoyi/order/api/entity/EvaluateOrderInfoVO.java
index 5c281c3..478b453 100644
--- a/ruoyi-api/ruoyi-api-order/src/main/java/com/ruoyi/order/api/entity/EvaluateOrderInfoVO.java
+++ b/ruoyi-api/ruoyi-api-order/src/main/java/com/ruoyi/order/api/entity/EvaluateOrderInfoVO.java
@@ -36,7 +36,7 @@
     private String serverPhone;
 
     @ApiModelProperty("订单完成时间")
-    @JsonFormat(pattern = "yyyy-MM-dd HH:ss:mm")
+    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
     private Date completeTime;
 
     @ApiModelProperty("回收服务id")
diff --git a/ruoyi-api/ruoyi-api-order/src/main/java/com/ruoyi/order/api/entity/Order.java b/ruoyi-api/ruoyi-api-order/src/main/java/com/ruoyi/order/api/entity/Order.java
index b4116ba..14d39c0 100644
--- a/ruoyi-api/ruoyi-api-order/src/main/java/com/ruoyi/order/api/entity/Order.java
+++ b/ruoyi-api/ruoyi-api-order/src/main/java/com/ruoyi/order/api/entity/Order.java
@@ -85,7 +85,7 @@
 
     @ApiModelProperty("接单时间(师傅接单或后台派单,更新该字段时间)")
     @TableField("accept_time")
-    @JsonFormat(pattern = "yyyy-MM-dd HH:ss:mm")
+    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
     private Date acceptTime;
 
     @ApiModelProperty("服务人员id")
@@ -110,7 +110,7 @@
 
     @ApiModelProperty("师傅到达预约地点时间")
     @TableField("arrive_time")
-    @JsonFormat(pattern = "yyyy-MM-dd HH:ss:mm")
+    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
     private Date arriveTime;
 
     @ApiModelProperty("订单类型(0:正常订单,1:后台订单(后台订单与用户端、师傅端无联系))")
@@ -127,7 +127,7 @@
 
     @ApiModelProperty("订单完成时间")
     @TableField("complete_time")
-    @JsonFormat(pattern = "yyyy-MM-dd HH:ss:mm")
+    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
     private Date completeTime;
 
     @ApiModelProperty("订单补贴金额")
diff --git a/ruoyi-api/ruoyi-api-order/src/main/java/com/ruoyi/order/api/entity/OrderQueryRequest.java b/ruoyi-api/ruoyi-api-order/src/main/java/com/ruoyi/order/api/entity/OrderQueryRequest.java
index b9633a8..0c86d32 100644
--- a/ruoyi-api/ruoyi-api-order/src/main/java/com/ruoyi/order/api/entity/OrderQueryRequest.java
+++ b/ruoyi-api/ruoyi-api-order/src/main/java/com/ruoyi/order/api/entity/OrderQueryRequest.java
@@ -60,4 +60,7 @@
     @ApiModelProperty("导出ids集合")
     private List<String> ids;
 
+    @ApiModelProperty("城市列表")
+    private List<String> cityList;
+
 }
diff --git a/ruoyi-api/ruoyi-api-order/src/main/java/com/ruoyi/order/api/entity/OrderRequest.java b/ruoyi-api/ruoyi-api-order/src/main/java/com/ruoyi/order/api/entity/OrderRequest.java
index 7ea3ae3..9579839 100644
--- a/ruoyi-api/ruoyi-api-order/src/main/java/com/ruoyi/order/api/entity/OrderRequest.java
+++ b/ruoyi-api/ruoyi-api-order/src/main/java/com/ruoyi/order/api/entity/OrderRequest.java
@@ -73,7 +73,7 @@
     private Integer state;
 
     @ApiModelProperty("师傅到达预约地点时间")
-    @JsonFormat(pattern = "yyyy-MM-dd HH:ss:mm")
+    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
     private Date arriveTime;
 
     @ApiModelProperty("订单类型(0:正常订单,1:后台订单(后台订单与用户端、师傅端无联系))")
diff --git a/ruoyi-api/ruoyi-api-order/src/main/java/com/ruoyi/order/api/entity/Withdraw.java b/ruoyi-api/ruoyi-api-order/src/main/java/com/ruoyi/order/api/entity/Withdraw.java
index 6244d4a..e79cd91 100644
--- a/ruoyi-api/ruoyi-api-order/src/main/java/com/ruoyi/order/api/entity/Withdraw.java
+++ b/ruoyi-api/ruoyi-api-order/src/main/java/com/ruoyi/order/api/entity/Withdraw.java
@@ -41,7 +41,7 @@
 
     @ApiModelProperty("申请时间")
     @TableField("apply_for_time")
-    @JsonFormat(pattern = "yyyy-MM-dd HH:ss:mm")
+    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
     private Date applyForTime;
 
     @ApiModelProperty("申请金额")
diff --git a/ruoyi-api/ruoyi-api-order/src/main/java/com/ruoyi/order/api/entity/WithdrawDetailVO.java b/ruoyi-api/ruoyi-api-order/src/main/java/com/ruoyi/order/api/entity/WithdrawDetailVO.java
index e11ca9e..7d7debc 100644
--- a/ruoyi-api/ruoyi-api-order/src/main/java/com/ruoyi/order/api/entity/WithdrawDetailVO.java
+++ b/ruoyi-api/ruoyi-api-order/src/main/java/com/ruoyi/order/api/entity/WithdrawDetailVO.java
@@ -49,7 +49,7 @@
     private String time;
 
     @ApiModelProperty("接单时间(师傅接单或后台派单,更新该字段时间)")
-    @JsonFormat(pattern = "yyyy-MM-dd HH:ss:mm")
+    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
     private Date acceptTime;
 
     @ApiModelProperty("服务人员id")
@@ -68,11 +68,11 @@
     private Integer state;
 
     @ApiModelProperty("师傅到达预约地点时间")
-    @JsonFormat(pattern = "yyyy-MM-dd HH:ss:mm")
+    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
     private Date arriveTime;
 
     @ApiModelProperty("订单完成时间")
-    @JsonFormat(pattern = "yyyy-MM-dd HH:ss:mm")
+    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
     private Date completeTime;
 
     @ApiModelProperty("订单补贴金额")
@@ -85,7 +85,7 @@
     private Integer withdrawalState;
 
     @ApiModelProperty("提现申请时间")
-    @JsonFormat(pattern = "yyyy-MM-dd HH:ss:mm")
+    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
     private Date withdrawalTime;
 
     @ApiModelProperty("详细地址")
diff --git a/ruoyi-api/ruoyi-api-order/src/main/java/com/ruoyi/order/api/factory/OrderFallbackFactory.java b/ruoyi-api/ruoyi-api-order/src/main/java/com/ruoyi/order/api/factory/OrderFallbackFactory.java
index 5675d83..3eae05f 100644
--- a/ruoyi-api/ruoyi-api-order/src/main/java/com/ruoyi/order/api/factory/OrderFallbackFactory.java
+++ b/ruoyi-api/ruoyi-api-order/src/main/java/com/ruoyi/order/api/factory/OrderFallbackFactory.java
@@ -77,6 +77,11 @@
             }
 
             @Override
+            public R<Boolean> updateStateAndArrivalTime(String orderId, Integer state) {
+                return R.fail(cause.getMessage());
+            }
+
+            @Override
             public R<Boolean> generateNewOrder(Order order) {
                 return R.fail(cause.getMessage());
             }
diff --git a/ruoyi-api/ruoyi-api-order/src/main/java/com/ruoyi/order/api/feignClient/OrderClient.java b/ruoyi-api/ruoyi-api-order/src/main/java/com/ruoyi/order/api/feignClient/OrderClient.java
index c0a60c4..6d828f6 100644
--- a/ruoyi-api/ruoyi-api-order/src/main/java/com/ruoyi/order/api/feignClient/OrderClient.java
+++ b/ruoyi-api/ruoyi-api-order/src/main/java/com/ruoyi/order/api/feignClient/OrderClient.java
@@ -139,6 +139,18 @@
     R<Boolean> updateState(@RequestParam("orderId") String orderId, @RequestParam("state") Integer state);
 
     /**
+     * 更改订单状态且清空到达时间
+     *
+     * @param orderId 订单id
+     * @param state   订单状态
+     * @return 修改结果
+     */
+    @ApiOperation(value = "订单列表-更改订单状态且清空到达时间", tags = {"后台-订单管理"})
+    @PostMapping(value = "/order/updateStateAndArrivalTime")
+    R<Boolean> updateStateAndArrivalTime(@RequestParam("orderId") String orderId,
+                                         @RequestParam("state") Integer state);
+
+    /**
      * 申请改派审核通过后生成新订单
      *
      * @param order 订单信息
diff --git a/ruoyi-common/ruoyi-common-core/src/main/java/com/ruoyi/common/core/constant/Constants.java b/ruoyi-common/ruoyi-common-core/src/main/java/com/ruoyi/common/core/constant/Constants.java
index 26d7a71..157d44d 100644
--- a/ruoyi-common/ruoyi-common-core/src/main/java/com/ruoyi/common/core/constant/Constants.java
+++ b/ruoyi-common/ruoyi-common-core/src/main/java/com/ruoyi/common/core/constant/Constants.java
@@ -253,11 +253,21 @@
     public static final Integer EIGHT = 18;
 
     /**
+     * 数字 30
+     */
+    public static final Integer THIRTY = 30;
+
+    /**
      * 数字100
      */
     public static final Integer ONE_HUNDRED = 100;
 
     /**
+     * 数字 365
+     */
+    public static final Integer YEAR_DAY = 365;
+
+    /**
      * 数字 3000
      */
     public static final Integer THREE_THOUSAND = 3000;
diff --git a/ruoyi-common/ruoyi-common-core/src/main/java/com/ruoyi/common/core/utils/StringUtils.java b/ruoyi-common/ruoyi-common-core/src/main/java/com/ruoyi/common/core/utils/StringUtils.java
index 9cbbc1d..edc5d13 100644
--- a/ruoyi-common/ruoyi-common-core/src/main/java/com/ruoyi/common/core/utils/StringUtils.java
+++ b/ruoyi-common/ruoyi-common-core/src/main/java/com/ruoyi/common/core/utils/StringUtils.java
@@ -7,6 +7,7 @@
 import java.util.Collection;
 import java.util.List;
 import java.util.Map;
+import java.util.Random;
 
 /**
  * 字符串工具类
@@ -29,6 +30,25 @@
      */
     private static final char ASTERISK = '*';
 
+    public static String getCharAndNum(int length) {
+        StringBuilder val = new StringBuilder();
+        Random random = new Random();
+        for (int i = 0; i < length; i++) {
+            // 输出字母还是数字
+            String charOrNum = random.nextInt(2) % 2 == 0 ? "char" : "num";
+            // 字符串
+            if ("char".equalsIgnoreCase(charOrNum)) {
+                // 取得大写字母还是小写字母
+                int choice = random.nextInt(2) % 2 == 0 ? 65 : 97;
+                val.append((char) (choice + random.nextInt(26)));
+                // 数字
+            } else if ("num".equalsIgnoreCase(charOrNum)) {
+                val.append(random.nextInt(10));
+            }
+        }
+        return val.toString();
+    }
+
     /**
      * 获取参数不为空值
      *
diff --git a/ruoyi-modules/ruoyi-system/src/main/resources/mapper/system/SysMenuMapper.xml b/ruoyi-modules/ruoyi-system/src/main/resources/mapper/system/SysMenuMapper.xml
index 2d7d2ce..080fb4c 100644
--- a/ruoyi-modules/ruoyi-system/src/main/resources/mapper/system/SysMenuMapper.xml
+++ b/ruoyi-modules/ruoyi-system/src/main/resources/mapper/system/SysMenuMapper.xml
@@ -126,7 +126,7 @@
 	</select>
 	
 	<select id="selectMenuPermsByRoleId" parameterType="Long" resultType="String">
-		select distinct m.perms
+		select distinct m.component
 		from sys_menu m
 			 left join sys_role_menu rm on m.menu_id = rm.menu_id
 		where m.status = '0' and rm.role_id = #{roleId}
diff --git a/ruoyi-modules/ruoyi-system/src/main/resources/mapper/system/SysUserMapper.xml b/ruoyi-modules/ruoyi-system/src/main/resources/mapper/system/SysUserMapper.xml
index 264c415..7ea8957 100644
--- a/ruoyi-modules/ruoyi-system/src/main/resources/mapper/system/SysUserMapper.xml
+++ b/ruoyi-modules/ruoyi-system/src/main/resources/mapper/system/SysUserMapper.xml
@@ -17,6 +17,7 @@
         <result property="createTime" column="create_time"/>
         <result property="updateBy" column="update_by"/>
         <result property="updateTime" column="update_time"/>
+        <result property="franchiseeId" column="franchisee_id"/>
     </resultMap>
 
     <resultMap id="RoleResult" type="com.ruoyi.system.api.domain.SysRole">
@@ -39,6 +40,7 @@
                u.login_date,
                u.create_by,
                u.create_time,
+               u.franchisee_id,
                r.role_id,
                r.role_name,
                r.role_key,
diff --git a/ruoyi-service/ruoyi-admin/src/main/java/com/ruoyi/admin/controller/MasterWorkerController.java b/ruoyi-service/ruoyi-admin/src/main/java/com/ruoyi/admin/controller/MasterWorkerController.java
index 196eb28..7e04012 100644
--- a/ruoyi-service/ruoyi-admin/src/main/java/com/ruoyi/admin/controller/MasterWorkerController.java
+++ b/ruoyi-service/ruoyi-admin/src/main/java/com/ruoyi/admin/controller/MasterWorkerController.java
@@ -11,8 +11,10 @@
 import com.ruoyi.common.core.domain.R;
 import com.ruoyi.common.core.utils.StringUtils;
 import com.ruoyi.common.core.utils.bean.BeanUtils;
+import com.ruoyi.common.security.service.TokenService;
 import com.ruoyi.order.api.entity.Evaluate;
 import com.ruoyi.order.api.feignClient.EvaluateClient;
+import com.ruoyi.system.api.model.LoginUser;
 import io.swagger.annotations.Api;
 import io.swagger.annotations.ApiImplicitParam;
 import io.swagger.annotations.ApiImplicitParams;
@@ -23,6 +25,7 @@
 
 import javax.annotation.Resource;
 import java.math.BigDecimal;
+import java.util.ArrayList;
 import java.util.Arrays;
 import java.util.List;
 import java.util.stream.Collectors;
@@ -44,6 +47,8 @@
     private MasterWorkerService masterWorkerService;
     @Resource
     private EvaluateClient evaluateClient;
+    @Resource
+    private TokenService tokenService;
 
     /**
      * 师傅列表分页查询 (添加订单-选择师傅列表)
@@ -61,6 +66,14 @@
     public R<IPage<MasterWorker>> selectServe(String workerName, String phone, String city, Integer state,
                                               @RequestParam(name = "pageNum", defaultValue = "1") Integer pageNum,
                                               @RequestParam(name = "pageSize", defaultValue = "10") Integer pageSize) {
+        LoginUser loginUser = tokenService.getLoginUser();
+        if (null == loginUser) {
+            return R.loginExpire("登录失效!");
+        }
+        List<String> cityList = new ArrayList<>();
+        if (loginUser.getIsFranchisee()) {
+            cityList = loginUser.getCityList();
+        }
         LambdaQueryChainWrapper<MasterWorker> wrapper = masterWorkerService.lambdaQuery();
         wrapper = StringUtils.isNotBlank(workerName) ? wrapper.like(MasterWorker::getRealName, workerName) : wrapper;
         wrapper = StringUtils.isNotBlank(phone) ? wrapper.like(MasterWorker::getPhone, phone) : wrapper;
@@ -68,6 +81,15 @@
         if (null != state) {
             wrapper.eq(MasterWorker::getIsEnable, Constants.ONE);
         }
+        for (int i = 0; i < cityList.size(); i++) {
+            // 最后一跳城市不匹配or条件
+            String s = cityList.get(i);
+            if (cityList.size() - 1 == i) {
+                wrapper.like(MasterWorker::getCity, s);
+            } else {
+                wrapper.like(MasterWorker::getCity, s).or();
+            }
+        }
         return R.ok(wrapper.eq(MasterWorker::getIsDelete, Constants.ZERO)
                 .orderByDesc(MasterWorker::getCreateTime).page(Page.of(pageNum, pageSize)));
     }
diff --git a/ruoyi-service/ruoyi-admin/src/main/java/com/ruoyi/admin/controller/OrderController.java b/ruoyi-service/ruoyi-admin/src/main/java/com/ruoyi/admin/controller/OrderController.java
index 6a2ed6a..6045314 100644
--- a/ruoyi-service/ruoyi-admin/src/main/java/com/ruoyi/admin/controller/OrderController.java
+++ b/ruoyi-service/ruoyi-admin/src/main/java/com/ruoyi/admin/controller/OrderController.java
@@ -109,11 +109,24 @@
         if (null == loginUser) {
             return R.loginExpire("登录失效!");
         }
-        List<String> userCity = new ArrayList<>();
         if (loginUser.getIsFranchisee()) {
-            userCity = loginUser.getCityList();
+            orderQueryRequest.setCityList(loginUser.getCityList());
         }
-        return R.ok(orderClient.queryPage(orderQueryRequest).getData());
+        Page<Order> data = orderClient.queryPage(orderQueryRequest).getData();
+        if (null != data) {
+            for (Order record : data.getRecords()) {
+                // 回收服务信息
+                Integer serverId = record.getServerId();
+                MasterWorker masterWorker = masterWorkerService.lambdaQuery()
+                        .eq(MasterWorker::getId, serverId)
+                        .eq(MasterWorker::getIsDelete, 0).one();
+                if (null != masterWorker) {
+                    record.setServerName(masterWorker.getRealName());
+                    record.setServerPhone(masterWorker.getPhone());
+                }
+            }
+        }
+        return R.ok(data);
     }
 
     /**
@@ -208,6 +221,7 @@
         MasterWorker masterWorker = masterWorkerService.lambdaQuery()
                 .eq(MasterWorker::getId, workerId)
                 .eq(MasterWorker::getIsDelete, 0).one();
+        Order item = orderClient.detail(orderId).getData();
         Order order = orderClient.exchangeOrder(type, orderId, workerId,
                 masterWorker.getRealName(), masterWorker.getPhone()).getData();
         // 订单派单
@@ -216,19 +230,23 @@
             if (order.getState().equals(Constants.SIX) || order.getState().equals(Constants.THREE)) {
                 orderClient.updateState(order.getId(), Constants.ONE);
             }
+            // 订单状态为 待完工时,需要更改状态 待上门且清空师傅到达预约点时间
+            if (order.getState().equals(Constants.TWO)) {
+                orderClient.updateStateAndArrivalTime(orderId, Constants.ONE);
+            }
             // 生成改派信息
             ChangeDispatch changeDispatch = new ChangeDispatch();
-            changeDispatch.setWorkerId(order.getServerId());
-            changeDispatch.setWorkerName(order.getServerName());
+            changeDispatch.setWorkerId(item.getServerId());
+            changeDispatch.setWorkerName(item.getServerName());
             changeDispatch.setApplyReason(applyReason);
             changeDispatch.setApplyTime(new Date());
             changeDispatch.setState(Constants.ONE);
-            changeDispatch.setOrderId(order.getId());
-            changeDispatch.setOrderNumber(order.getOrderNumber());
-            if (null != order.getUserId()) {
-                changeDispatch.setUserId(order.getUserId());
+            changeDispatch.setOrderId(orderId);
+            changeDispatch.setOrderNumber(item.getOrderNumber());
+            if (null != item.getUserId()) {
+                changeDispatch.setUserId(item.getUserId());
             }
-            changeDispatch.setUserName(order.getReservationName());
+            changeDispatch.setUserName(item.getReservationName());
             changeDispatch.setIsDelete(Constants.ZERO);
             result = dispatchClient.saveRecord(changeDispatch).getData();
         }
@@ -296,11 +314,14 @@
             masterWorkerList = masterWorkerService.lambdaQuery()
                     .eq(MasterWorker::getIsDelete, 0).list();
         }
-        Map<Integer, String> map = masterWorkerList.stream().collect(Collectors.toMap(MasterWorker::getId,
+        Map<Integer, String> profilePictureMap = masterWorkerList.stream().collect(Collectors.toMap(MasterWorker::getId,
                 mw -> Optional.ofNullable(mw.getProfilePicture()).orElse("")));
+        Map<Integer, String> realNameMap = masterWorkerList.stream().collect(Collectors.toMap(MasterWorker::getId,
+                mw -> Optional.ofNullable(mw.getRealName()).orElse("")));
         for (OrderCountVO record : data.getRecords()) {
             Integer workerId = record.getWorkerId();
-            record.setProfilePicture(map.get(workerId));
+            record.setRealName(realNameMap.get(workerId));
+            record.setProfilePicture(profilePictureMap.get(workerId));
         }
         return R.ok(data);
     }
diff --git a/ruoyi-service/ruoyi-admin/src/main/java/com/ruoyi/admin/controller/SendSmsController.java b/ruoyi-service/ruoyi-admin/src/main/java/com/ruoyi/admin/controller/SendSmsController.java
index 887b88f..4ce3962 100644
--- a/ruoyi-service/ruoyi-admin/src/main/java/com/ruoyi/admin/controller/SendSmsController.java
+++ b/ruoyi-service/ruoyi-admin/src/main/java/com/ruoyi/admin/controller/SendSmsController.java
@@ -91,7 +91,7 @@
     }
 
     /**
-     * 师傅端-找回密码/验证手机号/验证码登录
+     * 师傅端-修改手机号时校验新手机号是否已注册
      *
      * @param phone 订单记录id
      */
@@ -111,6 +111,26 @@
     }
 
     /**
+     * 师傅端-忘记密码
+     *
+     * @param phone 订单记录id
+     */
+    @ApiOperation(value = "师傅端-忘记密码", tags = {"发送短信"})
+    @GetMapping(value = "/passwordCheckPhone")
+    @ApiImplicitParams({
+            @ApiImplicitParam(value = "手机号", name = "phone", dataType = "String", required = true)
+    })
+    public R<String> passwordCheckPhone(@RequestParam String phone) {
+        MasterWorker masterWorker = masterWorkerService.lambdaQuery()
+                .eq(MasterWorker::getPhone, phone)
+                .eq(MasterWorker::getIsDelete, 0).one();
+        if (null == masterWorker) {
+            return R.fail("手机号未注册!");
+        }
+        return R.ok();
+    }
+
+    /**
      * 师傅端-发送登录验证码短信
      *
      * @param phone 订单记录id
diff --git a/ruoyi-service/ruoyi-admin/src/main/java/com/ruoyi/admin/controller/SysUserController.java b/ruoyi-service/ruoyi-admin/src/main/java/com/ruoyi/admin/controller/SysUserController.java
index 8fa5bea..f3c0677 100644
--- a/ruoyi-service/ruoyi-admin/src/main/java/com/ruoyi/admin/controller/SysUserController.java
+++ b/ruoyi-service/ruoyi-admin/src/main/java/com/ruoyi/admin/controller/SysUserController.java
@@ -158,7 +158,8 @@
         }
         SysUser user = sysUserService.lambdaQuery()
                 .eq(SysUser::getAccount, sysUserRequest.getAccount())
-                .eq(SysUser::getIsDelete, 0).one();
+                .eq(SysUser::getIsDelete, 0)
+                .ne(SysUser::getUserId, sysUserRequest.getUserId()).one();
         if (null != user) {
             return R.fail("该账号已存在!");
         }
@@ -198,7 +199,7 @@
                 return R.fail("新密码与二次确认密码不一致,请重新输入!");
             }
             BCryptPasswordEncoder passwordEncoder = new BCryptPasswordEncoder();
-            if (!passwordEncoder.matches(newPassword, oldPassword)) {
+            if (!passwordEncoder.matches(oldPassword, user.getPassword())) {
                 return R.fail("原密码错误,请重试!");
             }
             // 校验通过,加密新的明文密码
diff --git a/ruoyi-service/ruoyi-admin/src/main/java/com/ruoyi/admin/controller/UserController.java b/ruoyi-service/ruoyi-admin/src/main/java/com/ruoyi/admin/controller/UserController.java
index 381e785..abb6c0e 100644
--- a/ruoyi-service/ruoyi-admin/src/main/java/com/ruoyi/admin/controller/UserController.java
+++ b/ruoyi-service/ruoyi-admin/src/main/java/com/ruoyi/admin/controller/UserController.java
@@ -8,6 +8,8 @@
 import com.ruoyi.admin.service.UserService;
 import com.ruoyi.common.core.domain.R;
 import com.ruoyi.common.core.utils.StringUtils;
+import com.ruoyi.common.security.service.TokenService;
+import com.ruoyi.system.api.model.LoginUser;
 import io.swagger.annotations.Api;
 import io.swagger.annotations.ApiImplicitParam;
 import io.swagger.annotations.ApiImplicitParams;
@@ -34,6 +36,8 @@
 
     @Resource
     private UserService userService;
+    @Resource
+    private TokenService tokenService;
 
     /**
      * 用户信息分页列表
@@ -53,12 +57,19 @@
     public R<IPage<User>> queryPageList(String nickname, String phone, Integer state,
                                         @RequestParam(name = "pageNum", defaultValue = "1") Integer pageNum,
                                         @RequestParam(name = "pageSize", defaultValue = "10") Integer pageSize) {
+        LoginUser loginUser = tokenService.getLoginUser();
+        if (null == loginUser) {
+            return R.loginExpire("登录失效!");
+        }
         LambdaQueryChainWrapper<User> query = userService.lambdaQuery();
         // 穆湖匹配规则
         query = StringUtils.isNotBlank(nickname) ? query.like(User::getNickname, nickname) : query;
         query = StringUtils.isNotBlank(phone) ? query.like(User::getPhone, phone) : query;
         // 账号是否启用
         query = null != state ? query.eq(User::getState, state) : query;
+        if (loginUser.getIsFranchisee() && !loginUser.getCityList().isEmpty()) {
+            query.in(User::getCity, loginUser.getCityList());
+        }
         return R.ok(query.orderByDesc(User::getCreateTime).eq(User::getIsDelete, 0)
                 .orderByDesc(User::getCreateTime).page(Page.of(pageNum, pageSize)));
     }
diff --git a/ruoyi-service/ruoyi-admin/src/main/java/com/ruoyi/admin/controller/UserManageController.java b/ruoyi-service/ruoyi-admin/src/main/java/com/ruoyi/admin/controller/UserManageController.java
index 6c75ca6..227b545 100644
--- a/ruoyi-service/ruoyi-admin/src/main/java/com/ruoyi/admin/controller/UserManageController.java
+++ b/ruoyi-service/ruoyi-admin/src/main/java/com/ruoyi/admin/controller/UserManageController.java
@@ -8,6 +8,7 @@
 import com.ruoyi.common.core.domain.R;
 import com.ruoyi.common.core.exception.GlobalException;
 import com.ruoyi.common.core.utils.StringUtils;
+import com.ruoyi.common.security.service.TokenService;
 import com.ruoyi.order.api.entity.EvaluatePageVO;
 import com.ruoyi.order.api.entity.Order;
 import com.ruoyi.order.api.entity.UserWithdrawRecordVO;
@@ -15,6 +16,7 @@
 import com.ruoyi.order.api.feignClient.EvaluateClient;
 import com.ruoyi.order.api.feignClient.OrderClient;
 import com.ruoyi.order.api.feignClient.WithdrawClient;
+import com.ruoyi.system.api.model.LoginUser;
 import io.swagger.annotations.Api;
 import io.swagger.annotations.ApiImplicitParam;
 import io.swagger.annotations.ApiImplicitParams;
@@ -47,6 +49,8 @@
     private EvaluateClient evaluateClient;
     @Resource
     private WithdrawClient withdrawClient;
+    @Resource
+    private TokenService tokenService;
 
     /**
      * 用户信息分页列表
@@ -125,6 +129,10 @@
     public R<IPage<Order>> orderList(@RequestParam("userId") Integer userId,
                                      @RequestParam(name = "pageNum", defaultValue = "1") Integer pageNum,
                                      @RequestParam(name = "pageSize", defaultValue = "10") Integer pageSize) {
+        LoginUser loginUser = tokenService.getLoginUser();
+        if (null == loginUser) {
+            return R.loginExpire("登录失效!");
+        }
         return R.ok(orderClient.orderList(userId, pageNum, pageSize).getData());
     }
 
diff --git a/ruoyi-service/ruoyi-admin/src/main/java/com/ruoyi/admin/controller/WorkerProcessController.java b/ruoyi-service/ruoyi-admin/src/main/java/com/ruoyi/admin/controller/WorkerProcessController.java
index c40f934..c6b5a34 100644
--- a/ruoyi-service/ruoyi-admin/src/main/java/com/ruoyi/admin/controller/WorkerProcessController.java
+++ b/ruoyi-service/ruoyi-admin/src/main/java/com/ruoyi/admin/controller/WorkerProcessController.java
@@ -10,6 +10,8 @@
 import com.ruoyi.common.core.domain.R;
 import com.ruoyi.common.core.utils.StringUtils;
 import com.ruoyi.common.security.annotation.RequiresPermissions;
+import com.ruoyi.common.security.service.TokenService;
+import com.ruoyi.system.api.model.LoginUser;
 import io.swagger.annotations.Api;
 import io.swagger.annotations.ApiImplicitParam;
 import io.swagger.annotations.ApiImplicitParams;
@@ -17,6 +19,7 @@
 import org.springframework.web.bind.annotation.*;
 
 import javax.annotation.Resource;
+import java.util.ArrayList;
 import java.util.Arrays;
 import java.util.List;
 import java.util.stream.Collectors;
@@ -36,6 +39,8 @@
 
     @Resource
     private WorkerProcessService workerProcessService;
+    @Resource
+    private TokenService tokenService;
 
     /**
      * 师傅入驻审核分页列表
@@ -57,11 +62,30 @@
     public R<IPage<WorkerProcess>> queryPageList(String id, String realName, String city, Integer state,
                                                  @RequestParam(name = "pageNum", defaultValue = "1") Integer pageNum,
                                                  @RequestParam(name = "pageSize", defaultValue = "10") Integer pageSize) {
+        LoginUser loginUser = tokenService.getLoginUser();
+        if (null == loginUser) {
+            return R.loginExpire("登录失效!");
+        }
+        List<String> cityList = new ArrayList<>();
+        if (loginUser.getIsFranchisee()) {
+            cityList = loginUser.getCityList();
+        }
+        // 构建初始条件
         LambdaQueryChainWrapper<WorkerProcess> wrapper = workerProcessService.lambdaQuery();
         wrapper = StringUtils.isNotBlank(id) ? wrapper.like(WorkerProcess::getId, id) : wrapper;
         wrapper = StringUtils.isNotBlank(realName) ? wrapper.like(WorkerProcess::getRealName, realName) : wrapper;
         wrapper = StringUtils.isNotBlank(city) ? wrapper.like(WorkerProcess::getCity, city) : wrapper;
         wrapper = null != state ? wrapper.eq(WorkerProcess::getState, state) : wrapper;
+        // 管辖城市
+        for (int i = 0; i < cityList.size(); i++) {
+            // 最后一跳城市不匹配or条件
+            String s = cityList.get(i);
+            if (cityList.size() - 1 == i) {
+                wrapper.like(WorkerProcess::getCity, s);
+            } else {
+                wrapper.like(WorkerProcess::getCity, s).or();
+            }
+        }
         return R.ok(wrapper.eq(WorkerProcess::getIsDelete, 0)
                 .orderByDesc(WorkerProcess::getCreateTime).page(Page.of(pageNum, pageSize)));
     }
diff --git a/ruoyi-service/ruoyi-admin/src/main/java/com/ruoyi/admin/entity/ChangeDispatch.java b/ruoyi-service/ruoyi-admin/src/main/java/com/ruoyi/admin/entity/ChangeDispatch.java
index 29b64f7..7309313 100644
--- a/ruoyi-service/ruoyi-admin/src/main/java/com/ruoyi/admin/entity/ChangeDispatch.java
+++ b/ruoyi-service/ruoyi-admin/src/main/java/com/ruoyi/admin/entity/ChangeDispatch.java
@@ -44,7 +44,7 @@
 
     @ApiModelProperty("申请改派时间")
     @TableField("apply_time")
-    @JsonFormat(pattern = "yyyy-MM-dd HH:ss:mm")
+    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
     private Date applyTime;
 
     @ApiModelProperty("改派状态 (0:未改派 ;1:已改派)")
diff --git a/ruoyi-service/ruoyi-admin/src/main/java/com/ruoyi/admin/entity/Order.java b/ruoyi-service/ruoyi-admin/src/main/java/com/ruoyi/admin/entity/Order.java
index 01dfef0..a2316e8 100644
--- a/ruoyi-service/ruoyi-admin/src/main/java/com/ruoyi/admin/entity/Order.java
+++ b/ruoyi-service/ruoyi-admin/src/main/java/com/ruoyi/admin/entity/Order.java
@@ -109,7 +109,7 @@
 
     @ApiModelProperty("师傅到达预约地点时间")
     @TableField("arrive_time")
-    @JsonFormat(pattern = "yyyy-MM-dd HH:ss:mm")
+    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
     private Date arriveTime;
 
     @ApiModelProperty("订单类型(0:正常订单,1:后台订单(后台订单与用户端、师傅端无联系))")
diff --git a/ruoyi-service/ruoyi-admin/src/main/java/com/ruoyi/admin/entity/User.java b/ruoyi-service/ruoyi-admin/src/main/java/com/ruoyi/admin/entity/User.java
index 8fd4c43..044a627 100644
--- a/ruoyi-service/ruoyi-admin/src/main/java/com/ruoyi/admin/entity/User.java
+++ b/ruoyi-service/ruoyi-admin/src/main/java/com/ruoyi/admin/entity/User.java
@@ -35,6 +35,10 @@
     @TableField("city")
     private String city;
 
+    @ApiModelProperty("城市编码")
+    @TableField("city_code")
+    private String cityCode;
+
     @ApiModelProperty("用户昵称")
     @TableField("nickname")
     private String nickname;
diff --git a/ruoyi-service/ruoyi-admin/src/main/java/com/ruoyi/admin/service/impl/OrderServiceImpl.java b/ruoyi-service/ruoyi-admin/src/main/java/com/ruoyi/admin/service/impl/OrderServiceImpl.java
index dd6d01c..1a811ea 100644
--- a/ruoyi-service/ruoyi-admin/src/main/java/com/ruoyi/admin/service/impl/OrderServiceImpl.java
+++ b/ruoyi-service/ruoyi-admin/src/main/java/com/ruoyi/admin/service/impl/OrderServiceImpl.java
@@ -34,6 +34,7 @@
 import java.net.URLEncoder;
 import java.nio.file.Files;
 import java.nio.file.Paths;
+import java.text.SimpleDateFormat;
 import java.util.ArrayList;
 import java.util.Arrays;
 import java.util.List;
@@ -132,7 +133,9 @@
     private void serveRecordInfo(OrderDetailVO result, com.ruoyi.order.api.entity.Order order) {
         OrderByServeRecordVO orderByServeRecord = new OrderByServeRecordVO();
         orderByServeRecord.setAcceptOrderTime(order.getAcceptTime());
-        orderByServeRecord.setReachTime(order.getTime());
+        if (null != order.getArriveTime()) {
+            orderByServeRecord.setReachTime(new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(order.getArriveTime()));
+        }
         // 服务记录 包含现场照片
         ServeRecord serveRecord = serveRecordClient.serveRecordByOrderId(order.getId()).getData();
         // 师傅路线轨迹
diff --git a/ruoyi-service/ruoyi-admin/src/main/java/com/ruoyi/admin/vo/OrderByServeRecordVO.java b/ruoyi-service/ruoyi-admin/src/main/java/com/ruoyi/admin/vo/OrderByServeRecordVO.java
index 3499893..db175ca 100644
--- a/ruoyi-service/ruoyi-admin/src/main/java/com/ruoyi/admin/vo/OrderByServeRecordVO.java
+++ b/ruoyi-service/ruoyi-admin/src/main/java/com/ruoyi/admin/vo/OrderByServeRecordVO.java
@@ -18,7 +18,7 @@
 public class OrderByServeRecordVO {
 
     @ApiModelProperty("接单时间")
-    @JsonFormat(pattern = "yyyy-MM-dd HH:ss:mm")
+    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
     private Date acceptOrderTime;
 
     @ApiModelProperty("上门时间")
diff --git a/ruoyi-service/ruoyi-admin/src/main/java/com/ruoyi/admin/vo/OrderInfoVO.java b/ruoyi-service/ruoyi-admin/src/main/java/com/ruoyi/admin/vo/OrderInfoVO.java
index 099f10b..b5a3194 100644
--- a/ruoyi-service/ruoyi-admin/src/main/java/com/ruoyi/admin/vo/OrderInfoVO.java
+++ b/ruoyi-service/ruoyi-admin/src/main/java/com/ruoyi/admin/vo/OrderInfoVO.java
@@ -20,7 +20,7 @@
     private String orderNumber;
 
     @ApiModelProperty("下单时间")
-    @JsonFormat(pattern = "yyyy-MM-dd HH:ss:mm")
+    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
     private Date placeOrderTime;
 
     @ApiModelProperty("订单状态(0:待派单;1:待上门;2:待完工;3:已完结;4:已取消;5:已改派)")
diff --git a/ruoyi-service/ruoyi-order/src/main/java/com/ruoyi/order/controller/ChangeDispatchController.java b/ruoyi-service/ruoyi-order/src/main/java/com/ruoyi/order/controller/ChangeDispatchController.java
index 06c042a..3cff6d3 100644
--- a/ruoyi-service/ruoyi-order/src/main/java/com/ruoyi/order/controller/ChangeDispatchController.java
+++ b/ruoyi-service/ruoyi-order/src/main/java/com/ruoyi/order/controller/ChangeDispatchController.java
@@ -67,8 +67,18 @@
         wrapper = StringUtils.isNotBlank(workerName) ? wrapper.like(ChangeDispatch::getWorkerName, workerName) : wrapper;
         wrapper = StringUtils.isNotBlank(orderNumber) ? wrapper.like(ChangeDispatch::getOrderNumber, orderNumber) : wrapper;
         wrapper = StringUtils.isNotBlank(userName) ? wrapper.like(ChangeDispatch::getUserName, userName) : wrapper;
-        return R.ok(wrapper.eq(ChangeDispatch::getIsDelete, 0)
-                .orderByDesc(ChangeDispatch::getCreateTime).page(Page.of(pageNum, pageSize)));
+        Page<ChangeDispatch> page = wrapper.eq(ChangeDispatch::getIsDelete, 0)
+                .orderByDesc(ChangeDispatch::getCreateTime).page(Page.of(pageNum, pageSize));
+        for (ChangeDispatch record : page.getRecords()) {
+            String orderId = record.getOrderId();
+            Order order = orderService.lambdaQuery()
+                    .eq(Order::getId, orderId)
+                    .eq(Order::getIsDelete, 0).one();
+            if (null != order) {
+                record.setOrderTime(order.getCreateTime());
+            }
+        }
+        return R.ok(page);
     }
 
     /**
@@ -240,24 +250,15 @@
         if (null == order) {
             throw new GlobalException("订单不存在!");
         }
-        // 原订单状态改为 1:待上门,已选择师傅
-        order.setState(Constants.ONE);
         // 更改订单信息为再投单
-        boolean orderUpdate = orderService.lambdaUpdate().set(Order::getIsReinvest, Constants.ONE)
+        boolean orderUpdate = orderService.lambdaUpdate()
+                .set(Order::getIsReinvest, Constants.ONE)
                 .set(Order::getAcceptTime, new Date())
                 .set(Order::getArriveTime, null)
                 .set(Order::getCompleteTime, null)
+                // 原订单状态改为 1:待上门,已选择师傅
+                .set(Order::getState, Constants.ONE)
                 .eq(Order::getId, order.getId()).update();
-        // 生成新订单信息
-//        Order newOrder = new Order();
-//        BeanUtils.copyProperties(order, newOrder);
-//        newOrder.setId(null);
-//        newOrder.setServerId(workerId);
-//        newOrder.setServerName(name);
-//        newOrder.setServerPhone(phone);
-//        newOrder.setState(Constants.ONE);
-//        // 构建新订单
-//        boolean save = orderService.save(newOrder);
         // 改派信息
         boolean update = changeDispatchService.lambdaUpdate().set(ChangeDispatch::getState, 1)
                 .eq(ChangeDispatch::getId, changeId).eq(ChangeDispatch::getIsDelete, 0).update();
diff --git a/ruoyi-service/ruoyi-order/src/main/java/com/ruoyi/order/controller/OrderController.java b/ruoyi-service/ruoyi-order/src/main/java/com/ruoyi/order/controller/OrderController.java
index c332288..eab7821 100644
--- a/ruoyi-service/ruoyi-order/src/main/java/com/ruoyi/order/controller/OrderController.java
+++ b/ruoyi-service/ruoyi-order/src/main/java/com/ruoyi/order/controller/OrderController.java
@@ -99,6 +99,18 @@
     }
 
     /**
+     * 更改订单状态且清空到达时间
+     */
+    @ApiOperation(value = "订单列表-更改订单状态且清空到达时间", tags = {"后台-订单管理"})
+    @PostMapping(value = "/updateStateAndArrivalTime")
+    public R<Boolean> updateStateAndArrivalTime(@RequestParam("orderId") String orderId,
+                                                @RequestParam("state") Integer state) {
+        return R.ok(orderService.lambdaUpdate()
+                .eq(Order::getId, orderId).set(Order::getState, state)
+                .set(Order::getArriveTime, null).update());
+    }
+
+    /**
      * 更改订单提现状态
      */
     @ApiOperation(value = "订单列表-更改订单提现状态", tags = {"后台-订单管理"})
@@ -235,6 +247,7 @@
         order.setSiteName(orderRequest.getSiteName());
         order.setServeId(orderRequest.getServeId());
         order.setServeName(orderRequest.getServeName());
+        order.setServePrice(orderRequest.getServePrice());
         order.setSiteName(orderRequest.getSiteName());
         // 预约信息
         order.setReservationName(orderRequest.getReservationName());
@@ -441,8 +454,6 @@
     public R<OrderDetailVO> orderDetail(@RequestParam("orderId") String orderId) {
         // 订单信息
         Order order = orderService.lambdaQuery().eq(Order::getId, orderId).eq(Order::getIsDelete, 0).one();
-        // 获取回收服务封面
-
         // 服务信息(服务备注、上门时间、完成时间、完成所拍现场照片)
         ServeRecord serveRecord = serveRecordService.lambdaQuery().eq(ServeRecord::getOrderId, orderId)
                 .eq(ServeRecord::getIsDelete, 0).one();
diff --git a/ruoyi-service/ruoyi-order/src/main/java/com/ruoyi/order/entity/ChangeDispatch.java b/ruoyi-service/ruoyi-order/src/main/java/com/ruoyi/order/entity/ChangeDispatch.java
index 3885df0..c35bd71 100644
--- a/ruoyi-service/ruoyi-order/src/main/java/com/ruoyi/order/entity/ChangeDispatch.java
+++ b/ruoyi-service/ruoyi-order/src/main/java/com/ruoyi/order/entity/ChangeDispatch.java
@@ -44,7 +44,7 @@
 
     @ApiModelProperty("申请改派时间")
     @TableField("apply_time")
-    @JsonFormat(pattern = "yyyy-MM-dd HH:ss:mm")
+    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
     private Date applyTime;
 
     @ApiModelProperty("改派状态 (0:未改派 ;1:已改派 ;2:拒绝)")
@@ -55,6 +55,11 @@
     @TableField("order_id")
     private String orderId;
 
+    @ApiModelProperty("下单时间")
+    @TableField(exist = false)
+    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
+    private Date orderTime;
+
     @ApiModelProperty("订单编号")
     @TableField("order_number")
     private String orderNumber;
diff --git a/ruoyi-service/ruoyi-order/src/main/java/com/ruoyi/order/entity/Order.java b/ruoyi-service/ruoyi-order/src/main/java/com/ruoyi/order/entity/Order.java
index cdda0c2..19b8051 100644
--- a/ruoyi-service/ruoyi-order/src/main/java/com/ruoyi/order/entity/Order.java
+++ b/ruoyi-service/ruoyi-order/src/main/java/com/ruoyi/order/entity/Order.java
@@ -85,7 +85,7 @@
 
     @ApiModelProperty("接单时间(师傅接单或后台派单,更新该字段时间)")
     @TableField("accept_time")
-    @JsonFormat(pattern = "yyyy-MM-dd HH:ss:mm")
+    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
     private Date acceptTime;
 
     @ApiModelProperty("服务人员id")
@@ -110,7 +110,7 @@
 
     @ApiModelProperty("师傅到达预约地点时间")
     @TableField("arrive_time")
-    @JsonFormat(pattern = "yyyy-MM-dd HH:ss:mm")
+    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
     private Date arriveTime;
 
     @ApiModelProperty("订单类型(0:正常订单,1:后台订单(后台订单与用户端、师傅端无联系))")
@@ -127,7 +127,7 @@
 
     @ApiModelProperty("订单完成时间")
     @TableField("complete_time")
-    @JsonFormat(pattern = "yyyy-MM-dd HH:ss:mm")
+    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
     private Date completeTime;
 
     @ApiModelProperty("订单补贴金额")
diff --git a/ruoyi-service/ruoyi-order/src/main/java/com/ruoyi/order/entity/Withdraw.java b/ruoyi-service/ruoyi-order/src/main/java/com/ruoyi/order/entity/Withdraw.java
index 32cadb0..f2ff4dc 100644
--- a/ruoyi-service/ruoyi-order/src/main/java/com/ruoyi/order/entity/Withdraw.java
+++ b/ruoyi-service/ruoyi-order/src/main/java/com/ruoyi/order/entity/Withdraw.java
@@ -49,7 +49,7 @@
 
     @ApiModelProperty("申请时间")
     @TableField("apply_for_time")
-    @JsonFormat(pattern = "yyyy-MM-dd HH:ss:mm")
+    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
     private Date applyForTime;
 
     @ApiModelProperty("申请金额")
@@ -67,6 +67,5 @@
     @ApiModelProperty("订单id")
     @TableField("order_id")
     private String orderId;
-
 
 }
diff --git a/ruoyi-service/ruoyi-order/src/main/java/com/ruoyi/order/mapper/OrderMapper.java b/ruoyi-service/ruoyi-order/src/main/java/com/ruoyi/order/mapper/OrderMapper.java
index 04d11b0..249d601 100644
--- a/ruoyi-service/ruoyi-order/src/main/java/com/ruoyi/order/mapper/OrderMapper.java
+++ b/ruoyi-service/ruoyi-order/src/main/java/com/ruoyi/order/mapper/OrderMapper.java
@@ -24,48 +24,36 @@
      *
      * @param cityList   城市集合
      * @param orderState 订单状态
-     * @param startTime  开始日期
-     * @param endTime    结束日期
      * @return 本年订单数量
      */
-    List<OrderQueryVO> orderCountByYear(@Param("cityList") List<String> cityList, @Param("orderState") Integer orderState,
-                                        @Param("startTime") String startTime, @Param("endTime") String endTime);
+    List<OrderQueryVO> orderCountByYear(@Param("cityList") List<String> cityList, @Param("orderState") Integer orderState);
 
     /**
      * 查询本月订单数量
      *
      * @param cityList   城市集合
      * @param orderState 订单状态
-     * @param startTime  开始日期
-     * @param endTime    结束日期
      * @return 本年订单数量
      */
-    List<OrderQueryVO> orderCountByMonth(@Param("cityList") List<String> cityList, @Param("orderState") Integer orderState,
-                                         @Param("startTime") String startTime, @Param("endTime") String endTime);
+    List<OrderQueryVO> orderCountByMonth(@Param("cityList") List<String> cityList, @Param("orderState") Integer orderState);
 
     /**
      * 查询本周订单数量
      *
      * @param cityList   城市集合
      * @param orderState 订单状态
-     * @param startTime  开始日期
-     * @param endTime    结束日期
      * @return 本年订单数量
      */
-    List<OrderQueryVO> orderCountByWeek(@Param("cityList") List<String> cityList, @Param("orderState") Integer orderState,
-                                        @Param("startTime") String startTime, @Param("endTime") String endTime);
+    List<OrderQueryVO> orderCountByWeek(@Param("cityList") List<String> cityList, @Param("orderState") Integer orderState);
 
     /**
      * 查询当天订单数量
      *
      * @param cityList   城市集合
      * @param orderState 订单状态
-     * @param startTime  开始日期
-     * @param endTime    结束日期
      * @return 本年订单数量
      */
-    List<OrderQueryVO> orderCountByToday(@Param("cityList") List<String> cityList, @Param("orderState") Integer orderState,
-                                         @Param("startTime") String startTime, @Param("endTime") String endTime);
+    List<OrderQueryVO> orderCountByToday(@Param("cityList") List<String> cityList, @Param("orderState") Integer orderState);
 
     /**
      * 查询整个季度的交易额(订单状态为:已完工)
@@ -162,4 +150,42 @@
      * @return 统计结果
      */
     WorkerOrderCountVO orderStateCount(@Param("workerId") Integer workerId);
+
+    /**
+     * 根据时间范围筛选订单
+     *
+     * @param cityList   城市列表
+     * @param startTime  开始时间
+     * @param endTime    结束时间
+     * @param orderState 订单状态
+     * @return 列表
+     */
+    List<OrderQueryVO> orderCountByTimeRange(@Param("cityList") List<String> cityList, @Param("startTime") String startTime,
+                                             @Param("endTime") String endTime, @Param("orderState") Integer orderState);
+
+    /**
+     * 根据时间范围筛选订单
+     * -- 按年统计
+     *
+     * @param cityList   城市列表
+     * @param startTime  开始时间
+     * @param endTime    结束时间
+     * @param orderState 订单状态
+     * @return 列表
+     */
+    List<OrderQueryVO> orderCountByTimeRangeYear(@Param("cityList") List<String> cityList, @Param("startTime") String startTime,
+                                                 @Param("endTime") String endTime, @Param("orderState") Integer orderState);
+
+    /**
+     * 根据时间范围筛选订单
+     * -- 按月统计
+     *
+     * @param cityList   城市列表
+     * @param startTime  开始时间
+     * @param endTime    结束时间
+     * @param orderState 订单状态
+     * @return 列表
+     */
+    List<OrderQueryVO> orderCountByTimeRangeMonth(@Param("cityList") List<String> cityList, @Param("startTime") String startTime,
+                                                  @Param("endTime") String endTime, @Param("orderState") Integer orderState);
 }
diff --git a/ruoyi-service/ruoyi-order/src/main/java/com/ruoyi/order/request/OrderRequest.java b/ruoyi-service/ruoyi-order/src/main/java/com/ruoyi/order/request/OrderRequest.java
index b2d86e0..5f4eda7 100644
--- a/ruoyi-service/ruoyi-order/src/main/java/com/ruoyi/order/request/OrderRequest.java
+++ b/ruoyi-service/ruoyi-order/src/main/java/com/ruoyi/order/request/OrderRequest.java
@@ -73,7 +73,7 @@
     private Integer state;
 
     @ApiModelProperty("师傅到达预约地点时间")
-    @JsonFormat(pattern = "yyyy-MM-dd HH:ss:mm")
+    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
     private Date arriveTime;
 
     @ApiModelProperty("订单类型(0:正常订单,1:后台订单(后台订单与用户端、师傅端无联系))")
diff --git a/ruoyi-service/ruoyi-order/src/main/java/com/ruoyi/order/service/impl/OrderServiceImpl.java b/ruoyi-service/ruoyi-order/src/main/java/com/ruoyi/order/service/impl/OrderServiceImpl.java
index c07ae66..24cde1d 100644
--- a/ruoyi-service/ruoyi-order/src/main/java/com/ruoyi/order/service/impl/OrderServiceImpl.java
+++ b/ruoyi-service/ruoyi-order/src/main/java/com/ruoyi/order/service/impl/OrderServiceImpl.java
@@ -18,11 +18,14 @@
 
 import javax.annotation.Resource;
 import java.math.BigDecimal;
+import java.text.ParseException;
+import java.text.SimpleDateFormat;
 import java.time.LocalDate;
 import java.time.Month;
 import java.time.Year;
 import java.time.temporal.TemporalAdjusters;
 import java.util.ArrayList;
+import java.util.Date;
 import java.util.List;
 import java.util.Objects;
 
@@ -51,15 +54,32 @@
         List<OrderQueryVO> list;
         // 根据查询类型查询订单信息
         if (OrderConstants.YEAR.equals(countType)) {
-            list = baseMapper.orderCountByYear(cityList, orderState, startTime, endTime);
+            list = baseMapper.orderCountByYear(cityList, orderState);
         } else if (OrderConstants.MONTH.equals(countType)) {
-            list = baseMapper.orderCountByMonth(cityList, orderState, startTime, endTime);
+            list = baseMapper.orderCountByMonth(cityList, orderState);
         } else if (OrderConstants.WEEK.equals(countType)) {
-            list = baseMapper.orderCountByWeek(cityList, orderState, startTime, endTime);
+            list = baseMapper.orderCountByWeek(cityList, orderState);
         } else if (OrderConstants.TODAY.equals(countType)) {
-            list = baseMapper.orderCountByToday(cityList, orderState, startTime, endTime);
+            list = baseMapper.orderCountByToday(cityList, orderState);
         } else {
-            list = new ArrayList<>();
+            try {
+                startTime = startTime + " 00:00:00";
+                endTime = endTime + " 00:00:00";
+                SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
+                Date date1 = sdf.parse(startTime);
+                Date date2 = sdf.parse(endTime);
+                long diffInMillis = date2.getTime() - date1.getTime();
+                long diffInDays = diffInMillis / (24 * 60 * 60 * 1000);
+                if (diffInDays > Constants.YEAR_DAY) {
+                    list = baseMapper.orderCountByTimeRangeYear(cityList, startTime, endTime,orderState);
+                } else if (diffInDays > Constants.THIRTY) {
+                    list = baseMapper.orderCountByTimeRangeMonth(cityList, startTime, endTime,orderState);
+                } else {
+                    list = baseMapper.orderCountByTimeRange(cityList, startTime, endTime,orderState);
+                }
+            } catch (ParseException e) {
+                list = new ArrayList<>();
+            }
         }
         // 计算订单总额及总订单数量
         BigDecimal totalMoney;
@@ -73,7 +93,10 @@
             orderNumber = list.stream().filter(order -> order.getNumber() != null)
                     .mapToInt(OrderQueryVO::getNumber).sum();
         }
-        return new OrderResultVO(totalMoney, orderNumber, list);
+        return new
+
+                OrderResultVO(totalMoney, orderNumber, list);
+
     }
 
     @Override
@@ -136,7 +159,7 @@
             } else if (Constants.FOUR.equals(state)) {
                 canceled++;
             }
-            if (order.getIsReinvest() != null && order.getIsReinvest() == 1) {
+            if (order.getState().equals(Constants.SIX)) {
                 reInvestment++;
             }
         }
diff --git a/ruoyi-service/ruoyi-order/src/main/java/com/ruoyi/order/vo/EvaluateInfoVO.java b/ruoyi-service/ruoyi-order/src/main/java/com/ruoyi/order/vo/EvaluateInfoVO.java
index d15a50a..67f3637 100644
--- a/ruoyi-service/ruoyi-order/src/main/java/com/ruoyi/order/vo/EvaluateInfoVO.java
+++ b/ruoyi-service/ruoyi-order/src/main/java/com/ruoyi/order/vo/EvaluateInfoVO.java
@@ -21,7 +21,7 @@
     private Integer starRating;
 
     @ApiModelProperty("评价时间")
-    @JsonFormat(pattern = "yyyy-MM-dd HH:ss:mm")
+    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
     private Date evaluateTime;
 
 }
diff --git a/ruoyi-service/ruoyi-order/src/main/java/com/ruoyi/order/vo/EvaluateOrderInfoVO.java b/ruoyi-service/ruoyi-order/src/main/java/com/ruoyi/order/vo/EvaluateOrderInfoVO.java
index ece2684..2ccd818 100644
--- a/ruoyi-service/ruoyi-order/src/main/java/com/ruoyi/order/vo/EvaluateOrderInfoVO.java
+++ b/ruoyi-service/ruoyi-order/src/main/java/com/ruoyi/order/vo/EvaluateOrderInfoVO.java
@@ -36,7 +36,7 @@
     private String serverPhone;
 
     @ApiModelProperty("订单完成时间")
-    @JsonFormat(pattern = "yyyy-MM-dd HH:ss:mm")
+    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
     private Date completeTime;
 
     @ApiModelProperty("回收服务id")
diff --git a/ruoyi-service/ruoyi-order/src/main/java/com/ruoyi/order/vo/OrderQueryRequest.java b/ruoyi-service/ruoyi-order/src/main/java/com/ruoyi/order/vo/OrderQueryRequest.java
index b8a6b5a..51cbca6 100644
--- a/ruoyi-service/ruoyi-order/src/main/java/com/ruoyi/order/vo/OrderQueryRequest.java
+++ b/ruoyi-service/ruoyi-order/src/main/java/com/ruoyi/order/vo/OrderQueryRequest.java
@@ -60,5 +60,7 @@
     @ApiModelProperty("导出ids集合")
     private List<String> ids;
 
+    @ApiModelProperty("城市列表")
+    private List<String> cityList;
 
 }
diff --git a/ruoyi-service/ruoyi-order/src/main/java/com/ruoyi/order/vo/WithdrawDetailVO.java b/ruoyi-service/ruoyi-order/src/main/java/com/ruoyi/order/vo/WithdrawDetailVO.java
index 7f13eac..ecdcdfb 100644
--- a/ruoyi-service/ruoyi-order/src/main/java/com/ruoyi/order/vo/WithdrawDetailVO.java
+++ b/ruoyi-service/ruoyi-order/src/main/java/com/ruoyi/order/vo/WithdrawDetailVO.java
@@ -49,7 +49,7 @@
     private String time;
 
     @ApiModelProperty("接单时间(师傅接单或后台派单,更新该字段时间)")
-    @JsonFormat(pattern = "yyyy-MM-dd HH:ss:mm")
+    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
     private Date acceptTime;
 
     @ApiModelProperty("服务人员id")
@@ -68,11 +68,11 @@
     private Integer state;
 
     @ApiModelProperty("师傅到达预约地点时间")
-    @JsonFormat(pattern = "yyyy-MM-dd HH:ss:mm")
+    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
     private Date arriveTime;
 
     @ApiModelProperty("订单完成时间")
-    @JsonFormat(pattern = "yyyy-MM-dd HH:ss:mm")
+    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
     private Date completeTime;
 
     @ApiModelProperty("订单补贴金额")
@@ -85,7 +85,7 @@
     private Integer withdrawalState;
 
     @ApiModelProperty("提现申请时间")
-    @JsonFormat(pattern = "yyyy-MM-dd HH:ss:mm")
+    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
     private Date withdrawalTime;
 
     @ApiModelProperty("详细地址")
diff --git a/ruoyi-service/ruoyi-order/src/main/resources/mapper/order/OrderMapper.xml b/ruoyi-service/ruoyi-order/src/main/resources/mapper/order/OrderMapper.xml
index 7de42ab..a8a5e22 100644
--- a/ruoyi-service/ruoyi-order/src/main/resources/mapper/order/OrderMapper.xml
+++ b/ruoyi-service/ruoyi-order/src/main/resources/mapper/order/OrderMapper.xml
@@ -30,7 +30,7 @@
 
 
     <select id="orderCountByYear" resultType="com.ruoyi.order.vo.OrderQueryVO">
-        SELECT DATE_FORMAT(createTime, '%Y-%m') AS dateTime, COUNT(*) AS number, sum(serve_price) as totalPrice
+        SELECT DATE_FORMAT(createTime, '%Y-%m') AS dateTime, COUNT(*) AS number, sum(IFNULL(serve_price, 0)) as totalPrice
         FROM t_order
         <where>
             is_delete = 0
@@ -41,14 +41,8 @@
                     #{id}
                 </foreach>
             </if>
-            <if test="orderState != null and orderState != ''">
+            <if test="orderState != null">
                 and state = #{orderState}
-            </if>
-            <if test="startTime != null and startTime != ''">
-                and createTime <![CDATA[ >= ]]> #{startTime}
-            </if>
-            <if test="endTime != null and endTime != ''">
-                and createTime <![CDATA[ <= ]]> #{endTime}
             </if>
         </where>
         GROUP BY dateTime
@@ -56,25 +50,19 @@
     </select>
 
     <select id="orderCountByWeek" resultType="com.ruoyi.order.vo.OrderQueryVO">
-        SELECT DATE_FORMAT(createTime, '%Y-%m-%d') AS dateTime, COUNT(*) AS number, sum(serve_price) as totalPrice
+        SELECT DATE_FORMAT(createTime, '%Y-%m-%d') AS dateTime, COUNT(*) AS number, sum(IFNULL(serve_price, 0)) as totalPrice
         FROM t_order
         <where>
             is_delete = 0
-              and YEARWEEK(DATE_FORMAT(createTime, '%Y-%m-%d')) = YEARWEEK(NOW())
+              and YEARWEEK(DATE_FORMAT(createTime, '%Y-%m-%d'), 1) = YEARWEEK(NOW(), 1)
             <if test="cityList != null and cityList.size() != 0">
                 and city in
                 <foreach collection="cityList" item="id" open="(" separator="," close=")">
                     #{id}
                 </foreach>
             </if>
-            <if test="orderState != null and orderState != ''">
+            <if test="orderState != null">
                 and state = #{orderState}
-            </if>
-            <if test="startTime != null and startTime != ''">
-                and createTime <![CDATA[ >= ]]> #{startTime}
-            </if>
-            <if test="endTime != null and endTime != ''">
-                and createTime <![CDATA[ <= ]]> #{endTime}
             </if>
         </where>
         GROUP BY dateTime
@@ -82,7 +70,7 @@
     </select>
 
     <select id="orderCountByMonth" resultType="com.ruoyi.order.vo.OrderQueryVO">
-        SELECT DATE_FORMAT(createTime, '%Y-%m-%d') AS dateTime, COUNT(*) AS number, sum(serve_price) as totalPrice
+        SELECT DATE_FORMAT(createTime, '%Y-%m-%d') AS dateTime, COUNT(*) AS number, sum(IFNULL(serve_price, 0)) as totalPrice
         FROM t_order
         <where>
             is_delete = 0
@@ -94,14 +82,8 @@
                     #{id}
                 </foreach>
             </if>
-            <if test="orderState != null and orderState != ''">
+            <if test="orderState != null">
                 and state = #{orderState}
-            </if>
-            <if test="startTime != null and startTime != ''">
-                and createTime <![CDATA[ >= ]]> #{startTime}
-            </if>
-            <if test="endTime != null and endTime != ''">
-                and createTime <![CDATA[ <= ]]> #{endTime}
             </if>
         </where>
         GROUP BY dateTime
@@ -109,24 +91,19 @@
     </select>
 
     <select id="orderCountByToday" resultType="com.ruoyi.order.vo.OrderQueryVO">
-        SELECT DATE_FORMAT(createTime, '%Y-%m-%d %H') AS dateTime, COUNT(*) AS number, sum(serve_price) as totalPrice
+        SELECT DATE_FORMAT(createTime, '%Y-%m-%d') AS dateTime, COUNT(*) AS number, sum(IFNULL(serve_price, 0)) as totalPrice
         FROM t_order
         <where>
-            DATE(createTime) = CURDATE()
+            is_delete = 0
+              and DATE(createTime) = CURDATE()
             <if test="cityList != null and cityList.size() != 0">
                 and city in
                 <foreach collection="cityList" item="id" open="(" separator="," close=")">
                     #{id}
                 </foreach>
             </if>
-            <if test="orderState != null and orderState != ''">
+            <if test="orderState != null">
                 and state = #{orderState}
-            </if>
-            <if test="startTime != null and startTime != ''">
-                and createTime <![CDATA[ >= ]]> #{startTime}
-            </if>
-            <if test="endTime != null and endTime != ''">
-                and createTime <![CDATA[ <= ]]> #{endTime}
             </if>
         </where>
         GROUP BY dateTime
@@ -184,8 +161,7 @@
     </select>
 
     <select id="orderCount" resultType="com.ruoyi.order.vo.OrderCountVO">
-        SELECT o.server_name                                      AS realName,
-               o.server_id                                        as workerId,
+        SELECT o.server_id                                        as workerId,
                SUM(CASE WHEN o.state in (1, 2) THEN 1 ELSE 0 END) AS toBeCompletedNumber,
                SUM(CASE WHEN o.state = 3 THEN 1 ELSE 0 END)       AS completedNumber,
                SUM(CASE WHEN o.state = 6 THEN 1 ELSE 0 END)       AS reInvestment
@@ -197,7 +173,7 @@
         <if test="name != null and name != ''">
             and o.server_name like concat('%', #{name}, '%')
         </if>
-        GROUP BY o.server_name, o.server_id
+        GROUP BY o.server_id
     </select>
 
     <select id="queryPage" resultMap="BaseResultMap">
@@ -210,6 +186,12 @@
             </if>
             <if test="data.cityName != null and data.cityName != ''">
                 and o.city like concat('%', #{data.cityName}, '%')
+            </if>
+            <if test="data.cityList != null and data.cityList.size() != 0">
+                and o.city in
+                <foreach collection="data.cityList" item="c" open="(" separator="," close=")">
+                    #{c}
+                </foreach>
             </if>
             <if test="data.reservationName != null and data.reservationName != ''">
                 and o.reservation_name like concat('%', #{data.reservationName}, '%')
@@ -269,7 +251,7 @@
                 and o.server_phone like concat('%', #{data.workerPhone}, '%')
             </if>
             <if test="data.serveName != null and data.serveName != ''">
-                and o.serve_name like concat('%', #{data.serveName}, '%')
+                and o.site_name like concat('%', #{data.serveName}, '%')
             </if>
             <if test="data.orderTimeStart != null and data.orderTimeStart != ''">
                 and DATE(o.createTime) <![CDATA[ >= ]]> #{data.orderTimeStart}
@@ -393,4 +375,79 @@
         where o.server_id = #{workerId}
           and o.is_delete = 0
     </select>
+
+    <select id="orderCountByTimeRange" resultType="com.ruoyi.order.vo.OrderQueryVO">
+        SELECT DATE_FORMAT(createTime, '%Y-%m-%d') AS dateTime, COUNT(*) AS number, sum(IFNULL(serve_price, 0)) as totalPrice
+        FROM t_order
+        <where>
+            is_delete = 0
+            <if test="cityList != null and cityList.size() != 0">
+                and city in
+                <foreach collection="cityList" item="id" open="(" separator="," close=")">
+                    #{id}
+                </foreach>
+            </if>
+            <if test="orderState != null">
+                and state = #{orderState}
+            </if>
+            <if test="startTime != null and startTime != ''">
+                and createTime <![CDATA[ >= ]]> #{startTime}
+            </if>
+            <if test="endTime != null and endTime != ''">
+                and createTime <![CDATA[ <= ]]> #{endTime}
+            </if>
+        </where>
+        GROUP BY dateTime
+        order by dateTime
+    </select>
+
+    <select id="orderCountByTimeRangeYear" resultType="com.ruoyi.order.vo.OrderQueryVO">
+        SELECT DATE_FORMAT(createTime, '%Y') AS dateTime, COUNT(*) AS number, sum(IFNULL(serve_price, 0)) as totalPrice
+        FROM t_order
+        <where>
+            is_delete = 0
+            <if test="cityList != null and cityList.size() != 0">
+                and city in
+                <foreach collection="cityList" item="id" open="(" separator="," close=")">
+                    #{id}
+                </foreach>
+            </if>
+            <if test="orderState != null">
+                and state = #{orderState}
+            </if>
+            <if test="startTime != null and startTime != ''">
+                and createTime <![CDATA[ >= ]]> #{startTime}
+            </if>
+            <if test="endTime != null and endTime != ''">
+                and createTime <![CDATA[ <= ]]> #{endTime}
+            </if>
+        </where>
+        GROUP BY dateTime
+        order by dateTime
+    </select>
+
+    <select id="orderCountByTimeRangeMonth" resultType="com.ruoyi.order.vo.OrderQueryVO">
+        SELECT DATE_FORMAT(createTime, '%Y-%m') AS dateTime, COUNT(*) AS number, sum(IFNULL(serve_price, 0)) as totalPrice
+        FROM t_order
+        <where>
+            is_delete = 0
+            <if test="cityList != null and cityList.size() != 0">
+                and city in
+                <foreach collection="cityList" item="id" open="(" separator="," close=")">
+                    #{id}
+                </foreach>
+            </if>
+            <if test="orderState != null">
+                and state = #{orderState}
+            </if>
+            <if test="startTime != null and startTime != ''">
+                and createTime <![CDATA[ >= ]]> #{startTime}
+            </if>
+            <if test="endTime != null and endTime != ''">
+                and createTime <![CDATA[ <= ]]> #{endTime}
+            </if>
+        </where>
+        GROUP BY dateTime
+        order by dateTime
+    </select>
 </mapper>
diff --git a/ruoyi-service/ruoyi-user/src/main/java/com/ruoyi/user/controller/RecoveryServeController.java b/ruoyi-service/ruoyi-user/src/main/java/com/ruoyi/user/controller/RecoveryServeController.java
index 821aad1..0204b90 100644
--- a/ruoyi-service/ruoyi-user/src/main/java/com/ruoyi/user/controller/RecoveryServeController.java
+++ b/ruoyi-service/ruoyi-user/src/main/java/com/ruoyi/user/controller/RecoveryServeController.java
@@ -83,7 +83,7 @@
      */
     @GetMapping(value = "/servePage")
     @ApiOperation(value = "根据所选分类获取服务列表", tags = {"用户端-服务"})
-    public R<IPage<RecoveryServe>> servePage(@RequestParam("id") Integer id,
+    public R<IPage<RecoveryServe>> servePage(@RequestParam("id") String id,
                                              @RequestParam(name = "pageNum", defaultValue = "1") Integer pageNum,
                                              @RequestParam(name = "pageSize", defaultValue = "10") Integer pageSize) {
         Page<RecoveryServe> page = recoveryServeService.lambdaQuery()
@@ -109,9 +109,9 @@
     @GetMapping(value = "/serveDetail")
     @ApiOperation(value = "获取服务详情", tags = {"用户端-服务"})
     @ApiImplicitParams({
-            @ApiImplicitParam(value = "服务id", name = "serveId", dataType = "Integer", required = true)
+            @ApiImplicitParam(value = "服务id", name = "serveId", dataType = "String", required = true)
     })
-    public R<RecoveryServe> serveDetail(@RequestParam Integer serveId) {
+    public R<RecoveryServe> serveDetail(@RequestParam String serveId) {
         RecoveryServe recoveryServe = recoveryServeService.lambdaQuery().eq(RecoveryServe::getId, serveId)
                 .eq(RecoveryServe::getIsDelete, 0).orderByAsc(RecoveryServe::getSort).one();
         // 用户是否收藏
diff --git a/ruoyi-service/ruoyi-user/src/main/java/com/ruoyi/user/controller/UserController.java b/ruoyi-service/ruoyi-user/src/main/java/com/ruoyi/user/controller/UserController.java
index ff3d35f..0bfcc23 100644
--- a/ruoyi-service/ruoyi-user/src/main/java/com/ruoyi/user/controller/UserController.java
+++ b/ruoyi-service/ruoyi-user/src/main/java/com/ruoyi/user/controller/UserController.java
@@ -1,7 +1,6 @@
 package com.ruoyi.user.controller;
 
 
-import cn.hutool.core.util.RandomUtil;
 import com.baomidou.mybatisplus.extension.conditions.query.LambdaQueryChainWrapper;
 import com.ruoyi.admin.api.entity.*;
 import com.ruoyi.admin.api.feignClient.AdminClient;
@@ -126,7 +125,7 @@
         } else {
             user = new User();
             // 随机编号
-            user.setUserNo(String.format(Constants.USER_NO_PRE, RandomUtil.randomNumbers(Constants.EIGHT)));
+            user.setUserNo(String.format(Constants.USER_NO_PRE, StringUtils.getCharAndNum(Constants.SIX)));
             user.setState(Constants.ONE);
             user.setNickname(phone);
             user.setPhone(phone);
@@ -154,7 +153,7 @@
     @ApiImplicitParams({
             @ApiImplicitParam(value = "0:用户注册协议、1:用户隐私协议", name = "type", dataType = "Integer", required = true)
     })
-    public R<Agreement> recoverySearch(@RequestParam Integer type) {
+    public R<Agreement> registerOrAgreement(@RequestParam Integer type) {
         if (!Constants.ZERO.equals(type) && !Constants.ONE.equals(type)) {
             throw new GlobalException("获取类型异常!");
         }
@@ -246,19 +245,21 @@
         LambdaQueryChainWrapper<RecoveryServe> wrapper = recoveryServeService.lambdaQuery()
                 .eq(RecoveryServe::getIsDelete, 0)
                 .orderByAsc(RecoveryServe::getSort);
-        wrapper = StringUtils.isNotBlank(keyword) ? wrapper.like(RecoveryServe::getServeName, keyword) : wrapper;
+        wrapper = null != keyword && !"".equals(keyword.trim()) ?
+                wrapper.like(RecoveryServe::getServeName, keyword) : wrapper;
         List<RecoveryServe> serveList = wrapper.list();
         for (RecoveryServe recoveryServe : serveList) {
             RecoveryClassify classify = recoveryClassifyService.lambdaQuery()
-                    .eq(RecoveryClassify::getId, recoveryServe.getClassifyId())
-                    .eq(RecoveryClassify::getIsDelete, 0).one();
-            if (Constants.RECOVERY.equals(classify.getSupClassify())) {
-                recoveryServe.setType(Constants.ONE);
-            } else {
-                recoveryServe.setType(Constants.ZERO);
+                    .eq(RecoveryClassify::getId, recoveryServe.getClassifyId()).one();
+            if (null != classify) {
+                if (Constants.RECOVERY.equals(classify.getSupClassify())) {
+                    recoveryServe.setType(Constants.ONE);
+                } else {
+                    recoveryServe.setType(Constants.ZERO);
+                }
             }
         }
-        return R.ok(wrapper.list());
+        return R.ok(serveList);
     }
 
     /**
@@ -290,4 +291,19 @@
                 .set(User::getNickname, nickname).update());
     }
 
+    /**
+     * 用户端-修改用户定位城市
+     */
+    @ApiOperation(value = "修改用户定位城市", tags = {"用户端-个人中心"})
+    @GetMapping(value = "/updateCity")
+    public R<Boolean> updateCity(@RequestParam String city, @RequestParam String cityCode) {
+        LoginUserInfo loginUser = tokenService.getLoginUserByUser();
+        if (null == loginUser) {
+            return R.loginExpire("登录失效!");
+        }
+        return R.ok(userService.lambdaUpdate().eq(User::getId, loginUser.getUserid())
+                .set(User::getCity, city)
+                .set(User::getCityCode, cityCode).update());
+    }
+
 }
diff --git a/ruoyi-service/ruoyi-user/src/main/java/com/ruoyi/user/entity/User.java b/ruoyi-service/ruoyi-user/src/main/java/com/ruoyi/user/entity/User.java
index 51aacf4..d9e99c4 100644
--- a/ruoyi-service/ruoyi-user/src/main/java/com/ruoyi/user/entity/User.java
+++ b/ruoyi-service/ruoyi-user/src/main/java/com/ruoyi/user/entity/User.java
@@ -51,6 +51,10 @@
     @TableField("city")
     private String city;
 
+    @ApiModelProperty("城市编码")
+    @TableField("city_code")
+    private String cityCode;
+
     @ApiModelProperty("微信OpenId")
     @TableField("open_id")
     private String openId;
diff --git a/ruoyi-service/ruoyi-user/src/main/java/com/ruoyi/user/service/impl/RegionServiceImpl.java b/ruoyi-service/ruoyi-user/src/main/java/com/ruoyi/user/service/impl/RegionServiceImpl.java
index 98e9026..611de69 100644
--- a/ruoyi-service/ruoyi-user/src/main/java/com/ruoyi/user/service/impl/RegionServiceImpl.java
+++ b/ruoyi-service/ruoyi-user/src/main/java/com/ruoyi/user/service/impl/RegionServiceImpl.java
@@ -7,6 +7,7 @@
 import com.ruoyi.user.entity.Region;
 import com.ruoyi.user.mapper.RegionMapper;
 import com.ruoyi.user.service.RegionService;
+import com.ruoyi.user.vo.RegionVo;
 import net.sourceforge.pinyin4j.PinyinHelper;
 import net.sourceforge.pinyin4j.format.HanyuPinyinCaseType;
 import net.sourceforge.pinyin4j.format.HanyuPinyinOutputFormat;
@@ -14,9 +15,10 @@
 import net.sourceforge.pinyin4j.format.exception.BadHanyuPinyinOutputFormatCombination;
 import org.springframework.stereotype.Service;
 
-import java.text.Collator;
-import java.util.*;
-import java.util.stream.Collectors;
+import java.util.ArrayList;
+import java.util.List;
+import java.util.Map;
+import java.util.TreeMap;
 
 /**
  * <p>
@@ -38,21 +40,8 @@
         }
         // 获取所有市区信息
         List<Region> reginList = wrapper.orderByAsc(Region::getId).list();
-        List<String> data = reginList.stream().map(Region::getName).collect(Collectors.toList());
-        Map<String, Object> px = px(data);
-        return px;
         // 根据市区首字母分组排序
-//        data.sort(new Comparator<String>() {
-//            final Collator collator = Collator.getInstance(Locale.CHINA);
-//
-//            @Override
-//            public int compare(String o1, String o2) {
-//                CollationKey key1 = collator.getCollationKey(o1);
-//                CollationKey key2 = collator.getCollationKey(o2);
-//                return key1.compareTo(key2);
-//            }
-//        });
-//        return reginList;
+        return newSort(reginList);
     }
 
     /**
@@ -67,40 +56,37 @@
         HanyuPinyinOutputFormat defaultFormat = new HanyuPinyinOutputFormat();
         defaultFormat.setCaseType(HanyuPinyinCaseType.UPPERCASE);
         defaultFormat.setToneType(HanyuPinyinToneType.WITHOUT_TONE);
-        for (int i = 0; i < arr.length; i++) {
-            if (arr[i] > 128) {
+        for (char c : arr) {
+            if (c > 128) {
                 try {
-                    pybf.append(PinyinHelper.toHanyuPinyinStringArray(arr[i], defaultFormat)[0]);
+                    pybf.append(PinyinHelper.toHanyuPinyinStringArray(c, defaultFormat)[0]);
                 } catch (BadHanyuPinyinOutputFormatCombination e) {
                     e.printStackTrace();
                 }
             } else {
-                pybf.append(arr[i]);
+                pybf.append(c);
             }
         }
         return pybf.toString();
     }
 
-    public Map<String, Object> px(List<String> list) {
-        Comparator<Object> com = Collator.getInstance(java.util.Locale.CHINA);
-        // 按字母排序
-        Collections.sort(list, com);
-        //输出26个字母
-        Map<String, Object> map = new TreeMap<>();
+    private Object newSort(List<Region> reginList) {
+        // 按照城市名称排序,并分组
+        Map<String, List<RegionVo>> map = new TreeMap<>();
         for (int i = 1; i <= 26; i++) {
-            //循环找出 首字母一样的数据
-            String word = String.valueOf((char) (96 + i)).toUpperCase();
-            List<String> letter = new ArrayList<>();
-            for (String str : list) {
-                // System.out.println("首字母"+zm);
-                String zm = getFullSpell(str).substring(0, 1);
-                if (word.equals(zm)) {
-                    letter.add(str);
+            // 循环找出首字母一样的数据
+            String letter = String.valueOf((char) (96 + i)).toUpperCase();
+            List<RegionVo> regionVos = new ArrayList<>();
+            for (Region region : reginList) {
+                String firstLetter = getFullSpell(region.getName()).substring(0, 1);
+                if (letter.equals(firstLetter)) {
+                    RegionVo regionVo = new RegionVo(region.getName(), region.getCityCode());
+                    regionVos.add(regionVo);
                 }
-                map.put(word, letter);
+                map.put(letter, regionVos);
             }
-            //System.out.println(JsoN.to]soNString(map));
         }
         return map;
     }
+
 }
diff --git a/ruoyi-service/ruoyi-user/src/main/java/com/ruoyi/user/service/impl/UserServiceImpl.java b/ruoyi-service/ruoyi-user/src/main/java/com/ruoyi/user/service/impl/UserServiceImpl.java
index f2b8f7f..f90ab72 100644
--- a/ruoyi-service/ruoyi-user/src/main/java/com/ruoyi/user/service/impl/UserServiceImpl.java
+++ b/ruoyi-service/ruoyi-user/src/main/java/com/ruoyi/user/service/impl/UserServiceImpl.java
@@ -4,7 +4,6 @@
 import cn.binarywang.wx.miniapp.api.WxMaUserService;
 import cn.binarywang.wx.miniapp.bean.WxMaJscode2SessionResult;
 import cn.binarywang.wx.miniapp.bean.WxMaPhoneNumberInfo;
-import cn.hutool.core.util.RandomUtil;
 import cn.hutool.http.HttpRequest;
 import com.alibaba.fastjson2.JSONObject;
 import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
@@ -91,15 +90,15 @@
         }
         if (session != null && StringUtils.isNotBlank(session.getOpenid())) {
             String openid = session.getOpenid();
-//            String sessionKey = session.getSessionKey();
+            /*String sessionKey = session.getSessionKey();
             // 加密明文及初始向量转义
-//                encryptedData = URLEncoder.encode(encryptedData, "UTF-8").replace("%3D", "=").replace("%2F", "/");
-//                ivStr = URLEncoder.encode(ivStr, "UTF-8").replace("%3D", "=").replace("%2F", "/");
-//                // 获取用户信息
-//                String result = WxAesUtils.decryptData(WxAesUtils.getUrlDecoderString(encryptedData),
-//                        sessionKey,
-//                        WxAesUtils.getUrlDecoderString(ivStr));
-//                JSONObject userJson = JSONObject.parseObject(result);
+            encryptedData = URLEncoder.encode(encryptedData, "UTF-8").replace("%3D", "=").replace("%2F", "/");
+            ivStr = URLEncoder.encode(ivStr, "UTF-8").replace("%3D", "=").replace("%2F", "/");
+            // 获取用户信息
+            String result = WxAesUtils.decryptData(WxAesUtils.getUrlDecoderString(encryptedData),
+                    sessionKey,
+                    WxAesUtils.getUrlDecoderString(ivStr));
+            JSONObject userJson = JSONObject.parseObject(result);*/
             // 封装项目用户信息
             if (null != phoneNoInfo) {
                 String phoneNumber = phoneNoInfo.getPhoneNumber();
@@ -107,7 +106,7 @@
                         .eq(User::getIsDelete, 0).one();
                 if (null == user) {
                     user = new User();
-                    user.setUserNo(String.format(Constants.USER_NO_PRE, RandomUtil.randomNumbers(Constants.EIGHT)));
+                    user.setUserNo(String.format(Constants.USER_NO_PRE, StringUtils.getCharAndNum(Constants.SIX)));
                     user.setPhone(phoneNumber);
                     user.setState(Constants.ONE);
                     user.setOpenId(openid);
diff --git a/ruoyi-service/ruoyi-user/src/main/java/com/ruoyi/user/vo/OrderDetailVO.java b/ruoyi-service/ruoyi-user/src/main/java/com/ruoyi/user/vo/OrderDetailVO.java
index b20cf25..92e824d 100644
--- a/ruoyi-service/ruoyi-user/src/main/java/com/ruoyi/user/vo/OrderDetailVO.java
+++ b/ruoyi-service/ruoyi-user/src/main/java/com/ruoyi/user/vo/OrderDetailVO.java
@@ -53,15 +53,15 @@
     private Integer state;
 
     @ApiModelProperty("接单时间(师傅接单或后台派单,更新该字段时间)")
-    @JsonFormat(pattern = "yyyy-MM-dd HH:ss:mm")
+    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
     private Date acceptTime;
 
     @ApiModelProperty("师傅到达预约地点时间")
-    @JsonFormat(pattern = "yyyy-MM-dd HH:ss:mm")
+    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
     private Date arriveTime;
 
     @ApiModelProperty("订单完成时间")
-    @JsonFormat(pattern = "yyyy-MM-dd HH:ss:mm")
+    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
     private Date completeTime;
 
     @ApiModelProperty("订单补贴金额")
diff --git a/ruoyi-service/ruoyi-user/src/main/java/com/ruoyi/user/vo/RegionVo.java b/ruoyi-service/ruoyi-user/src/main/java/com/ruoyi/user/vo/RegionVo.java
new file mode 100644
index 0000000..f47cc73
--- /dev/null
+++ b/ruoyi-service/ruoyi-user/src/main/java/com/ruoyi/user/vo/RegionVo.java
@@ -0,0 +1,31 @@
+package com.ruoyi.user.vo;
+
+import lombok.Data;
+
+/**
+ * @author HJL
+ * @version 1.0
+ * @since 2024-07-16 10:05
+ */
+@Data
+public class RegionVo {
+
+    /**
+     * 城市
+     */
+    private String city;
+
+    /**
+     * 城市编码
+     */
+    private String cityCode;
+
+    public RegionVo() {
+    }
+
+    public RegionVo(String city, String cityCode) {
+        this.city = city;
+        this.cityCode = cityCode;
+    }
+
+}
diff --git a/ruoyi-service/ruoyi-worker/src/main/java/com/ruoyi/worker/controller/MasterWorkerController.java b/ruoyi-service/ruoyi-worker/src/main/java/com/ruoyi/worker/controller/MasterWorkerController.java
index 7b425ce..4bd8194 100644
--- a/ruoyi-service/ruoyi-worker/src/main/java/com/ruoyi/worker/controller/MasterWorkerController.java
+++ b/ruoyi-service/ruoyi-worker/src/main/java/com/ruoyi/worker/controller/MasterWorkerController.java
@@ -79,6 +79,19 @@
         if (!Constants.ONE.equals(worker.getIsEnable())) {
             return R.notEnabled("当前手机号已禁用!");
         }
+        // 校验师傅是否已提交入驻申请
+        WorkerProcess process = workerProcessService.lambdaQuery()
+                .eq(WorkerProcess::getPhone, phone)
+                .eq(WorkerProcess::getIsDelete, 0)
+                .orderByDesc(WorkerProcess::getCreateTime)
+                .last("limit 1").one();
+        if (null != process) {
+            if (Constants.TWO.equals(process.getState())) {
+                return R.fail("入驻申请暂未审核通过,请耐心等待!");
+            }
+        } else {
+            return R.registered("当前账号未提交入驻申请,无法登录!");
+        }
         // MD5加密登录密码(新)
         BCryptPasswordEncoder passwordEncoder = new BCryptPasswordEncoder();
         // 校验用户输入密码与加密后的密码是否匹配
@@ -143,7 +156,9 @@
             // 校验师傅是否已提交入驻申请
             WorkerProcess process = workerProcessService.lambdaQuery()
                     .eq(WorkerProcess::getPhone, phone)
-                    .eq(WorkerProcess::getIsDelete, 0).one();
+                    .eq(WorkerProcess::getIsDelete, 0)
+                    .orderByDesc(WorkerProcess::getCreateTime)
+                    .last("limit 1").one();
             if (null != process) {
                 if (Constants.ZERO.equals(process.getState())) {
                     return R.fail("入驻申请暂未审核通过,请耐心等待!");
@@ -193,8 +208,6 @@
         if (null != dbProcess) {
             if (Constants.ZERO.equals(dbProcess.getState())) {
                 return R.fail("入驻申请已提交,审核未通过,请耐心等待!");
-            } else if (Constants.ONE.equals(dbProcess.getState())) {
-                return R.fail("该手机号入驻申请已通过,请通过手机号登录!");
             }
         }
         // 默认状态待审核
@@ -328,9 +341,9 @@
     }
 
     /**
-     * 师傅端-订单代办列表
+     * 师傅端-订单列表-地图模式
      */
-    @ApiOperation(value = "订单代办列表", tags = {"师傅端-首页"})
+    @ApiOperation(value = "订单列表-地图模式", tags = {"师傅端-首页"})
     @GetMapping(value = "/orderMapMode")
     @ApiImplicitParams({
             @ApiImplicitParam(value = "师傅所在经度", name = "longitude", dataType = "String", required = true),
diff --git a/ruoyi-service/ruoyi-worker/src/main/java/com/ruoyi/worker/controller/OrderController.java b/ruoyi-service/ruoyi-worker/src/main/java/com/ruoyi/worker/controller/OrderController.java
index d0c05bc..2f0930c 100644
--- a/ruoyi-service/ruoyi-worker/src/main/java/com/ruoyi/worker/controller/OrderController.java
+++ b/ruoyi-service/ruoyi-worker/src/main/java/com/ruoyi/worker/controller/OrderController.java
@@ -134,7 +134,7 @@
         changeDispatch.setWorkerName(masterWorker.getRealName());
         changeDispatch.setApplyReason(reason);
         changeDispatch.setApplyTime(DateUtils.getNowDate());
-        changeDispatch.setState(0);
+        changeDispatch.setState(Constants.ZERO);
         Boolean result = orderClient.changeOrderState(orderId, Constants.SIX).getData();
         Order order = orderClient.detail(orderId).getData();
         if (null == order) {
@@ -178,7 +178,7 @@
         // 上传时判断是否在下单位置附件,距离大于某个值则 不允许上传
         if (distance > Constants.THREE_THOUSAND) {
 //            throw new GlobalException("您当前手机定位超出当前订单预约地址范围 3km,无法提供回收服务!");
-            return R.fail(Boolean.FALSE, "您当前手机定位超出当前订单预约地址范围 3km,无法提供回收服务!");
+            return R.ok(Boolean.FALSE, "您当前手机定位超出当前订单预约地址范围 3km,无法提供回收服务!");
         }
         return R.ok(true);
     }
@@ -245,7 +245,9 @@
         Integer serveId = data.getOrderInfo().getServeId();
         RecoveryServe recoveryServe = recoveryServeService.lambdaQuery()
                 .eq(RecoveryServe::getId, serveId).one();
-        data.getOrderInfo().setCover(recoveryServe.getCover());
+        if (null != recoveryServe) {
+            data.getOrderInfo().setCover(recoveryServe.getCover());
+        }
         return R.ok(data);
     }
 
diff --git a/ruoyi-service/ruoyi-worker/src/main/java/com/ruoyi/worker/entity/Evaluate.java b/ruoyi-service/ruoyi-worker/src/main/java/com/ruoyi/worker/entity/Evaluate.java
index ec3153a..d5ed75c 100644
--- a/ruoyi-service/ruoyi-worker/src/main/java/com/ruoyi/worker/entity/Evaluate.java
+++ b/ruoyi-service/ruoyi-worker/src/main/java/com/ruoyi/worker/entity/Evaluate.java
@@ -61,7 +61,7 @@
     private String updateBy;
 
     @TableField("createTime")
-    @JsonFormat(pattern = "yyyy-MM-dd HH:ss:mm")
+    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
     private Date createTime;
 
     @TableField("updateTime")
diff --git a/ruoyi-service/ruoyi-worker/src/main/java/com/ruoyi/worker/service/impl/MasterWorkerServiceImpl.java b/ruoyi-service/ruoyi-worker/src/main/java/com/ruoyi/worker/service/impl/MasterWorkerServiceImpl.java
index 1278b27..10630de 100644
--- a/ruoyi-service/ruoyi-worker/src/main/java/com/ruoyi/worker/service/impl/MasterWorkerServiceImpl.java
+++ b/ruoyi-service/ruoyi-worker/src/main/java/com/ruoyi/worker/service/impl/MasterWorkerServiceImpl.java
@@ -93,8 +93,18 @@
             OrderNotHandleVO vo = new OrderNotHandleVO(distance, orderListVO);
             list.add(vo);
         }
+        List<OrderNotHandleVO> newList = new ArrayList<>();
         if (item) {
-            return list.stream().map(OrderNotHandleVO::getOrderList).collect(Collectors.toList());
+            // 已置顶订单
+            List<OrderNotHandleVO> topSortNotNull = list.stream()
+                    .filter(data -> data.getOrderList().getTopSort() != null).collect(Collectors.toList());
+            newList.addAll(topSortNotNull);
+            // 未置顶订单,根据距离由近到远排序
+            List<OrderNotHandleVO> topSortNull = list.stream()
+                    .filter(data -> data.getOrderList().getTopSort() == null).collect(Collectors.toList());
+            topSortNull.sort(Comparator.comparing(OrderNotHandleVO::getDistance));
+            newList.addAll(topSortNull);
+            return newList.stream().map(OrderNotHandleVO::getOrderList).collect(Collectors.toList());
         } else {
             // 根据距离排序
             list.sort(Comparator.comparing(OrderNotHandleVO::getDistance));
diff --git a/ruoyi-service/ruoyi-worker/src/main/java/com/ruoyi/worker/vo/OrderListVO.java b/ruoyi-service/ruoyi-worker/src/main/java/com/ruoyi/worker/vo/OrderListVO.java
index 68e21f2..e6978c1 100644
--- a/ruoyi-service/ruoyi-worker/src/main/java/com/ruoyi/worker/vo/OrderListVO.java
+++ b/ruoyi-service/ruoyi-worker/src/main/java/com/ruoyi/worker/vo/OrderListVO.java
@@ -77,11 +77,11 @@
     private Integer state;
 
     @ApiModelProperty("接单时间(师傅接单或后台派单,更新该字段时间)")
-    @JsonFormat(pattern = "yyyy-MM-dd HH:ss:mm")
+    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
     private Date acceptTime;
 
     @ApiModelProperty("师傅到达预约地点时间")
-    @JsonFormat(pattern = "yyyy-MM-dd HH:ss:mm")
+    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
     private Date arriveTime;
 
     @ApiModelProperty("订单类型(0:正常订单,1:后台订单(后台订单与用户端、师傅端无联系))")
diff --git a/sql/secondary_recovery.sql b/sql/secondary_recovery.sql
index 9dafb1e..6be4af2 100644
--- a/sql/secondary_recovery.sql
+++ b/sql/secondary_recovery.sql
@@ -11,7 +11,7 @@
  Target Server Version : 80037 (8.0.37)
  File Encoding         : 65001
 
- Date: 08/07/2024 11:27:48
+ Date: 16/07/2024 09:28:34
 */
 
 SET NAMES utf8mb4;
@@ -40,7 +40,7 @@
   `c_schema` text CHARACTER SET utf8mb3 COLLATE utf8mb3_bin NULL,
   PRIMARY KEY (`id`) USING BTREE,
   UNIQUE INDEX `uk_configinfo_datagrouptenant`(`data_id` ASC, `group_id` ASC, `tenant_id` ASC) USING BTREE
-) ENGINE = InnoDB CHARACTER SET = utf8mb3 COLLATE = utf8mb3_bin COMMENT = 'config_info' ROW_FORMAT = Dynamic;
+) ENGINE = InnoDB AUTO_INCREMENT = 1 CHARACTER SET = utf8mb3 COLLATE = utf8mb3_bin COMMENT = 'config_info' ROW_FORMAT = Dynamic;
 
 -- ----------------------------
 -- Table structure for config_info_aggr
@@ -57,7 +57,7 @@
   `tenant_id` varchar(128) CHARACTER SET utf8mb3 COLLATE utf8mb3_bin NULL DEFAULT '' COMMENT '租户字段',
   PRIMARY KEY (`id`) USING BTREE,
   UNIQUE INDEX `uk_configinfoaggr_datagrouptenantdatum`(`data_id` ASC, `group_id` ASC, `tenant_id` ASC, `datum_id` ASC) USING BTREE
-) ENGINE = InnoDB CHARACTER SET = utf8mb3 COLLATE = utf8mb3_bin COMMENT = '增加租户字段' ROW_FORMAT = Dynamic;
+) ENGINE = InnoDB AUTO_INCREMENT = 1 CHARACTER SET = utf8mb3 COLLATE = utf8mb3_bin COMMENT = '增加租户字段' ROW_FORMAT = Dynamic;
 
 -- ----------------------------
 -- Table structure for config_info_beta
@@ -78,7 +78,7 @@
   `tenant_id` varchar(128) CHARACTER SET utf8mb3 COLLATE utf8mb3_bin NULL DEFAULT '' COMMENT '租户字段',
   PRIMARY KEY (`id`) USING BTREE,
   UNIQUE INDEX `uk_configinfobeta_datagrouptenant`(`data_id` ASC, `group_id` ASC, `tenant_id` ASC) USING BTREE
-) ENGINE = InnoDB CHARACTER SET = utf8mb3 COLLATE = utf8mb3_bin COMMENT = 'config_info_beta' ROW_FORMAT = Dynamic;
+) ENGINE = InnoDB AUTO_INCREMENT = 1 CHARACTER SET = utf8mb3 COLLATE = utf8mb3_bin COMMENT = 'config_info_beta' ROW_FORMAT = Dynamic;
 
 -- ----------------------------
 -- Table structure for config_info_tag
@@ -99,7 +99,7 @@
   `src_ip` varchar(50) CHARACTER SET utf8mb3 COLLATE utf8mb3_bin NULL DEFAULT NULL COMMENT 'source ip',
   PRIMARY KEY (`id`) USING BTREE,
   UNIQUE INDEX `uk_configinfotag_datagrouptenanttag`(`data_id` ASC, `group_id` ASC, `tenant_id` ASC, `tag_id` ASC) USING BTREE
-) ENGINE = InnoDB CHARACTER SET = utf8mb3 COLLATE = utf8mb3_bin COMMENT = 'config_info_tag' ROW_FORMAT = Dynamic;
+) ENGINE = InnoDB AUTO_INCREMENT = 1 CHARACTER SET = utf8mb3 COLLATE = utf8mb3_bin COMMENT = 'config_info_tag' ROW_FORMAT = Dynamic;
 
 -- ----------------------------
 -- Table structure for config_tags_relation
@@ -116,7 +116,7 @@
   PRIMARY KEY (`nid`) USING BTREE,
   UNIQUE INDEX `uk_configtagrelation_configidtag`(`id` ASC, `tag_name` ASC, `tag_type` ASC) USING BTREE,
   INDEX `idx_tenant_id`(`tenant_id` ASC) USING BTREE
-) ENGINE = InnoDB CHARACTER SET = utf8mb3 COLLATE = utf8mb3_bin COMMENT = 'config_tag_relation' ROW_FORMAT = Dynamic;
+) ENGINE = InnoDB AUTO_INCREMENT = 1 CHARACTER SET = utf8mb3 COLLATE = utf8mb3_bin COMMENT = 'config_tag_relation' ROW_FORMAT = Dynamic;
 
 -- ----------------------------
 -- Table structure for data_address
@@ -149,7 +149,7 @@
   `sort` bigint NULL DEFAULT 0 COMMENT '排序权重',
   `create_at` timestamp NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
   PRIMARY KEY (`id`) USING BTREE
-) ENGINE = InnoDB AUTO_INCREMENT = 9 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '服务优势' ROW_FORMAT = Dynamic;
+) ENGINE = InnoDB AUTO_INCREMENT = 882 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '服务优势' ROW_FORMAT = Dynamic;
 
 -- ----------------------------
 -- Table structure for data_cate
@@ -368,7 +368,7 @@
   `gmt_modified` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '修改时间',
   PRIMARY KEY (`id`) USING BTREE,
   UNIQUE INDEX `uk_group_id`(`group_id` ASC) USING BTREE
-) ENGINE = InnoDB CHARACTER SET = utf8mb3 COLLATE = utf8mb3_bin COMMENT = '集群、各Group容量信息表' ROW_FORMAT = Dynamic;
+) ENGINE = InnoDB AUTO_INCREMENT = 1 CHARACTER SET = utf8mb3 COLLATE = utf8mb3_bin COMMENT = '集群、各Group容量信息表' ROW_FORMAT = Dynamic;
 
 -- ----------------------------
 -- Table structure for his_config_info
@@ -392,7 +392,7 @@
   INDEX `idx_gmt_create`(`gmt_create` ASC) USING BTREE,
   INDEX `idx_gmt_modified`(`gmt_modified` ASC) USING BTREE,
   INDEX `idx_did`(`data_id` ASC) USING BTREE
-) ENGINE = InnoDB CHARACTER SET = utf8mb3 COLLATE = utf8mb3_bin COMMENT = '多租户改造' ROW_FORMAT = Dynamic;
+) ENGINE = InnoDB AUTO_INCREMENT = 1 CHARACTER SET = utf8mb3 COLLATE = utf8mb3_bin COMMENT = '多租户改造' ROW_FORMAT = Dynamic;
 
 -- ----------------------------
 -- Table structure for permissions
@@ -430,29 +430,6 @@
   `is_delete` int NULL DEFAULT NULL COMMENT '是否删除 0未删除;1已删除',
   PRIMARY KEY (`id`) USING BTREE
 ) ENGINE = InnoDB AUTO_INCREMENT = 6 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_0900_ai_ci COMMENT = '协议政策、司机操作指导' ROW_FORMAT = DYNAMIC;
-
--- ----------------------------
--- Table structure for sys_change_dispatch
--- ----------------------------
-DROP TABLE IF EXISTS `sys_change_dispatch`;
-CREATE TABLE `sys_change_dispatch`  (
-  `id` int NOT NULL AUTO_INCREMENT,
-  `worker_id` int NOT NULL COMMENT '申请师傅',
-  `worker_name` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '申请师傅姓名',
-  `apply_reason` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '申请原因',
-  `apply_time` datetime NULL DEFAULT NULL COMMENT '申请改派时间',
-  `state` int NULL DEFAULT NULL COMMENT '改派状态 (0:未改派 ;1:已改派)',
-  `createBy` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL,
-  `updateBy` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL,
-  `createTime` datetime NULL DEFAULT NULL,
-  `updateTime` datetime NULL DEFAULT NULL,
-  `is_delete` int NULL DEFAULT NULL COMMENT '是否删除 0未删除;1已删除',
-  `order_id` int NULL DEFAULT NULL COMMENT '订单id',
-  `order_number` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '订单编号',
-  `user_id` int NULL DEFAULT NULL COMMENT '下单用户id',
-  `user_name` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '下单用户名称',
-  PRIMARY KEY (`id`) USING BTREE
-) ENGINE = InnoDB AUTO_INCREMENT = 68 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_0900_ai_ci COMMENT = '改派管理' ROW_FORMAT = Dynamic;
 
 -- ----------------------------
 -- Table structure for sys_config
@@ -536,7 +513,7 @@
   `is_delete` int NULL DEFAULT NULL COMMENT '是否删除 0未删除;1已删除',
   `city_str` text CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL COMMENT '城市数组字符串',
   PRIMARY KEY (`id`) USING BTREE
-) ENGINE = InnoDB AUTO_INCREMENT = 4 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_0900_ai_ci COMMENT = '加盟商信息表' ROW_FORMAT = DYNAMIC;
+) ENGINE = InnoDB AUTO_INCREMENT = 6 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_0900_ai_ci COMMENT = '加盟商信息表' ROW_FORMAT = DYNAMIC;
 
 -- ----------------------------
 -- Table structure for sys_logininfor
@@ -552,7 +529,7 @@
   PRIMARY KEY (`info_id`) USING BTREE,
   INDEX `idx_sys_logininfor_s`(`status` ASC) USING BTREE,
   INDEX `idx_sys_logininfor_lt`(`access_time` ASC) USING BTREE
-) ENGINE = InnoDB AUTO_INCREMENT = 184 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_0900_ai_ci COMMENT = '系统访问记录' ROW_FORMAT = Dynamic;
+) ENGINE = InnoDB AUTO_INCREMENT = 194 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_0900_ai_ci COMMENT = '系统访问记录' ROW_FORMAT = Dynamic;
 
 -- ----------------------------
 -- Table structure for sys_master_worker
@@ -659,7 +636,7 @@
   `updateTime` datetime NULL DEFAULT NULL,
   `is_delete` int NULL DEFAULT NULL COMMENT '是否删除 0未删除;1已删除',
   PRIMARY KEY (`id`) USING BTREE
-) ENGINE = InnoDB AUTO_INCREMENT = 2 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_0900_ai_ci COMMENT = '常见问题管理' ROW_FORMAT = DYNAMIC;
+) ENGINE = InnoDB AUTO_INCREMENT = 3 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_0900_ai_ci COMMENT = '常见问题管理' ROW_FORMAT = DYNAMIC;
 
 -- ----------------------------
 -- Table structure for sys_recovery_classify
@@ -681,7 +658,7 @@
   `updateTime` datetime NULL DEFAULT NULL,
   `is_delete` int NULL DEFAULT NULL COMMENT '是否删除 0未删除;1已删除',
   PRIMARY KEY (`id`) USING BTREE
-) ENGINE = InnoDB AUTO_INCREMENT = 18 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_0900_ai_ci COMMENT = '回收分类表' ROW_FORMAT = DYNAMIC;
+) ENGINE = InnoDB AUTO_INCREMENT = 20 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_0900_ai_ci COMMENT = '回收分类表' ROW_FORMAT = DYNAMIC;
 
 -- ----------------------------
 -- Table structure for sys_recovery_serve
@@ -692,7 +669,7 @@
   `classify_id` int NOT NULL COMMENT '所属分类id',
   `serve_name` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '服务名称',
   `serve_describe` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '服务描述',
-  `estimate_price` decimal(10, 2) NULL DEFAULT NULL COMMENT '预估价格',
+  `estimate_price` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '预估价格',
   `default_price` decimal(10, 2) NULL DEFAULT NULL COMMENT '默认回收价',
   `sort` int NULL DEFAULT NULL COMMENT '排序权重',
   `cover` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '封面图片',
@@ -703,7 +680,7 @@
   `updateTime` datetime NULL DEFAULT NULL,
   `is_delete` int NULL DEFAULT NULL COMMENT '是否删除 0未删除;1已删除',
   PRIMARY KEY (`id`) USING BTREE
-) ENGINE = InnoDB AUTO_INCREMENT = 9 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_0900_ai_ci COMMENT = '回收服务列表' ROW_FORMAT = DYNAMIC;
+) ENGINE = InnoDB AUTO_INCREMENT = 11 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_0900_ai_ci COMMENT = '回收服务列表' ROW_FORMAT = DYNAMIC;
 
 -- ----------------------------
 -- Table structure for sys_recovery_serve_price
@@ -720,7 +697,7 @@
   `updateTime` datetime NULL DEFAULT NULL,
   `is_delete` int NULL DEFAULT NULL COMMENT '是否删除 0未删除;1已删除',
   PRIMARY KEY (`id`) USING BTREE
-) ENGINE = InnoDB AUTO_INCREMENT = 11 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_0900_ai_ci COMMENT = '回收服务对应回收价格及所在城市' ROW_FORMAT = DYNAMIC;
+) ENGINE = InnoDB AUTO_INCREMENT = 12 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_0900_ai_ci COMMENT = '回收服务对应回收价格及所在城市' ROW_FORMAT = DYNAMIC;
 
 -- ----------------------------
 -- Table structure for sys_role
@@ -743,7 +720,7 @@
   `update_time` datetime NULL DEFAULT NULL COMMENT '更新时间',
   `remark` varchar(500) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '备注',
   PRIMARY KEY (`role_id`) USING BTREE
-) ENGINE = InnoDB AUTO_INCREMENT = 92 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '角色信息表' ROW_FORMAT = Dynamic;
+) ENGINE = InnoDB AUTO_INCREMENT = 93 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '角色信息表' ROW_FORMAT = Dynamic;
 
 -- ----------------------------
 -- Table structure for sys_role_menu
@@ -787,43 +764,7 @@
   `updateTime` datetime NULL DEFAULT NULL,
   `is_delete` int NULL DEFAULT NULL COMMENT '是否删除 0未删除;1已删除',
   PRIMARY KEY (`id`) USING BTREE
-) ENGINE = InnoDB AUTO_INCREMENT = 4 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_0900_ai_ci COMMENT = '服务优势管理' ROW_FORMAT = DYNAMIC;
-
--- ----------------------------
--- Table structure for sys_serve_coordinate
--- ----------------------------
-DROP TABLE IF EXISTS `sys_serve_coordinate`;
-CREATE TABLE `sys_serve_coordinate`  (
-  `id` int NOT NULL AUTO_INCREMENT,
-  `worker_id` int NOT NULL COMMENT '师傅id',
-  `order_id` int NULL DEFAULT NULL COMMENT '订单id',
-  `coordinate` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '路线经纬度',
-  `longitude` decimal(10, 6) NULL DEFAULT NULL COMMENT '经度',
-  `latitude` decimal(10, 6) NULL DEFAULT NULL COMMENT '纬度',
-  `createBy` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL,
-  `updateBy` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL,
-  `createTime` datetime NULL DEFAULT NULL,
-  `updateTime` datetime NULL DEFAULT NULL,
-  `is_delete` int NULL DEFAULT NULL COMMENT '是否删除 0未删除;1已删除',
-  PRIMARY KEY (`id`) USING BTREE
-) ENGINE = InnoDB AUTO_INCREMENT = 25 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_0900_ai_ci COMMENT = '师傅路线经纬度信息' ROW_FORMAT = Dynamic;
-
--- ----------------------------
--- Table structure for sys_serve_record
--- ----------------------------
-DROP TABLE IF EXISTS `sys_serve_record`;
-CREATE TABLE `sys_serve_record`  (
-  `id` int NOT NULL AUTO_INCREMENT,
-  `order_id` int NULL DEFAULT NULL COMMENT '订单id',
-  `photo` text CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL COMMENT '现场照片(多张照片 \',\'隔开)',
-  `remark` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '服务备注',
-  `createBy` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL,
-  `updateBy` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL,
-  `createTime` datetime NULL DEFAULT NULL,
-  `updateTime` datetime NULL DEFAULT NULL,
-  `is_delete` int NULL DEFAULT NULL COMMENT '是否删除 0未删除;1已删除',
-  PRIMARY KEY (`id`) USING BTREE
-) ENGINE = InnoDB AUTO_INCREMENT = 9 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_0900_ai_ci COMMENT = '师傅服务记录' ROW_FORMAT = Dynamic;
+) ENGINE = InnoDB AUTO_INCREMENT = 9 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_0900_ai_ci COMMENT = '服务优势管理' ROW_FORMAT = DYNAMIC;
 
 -- ----------------------------
 -- Table structure for sys_site
@@ -858,8 +799,9 @@
   `update_by` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '更新者',
   `update_time` datetime NULL DEFAULT NULL COMMENT '更新时间',
   `is_delete` int NULL DEFAULT NULL COMMENT '是否软删除 0未删除;1已删除',
+  `franchisee_id` int NULL DEFAULT NULL COMMENT '加盟商id',
   PRIMARY KEY (`user_id`) USING BTREE
-) ENGINE = InnoDB AUTO_INCREMENT = 217 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '用户信息表' ROW_FORMAT = Dynamic;
+) ENGINE = InnoDB AUTO_INCREMENT = 219 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '用户信息表' ROW_FORMAT = Dynamic;
 
 -- ----------------------------
 -- Table structure for sys_user_role
@@ -905,72 +847,9 @@
   `updateTime` datetime NULL DEFAULT NULL,
   `is_delete` int NULL DEFAULT NULL COMMENT '是否删除 0未删除;1已删除',
   `opinion` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '审批意见',
+  `city_str` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '城市数组',
   PRIMARY KEY (`id`) USING BTREE
-) ENGINE = InnoDB AUTO_INCREMENT = 7512399 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_0900_ai_ci COMMENT = '师傅入驻审核表' ROW_FORMAT = DYNAMIC;
-
--- ----------------------------
--- Table structure for t_evaluate
--- ----------------------------
-DROP TABLE IF EXISTS `t_evaluate`;
-CREATE TABLE `t_evaluate`  (
-  `id` int NOT NULL AUTO_INCREMENT,
-  `user_id` int NOT NULL COMMENT '用户id',
-  `user_phone` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '用户手机号',
-  `order_id` int NULL DEFAULT NULL COMMENT '订单id',
-  `content` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '评价内容',
-  `worker_id` int NULL DEFAULT NULL COMMENT '评价师傅id',
-  `star_rating` double(2, 1) NULL DEFAULT NULL COMMENT '评价星级',
-  `serve_no` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '服务单号',
-  `createBy` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL,
-  `updateBy` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL,
-  `createTime` datetime NULL DEFAULT NULL,
-  `updateTime` datetime NULL DEFAULT NULL,
-  `is_delete` int NULL DEFAULT NULL COMMENT '是否删除 0未删除;1已删除',
-  PRIMARY KEY (`id`) USING BTREE
-) ENGINE = InnoDB AUTO_INCREMENT = 5 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_0900_ai_ci COMMENT = '用户评价表' ROW_FORMAT = DYNAMIC;
-
--- ----------------------------
--- Table structure for t_order
--- ----------------------------
-DROP TABLE IF EXISTS `t_order`;
-CREATE TABLE `t_order`  (
-  `id` int NOT NULL AUTO_INCREMENT,
-  `city` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '下单城市',
-  `order_number` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '订单编号',
-  `site_id` int NULL DEFAULT NULL COMMENT '站点id',
-  `site_name` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '站点名称',
-  `serve_id` int NOT NULL COMMENT '回收服务id',
-  `serve_name` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL COMMENT '回收服务名称',
-  `serve_price` decimal(10, 2) NULL DEFAULT NULL COMMENT '回收服务的回收价',
-  `user_id` int NULL DEFAULT NULL COMMENT '下单用户id',
-  `reservation_name` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL COMMENT '预约姓名',
-  `reservation_phone` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL COMMENT '预约手机号',
-  `reservation_address` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL COMMENT '预约地址',
-  `time` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL COMMENT '预约上门时间段',
-  `server_id` int NOT NULL COMMENT '服务人员id',
-  `server_name` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL COMMENT '服务人员名称',
-  `server_phone` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL COMMENT '服务人员手机号',
-  `reservation_remark` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '预约备注(服务备注)',
-  `order_money` decimal(10, 6) NULL DEFAULT NULL COMMENT '订单成交价(服务回收价 + 津贴)',
-  `state` int NULL DEFAULT NULL COMMENT '订单状态(0:待派单;1:待上门;2:待完工;3:已完结;4:已取消;5:已改派)',
-  `createBy` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL,
-  `updateBy` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL,
-  `createTime` datetime NULL DEFAULT NULL,
-  `updateTime` datetime NULL DEFAULT NULL,
-  `is_delete` int NULL DEFAULT NULL COMMENT '是否删除 0未删除;1已删除',
-  `accept_time` datetime NULL DEFAULT NULL COMMENT '接单时间(师傅接单或后台派单,更新该字段时间)',
-  `type` int NULL DEFAULT NULL COMMENT '订单类型(0:正常订单,1:后台订单(后台订单与用户端、师傅端无联系))',
-  `longitude` double NULL DEFAULT NULL COMMENT '下单用户经度',
-  `latitude` double NULL DEFAULT NULL COMMENT '下单用户纬度',
-  `arrive_time` datetime NULL DEFAULT NULL COMMENT '师傅到达预约地点时间',
-  `complete_time` datetime NULL DEFAULT NULL COMMENT '订单完成时间',
-  `is_withdrawal` int NULL DEFAULT NULL COMMENT '是否已提现(0:未提现,1:已提现)',
-  `subsidy` decimal(10, 6) NULL DEFAULT NULL COMMENT '补贴金额',
-  `address` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '详细地址',
-  `top_sort` int NULL DEFAULT NULL COMMENT '置顶顺序',
-  `cancel_reason` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '订单取消原因',
-  PRIMARY KEY (`id`) USING BTREE
-) ENGINE = InnoDB AUTO_INCREMENT = 33 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_0900_ai_ci COMMENT = '订单管理' ROW_FORMAT = DYNAMIC;
+) ENGINE = InnoDB AUTO_INCREMENT = 7512401 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_0900_ai_ci COMMENT = '师傅入驻审核表' ROW_FORMAT = DYNAMIC;
 
 -- ----------------------------
 -- Table structure for t_region
@@ -1005,7 +884,7 @@
   `updateTime` datetime NULL DEFAULT NULL,
   `is_delete` int NULL DEFAULT NULL COMMENT '是否删除 0未删除;1已删除',
   PRIMARY KEY (`id`) USING BTREE
-) ENGINE = InnoDB AUTO_INCREMENT = 3 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_0900_ai_ci COMMENT = '用户列表' ROW_FORMAT = DYNAMIC;
+) ENGINE = InnoDB AUTO_INCREMENT = 9 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_0900_ai_ci COMMENT = '用户列表' ROW_FORMAT = DYNAMIC;
 
 -- ----------------------------
 -- Table structure for t_user_collect
@@ -1021,7 +900,7 @@
   `updateTime` datetime NULL DEFAULT NULL,
   `is_delete` int NULL DEFAULT NULL COMMENT '是否删除 0未删除;1已删除',
   PRIMARY KEY (`id`) USING BTREE
-) ENGINE = InnoDB AUTO_INCREMENT = 2 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_0900_ai_ci COMMENT = '用户收藏表' ROW_FORMAT = Dynamic;
+) ENGINE = InnoDB AUTO_INCREMENT = 19 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_0900_ai_ci COMMENT = '用户收藏表' ROW_FORMAT = Dynamic;
 
 -- ----------------------------
 -- Table structure for t_user_recipient
@@ -1042,29 +921,9 @@
   `createTime` datetime NULL DEFAULT NULL,
   `updateTime` datetime NULL DEFAULT NULL,
   `is_delete` int NULL DEFAULT 0 COMMENT '是否删除 0否1是',
+  `name` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '地图搜索地址名称',
   PRIMARY KEY (`id`) USING BTREE
-) ENGINE = InnoDB AUTO_INCREMENT = 3 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_0900_ai_ci COMMENT = '用户收货地址' ROW_FORMAT = Dynamic;
-
--- ----------------------------
--- Table structure for t_withdraw
--- ----------------------------
-DROP TABLE IF EXISTS `t_withdraw`;
-CREATE TABLE `t_withdraw`  (
-  `id` int NOT NULL AUTO_INCREMENT,
-  `user_id` int NOT NULL COMMENT '用户id',
-  `user_phone` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '用户手机号',
-  `apply_for_time` datetime NOT NULL COMMENT '申请时间',
-  `apply_for_money` decimal(10, 2) NULL DEFAULT NULL COMMENT '申请金额',
-  `state` int NULL DEFAULT NULL COMMENT '申请状态 0待审核;1已通过;2已驳回',
-  `opinion` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '审批意见',
-  `createBy` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL,
-  `updateBy` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL,
-  `createTime` datetime NULL DEFAULT NULL,
-  `updateTime` datetime NULL DEFAULT NULL,
-  `is_delete` int NULL DEFAULT NULL COMMENT '是否删除 0未删除;1已删除',
-  `order_id` int NULL DEFAULT NULL COMMENT '订单id',
-  PRIMARY KEY (`id`) USING BTREE
-) ENGINE = InnoDB AUTO_INCREMENT = 12 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_0900_ai_ci COMMENT = '用户提现申请记录表' ROW_FORMAT = DYNAMIC;
+) ENGINE = InnoDB AUTO_INCREMENT = 18 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_0900_ai_ci COMMENT = '用户收货地址' ROW_FORMAT = Dynamic;
 
 -- ----------------------------
 -- Table structure for tenant_capacity
@@ -1083,7 +942,7 @@
   `gmt_modified` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '修改时间',
   PRIMARY KEY (`id`) USING BTREE,
   UNIQUE INDEX `uk_tenant_id`(`tenant_id` ASC) USING BTREE
-) ENGINE = InnoDB CHARACTER SET = utf8mb3 COLLATE = utf8mb3_bin COMMENT = '租户容量信息表' ROW_FORMAT = Dynamic;
+) ENGINE = InnoDB AUTO_INCREMENT = 1 CHARACTER SET = utf8mb3 COLLATE = utf8mb3_bin COMMENT = '租户容量信息表' ROW_FORMAT = Dynamic;
 
 -- ----------------------------
 -- Table structure for tenant_info
@@ -1101,7 +960,7 @@
   PRIMARY KEY (`id`) USING BTREE,
   UNIQUE INDEX `uk_tenant_info_kptenantid`(`kp` ASC, `tenant_id` ASC) USING BTREE,
   INDEX `idx_tenant_id`(`tenant_id` ASC) USING BTREE
-) ENGINE = InnoDB CHARACTER SET = utf8mb3 COLLATE = utf8mb3_bin COMMENT = 'tenant_info' ROW_FORMAT = Dynamic;
+) ENGINE = InnoDB AUTO_INCREMENT = 1 CHARACTER SET = utf8mb3 COLLATE = utf8mb3_bin COMMENT = 'tenant_info' ROW_FORMAT = Dynamic;
 
 -- ----------------------------
 -- Table structure for users
diff --git a/sql/secondary_recovery_order.sql b/sql/secondary_recovery_order.sql
new file mode 100644
index 0000000..b6bfa86
--- /dev/null
+++ b/sql/secondary_recovery_order.sql
@@ -0,0 +1,178 @@
+/*
+ Navicat Premium Data Transfer
+
+ Source Server         : 二手回收-本地
+ Source Server Type    : MySQL
+ Source Server Version : 80037 (8.0.37)
+ Source Host           : localhost:3306
+ Source Schema         : secondary_recovery_order
+
+ Target Server Type    : MySQL
+ Target Server Version : 80037 (8.0.37)
+ File Encoding         : 65001
+
+ Date: 16/07/2024 09:28:41
+*/
+
+SET NAMES utf8mb4;
+SET FOREIGN_KEY_CHECKS = 0;
+
+-- ----------------------------
+-- Table structure for sys_change_dispatch
+-- ----------------------------
+DROP TABLE IF EXISTS `sys_change_dispatch`;
+CREATE TABLE `sys_change_dispatch`  (
+  `id` bigint NOT NULL,
+  `worker_id` int NOT NULL COMMENT '申请师傅',
+  `worker_name` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '申请师傅姓名',
+  `apply_reason` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '申请原因',
+  `apply_time` datetime NULL DEFAULT NULL COMMENT '申请改派时间',
+  `state` int NULL DEFAULT NULL COMMENT '改派状态 (0:未改派 ;1:已改派 ;2:拒绝)',
+  `createBy` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL,
+  `updateBy` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL,
+  `createTime` datetime NULL DEFAULT NULL,
+  `updateTime` datetime NULL DEFAULT NULL,
+  `is_delete` int NULL DEFAULT NULL COMMENT '是否删除 0未删除;1已删除',
+  `order_id` bigint NULL DEFAULT NULL COMMENT '订单id',
+  `order_number` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '订单编号',
+  `user_id` int NULL DEFAULT NULL COMMENT '下单用户id',
+  `user_name` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '下单用户名称',
+  PRIMARY KEY (`id`) USING BTREE
+) ENGINE = InnoDB AUTO_INCREMENT = 69 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_0900_ai_ci COMMENT = '改派管理' ROW_FORMAT = Dynamic;
+
+-- ----------------------------
+-- Table structure for sys_serve_coordinate
+-- ----------------------------
+DROP TABLE IF EXISTS `sys_serve_coordinate`;
+CREATE TABLE `sys_serve_coordinate`  (
+  `id` int NOT NULL AUTO_INCREMENT,
+  `worker_id` int NOT NULL COMMENT '师傅id',
+  `order_id` int NULL DEFAULT NULL COMMENT '订单id',
+  `coordinate` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '路线经纬度',
+  `longitude` decimal(10, 6) NULL DEFAULT NULL COMMENT '经度',
+  `latitude` decimal(10, 6) NULL DEFAULT NULL COMMENT '纬度',
+  `createBy` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL,
+  `updateBy` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL,
+  `createTime` datetime NULL DEFAULT NULL,
+  `updateTime` datetime NULL DEFAULT NULL,
+  `is_delete` int NULL DEFAULT NULL COMMENT '是否删除 0未删除;1已删除',
+  PRIMARY KEY (`id`) USING BTREE
+) ENGINE = InnoDB AUTO_INCREMENT = 25 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_0900_ai_ci COMMENT = '师傅路线经纬度信息' ROW_FORMAT = Dynamic;
+
+-- ----------------------------
+-- Table structure for sys_serve_record
+-- ----------------------------
+DROP TABLE IF EXISTS `sys_serve_record`;
+CREATE TABLE `sys_serve_record`  (
+  `id` bigint NOT NULL,
+  `order_id` bigint NULL DEFAULT NULL COMMENT '订单id',
+  `photo` text CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL COMMENT '现场照片(多张照片 \',\'隔开)',
+  `remark` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '服务备注',
+  `createBy` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL,
+  `updateBy` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL,
+  `createTime` datetime NULL DEFAULT NULL,
+  `updateTime` datetime NULL DEFAULT NULL,
+  `is_delete` int NULL DEFAULT NULL COMMENT '是否删除 0未删除;1已删除',
+  PRIMARY KEY (`id`) USING BTREE
+) ENGINE = InnoDB AUTO_INCREMENT = 9 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_0900_ai_ci COMMENT = '师傅服务记录' ROW_FORMAT = Dynamic;
+
+-- ----------------------------
+-- Table structure for sys_withdrawal_setting
+-- ----------------------------
+DROP TABLE IF EXISTS `sys_withdrawal_setting`;
+CREATE TABLE `sys_withdrawal_setting`  (
+  `id` int NOT NULL AUTO_INCREMENT,
+  `enable_process` int NOT NULL COMMENT '是否开启审核(0:未开启,1:已开启)',
+  PRIMARY KEY (`id`) USING BTREE
+) ENGINE = InnoDB AUTO_INCREMENT = 2 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_0900_ai_ci COMMENT = '审核管理全局设置' ROW_FORMAT = Dynamic;
+
+-- ----------------------------
+-- Table structure for t_evaluate
+-- ----------------------------
+DROP TABLE IF EXISTS `t_evaluate`;
+CREATE TABLE `t_evaluate`  (
+  `id` bigint NOT NULL,
+  `user_id` int NOT NULL COMMENT '用户id',
+  `user_phone` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '用户手机号',
+  `order_id` bigint NULL DEFAULT NULL COMMENT '订单id',
+  `content` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '评价内容',
+  `worker_id` int NULL DEFAULT NULL COMMENT '评价师傅id',
+  `star_rating` double(2, 1) NULL DEFAULT NULL COMMENT '评价星级',
+  `serve_no` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '服务单号',
+  `createBy` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL,
+  `updateBy` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL,
+  `createTime` datetime NULL DEFAULT NULL,
+  `updateTime` datetime NULL DEFAULT NULL,
+  `is_delete` int NULL DEFAULT NULL COMMENT '是否删除 0未删除;1已删除',
+  PRIMARY KEY (`id`) USING BTREE
+) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_0900_ai_ci COMMENT = '用户评价表' ROW_FORMAT = DYNAMIC;
+
+-- ----------------------------
+-- Table structure for t_order
+-- ----------------------------
+DROP TABLE IF EXISTS `t_order`;
+CREATE TABLE `t_order`  (
+  `id` bigint NOT NULL,
+  `city` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '下单城市',
+  `order_number` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '订单编号',
+  `site_id` int NULL DEFAULT NULL COMMENT '站点id',
+  `site_name` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '站点名称',
+  `serve_id` int NOT NULL COMMENT '回收服务id',
+  `serve_name` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL COMMENT '回收服务名称',
+  `serve_price` decimal(10, 2) NULL DEFAULT NULL COMMENT '回收服务的回收价',
+  `user_id` int NULL DEFAULT NULL COMMENT '下单用户id',
+  `reservation_name` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL COMMENT '预约姓名',
+  `reservation_phone` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL COMMENT '预约手机号',
+  `reservation_address` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL COMMENT '预约地址',
+  `time` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL COMMENT '预约上门时间段',
+  `server_id` int NULL DEFAULT NULL COMMENT '服务人员id',
+  `server_name` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '服务人员名称',
+  `server_phone` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '服务人员手机号',
+  `reservation_remark` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '预约备注(服务备注)',
+  `order_money` decimal(10, 6) NULL DEFAULT NULL COMMENT '订单成交价(服务回收价 + 津贴)',
+  `state` int NULL DEFAULT NULL COMMENT '订单状态(0:待派单;1:待上门;2:待完工;3:已完结;4:已取消;5:已改派,6:待改派)',
+  `createBy` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL,
+  `updateBy` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL,
+  `createTime` datetime NULL DEFAULT NULL,
+  `updateTime` datetime NULL DEFAULT NULL,
+  `is_delete` int NULL DEFAULT NULL COMMENT '是否删除 0未删除;1已删除',
+  `accept_time` datetime NULL DEFAULT NULL COMMENT '接单时间(师傅接单或后台派单,更新该字段时间)',
+  `type` int NULL DEFAULT NULL COMMENT '订单类型(0:正常订单,1:后台订单(后台订单与用户端、师傅端无联系))',
+  `longitude` double NULL DEFAULT NULL COMMENT '下单用户经度',
+  `latitude` double NULL DEFAULT NULL COMMENT '下单用户纬度',
+  `arrive_time` datetime NULL DEFAULT NULL COMMENT '师傅到达预约地点时间',
+  `complete_time` datetime NULL DEFAULT NULL COMMENT '订单完成时间',
+  `is_withdrawal` int NULL DEFAULT NULL COMMENT '是否已提现(0:未提现,1:已提现)',
+  `subsidy` decimal(10, 6) NULL DEFAULT NULL COMMENT '补贴金额',
+  `address` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '详细地址',
+  `top_sort` int NULL DEFAULT NULL COMMENT '置顶顺序',
+  `cancel_reason` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '订单取消原因',
+  `is_evaluate` int NULL DEFAULT NULL COMMENT '是否评价(0:未评价,1:已评价)',
+  `is_reinvest` int NULL DEFAULT NULL COMMENT '是否为再投单 1:再投',
+  PRIMARY KEY (`id`) USING BTREE
+) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_0900_ai_ci COMMENT = '订单管理' ROW_FORMAT = DYNAMIC;
+
+-- ----------------------------
+-- Table structure for t_withdraw
+-- ----------------------------
+DROP TABLE IF EXISTS `t_withdraw`;
+CREATE TABLE `t_withdraw`  (
+  `id` bigint NOT NULL,
+  `user_id` int NOT NULL COMMENT '用户id',
+  `user_no` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '用户编号',
+  `nick_name` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '用户昵称',
+  `user_phone` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '用户手机号',
+  `apply_for_time` datetime NOT NULL COMMENT '申请时间',
+  `apply_for_money` decimal(10, 2) NULL DEFAULT NULL COMMENT '申请金额',
+  `state` int NULL DEFAULT NULL COMMENT '申请状态 0待审核;1已通过;2已驳回',
+  `opinion` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '审批意见',
+  `createBy` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL,
+  `updateBy` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL,
+  `createTime` datetime NULL DEFAULT NULL,
+  `updateTime` datetime NULL DEFAULT NULL,
+  `is_delete` int NULL DEFAULT NULL COMMENT '是否删除 0未删除;1已删除',
+  `order_id` bigint NULL DEFAULT NULL COMMENT '订单id',
+  PRIMARY KEY (`id`) USING BTREE
+) ENGINE = InnoDB AUTO_INCREMENT = 12 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_0900_ai_ci COMMENT = '用户提现申请记录表' ROW_FORMAT = DYNAMIC;
+
+SET FOREIGN_KEY_CHECKS = 1;

--
Gitblit v1.7.1