From cb49d77f0b0a1a066790c65088864200f10e9462 Mon Sep 17 00:00:00 2001
From: jiangqs <jiangqs>
Date: 星期五, 28 七月 2023 19:55:39 +0800
Subject: [PATCH] bug

---
 ruoyi-modules/ruoyi-member/src/main/java/com/ruoyi/member/controller/miniapp/AppMemberController.java |   28 ++++++++++++++++++++++++----
 1 files changed, 24 insertions(+), 4 deletions(-)

diff --git a/ruoyi-modules/ruoyi-member/src/main/java/com/ruoyi/member/controller/miniapp/AppMemberController.java b/ruoyi-modules/ruoyi-member/src/main/java/com/ruoyi/member/controller/miniapp/AppMemberController.java
index 9064269..63a63ab 100644
--- a/ruoyi-modules/ruoyi-member/src/main/java/com/ruoyi/member/controller/miniapp/AppMemberController.java
+++ b/ruoyi-modules/ruoyi-member/src/main/java/com/ruoyi/member/controller/miniapp/AppMemberController.java
@@ -5,18 +5,17 @@
 import com.ruoyi.common.core.exception.ServiceException;
 import com.ruoyi.common.core.utils.StringUtils;
 import com.ruoyi.common.security.utils.SecurityUtils;
+import com.ruoyi.member.domain.dto.AppMemberBrowseDto;
 import com.ruoyi.member.domain.vo.AppBirthdayCardVo;
 import com.ruoyi.member.domain.vo.AppMemberPrizePageVo;
 import com.ruoyi.member.domain.vo.AppSuggestPageVo;
 import com.ruoyi.member.domain.vo.AppUserInfoVo;
 import com.ruoyi.member.service.birthday.BirthdayCardService;
+import com.ruoyi.member.service.member.BrowseRecordService;
 import com.ruoyi.member.service.member.MemberService;
 import com.ruoyi.member.service.member.MemberSuggestService;
 import com.ruoyi.system.api.constant.AppErrorConstant;
-import com.ruoyi.system.api.domain.dto.AppEditUserDto;
-import com.ruoyi.system.api.domain.dto.AppPageDto;
-import com.ruoyi.system.api.domain.dto.AppSuggestPageDto;
-import com.ruoyi.system.api.domain.dto.AppUserSuggestDto;
+import com.ruoyi.system.api.domain.dto.*;
 import com.ruoyi.system.api.domain.poji.member.Member;
 import io.swagger.annotations.Api;
 import io.swagger.annotations.ApiOperation;
@@ -49,6 +48,9 @@
 
     @Resource
     private BirthdayCardService birthdayCardService;
+
+    @Resource
+    private BrowseRecordService browseRecordService;
 
 
     @RequestMapping(value = "/getAppUserInfo", method = RequestMethod.POST)
@@ -86,6 +88,14 @@
         Long userId = SecurityUtils.getUserId();
         appUserSuggestDto.setUserId(userId);
         memberSuggestService.userSuggest(appUserSuggestDto);
+        IntegralChangeDto integralChangeDto = new IntegralChangeDto();
+        if(appUserSuggestDto.getSuggestType()==1){
+            integralChangeDto.setIntegralType(2);
+        }else{
+            integralChangeDto.setIntegralType(3);
+        }
+        integralChangeDto.setUserId(userId);
+        memberService.changeIntegral(integralChangeDto);
         return R.ok();
     }
 
@@ -151,4 +161,14 @@
         List<AppMemberPrizePageVo> memberPrizePageVoList = birthdayCardService.pageAppMemberPrize(page,userId);
         return R.ok(page.setRecords(memberPrizePageVoList));
     }
+
+
+    @RequestMapping(value = "/browseRecord", method = RequestMethod.POST)
+    @ApiOperation(value = "浏览记录")
+    public R browseRecord(@RequestBody AppMemberBrowseDto appMemberBrowseDto) {
+        Long userId = SecurityUtils.getUserId();
+        appMemberBrowseDto.setUserId(userId);
+        browseRecordService.browseRecord(appMemberBrowseDto);
+        return R.ok();
+    }
 }

--
Gitblit v1.7.1