ruoyi-api/ruoyi-api-account/src/main/java/com/ruoyi/account/api/model/AppUser.java
@@ -149,7 +149,7 @@ @TableField("total_distribution_amount") private BigDecimal totalDistributionAmount; @ApiModelProperty(value = "剩余积分") @TableField("lave_point") private Integer lavePoint; @@ -191,24 +191,31 @@ private String districtCode; @ApiModelProperty("等级1会员数") @TableField(exist = false) private Long count1; @ApiModelProperty("等级2会员数") @TableField(exist = false) private Long count2; @ApiModelProperty("等级3会员数") @TableField(exist = false) private Long count3; @ApiModelProperty("等级4会员数") @TableField(exist = false) private Long count4; @ApiModelProperty("等级5会员数") @TableField(exist = false) private Long count5; @ApiModelProperty("等级6会员数") @TableField(exist = false) private Long count6; @ApiModelProperty("等级7会员数") @TableField(exist = false) private Long count7; ruoyi-api/ruoyi-api-other/src/main/java/com/ruoyi/other/api/feignClient/RemoteVipSettingClient.java
@@ -7,7 +7,7 @@ import org.springframework.cloud.openfeign.FeignClient; import org.springframework.web.bind.annotation.GetMapping; @FeignClient(contextId = "RemoteOrderGoodsClient", value = ServiceNameConstants.ORDER_SERVICE, fallbackFactory = RemoteVipSettingFallbackFactory.class) @FeignClient(contextId = "RemoteOrderGoodsClient", value = ServiceNameConstants.OTHER_SERVICE, fallbackFactory = RemoteVipSettingFallbackFactory.class) public interface RemoteVipSettingClient { @GetMapping("/vip-setting/getVipSettingById") ruoyi-service/ruoyi-account/pom.xml
@@ -121,6 +121,10 @@ <groupId>junit</groupId> <artifactId>junit</artifactId> </dependency> <dependency> <groupId>com.github.pagehelper</groupId> <artifactId>pagehelper-spring-boot-starter</artifactId> </dependency> </dependencies> <build> ruoyi-service/ruoyi-account/src/main/java/com/ruoyi/account/controller/UserCouponController.java
@@ -99,7 +99,7 @@ if (data==null){ return R.fail("当前优惠券不存在,请刷新后重试"); } if (data.getSendType()!=1&&byId.getLavePoint().compareTo(data.getNeedPoint())==-1){ if (data.getSendType()!=1&&byId.getLavePoint().compareTo(data.getNeedPoint().intValue())==-1){ return R.fail("当前积分不足,兑换失败"); } //检验发放时间 @@ -112,12 +112,12 @@ UserPoint userPoint = new UserPoint(); userPoint.setType(4); userPoint.setHistoricalPoint(byId.getLavePoint()); userPoint.setVariablePoint(data.getNeedPoint()); userPoint.setVariablePoint(data.getNeedPoint().intValue()); userPoint.setAppUserId(userid); userPoint.setObjectId(Long.valueOf(data.getId())); userPointService.save(userPoint); //扣除积分 byId.setLavePoint(byId.getLavePoint().subtract(userPoint.getVariablePoint())); byId.setLavePoint(byId.getLavePoint() - userPoint.getVariablePoint()); appUserService.updateById(byId); } //增加优惠券记录,根据时间类型设置开始结束时间 ruoyi-service/ruoyi-account/src/main/java/com/ruoyi/account/service/impl/AppUserServiceImpl.java
@@ -307,11 +307,11 @@ } public AppUser getTopAppUser(List<AppUser> list, Long id){ AppUser appUser = list.stream().filter(s -> s.getInviteUserId().equals(id)).findFirst().get(); AppUser appUser = list.stream().filter(s -> s.getId().equals(id)).findFirst().get(); if(null == appUser.getInviteUserId()){ return appUser; } return getTopAppUser(list, appUser.getId()); return getTopAppUser(list, appUser.getInviteUserId()); } ruoyi-service/ruoyi-account/src/main/java/com/ruoyi/account/service/impl/UserPointServiceImpl.java
@@ -40,10 +40,10 @@ List<UserPoint> userPointList = list(new LambdaQueryWrapper<UserPoint>() .eq(UserPoint::getAppUserId, userId)); Map<Integer, BigDecimal> userBalanceMap = userPointList.stream() Map<Integer, Integer> userBalanceMap = userPointList.stream() .collect(Collectors.toMap(UserPoint::getType, UserPoint::getBalance)); BigDecimal lavePoint = appUser.getLavePoint(); Integer lavePoint = appUser.getLavePoint(); UserPointVO userPointVO = new UserPointVO(); userPointVO.setTotalPoint(lavePoint); userPointVO.setShopPoint(userBalanceMap.get(PointChangeType.CONSUME.getCode())); ruoyi-service/ruoyi-account/src/main/java/com/ruoyi/account/vo/UserPointDetailVO.java
@@ -16,7 +16,7 @@ private Integer type; @ApiModelProperty(value = "变动金额") private BigDecimal variablePoint; private Integer variablePoint; @ApiModelProperty(value = "变动时间") private LocalDateTime createTime; ruoyi-service/ruoyi-account/src/main/java/com/ruoyi/account/vo/UserPointVO.java
@@ -1,31 +1,28 @@ package com.ruoyi.account.vo; import com.baomidou.mybatisplus.annotation.TableField; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import lombok.Data; import java.math.BigDecimal; @Data @ApiModel(value="UserPoint对象", description="") public class UserPointVO { @ApiModelProperty(value = "总积分") private BigDecimal totalPoint; private Integer totalPoint; @ApiModelProperty(value = "消费积分数") private BigDecimal shopPoint; private Integer shopPoint; @ApiModelProperty(value = "返佣积分数") private BigDecimal sharePoint; private Integer sharePoint; @ApiModelProperty(value = "拉新积分") private BigDecimal pullNewPoint; private Integer pullNewPoint; @ApiModelProperty(value = "门店业绩积分") private BigDecimal shopAchievementPoint; private Integer shopAchievementPoint; @ApiModelProperty(value = "门店返佣积分") private BigDecimal shopSharePoint; private Integer shopSharePoint; } ruoyi-service/ruoyi-order/pom.xml
@@ -124,7 +124,7 @@ <dependency> <groupId>com.baomidou</groupId> <artifactId>mybatis-plus-boot-starter</artifactId> <version>3.5.2</version> <version>3.5.4</version> </dependency> <dependency> @@ -145,6 +145,11 @@ </exclusions> </dependency> <dependency> <groupId>com.github.pagehelper</groupId> <artifactId>pagehelper-spring-boot-starter</artifactId> </dependency> </dependencies> <build> ruoyi-service/ruoyi-order/src/main/java/com/ruoyi/order/service/impl/CommissionServiceImpl.java
@@ -102,7 +102,7 @@ } // 门店分销金额 og.getBoundShopCharges() og.getBoundShopCharges(); } } ruoyi-service/ruoyi-other/pom.xml
@@ -114,7 +114,7 @@ <dependency> <groupId>com.baomidou</groupId> <artifactId>mybatis-plus-boot-starter</artifactId> <version>3.5.2</version> <version>3.5.4</version> </dependency> <dependency> @@ -132,6 +132,10 @@ <version>RELEASE</version> <scope>compile</scope> </dependency> <dependency> <groupId>com.github.pagehelper</groupId> <artifactId>pagehelper-spring-boot-starter</artifactId> </dependency> </dependencies> <build>