|
|
@@ -3,9 +3,11 @@ package com.yc.ship.module.resource.controller.app.ship;
|
|
|
import com.yc.ship.framework.common.pojo.CommonResult;
|
|
|
import com.yc.ship.framework.common.util.object.BeanUtils;
|
|
|
import com.yc.ship.module.resource.controller.admin.ship.vo.ResourceShipRespVO;
|
|
|
+import com.yc.ship.module.resource.controller.app.ship.vo.AppPublicAreaImageRespVO;
|
|
|
import com.yc.ship.module.resource.controller.app.ship.vo.AppResourceShipRespVO;
|
|
|
import com.yc.ship.module.resource.dal.dataobject.ship.ResourceShipDO;
|
|
|
import com.yc.ship.module.resource.service.ship.ResourceShipService;
|
|
|
+import com.yc.ship.module.system.api.dict.DictDataApi;
|
|
|
import io.swagger.v3.oas.annotations.Operation;
|
|
|
import io.swagger.v3.oas.annotations.tags.Tag;
|
|
|
import org.springframework.validation.annotation.Validated;
|
|
|
@@ -15,6 +17,7 @@ import org.springframework.web.bind.annotation.RestController;
|
|
|
|
|
|
import javax.annotation.Resource;
|
|
|
import java.util.List;
|
|
|
+import java.util.stream.Collectors;
|
|
|
|
|
|
import static com.yc.ship.framework.common.pojo.CommonResult.success;
|
|
|
|
|
|
@@ -23,22 +26,32 @@ import static com.yc.ship.framework.common.pojo.CommonResult.success;
|
|
|
@RequestMapping("/resource/ship")
|
|
|
@Validated
|
|
|
public class AppResourceShipController {
|
|
|
-
|
|
|
+
|
|
|
@Resource
|
|
|
private ResourceShipService shipService;
|
|
|
|
|
|
+ @Resource
|
|
|
+ private DictDataApi dictDataApi;
|
|
|
+
|
|
|
@GetMapping("/list-simple")
|
|
|
@Operation(summary = "获取游轮列表(下拉筛选用)")
|
|
|
public CommonResult<List<AppResourceShipRespVO>> getShipListSimple() {
|
|
|
- List<ResourceShipDO> list = shipService.getListSimple();
|
|
|
+ List<ResourceShipDO> list = shipService.getAppListSimple();
|
|
|
return success(BeanUtils.toBean(list, AppResourceShipRespVO.class));
|
|
|
}
|
|
|
|
|
|
@GetMapping("/detail")
|
|
|
@Operation(summary = "获取游轮详情")
|
|
|
public CommonResult<AppResourceShipRespVO> getShipDetail(Long id) {
|
|
|
- ResourceShipDO ship = shipService.getShip(id);
|
|
|
+ ResourceShipDO ship = shipService.getAppShip(id);
|
|
|
return success(BeanUtils.toBean(ship, AppResourceShipRespVO.class));
|
|
|
}
|
|
|
|
|
|
+ @GetMapping("/public-area-images")
|
|
|
+ @Operation(summary = "获取游轮公共区域图片")
|
|
|
+ public CommonResult<List<AppPublicAreaImageRespVO>> getPublicAreaImages() {
|
|
|
+ return success(BeanUtils.toBean(dictDataApi.getDictDataList("public_area_images"),
|
|
|
+ AppPublicAreaImageRespVO.class));
|
|
|
+ }
|
|
|
+
|
|
|
}
|