Selaa lähdekoodia

视频平台对接

root 3 vuotta sitten
vanhempi
commit
cbf7d7518f

+ 18 - 1
src/main/java/com/zhiqiyun/open/core/mapper/place/PlaceBaseInfoMapper.java

@@ -1,5 +1,6 @@
 package com.zhiqiyun.open.core.mapper.place;
 
+import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
 import com.baomidou.mybatisplus.core.mapper.BaseMapper;
 import com.zhiqiyun.open.core.models.EchartsModel;
 import com.zhiqiyun.open.core.models.place.PlaceBaseInfo;
@@ -12,7 +13,7 @@ import java.util.List;
 @Mapper
 public interface PlaceBaseInfoMapper extends BaseMapper<PlaceBaseInfo> {
 
-    @Select("select sr.supplier_type as label,count(sr.id) as `value` from liucheng_smart.supplier sr where sr.is_deleted = 0 group by sr.supplier_type")
+    @Select("select sr.supplier_type as label,count(sr.id) as `value` from liucheng_smart.supplier sr where sr.is_deleted = 0 AND sr.app_id IS NULL group by sr.supplier_type")
     List<EchartsModel> cencus();
 
     @Select("select count(sr.id) from liucheng_smart.product sr where sr.is_deleted = 0 and sr.is_otc = 23")
@@ -32,4 +33,20 @@ public interface PlaceBaseInfoMapper extends BaseMapper<PlaceBaseInfo> {
 
     @Select("select * from (select DATE_FORMAT(hmc.create_date,'%Y-%m-%d') as `label`,SUM(hmc.person) AS `value` from liucheng_smart.xc_monitor hmc where hmc.is_deleted = 0 and hmc.mechanism_type = #{type} group by DATE_FORMAT(hmc.create_date,'%Y-%m-%d')) h where h.label >= #{start} and h.label <= #{end}")
     List<EchartsModel> visitsByDay(@Param("start") String start, @Param("end") String end, @Param("type") Integer type);
+
+    @Select("SELECT f.* FROM (SELECT " +
+            " sr.id," +
+            " sr.name, " +
+            " sr.pic AS litpic, " +
+            " sr.address, " +
+            " sr.phone AS contactNumber, " +
+            " SUBSTRING_INDEX(sfv.field_value,',',1) AS lat, " +
+            " SUBSTRING_INDEX(sfv.field_value,',',-1) AS lng, " +
+            " sr.supplier_type AS categoryId " +
+            "FROM " +
+            " liucheng_smart.supplier sr " +
+            " LEFT JOIN liucheng_smart.sys_field_value sfv ON sfv.bind_id = sr.id AND sfv.type = 2  and sfv.field_type = 8 " +
+            "WHERE " +
+            " sr.is_deleted = 0 AND sr.app_id IS NULL) f ${ew.customSqlSegment}")
+    List<PlaceBaseInfo> findByMapBounds(@Param("ew") QueryWrapper<PlaceBaseInfo> queryWrapper);
 }

+ 6 - 1
src/main/java/com/zhiqiyun/open/core/service/PlaceBaseInfoService.java

@@ -1,5 +1,6 @@
 package com.zhiqiyun.open.core.service;
 
+import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
 import com.baomidou.mybatisplus.extension.service.IService;
 import com.zhiqiyun.open.core.models.EchartsModel;
 import com.zhiqiyun.open.core.models.place.PlaceBaseInfo;
@@ -24,12 +25,14 @@ public interface PlaceBaseInfoService extends IService<PlaceBaseInfo> {
      */
     Map<String, Object> cencus();
 
+    Map<String, Object> census();
+
     /**
      * 各景点访问量
      *
      * @return List<EchartsModel>
      */
-    List<EchartsModel> scenicSpotVisits(Integer type,Integer dateTime);
+    List<EchartsModel> scenicSpotVisits(Integer type, Integer dateTime);
 
     /**
      * 访问量趋势
@@ -37,4 +40,6 @@ public interface PlaceBaseInfoService extends IService<PlaceBaseInfo> {
      * @return List<EchartsModel>
      */
     List<EchartsModel> visitsByDay(Integer type);
+
+    List<PlaceBaseInfo> findByMapBounds(QueryWrapper<PlaceBaseInfo> queryWrapper);
 }

+ 16 - 6
src/main/java/com/zhiqiyun/open/core/service/impl/PlaceBaseInfoServiceImpl.java

@@ -19,7 +19,6 @@ import java.util.Collection;
 import java.util.HashMap;
 import java.util.List;
 import java.util.Map;
-import java.util.stream.Collectors;
 
 @Service
 public class PlaceBaseInfoServiceImpl extends ServiceImpl<PlaceBaseInfoMapper, PlaceBaseInfo> implements PlaceBaseInfoService {
@@ -56,11 +55,7 @@ public class PlaceBaseInfoServiceImpl extends ServiceImpl<PlaceBaseInfoMapper, P
 
     @Override
     public Map<String, Object> cencus() {
-        List<EchartsModel> models = baseMapper.cencus();
-        Map<String, Object> result = new HashMap<>();
-        if (models != null && models.size() > 0) {
-            models.forEach(md -> result.put("resource_" + md.getLabel(), md.getValue()));
-        }
+        Map<String, Object> result = census();
 
         int lineTotal = baseMapper.culturalTourismLineTotal();
         result.put("lineTotal", lineTotal);
@@ -74,6 +69,16 @@ public class PlaceBaseInfoServiceImpl extends ServiceImpl<PlaceBaseInfoMapper, P
     }
 
     @Override
+    public Map<String, Object> census() {
+        List<EchartsModel> models = baseMapper.cencus();
+        Map<String, Object> result = new HashMap<>();
+        if (models != null && models.size() > 0) {
+            models.forEach(md -> result.put("resource_" + md.getLabel(), md.getValue()));
+        }
+        return result;
+    }
+
+    @Override
     public List<EchartsModel> scenicSpotVisits(Integer type, Integer dateTime) {
         if (dateTime != null && dateTime.compareTo(1) == 0) {
             String date = DateUtil.format("yyyyMMdd");
@@ -90,6 +95,11 @@ public class PlaceBaseInfoServiceImpl extends ServiceImpl<PlaceBaseInfoMapper, P
     }
 
     @Override
+    public List<PlaceBaseInfo> findByMapBounds(QueryWrapper<PlaceBaseInfo> queryWrapper) {
+        return baseMapper.findByMapBounds(queryWrapper);
+    }
+
+    @Override
     @Transactional(rollbackFor = Exception.class)
     public boolean removeByIds(Collection<?> list) {
 

+ 206 - 204
src/main/java/com/zhiqiyun/open/mvc/controller/PlaceBaseInfoController.java

@@ -36,127 +36,129 @@ import java.util.Map;
 @RequestMapping("/place/info")
 public class PlaceBaseInfoController {
 
-	@Autowired
-	private PlaceCategoryService placeCategoryService;
+    @Autowired
+    private PlaceCategoryService placeCategoryService;
 
-	@Autowired
-	private PlaceCategoryExtendColumnService placeCategoryExtendColumnService;
+    @Autowired
+    private PlaceCategoryExtendColumnService placeCategoryExtendColumnService;
 
-	@Autowired
-	private PlaceBaseInfoService placeBaseInfoService;
+    @Autowired
+    private PlaceBaseInfoService placeBaseInfoService;
 
-	@Autowired
-	private PlaceBaseInfoExtendService placeBaseInfoExtendService;
+    @Autowired
+    private PlaceBaseInfoExtendService placeBaseInfoExtendService;
 
-	@Autowired
-	private SequenceService sequenceService;
+    @Autowired
+    private SequenceService sequenceService;
 
-	@Autowired
-	private OauthService oauthService;
+    @Autowired
+    private OauthService oauthService;
 
-	@Permission(value = "place.base.info.find", tags = "查询文旅场所")
-	@PostMapping("/findPage")
-	public Result findPage(@RequestBody QueryPlaceBaseInfoParam param) {
-
-		QueryWrapper<PlaceBaseInfo> wrapper = new QueryWrapper<>();
-
-		if (StringUtils.isNotBlank(param.getName())) {
-			wrapper.like("name", param.getName());
-		}
-		Page<PlaceBaseInfo> page = param.getPage();
-		page.addOrder(OrderItem.desc("id"));
-
-		Page<PlaceBaseInfo> resultData = this.placeBaseInfoService.page(page, wrapper);
-
-		for (PlaceBaseInfo baseInfo : resultData.getRecords()) {
-			PlaceCategory category = this.placeCategoryService.getById(baseInfo.getCategoryId());
-			baseInfo.setCategory(category);
-		}
-
-		return Result.instance(Result.Code.SUCCESS).setData(resultData);
-	}
-
-	@Permission(value = "place.base.info.add", tags = "新建文旅场所")
-	@PostMapping("/save")
-	public Result save(@Valid @RequestBody SavePlaceBaseInfoParam param) throws Exception {
-
-		PlaceBaseInfo entity = new PlaceBaseInfo();
-		BeanUtils.copyProperties(param, entity);
-
-		OauthInfo oauthInfo = this.oauthService.getAuth(ServletContext.getAccessToken());
-
-		entity.setCreatedTime(DateUtil.current());
-		entity.setCreatedBy(oauthInfo.getId());
-
-		entity.setUpdatedTime(DateUtil.current());
-		entity.setUpdatedBy(oauthInfo.getId());
-		entity.setId(this.sequenceService.nextId());
-
-		List<PlaceBaseInfoExtend> listExtends = new ArrayList<>();
-		if (param.getListExtends() != null) {
-			for (SavePlaceBaseInfoExtendParam extendParam : param.getListExtends()) {
-				PlaceBaseInfoExtend extend = new PlaceBaseInfoExtend();
-				BeanUtils.copyProperties(extendParam, extend);
-				listExtends.add(extend);
-			}
-		}
-
-		this.placeBaseInfoService.save(entity, listExtends);
-
-		return Result.instance(Result.Code.MESSAGE_SUCCESS);
-	}
-
-	@Permission(value = "place.base.info.edit", tags = "更新文旅场所")
-	@PostMapping("/updateById")
-	public Result updateById(Long id, @Valid @RequestBody SavePlaceBaseInfoParam param) {
-		PlaceBaseInfo entity = new PlaceBaseInfo();
-		BeanUtils.copyProperties(param, entity);
-
-		OauthInfo oauthInfo = this.oauthService.getAuth(ServletContext.getAccessToken());
-
-		entity.setUpdatedBy(oauthInfo.getId());
-		entity.setUpdatedTime(DateUtil.current());
-		entity.setId(id);
-
-		List<PlaceBaseInfoExtend> listExtends = new ArrayList<>();
-		if (param.getListExtends() != null) {
-			for (SavePlaceBaseInfoExtendParam extendParam : param.getListExtends()) {
-				PlaceBaseInfoExtend extend = new PlaceBaseInfoExtend();
-				BeanUtils.copyProperties(extendParam, extend);
-				listExtends.add(extend);
-			}
-		}
-
-		log.info(JSON.toJSONString(listExtends));
-		this.placeBaseInfoService.updateById(entity, listExtends);
-
-		return Result.instance(Result.Code.MESSAGE_SUCCESS);
-	}
-
-	@Permission(value = "place.base.info.delete", tags = "删除文旅场所")
-	@PostMapping("/deleteByIds")
-	public Result deleteByIds(@RequestBody List<Long> ids) {
-		this.placeBaseInfoService.removeByIds(ids);
-		return Result.instance(Result.Code.MESSAGE_SUCCESS);
-	}
-
-	@Permission(value = "place.base.info.gis.map", tags = "分类组查询数量", writeLog = false)
-	@PostMapping("/findByGroupByDataType")
-	public Result findByGroupByDataType() {
-		List<PlaceCategory> list = this.placeCategoryService.list();
-		List<Map<String, Object>> listData = new ArrayList<>();
-		for (PlaceCategory category : list) {
-			Map<String, Object> dataMap = new HashMap<>();
-
-			QueryWrapper<PlaceBaseInfo> queryWrapper = new QueryWrapper<>();
-			queryWrapper.eq("category_id", category.getId());
-
-			long num = this.placeBaseInfoService.count(queryWrapper);
-
-			dataMap.put("num", num);
-			dataMap.put("category", category);
-			listData.add(dataMap);
-		}
+    @Permission(value = "place.base.info.find", tags = "查询文旅场所")
+    @PostMapping("/findPage")
+    public Result findPage(@RequestBody QueryPlaceBaseInfoParam param) {
+
+        QueryWrapper<PlaceBaseInfo> wrapper = new QueryWrapper<>();
+
+        if (StringUtils.isNotBlank(param.getName())) {
+            wrapper.like("name", param.getName());
+        }
+        Page<PlaceBaseInfo> page = param.getPage();
+        page.addOrder(OrderItem.desc("id"));
+
+        Page<PlaceBaseInfo> resultData = this.placeBaseInfoService.page(page, wrapper);
+
+        for (PlaceBaseInfo baseInfo : resultData.getRecords()) {
+            PlaceCategory category = this.placeCategoryService.getById(baseInfo.getCategoryId());
+            baseInfo.setCategory(category);
+        }
+
+        return Result.instance(Result.Code.SUCCESS).setData(resultData);
+    }
+
+    @Permission(value = "place.base.info.add", tags = "新建文旅场所")
+    @PostMapping("/save")
+    public Result save(@Valid @RequestBody SavePlaceBaseInfoParam param) throws Exception {
+
+        PlaceBaseInfo entity = new PlaceBaseInfo();
+        BeanUtils.copyProperties(param, entity);
+
+        OauthInfo oauthInfo = this.oauthService.getAuth(ServletContext.getAccessToken());
+
+        entity.setCreatedTime(DateUtil.current());
+        entity.setCreatedBy(oauthInfo.getId());
+
+        entity.setUpdatedTime(DateUtil.current());
+        entity.setUpdatedBy(oauthInfo.getId());
+        entity.setId(this.sequenceService.nextId());
+
+        List<PlaceBaseInfoExtend> listExtends = new ArrayList<>();
+        if (param.getListExtends() != null) {
+            for (SavePlaceBaseInfoExtendParam extendParam : param.getListExtends()) {
+                PlaceBaseInfoExtend extend = new PlaceBaseInfoExtend();
+                BeanUtils.copyProperties(extendParam, extend);
+                listExtends.add(extend);
+            }
+        }
+
+        this.placeBaseInfoService.save(entity, listExtends);
+
+        return Result.instance(Result.Code.MESSAGE_SUCCESS);
+    }
+
+    @Permission(value = "place.base.info.edit", tags = "更新文旅场所")
+    @PostMapping("/updateById")
+    public Result updateById(Long id, @Valid @RequestBody SavePlaceBaseInfoParam param) {
+        PlaceBaseInfo entity = new PlaceBaseInfo();
+        BeanUtils.copyProperties(param, entity);
+
+        OauthInfo oauthInfo = this.oauthService.getAuth(ServletContext.getAccessToken());
+
+        entity.setUpdatedBy(oauthInfo.getId());
+        entity.setUpdatedTime(DateUtil.current());
+        entity.setId(id);
+
+        List<PlaceBaseInfoExtend> listExtends = new ArrayList<>();
+        if (param.getListExtends() != null) {
+            for (SavePlaceBaseInfoExtendParam extendParam : param.getListExtends()) {
+                PlaceBaseInfoExtend extend = new PlaceBaseInfoExtend();
+                BeanUtils.copyProperties(extendParam, extend);
+                listExtends.add(extend);
+            }
+        }
+
+        log.info(JSON.toJSONString(listExtends));
+        this.placeBaseInfoService.updateById(entity, listExtends);
+
+        return Result.instance(Result.Code.MESSAGE_SUCCESS);
+    }
+
+    @Permission(value = "place.base.info.delete", tags = "删除文旅场所")
+    @PostMapping("/deleteByIds")
+    public Result deleteByIds(@RequestBody List<Long> ids) {
+        this.placeBaseInfoService.removeByIds(ids);
+        return Result.instance(Result.Code.MESSAGE_SUCCESS);
+    }
+
+    @Permission(value = "place.base.info.gis.map", tags = "分类组查询数量", writeLog = false)
+    @PostMapping("/findByGroupByDataType")
+    public Result findByGroupByDataType() {
+        List<PlaceCategory> list = this.placeCategoryService.list();
+        List<Map<String, Object>> listData = new ArrayList<>();
+
+        Map<String, Object> mapList = this.placeBaseInfoService.cencus();
+        for (PlaceCategory category : list) {
+            Map<String, Object> dataMap = new HashMap<>();
+
+//			QueryWrapper<PlaceBaseInfo> queryWrapper = new QueryWrapper<>();
+//			queryWrapper.eq("category_id", category.getId());
+//
+//			long num = this.placeBaseInfoService.count(queryWrapper);
+            Object l = mapList.get("resource_" + category.getId());
+            dataMap.put("num", l != null ? l : 0);
+            dataMap.put("category", category);
+            listData.add(dataMap);
+        }
 
 //		QueryWrapper<PlaceBaseInfo> queryWrapper = new QueryWrapper<>();
 //		queryWrapper.select("category_id, count(1) num");
@@ -167,93 +169,93 @@ public class PlaceBaseInfoController {
 //			PlaceCategory category = this.placeCategoryService.getById(categoryId);
 //			dataMap.put("category", category);
 //		}
-		return Result.instance(Result.Code.SUCCESS).setData(listData);
-	}
-
-	@ResponseBody
-	@PostMapping("/findByMapBounds")
-	public Result findByMapBounds(BigDecimal maxlng, BigDecimal maxlat, BigDecimal minlng, BigDecimal minlat, Long categoryId) {
-		QueryWrapper<PlaceBaseInfo> queryWrapper = new QueryWrapper<>();
-		if (maxlng != null) {
-			queryWrapper.le("lng", maxlng);
-		}
-		if (maxlat != null) {
-			queryWrapper.le("lat", maxlat);
-		}
-		if (minlng != null) {
-			queryWrapper.ge("lng", minlng);
-		}
-		if (minlat != null) {
-			queryWrapper.ge("lat", minlat);
-		}
-		if (categoryId != null) {
-			queryWrapper.eq("category_id", categoryId);
-		}
-
-		List<PlaceBaseInfo> listData = this.placeBaseInfoService.list(queryWrapper);
-		for (PlaceBaseInfo baseInfo : listData) {
-			PlaceCategory category = this.placeCategoryService.getById(baseInfo.getCategoryId());
-			baseInfo.setCategory(category);
-		}
-		return Result.instance(Result.Code.SUCCESS).setData(listData);
-	}
-
-	@PostMapping("/findAllDataType")
-	@Permission(value = {"place.base.info.edit", "place.base.info.add"}, tags = "获取文旅场所", writeLog = false)
-	public Result findAllDataType() {
-		List<PlaceCategory> listData = this.placeCategoryService.list();
-		return Result.instance(Result.Code.SUCCESS).setData(listData);
-
-	}
-
-	@PostMapping("/findDataBaseInfoExtends")
-	@Permission(value = {"place.base.info.edit", "place.base.info.add"}, tags = "获取文旅场所扩展字段", writeLog = false)
-	public Result findDataBaseInfoExtends(Long baseInfoId, Long categoryId) {
-
-		QueryWrapper<PlaceCategoryExtendColumn> queryWrapper = new QueryWrapper<>();
-		queryWrapper.eq("category_id", categoryId);
-		List<PlaceCategoryExtendColumn> listData = this.placeCategoryExtendColumnService.list(queryWrapper);
-		if (baseInfoId != null) {
-			for (PlaceCategoryExtendColumn extendColumn : listData) {
-				String id = DigestUtils.md5Hex(String.format("%s@%s", baseInfoId, extendColumn.getId()));
-				PlaceBaseInfoExtend extend = this.placeBaseInfoExtendService.getById(id);
-				if (extend != null) {
-					extendColumn.setFieldValue(extend.getFieldValue());
-				}
-			}
-		}
-
-		return Result.instance(Result.Code.SUCCESS).setData(listData);
-	}
-
-	@ResponseBody
-	@PostMapping("/findSelectByKeyword")
-	public Result findSelectBaseInfoByKeyword(String keyword) throws Exception {
-		QueryWrapper<PlaceBaseInfo> queryWrapper = new QueryWrapper<>();
-
-		if (StringUtils.isNotBlank(keyword)) {
-			queryWrapper.like("id", keyword);
-			queryWrapper.or();
-			queryWrapper.like("name", keyword);
-			queryWrapper.or();
-			queryWrapper.like("brief", keyword);
-			queryWrapper.or();
-			queryWrapper.like("address", keyword);
-			queryWrapper.or();
-			queryWrapper.like("contacts", keyword);
-			queryWrapper.or();
-			queryWrapper.like("contact_number", keyword);
-			queryWrapper.or();
-			queryWrapper.inSql("category_id", "select id from place_category where name like '%" + keyword + "%'");
-		}
-		queryWrapper.last("limit 10");
-		queryWrapper.orderByDesc("id");
-
-		List<PlaceBaseInfo> listData = this.placeBaseInfoService.list(queryWrapper);
-		for (PlaceBaseInfo baseInfo : listData) {
-			PlaceCategory category = this.placeCategoryService.getById(baseInfo.getCategoryId());
-			baseInfo.setCategory(category);
-		}
-		return Result.instance(Result.Code.SUCCESS).setData(listData);
-	}
+        return Result.instance(Result.Code.SUCCESS).setData(listData);
+    }
+
+    @ResponseBody
+    @PostMapping("/findByMapBounds")
+    public Result findByMapBounds(BigDecimal maxlng, BigDecimal maxlat, BigDecimal minlng, BigDecimal minlat, Long categoryId) {
+        QueryWrapper<PlaceBaseInfo> queryWrapper = new QueryWrapper<>();
+        if (maxlng != null) {
+            queryWrapper.le("f.lng", maxlng);
+        }
+        if (maxlat != null) {
+            queryWrapper.le("f.lat", maxlat);
+        }
+        if (minlng != null) {
+            queryWrapper.ge("f.lng", minlng);
+        }
+        if (minlat != null) {
+            queryWrapper.ge("f.lat", minlat);
+        }
+        if (categoryId != null) {
+            queryWrapper.eq("f.categoryId", categoryId);
+        }
+
+        List<PlaceBaseInfo> listData = this.placeBaseInfoService.findByMapBounds(queryWrapper);
+        for (PlaceBaseInfo baseInfo : listData) {
+            PlaceCategory category = this.placeCategoryService.getById(baseInfo.getCategoryId());
+            baseInfo.setCategory(category);
+        }
+        return Result.instance(Result.Code.SUCCESS).setData(listData);
+    }
+
+    @PostMapping("/findAllDataType")
+    @Permission(value = {"place.base.info.edit", "place.base.info.add"}, tags = "获取文旅场所", writeLog = false)
+    public Result findAllDataType() {
+        List<PlaceCategory> listData = this.placeCategoryService.list();
+        return Result.instance(Result.Code.SUCCESS).setData(listData);
+
+    }
+
+    @PostMapping("/findDataBaseInfoExtends")
+    @Permission(value = {"place.base.info.edit", "place.base.info.add"}, tags = "获取文旅场所扩展字段", writeLog = false)
+    public Result findDataBaseInfoExtends(Long baseInfoId, Long categoryId) {
+
+        QueryWrapper<PlaceCategoryExtendColumn> queryWrapper = new QueryWrapper<>();
+        queryWrapper.eq("category_id", categoryId);
+        List<PlaceCategoryExtendColumn> listData = this.placeCategoryExtendColumnService.list(queryWrapper);
+        if (baseInfoId != null) {
+            for (PlaceCategoryExtendColumn extendColumn : listData) {
+                String id = DigestUtils.md5Hex(String.format("%s@%s", baseInfoId, extendColumn.getId()));
+                PlaceBaseInfoExtend extend = this.placeBaseInfoExtendService.getById(id);
+                if (extend != null) {
+                    extendColumn.setFieldValue(extend.getFieldValue());
+                }
+            }
+        }
+
+        return Result.instance(Result.Code.SUCCESS).setData(listData);
+    }
+
+    @ResponseBody
+    @PostMapping("/findSelectByKeyword")
+    public Result findSelectBaseInfoByKeyword(String keyword) throws Exception {
+        QueryWrapper<PlaceBaseInfo> queryWrapper = new QueryWrapper<>();
+
+        if (StringUtils.isNotBlank(keyword)) {
+            queryWrapper.like("id", keyword);
+            queryWrapper.or();
+            queryWrapper.like("name", keyword);
+            queryWrapper.or();
+            queryWrapper.like("brief", keyword);
+            queryWrapper.or();
+            queryWrapper.like("address", keyword);
+            queryWrapper.or();
+            queryWrapper.like("contacts", keyword);
+            queryWrapper.or();
+            queryWrapper.like("contact_number", keyword);
+            queryWrapper.or();
+            queryWrapper.inSql("category_id", "select id from place_category where name like '%" + keyword + "%'");
+        }
+        queryWrapper.last("limit 10");
+        queryWrapper.orderByDesc("id");
+
+        List<PlaceBaseInfo> listData = this.placeBaseInfoService.list(queryWrapper);
+        for (PlaceBaseInfo baseInfo : listData) {
+            PlaceCategory category = this.placeCategoryService.getById(baseInfo.getCategoryId());
+            baseInfo.setCategory(category);
+        }
+        return Result.instance(Result.Code.SUCCESS).setData(listData);
+    }
 }

Tiedoston diff-näkymää rajattu, sillä se on liian suuri
+ 0 - 0
src/main/resources/public/index.html


Kaikkia tiedostoja ei voida näyttää, sillä liian monta tiedostoa muuttui tässä diffissä