Browse Source

修改骑手查看可接订单

liu 1 year ago
parent
commit
38874b7725

+ 1 - 0
src/main/java/com/sqx/modules/errand/dto/WaitForAcceptOrderQueryDTO.java

@@ -41,5 +41,6 @@ public class WaitForAcceptOrderQueryDTO extends PageQuery {
     private Double distances;
 
     @ApiModelProperty(value = "接单城市", hidden = true)
+    @NotNull(message = "接单城市不能为空")
     private String city;
 }

+ 5 - 4
src/main/java/com/sqx/modules/errand/service/impl/TbIndentServiceImpl.java

@@ -562,8 +562,8 @@ public class TbIndentServiceImpl extends ServiceImpl<TbIndentDao, TbIndent> impl
             queryDTO.setDistances(Double.valueOf(one.getValue()));
             indent = baseMapper.findNewIndentByDistances(pages, queryDTO);
         } else {
-            String city = getCurrentCityByLngAndLat(queryDTO.getRiderLng(), queryDTO.getRiderLat());
-            queryDTO.setCity(city);
+//            String city = getCurrentCityByLngAndLat(queryDTO.getRiderLng(), queryDTO.getRiderLat());
+//            queryDTO.setCity(city);
 
             indent = baseMapper.findNewIndentByCity(pages, queryDTO);
         }
@@ -586,8 +586,8 @@ public class TbIndentServiceImpl extends ServiceImpl<TbIndentDao, TbIndent> impl
             queryDTO.setDistances(Double.valueOf(one.getValue()));
             indent = baseMapper.findNewIndentByDistancesGroupByShop(pages, queryDTO);
         } else {
-            String city = getCurrentCityByLngAndLat(queryDTO.getRiderLng(), queryDTO.getRiderLat());
-            queryDTO.setCity(city);
+//            String city = getCurrentCityByLngAndLat(queryDTO.getRiderLng(), queryDTO.getRiderLat());
+//            queryDTO.setCity(city);
 
             indent = baseMapper.findNewIndentByCityGroupByShop(pages, queryDTO);
         }
@@ -643,6 +643,7 @@ public class TbIndentServiceImpl extends ServiceImpl<TbIndentDao, TbIndent> impl
                     city = addressComponent.getString("city");
                 }
             }
+
         } catch (Exception e) {
             throw new SqxException("获取当前用户位置失败,失败原因:【" + e.getMessage() + "】");
         }

+ 1 - 1
src/main/resources/application.yml

@@ -19,7 +19,7 @@ spring:
     allow-circular-references: true
   # 环境 dev|test|prod
   profiles:
-    active: dev
+    active: prod
   # jackson时间格式化
   jackson:
     time-zone: GMT+8