Эх сурвалжийг харах

feat 1.配送费dto改为bigDecimal

classic_blue 4 сар өмнө
parent
commit
fa41c166d3

+ 8 - 7
application-webadmin/src/main/java/com/tourism/webadmin/app/wechat/controller/WechatFoodIndexController.java

@@ -95,19 +95,18 @@ public class WechatFoodIndexController {
      * @return 应答结果对象。
      */
     @GetMapping("/queryIndexHotFood")
-    @DisableDataFilter
     public ResponseResult<List<RestaurantFoodInfoVo>> queryIndexHotFood() {
         RestaurantFoodInfo filter = new RestaurantFoodInfo();
         filter.setDataState(1);
         filter.setEnable(1);
         filter.setIsHotFood(1);
 
-        MyOrderParam myOrderParam = new MyOrderParam();
-        myOrderParam.add(new MyOrderParam.OrderInfo("sales",false,null));
-        String orderBy = MyOrderParam.buildOrderBy(myOrderParam, RestaurantFoodInfo.class);
+//        MyOrderParam myOrderParam = new MyOrderParam();
+//        myOrderParam.add(new MyOrderParam.OrderInfo("totalSales",false,null));
+//        String orderBy = MyOrderParam.buildOrderBy(myOrderParam, RestaurantInfo.class);
 
         PageMethod.startPage(1, 4, true);
-        List<RestaurantFoodInfo> foodInfoList = restaurantFoodInfoService.getRestaurantFoodInfoList(filter, orderBy);
+        List<RestaurantFoodInfo> foodInfoList = restaurantFoodInfoService.getRestaurantFoodInfoList(filter, null);
         MyPageData<RestaurantFoodInfoVo> pageData = MyPageUtil.makeResponseData(foodInfoList, RestaurantFoodInfoVo.class);
         List<RestaurantFoodInfoVo> list = pageData.getDataList();
         list.stream().forEach(o->{
@@ -205,8 +204,10 @@ public class WechatFoodIndexController {
         }
         List<WechatSelectShopVo> dataList = pageData.getDataList();
         for (WechatSelectShopVo shopVo : dataList) {
-            String[] tags = shopVo.getTag().split("&");
-            shopVo.setTags(tags);
+            if(shopVo.getTag()!=null||!shopVo.getTag().equals("")){
+                String[] tags = shopVo.getTag().split("&");
+                shopVo.setTags(tags);
+            }
             //json->图片
             List<String> strings = UrlConvertUtils.urlConvert(applicationConfig.getHostIpPort(), shopVo.getUrl());
             shopVo.setUrlAfterConvert(strings);

+ 1 - 1
application-webadmin/src/main/java/com/tourism/webadmin/back/dto/RestaurantInfoDto.java

@@ -129,7 +129,7 @@ public class RestaurantInfoDto {
      * 配送费。
      */
     @Schema(description = "配送费。")
-    private String deliveryCharge;
+    private BigDecimal deliveryCharge;
 
     /**
      * 最低消费。