123
This commit is contained in:
@@ -43,6 +43,7 @@ public class UserInfo {
|
||||
private BigDecimal payIncomeRate;
|
||||
/**
|
||||
*/
|
||||
@Deprecated
|
||||
private BigDecimal pointRate;
|
||||
/**
|
||||
* 登录次数
|
||||
|
||||
@@ -64,7 +64,7 @@ public enum SystemConfigEnum {
|
||||
/**
|
||||
* 抽奖和积分
|
||||
*/
|
||||
DEFAULT_PAY_POINT_RATE("0", "默认分销上级充值的积分提成",SystemConfigGroupEnum.BUSINESS,new RateAllowZeroSystemConfigCheck()),
|
||||
DEFAULT_PAY_POINT_RATE("0", "分销上级充值的积分提成",SystemConfigGroupEnum.DRAW,new RateAllowZeroSystemConfigCheck()),
|
||||
OPEN_DRAW_WOMEN("1","是否开启女用户积分抽奖",SystemConfigGroupEnum.DRAW,new BooleanSystemConfigCheck()),
|
||||
OPEN_DRAW_MAN("1","是否开启男用户积分抽奖",SystemConfigGroupEnum.DRAW,new BooleanSystemConfigCheck()),
|
||||
WOMEN_DRAW_POINT("100","女用户抽奖分数",SystemConfigGroupEnum.DRAW,new NumberSystemConfigCheck()),
|
||||
|
||||
@@ -6,8 +6,10 @@ import com.ruoyi.cai.domain.*;
|
||||
import com.ruoyi.cai.dto.AddPointAdminDto;
|
||||
import com.ruoyi.cai.enums.ConsumeLogStatus;
|
||||
import com.ruoyi.cai.enums.PointLogType;
|
||||
import com.ruoyi.cai.enums.SystemConfigEnum;
|
||||
import com.ruoyi.cai.lottery.PointManager;
|
||||
import com.ruoyi.cai.manager.IdManager;
|
||||
import com.ruoyi.cai.manager.SystemConfigManager;
|
||||
import com.ruoyi.cai.mapper.AccountMapper;
|
||||
import com.ruoyi.cai.mapper.PointRecordLogMapper;
|
||||
import com.ruoyi.cai.service.*;
|
||||
@@ -19,6 +21,7 @@ import org.springframework.stereotype.Service;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import java.math.BigDecimal;
|
||||
import java.time.LocalDateTime;
|
||||
|
||||
/**
|
||||
@@ -39,6 +42,8 @@ public class PointRecordLogServiceImpl extends ServiceImpl<PointRecordLogMapper,
|
||||
@Resource
|
||||
private AccountMapper accountMapper;
|
||||
@Autowired
|
||||
private SystemConfigManager systemConfigManager;
|
||||
@Autowired
|
||||
private PointChangeLogService pointChangeLogService;
|
||||
@Autowired
|
||||
private PointManager pointManager;
|
||||
@@ -66,8 +71,8 @@ public class PointRecordLogServiceImpl extends ServiceImpl<PointRecordLogMapper,
|
||||
if(userInvite != null){
|
||||
User oneUser = userService.getById(userInvite.getInviteId());
|
||||
if(oneUser != null && oneUser.getStatus() == 0){
|
||||
UserInfo inviteUserInfo = userInfoService.getByUserId(userInvite.getInviteId());
|
||||
pointLog.setOneRate(inviteUserInfo.getPointRate());
|
||||
BigDecimal payPointRate = systemConfigManager.getSystemConfigOfBigDecimal(SystemConfigEnum.DEFAULT_PAY_POINT_RATE);
|
||||
pointLog.setOneRate(payPointRate);
|
||||
pointLog.setOneUserId(oneUser.getId());
|
||||
pointLog.setOneUsercode(oneUser.getUsercode());
|
||||
pointLog.setOnePhone(oneUser.getMobile());
|
||||
@@ -102,8 +107,8 @@ public class PointRecordLogServiceImpl extends ServiceImpl<PointRecordLogMapper,
|
||||
if(userInvite != null){
|
||||
User oneUser = userService.getById(userInvite.getInviteId());
|
||||
if(oneUser != null && oneUser.getStatus() == 0){
|
||||
UserInfo userInfo = userInfoService.getByUserId(userInvite.getUserId());
|
||||
pointLog.setOneRate(userInfo.getPointRate());
|
||||
BigDecimal payPointRate = systemConfigManager.getSystemConfigOfBigDecimal(SystemConfigEnum.DEFAULT_PAY_POINT_RATE);
|
||||
pointLog.setOneRate(payPointRate);
|
||||
pointLog.setOneUserId(oneUser.getId());
|
||||
pointLog.setOneUsercode(oneUser.getUsercode());
|
||||
pointLog.setOnePhone(oneUser.getMobile());
|
||||
|
||||
Reference in New Issue
Block a user