|
@@ -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);
|