|
@@ -0,0 +1,39 @@
|
|
|
|
|
+package com.sqx.modules.lovers.controller.app;
|
|
|
|
|
+
|
|
|
|
|
+import com.sqx.common.utils.PageUtils;
|
|
|
|
|
+import com.sqx.common.utils.Result;
|
|
|
|
|
+import com.sqx.modules.lovers.dto.LoversSetQueryDTO;
|
|
|
|
|
+import com.sqx.modules.lovers.service.LoversSetService;
|
|
|
|
|
+import com.sqx.modules.lovers.vo.LoversSetVO;
|
|
|
|
|
+import io.swagger.annotations.Api;
|
|
|
|
|
+import io.swagger.annotations.ApiOperation;
|
|
|
|
|
+import lombok.RequiredArgsConstructor;
|
|
|
|
|
+import org.springframework.web.bind.annotation.GetMapping;
|
|
|
|
|
+import org.springframework.web.bind.annotation.PathVariable;
|
|
|
|
|
+import org.springframework.web.bind.annotation.RequestMapping;
|
|
|
|
|
+import org.springframework.web.bind.annotation.RestController;
|
|
|
|
|
+
|
|
|
|
|
+import javax.validation.Valid;
|
|
|
|
|
+
|
|
|
|
|
+@Api(tags = {"用户端-情侣套餐"})
|
|
|
|
|
+@RestController
|
|
|
|
|
+@RequestMapping("app/lover-set")
|
|
|
|
|
+@RequiredArgsConstructor
|
|
|
|
|
+public class AppLoversSetController {
|
|
|
|
|
+
|
|
|
|
|
+ private final LoversSetService loversSetService;
|
|
|
|
|
+
|
|
|
|
|
+ @ApiOperation("套餐列表")
|
|
|
|
|
+ @GetMapping("page")
|
|
|
|
|
+ public Result page(@Valid LoversSetQueryDTO queryDTO){
|
|
|
|
|
+ PageUtils pages = loversSetService.listForApp(queryDTO);
|
|
|
|
|
+ return Result.success().put("data", pages);
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ @ApiOperation(value = "套餐列表", notes = "根据套餐id查询详情")
|
|
|
|
|
+ @GetMapping("{id}")
|
|
|
|
|
+ public Result detail(@PathVariable Long id){
|
|
|
|
|
+ LoversSetVO vo = loversSetService.getDetailById(id);
|
|
|
|
|
+ return Result.success().put("data", vo);
|
|
|
|
|
+ }
|
|
|
|
|
+}
|