puzhibing
2024-12-06 8ca8432f7dfb2c58ff6c0f9d1f7224b262bdaba4
Merge remote-tracking branch 'origin/master'
5个文件已修改
93 ■■■■■ 已修改文件
ruoyi-api/ruoyi-api-other/src/main/java/com/ruoyi/other/api/domain/VipSetting.java 50 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ruoyi-service/ruoyi-account/src/main/java/com/ruoyi/account/controller/UserCouponController.java 6 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ruoyi-service/ruoyi-account/src/main/java/com/ruoyi/account/controller/VipCenterController.java 31 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ruoyi-service/ruoyi-other/src/main/java/com/ruoyi/other/controller/VipGoodController.java 3 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ruoyi-service/ruoyi-other/src/main/java/com/ruoyi/other/mapper/GoodsMapper.java 3 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ruoyi-api/ruoyi-api-other/src/main/java/com/ruoyi/other/api/domain/VipSetting.java
@@ -39,15 +39,15 @@
    @TableField("vip_info")
    private String vipInfo;
    @ApiModelProperty(value = "1级会员用 注册 天后 未成为黄金会员自动解绑推广人")
    @ApiModelProperty(value = "自动解绑推广人天数: 达到设置天数未成为黄金会员自动解绑推广人")
    @TableField("vip_cancel_day")
    private Integer vipCancelDay;
    @ApiModelProperty(value = "1级会员用 注册 天后 未在商城下单,可更换推广人")
    @ApiModelProperty(value = "可更换绑定人天数:用户在达到设置的天数未下单商品,可以更换绑定人")
    @TableField("vip_change_day")
    private Integer vipChangeDay;
    @ApiModelProperty(value = "钱包提现权限1开0关")
    @ApiModelProperty(value = "钱包提现权限:1开0关")
    @TableField("vip_withdrawal_role")
    private Integer vipWithdrawalRole;
@@ -63,67 +63,71 @@
    @TableField("vip_gift_role")
    private Integer vipGiftRole;
    @ApiModelProperty(value = "消费达到积分 后升级")
    @ApiModelProperty(value = "达成会员等级所需消费积分数量")
    @TableField("vip_level_up_shop")
    private BigDecimal vipLevelUpShop;
    @ApiModelProperty(value = "普通会员:达到消费积分后升级开关 1开0关")
    @ApiModelProperty(value = "通过消费积分达成会员等级的开关 1开0关")
    @TableField("vip_level_up_shop_role")
    private Integer vipLevelUpShopRole;
    @ApiModelProperty(value = "返佣达到积分 后升级")
    @ApiModelProperty(value = "达成会员等级所需的返佣积分数量")
    @TableField("vip_level_up_share")
    private BigDecimal vipLevelUpShare;
    @ApiModelProperty(value = "普通会员:返佣积分后升级开关 1开0关")
    @ApiModelProperty(value = "通过返佣积分达成会员等级的开关 1开0关")
    @TableField("vip_level_up_share_role")
    private Integer vipLevelUpShareRole;
    @ApiModelProperty(value = "创业者:消费并且返佣升级  1开0关")
    @TableField("vip_agent_level_up_role")
    private Integer vipAgentLevelUpRole;
//    @ApiModelProperty(value = "创业者:消费并且返佣升级  1开0关")
//    @TableField("vip_agent_level_up_role")
//    private Integer vipAgentLevelUpRole;
    @ApiModelProperty(value = "普通会员:直推用户数 达到后升级")
    @ApiModelProperty(value = "达成会员等级所需的直推人数(包括砖石和代理)")
    @TableField("vip_direct_num")
    private Integer vipDirectNum;
    @ApiModelProperty(value = "普通会员:团队人数达到后升级")
    @ApiModelProperty(value = "达成会员等级所需的团队数量")
    @TableField("vip_team_num")
    private Integer vipTeamNum;
    @ApiModelProperty(value = "普通会员:推广人数升级开关 1开0关")
    @ApiModelProperty(value = "通过直推用户或团队数量的方式达成会员等级的开关 1开0关")
    @TableField("vip_level_up_num_role")
    private Integer vipLevelUpNumRole;
    @ApiModelProperty(value = "创业者:直推钻石会员")
    @TableField("vip_direct_vip_num")
    private Integer vipDirectVipNum;
    @ApiModelProperty(value = "创业者:直推钻石会员开关 1开0关")
    @ApiModelProperty(value = "通过直推钻石用户达成会员等级的开关 1开0关")
    @TableField("vip_direct_vip_role")
    private Integer vipDirectVipRole;
    @ApiModelProperty(value = "保级:消费x天")
    @ApiModelProperty(value = "达成会员等级所需准代理数")
    @TableField("vip_direct_vip_num")
    private Integer vipDirectVipNum;
    @ApiModelProperty(value = "消费积分保级周期(天)")
    @TableField("keep_buy_day")
    private Integer keepBuyDay;
    @ApiModelProperty(value = "保级:消费x分")
    @ApiModelProperty(value = "消费积分保级的积分阈值(分))")
    @TableField("keep_buy_point")
    private BigDecimal keepBuyPoint;
    @ApiModelProperty(value = "保级:返佣x天")
    @ApiModelProperty(value = "返佣积分保的周期(天)")
    @TableField("keep_share_day")
    private Integer keepShareDay;
    @ApiModelProperty(value = "保级:返佣x分")
    @ApiModelProperty(value = "返佣积分保级的积分阈值(分)")
    @TableField("keep_share_point")
    private BigDecimal keepSharePoint;
    @ApiModelProperty(value = "保级:门店x天")
    @ApiModelProperty(value = "门店业绩积分保级的周期(天)")
    @TableField("keep_shop_day")
    private Integer keepShopDay;
    @ApiModelProperty(value = "保级:门店x分")
    @ApiModelProperty(value = "门店业绩积分保级的积分阈值(分)")
    @TableField("keep_shop_point")
    private BigDecimal keepShopPoint;
