From b95715d5cdc806cbb15cc7f49c538e61f5ab5dc6 Mon Sep 17 00:00:00 2001
From: jiangqs <jiangqs>
Date: 星期四, 03 八月 2023 13:31:46 +0800
Subject: [PATCH] bug和二维码

---
 ruoyi-modules/ruoyi-goods/src/main/java/com/ruoyi/goods/controller/management/MgtActivityController.java |   16 +++++++++++++---
 1 files changed, 13 insertions(+), 3 deletions(-)

diff --git a/ruoyi-modules/ruoyi-goods/src/main/java/com/ruoyi/goods/controller/management/MgtActivityController.java b/ruoyi-modules/ruoyi-goods/src/main/java/com/ruoyi/goods/controller/management/MgtActivityController.java
index 45b2518..92eb3db 100644
--- a/ruoyi-modules/ruoyi-goods/src/main/java/com/ruoyi/goods/controller/management/MgtActivityController.java
+++ b/ruoyi-modules/ruoyi-goods/src/main/java/com/ruoyi/goods/controller/management/MgtActivityController.java
@@ -10,12 +10,14 @@
 import com.ruoyi.goods.domain.dto.MgtActivityPageDto;
 import com.ruoyi.goods.domain.dto.MgtActivityRecordPageDto;
 import com.ruoyi.goods.domain.vo.MgtActivityGetVo;
+import com.ruoyi.goods.domain.vo.MgtActivityListVo;
 import com.ruoyi.goods.domain.vo.MgtActivityPageVo;
 import com.ruoyi.goods.domain.vo.MgtActivityRecordPageVo;
 import com.ruoyi.goods.service.activity.ActivityService;
 import com.ruoyi.system.api.domain.dto.MgtBaseGetDto;
 import io.swagger.annotations.Api;
 import io.swagger.annotations.ApiOperation;
+import org.springframework.validation.annotation.Validated;
 import org.springframework.web.bind.annotation.RequestBody;
 import org.springframework.web.bind.annotation.RequestMapping;
 import org.springframework.web.bind.annotation.RequestMethod;
@@ -32,7 +34,7 @@
  * @Date 2023/6/14 10:17
  * @Version 1.0
  */
-@Api(value = "平台端活动相关接口", tags = "平台端活动相关接口", description = "平台端活动相关接口")
+@Api(value = "管理后台活动相关接口", tags = "管理后台活动相关接口", description = "管理后台活动相关接口")
 @RestController
 @RequestMapping("/mgt/activity")
 public class MgtActivityController {
@@ -43,7 +45,7 @@
     @RequestMapping(value = "/editMgtActivity", method = RequestMethod.POST)
     @Log(title = "活动管理", businessType = BusinessType.UPDATE,operContent = "编辑活动")
     @ApiOperation(value = "平台编辑活动")
-    public R editMgtActivity(@RequestBody MgtActivityEditDto mgtActivityEditDto) {
+    public R editMgtActivity(@Validated  @RequestBody MgtActivityEditDto mgtActivityEditDto) {
         Long userId = SecurityUtils.getUserId();
         mgtActivityEditDto.setUserId(userId);
         activityService.editMgtActivity(mgtActivityEditDto);
@@ -91,7 +93,7 @@
 
     @RequestMapping(value = "/exportPageMgtActivityRecord", method = RequestMethod.POST)
     @ApiOperation(value = "导出活动参与记录列表")
-    public void exportPageMgtActivityRecord(@RequestBody MgtActivityRecordPageDto mgtActivityRecordPageDto, HttpServletResponse response) {
+    public void exportPageMgtActivityRecord( MgtActivityRecordPageDto mgtActivityRecordPageDto, HttpServletResponse response) {
         Page<MgtActivityRecordPageVo> page = new Page<>();
         page.setSize(2000);
         page.setCurrent(1);
@@ -99,4 +101,12 @@
         ExcelUtil<MgtActivityRecordPageVo> util = new ExcelUtil<MgtActivityRecordPageVo>(MgtActivityRecordPageVo.class);
         util.exportExcel(response, activityRecordPageVoList, "商品列表");
     }
+
+    @RequestMapping(value = "/listMgtActivity", method = RequestMethod.POST)
+    @ApiOperation(value = "获取活动列表")
+    public R<List<MgtActivityListVo>> listMgtActivity() {
+
+        List<MgtActivityListVo> activityListVoList = activityService.listMgtActivity();
+        return R.ok(activityListVoList);
+    }
 }

--
Gitblit v1.7.1