From c8b658df0004f9698f20d7017703e0901fcf8b15 Mon Sep 17 00:00:00 2001
From: xiaoyong931011 <15274802129@163.com>
Date: Wed, 26 Jul 2023 13:00:57 +0800
Subject: [PATCH] 短信认证
---
src/main/java/cc/mrbird/febs/mall/controller/ApiMallGoodsController.java | 65 +++++++++++++++++++++++++++++---
1 files changed, 59 insertions(+), 6 deletions(-)
diff --git a/src/main/java/cc/mrbird/febs/mall/controller/ApiMallGoodsController.java b/src/main/java/cc/mrbird/febs/mall/controller/ApiMallGoodsController.java
index 2f4e723..b99779b 100644
--- a/src/main/java/cc/mrbird/febs/mall/controller/ApiMallGoodsController.java
+++ b/src/main/java/cc/mrbird/febs/mall/controller/ApiMallGoodsController.java
@@ -1,9 +1,10 @@
package cc.mrbird.febs.mall.controller;
import cc.mrbird.febs.common.entity.FebsResponse;
+import cc.mrbird.febs.mall.dto.ApiMallGoodsCommentDto;
import cc.mrbird.febs.mall.dto.MallGoodsQueryDto;
import cc.mrbird.febs.mall.service.IApiMallGoodsService;
-import cc.mrbird.febs.mall.vo.MallGoodsListVo;
+import cc.mrbird.febs.mall.vo.*;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import io.swagger.annotations.ApiResponse;
@@ -11,10 +12,7 @@
import lombok.RequiredArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import org.springframework.validation.annotation.Validated;
-import org.springframework.web.bind.annotation.PostMapping;
-import org.springframework.web.bind.annotation.RequestBody;
-import org.springframework.web.bind.annotation.RequestMapping;
-import org.springframework.web.bind.annotation.RestController;
+import org.springframework.web.bind.annotation.*;
/**
* @author wzy
@@ -22,6 +20,7 @@
**/
@Slf4j
@Validated
+@CrossOrigin
@RestController
@RequiredArgsConstructor
@RequestMapping(value = "/api/goods")
@@ -29,7 +28,7 @@
public class ApiMallGoodsController {
private final IApiMallGoodsService mallGoodsService;
- @ApiOperation(value = "findMallGoodsList", notes = "获取商城商品列表")
+ @ApiOperation(value = "获取商城商品列表", notes = "获取商城商品列表")
@ApiResponses({
@ApiResponse(code = 200, message = "success", response = MallGoodsListVo.class)
})
@@ -38,4 +37,58 @@
return new FebsResponse().success().data(mallGoodsService.findMallGoodsListInPage(queryDto));
}
+ @ApiOperation(value = "获取商城商品", notes = "获取商城商品")
+ @ApiResponses({
+ @ApiResponse(code = 200, message = "success", response = MallGoodsListVo.class)
+ })
+ @PostMapping(value = "/goodsListNoPage")
+ public FebsResponse goodsListNoPage(@RequestBody MallGoodsQueryDto queryDto) {
+ return new FebsResponse().success().data(mallGoodsService.findMallGoodsListNoPage(queryDto));
+ }
+
+ @ApiOperation(value = "获取商品详情", notes = "获取商品详情")
+ @ApiResponses({
+ @ApiResponse(code = 200, message = "success", response = MallGoodsDetailsVo.class)
+ })
+ @GetMapping(value = "/findMallGoodsDetailsById/{id}")
+ public FebsResponse findMallGoodsDetailsById(@PathVariable("id") Long id) {
+ return new FebsResponse().success().data(mallGoodsService.findMallGoodsDetailsById(id));
+ }
+
+ @ApiOperation(value = "获取商品评价", notes = "获取商品评价")
+ @ApiResponses({
+ @ApiResponse(code = 200, message = "success", response = MallGoodsCommentVo.class)
+ })
+ @PostMapping(value = "/commentByGoodsId")
+ public FebsResponse commentByGoodsId(@RequestBody ApiMallGoodsCommentDto queryDto) {
+ return new FebsResponse().success().data(mallGoodsService.findMallGoodsCommentByGoodsId(queryDto));
+ }
+
+ @ApiOperation(value = "获取商品评价等级数量", notes = "获取商品评价等级数量")
+ @ApiResponses({
+ @ApiResponse(code = 200, message = "success", response = MallGoodsCommentVo.class)
+ })
+ @GetMapping(value = "/commentLevelByGoodsId/{id}")
+ public FebsResponse commentLevelByGoodsId(@PathVariable("id") Long id) {
+ return new FebsResponse().success().data(mallGoodsService.findMallGoodsCommentLevelByGoodsId(id));
+ }
+
+ @ApiOperation(value = "配送设置", notes = "配送设置")
+ @ApiResponses({
+ @ApiResponse(code = 200, message = "success", response = ApiMallGoodsDeliveryVo.class)
+ })
+ @GetMapping(value = "/deliverySetting")
+ public FebsResponse deliverySetting() {
+ return new FebsResponse().success().data(mallGoodsService.findDeliverySetting());
+ }
+
+ @ApiOperation(value = "获取运费模板信息", notes = "获取运费模板信息")
+ @ApiResponses({
+ @ApiResponse(code = 200, message = "success", response = ApiMallCarriageRuleVo.class)
+ })
+ @GetMapping(value = "/findMallCarriageRuleById/{id}")
+ public FebsResponse findMallCarriageRuleById(@PathVariable("id") Long id) {
+ return new FebsResponse().success().data(mallGoodsService.findMallCarriageRuleById(id));
+ }
+
}
--
Gitblit v1.9.1