ruoyi-service/ruoyi-account/src/main/java/com/ruoyi/account/controller/UserCouponController.java
@@ -57,9 +57,9 @@
    public R<Page<UserCoupon>> minelist(@RequestParam Integer pageNum, @RequestParam Integer pageSize, @ApiParam("1未使用2已使用3已过期") Integer status) {
        Long userid = tokenService.getLoginUserApplet().getUserid();
        Page<UserCoupon> page = userCouponService.lambdaQuery()
                .isNull(status!=null&&(status==1||status==3),UserCoupon::getUseTime)
                .isNotNull(status!=null&&status==2,UserCoupon::getUseTime)
                .lt(status!=null&&status==3,UserCoupon::getEndTime, LocalDateTime.now())
                .isNull(status==1||status==3,UserCoupon::getUseTime)
                .isNotNull(status == 2,UserCoupon::getUseTime)
                .lt(status == 3,UserCoupon::getEndTime, LocalDateTime.now())
                .eq(UserCoupon::getAppUserId, userid).page(Page.of(pageNum, pageSize));
        for (UserCoupon record : page.getRecords()) {
            CouponInfo data = couponClient.detail(record.getCouponId()).getData();
ruoyi-service/ruoyi-account/src/main/java/com/ruoyi/account/controller/VipCenterController.java
@@ -1,6 +1,9 @@
package com.ruoyi.account.controller;
import com.alibaba.fastjson2.JSONObject;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.ruoyi.account.api.model.AppUser;
import com.ruoyi.account.service.AppUserService;
import com.ruoyi.account.service.VipSettingService;
import com.ruoyi.account.vo.vip.Level;
import com.ruoyi.account.vo.vip.VipLevel;
@@ -11,6 +14,7 @@
import com.ruoyi.other.api.feignClient.GoodsVipClient;
import com.ruoyi.other.api.feignClient.RemoteVipSettingClient;
import com.ruoyi.other.api.feignClient.VipGoodClient;
import com.ruoyi.system.api.model.LoginUser;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.extern.log4j.Log4j2;
@@ -40,8 +44,10 @@
    private VipSettingService vipSettingService;
    @Resource
    private TokenService tokenService;
//    @Resource
//    private VipGoodClient vipGoodClient;
    @Resource
    private VipGoodClient vipGoodClient;
    @Resource
    private AppUserService appUserService;
    @GetMapping("getVipLevelList")
@@ -126,6 +132,27 @@
        }
    }
    public R<Void> test() {
        LoginUser loginUserApplet = tokenService.getLoginUserApplet();
        AppUser appUser = appUserService.getById(loginUserApplet.getUserid());
        if (appUser.getShopPoint() < 500){
            return R.fail("消费积分不足500");
        }
        if (appUser.getSharePoint() < 500){
            return R.fail("返佣积分不足500");
        }
        // 当前用户的直推用户
//        List<AppUser> bottomUsers = appUserService.list(new LambdaQueryWrapper<AppUser>()
//                .eq(AppUser::getInviteUserId, loginUserApplet.getUserid())
//                .eq(AppUser::getVipId));
    }
    private boolean checkSuccess(R<?> r) {
        if (!R.isSuccess(r)) {
            log.error("请求失败: " + r.getMsg());
ruoyi-service/ruoyi-other/src/main/java/com/ruoyi/other/controller/VipGoodController.java
@@ -8,6 +8,7 @@
import com.ruoyi.other.service.VipGoodService;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;
import javax.annotation.Resource;
@@ -28,7 +29,7 @@
    private VipGoodService vipGoodService;
    @GetMapping("getVipGoodsByVipId")
    public R<List<VipGood>> getVipGoodsByVipId(Integer vipId){
    public R<List<VipGood>> getVipGoodsByVipId(@RequestParam("vipId") Integer vipId){
        return R.ok(vipGoodService.list(new LambdaQueryWrapper<VipGood>()
                .eq(VipGood::getVipId, vipId)));
    }
ruoyi-service/ruoyi-other/src/main/java/com/ruoyi/other/mapper/GoodsMapper.java
@@ -2,6 +2,7 @@
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.ruoyi.other.api.domain.Goods;
import org.apache.ibatis.annotations.Param;
import java.util.List;
@@ -14,5 +15,5 @@
 * @since 2024-11-20
 */
public interface GoodsMapper extends BaseMapper<Goods> {
    List<Goods> selectListByShopId(Integer shopId, Integer vip);
    List<Goods> selectListByShopId(@Param("shopId") Integer shopId,@Param("vip") Integer vip);
}