|
|
@@ -15,6 +15,7 @@ import com.zhiqiyun.open.core.service.PlaceCategoryService;
|
|
|
import com.zhiqiyun.open.mvc.Result;
|
|
|
import com.zhiqiyun.open.mvc.params.place.QueryPlaceCategoryParam;
|
|
|
import com.zhiqiyun.open.router.request.category.CategoryOccupationRequest;
|
|
|
+import com.zhiqiyun.open.router.request.place.CategoryPageRequest;
|
|
|
import com.zhiqiyun.open.router.request.place.CategoryRequest;
|
|
|
import com.zhiqiyun.open.router.request.place.PlaceInfoRequest;
|
|
|
import lombok.extern.slf4j.Slf4j;
|
|
|
@@ -45,6 +46,9 @@ public class PlaceApi {
|
|
|
if (request.getIsShow() != null) {
|
|
|
wrapper.eq("is_show", request.getIsShow());
|
|
|
}
|
|
|
+ if (StringUtils.isNotBlank(request.getCode())) {
|
|
|
+ wrapper.like("category_id", request.getCode());
|
|
|
+ }
|
|
|
wrapper.orderByDesc("sort_number");
|
|
|
wrapper.orderByDesc("id");
|
|
|
List<PlaceCategory> listData = this.placeCategoryService.list(wrapper);
|
|
|
@@ -52,7 +56,7 @@ public class PlaceApi {
|
|
|
}
|
|
|
|
|
|
@ServiceMethod(method = "list.place.category.page", title = "查询文旅场所分类分页")
|
|
|
- public Result listPlaceCategoryPage(@RequestBody CategoryRequest request) {
|
|
|
+ public Result listPlaceCategoryPage(@RequestBody CategoryPageRequest request) {
|
|
|
QueryWrapper<PlaceCategory> wrapper = new QueryWrapper<>();
|
|
|
if (StringUtils.isNotBlank(request.getName())) {
|
|
|
wrapper.like("name", request.getName());
|
|
|
@@ -60,6 +64,9 @@ public class PlaceApi {
|
|
|
if (request.getIsShow() != null) {
|
|
|
wrapper.eq("is_show", request.getIsShow());
|
|
|
}
|
|
|
+ if (StringUtils.isNotBlank(request.getCode())) {
|
|
|
+ wrapper.like("category_id", request.getCode());
|
|
|
+ }
|
|
|
Page<PlaceCategory> page = new Page<>(request.getCurrent(), request.getPageSize());
|
|
|
page.addOrder(OrderItem.asc("sort_number"));
|
|
|
page.addOrder(OrderItem.desc("id"));
|
|
|
@@ -68,6 +75,7 @@ public class PlaceApi {
|
|
|
return Result.instance(Result.Code.SUCCESS).setData(resultData);
|
|
|
}
|
|
|
|
|
|
+
|
|
|
@ServiceMethod(method = "list.place.info.page", title = "查询文旅场所")
|
|
|
public OapResponse listPlaceInfoPage(PlaceInfoRequest request) {
|
|
|
QueryWrapper<PlaceBaseInfo> wrapper = new QueryWrapper<>();
|