From eac1bb48ce6df55a923981a99c26693406f877e9 Mon Sep 17 00:00:00 2001
From: jiangqs <343695869@qq.com>
Date: 星期二, 25 七月 2023 21:56:42 +0800
Subject: [PATCH] bug
---
ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/controller/business/MerConfigController.java | 38 +++++++++++++++++++++++++++++++++++---
1 files changed, 35 insertions(+), 3 deletions(-)
diff --git a/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/controller/business/MerConfigController.java b/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/controller/business/MerConfigController.java
index 3c86752..84ba649 100644
--- a/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/controller/business/MerConfigController.java
+++ b/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/controller/business/MerConfigController.java
@@ -1,14 +1,21 @@
package com.ruoyi.system.controller.business;
+import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.ruoyi.common.core.domain.R;
-import com.ruoyi.system.domain.dto.AppAgreementDto;
-import com.ruoyi.system.domain.vo.AppAgreementVo;
+import com.ruoyi.common.security.utils.SecurityUtils;
+import com.ruoyi.system.domain.dto.MerRecommendCooperationDto;
+import com.ruoyi.system.domain.dto.MerShopRecommendPageDto;
+import com.ruoyi.system.domain.vo.MerShopRecommendPageVo;
+import com.ruoyi.system.service.config.RecommendCooperationService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RestController;
+
+import javax.annotation.Resource;
+import java.util.List;
/**
* @author jqs34
@@ -21,6 +28,31 @@
@RestController
@RequestMapping("/mer/config")
public class MerConfigController {
-
+
+ @Resource
+ private RecommendCooperationService recommendCooperationService;
+
+ @RequestMapping(value = "/pageMerShopRecommend", method = RequestMethod.POST)
+ @ApiOperation(value = "分页获取商户推荐列表")
+ public R<Page<MerShopRecommendPageVo>> pageMerShopRecommend(@RequestBody MerShopRecommendPageDto merShopRecommendPageDto) {
+ Long userId = SecurityUtils.getUserId();
+ merShopRecommendPageDto.setUserId(userId);
+ Page<MerShopRecommendPageVo> page = new Page<>();
+ page.setSize(merShopRecommendPageDto.getPageSize());
+ page.setCurrent(merShopRecommendPageDto.getPageNum());
+ List<MerShopRecommendPageVo> merShopRecommendPageVoList = recommendCooperationService.pageMerShopRecommend(page,merShopRecommendPageDto);
+ return R.ok(page.setRecords(merShopRecommendPageVoList));
+ }
+
+ @RequestMapping(value = "/recommendCooperation", method = RequestMethod.POST)
+ @ApiOperation(value = "推荐合作")
+ public R recommendCooperation(@RequestBody MerRecommendCooperationDto merRecommendCooperationDto) {
+ Long userId = SecurityUtils.getUserId();
+ merRecommendCooperationDto.setUserId(userId);
+ recommendCooperationService.recommendCooperation(merRecommendCooperationDto);
+ return R.ok();
+ }
+
+
}
--
Gitblit v1.7.1