From 80411da47ba7c91430ff57e26798922e5e1f2fa0 Mon Sep 17 00:00:00 2001
From: phpcjl <phpcjl@gmail.com>
Date: 星期一, 09 十二月 2024 15:58:28 +0800
Subject: [PATCH] 1.
---
ruoyi-service/ruoyi-account/src/main/java/com/ruoyi/account/service/impl/VipCenterServiceImpl.java | 20 ++++++++++++++++++++
ruoyi-service/ruoyi-other/src/main/java/com/ruoyi/other/vo/TechnicianSubscribeVO.java | 2 ++
ruoyi-service/ruoyi-other/src/main/resources/mapper/other/TechnicianSubscribeMapper.xml | 2 +-
3 files changed, 23 insertions(+), 1 deletions(-)
diff --git a/ruoyi-service/ruoyi-account/src/main/java/com/ruoyi/account/service/impl/VipCenterServiceImpl.java b/ruoyi-service/ruoyi-account/src/main/java/com/ruoyi/account/service/impl/VipCenterServiceImpl.java
index 74e5b9a..68bae5a 100644
--- a/ruoyi-service/ruoyi-account/src/main/java/com/ruoyi/account/service/impl/VipCenterServiceImpl.java
+++ b/ruoyi-service/ruoyi-account/src/main/java/com/ruoyi/account/service/impl/VipCenterServiceImpl.java
@@ -33,6 +33,26 @@
@Override
public Boolean checkReadyToBeProxy(Long userId,Integer vipId) {
+ AppUser appUser = appUserService.getById(userId);
+ // 消费积分
+ Integer shopPoint = appUser.getShopPoint();
+ // 返佣积分
+ Integer sharePoint = appUser.getSharePoint();
+ // 准代理会员设置
+ VipSetting vipSetting = vipSettingService.getVipSettingById(4);
+ // 消费积分阈值
+ Integer vipLevelUpShop = vipSetting.getVipLevelUpShop();
+ // 返佣积分阈值
+ Integer vipLevelUpShare = vipSetting.getVipLevelUpShare();
+ if (shopPoint >=vipLevelUpShop && sharePoint >= vipLevelUpShare){
+ return true;
+ }
+ // 直推钻石用户数阈值
+ Integer vipDirectNum = vipSetting.getVipDirectNum();
+ // 获取用户直推钻石用户数量
+ long userDiamondsCount = appUserService.count(new LambdaQueryWrapper<AppUser>()
+ .eq(AppUser::getInviteUserId, userId)
+ .eq(AppUser::getVipId, 3));
return false;
}
diff --git a/ruoyi-service/ruoyi-other/src/main/java/com/ruoyi/other/vo/TechnicianSubscribeVO.java b/ruoyi-service/ruoyi-other/src/main/java/com/ruoyi/other/vo/TechnicianSubscribeVO.java
index 42ccb7e..610d9f4 100644
--- a/ruoyi-service/ruoyi-other/src/main/java/com/ruoyi/other/vo/TechnicianSubscribeVO.java
+++ b/ruoyi-service/ruoyi-other/src/main/java/com/ruoyi/other/vo/TechnicianSubscribeVO.java
@@ -60,4 +60,6 @@
@ApiModelProperty(value = "纬度")
private String latitude;
+
+
}
diff --git a/ruoyi-service/ruoyi-other/src/main/resources/mapper/other/TechnicianSubscribeMapper.xml b/ruoyi-service/ruoyi-other/src/main/resources/mapper/other/TechnicianSubscribeMapper.xml
index d47604c..ea2c253 100644
--- a/ruoyi-service/ruoyi-other/src/main/resources/mapper/other/TechnicianSubscribeMapper.xml
+++ b/ruoyi-service/ruoyi-other/src/main/resources/mapper/other/TechnicianSubscribeMapper.xml
@@ -26,7 +26,7 @@
<select id="getTechnicianSubscribeByUser" resultType="com.ruoyi.other.vo.TechnicianSubscribeVO">
SELECT * from (
SELECT
- tts.id,
+ CAST(tts.id AS CHAR) id,
tts.user_address,
ts.`name` shopName,
ts.address shopAddress,
--
Gitblit v1.7.1