## 直推收益、平级收益处理;
This commit is contained in:
parent
9f8b77867c
commit
fe382acca8
|
@ -146,7 +146,7 @@ public class CuMemberBonusController extends BaseController {
|
||||||
bonusParam.setPkCountry(SecurityUtils.getPkCountry());
|
bonusParam.setPkCountry(SecurityUtils.getPkCountry());
|
||||||
//获取管理员权限《角色地区范围、 体系列表、团队列表)
|
//获取管理员权限《角色地区范围、 体系列表、团队列表)
|
||||||
Date date = DateUtils.currentDate();
|
Date date = DateUtils.currentDate();
|
||||||
if(bonusParam.getStartDate()==null||bonusParam.getEndDate()==null){
|
if (null == bonusParam.getStartDate() || null == bonusParam.getEndDate()) {
|
||||||
bonusParam.setStartDate(DateUtils.currentMonthFirstDate());
|
bonusParam.setStartDate(DateUtils.currentMonthFirstDate());
|
||||||
bonusParam.setEndDate(DateUtils.beforeDate(1, ChronoUnit.DAYS, date));
|
bonusParam.setEndDate(DateUtils.beforeDate(1, ChronoUnit.DAYS, date));
|
||||||
}
|
}
|
||||||
|
|
|
@ -45,11 +45,11 @@ import java.util.*;
|
||||||
public abstract class BonusSettleHandle {
|
public abstract class BonusSettleHandle {
|
||||||
|
|
||||||
@DubboReference
|
@DubboReference
|
||||||
protected ISaOrderServiceApi saOrderServiceApi;
|
ISaOrderServiceApi saOrderServiceApi;
|
||||||
@DubboReference
|
@DubboReference
|
||||||
protected IBonusItemsServiceApi bonusItemsServiceApi;
|
IBonusItemsServiceApi bonusItemsServiceApi;
|
||||||
@DubboReference
|
@DubboReference
|
||||||
private ICurrencyServiceApi currencyServiceApi;
|
ICurrencyServiceApi currencyServiceApi;
|
||||||
|
|
||||||
protected ICuMemberTreeService cuMemberTreeService;
|
protected ICuMemberTreeService cuMemberTreeService;
|
||||||
|
|
||||||
|
@ -655,33 +655,12 @@ public abstract class BonusSettleHandle {
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
* 获得 直推级差收益的备注
|
||||||
|
*
|
||||||
* @param saOrderExt 订单编号
|
* @param saOrderExt 订单编号
|
||||||
* @param cuMemberBonusRange 报单服务费
|
* @param cuMemberBonusRange 报单服务费
|
||||||
* @param sourceMemberRangeExt 提供奖金的人
|
* @param sourceMemberRangeExt 提供奖金的人
|
||||||
* @param targetMemberRangeExt 获得奖金的人
|
* @param targetMemberRangeExt 获得奖金的人
|
||||||
* @Description: 获得 报单服务费收益的备注
|
|
||||||
* @return: String
|
|
||||||
* @Author: sui q
|
|
||||||
* @Date: 2022/11/17 11:22
|
|
||||||
*/
|
|
||||||
protected void rangeRemark(SaOrderExt saOrderExt, CuMemberBonusRange cuMemberBonusRange, CuMemberRangeExt sourceMemberRangeExt,
|
|
||||||
CuMemberRangeExt targetMemberRangeExt) {
|
|
||||||
String remark = String.format(BonusMsgConstants.RANGE, saOrderExt.getOrderCode(),
|
|
||||||
sourceMemberRangeExt.getMemberCode() + sourceMemberRangeExt.getMemberName(),
|
|
||||||
targetMemberRangeExt.getMemberCode() + targetMemberRangeExt.getMemberName(),
|
|
||||||
cuMemberBonusRange.getCalAchieve(), sourceMemberRangeExt.getRangeAwardsValue(), targetMemberRangeExt.getRangeAwardsValue());
|
|
||||||
cuMemberBonusRange.setRemark(remark);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @param saOrderExt 订单编号
|
|
||||||
* @param cuMemberBonusRange 报单服务费
|
|
||||||
* @param sourceMemberRangeExt 提供奖金的人
|
|
||||||
* @param targetMemberRangeExt 获得奖金的人
|
|
||||||
* @Description: 获得 报单服务费收益的备注
|
|
||||||
* @return: String
|
|
||||||
* @Author: sui q
|
|
||||||
* @Date: 2022/11/17 11:22
|
|
||||||
*/
|
*/
|
||||||
protected void rangeRetailRemark(SaOrderExt saOrderExt, CuMemberBonusRange cuMemberBonusRange, CuMemberRetailRangeExt sourceMemberRangeExt,
|
protected void rangeRetailRemark(SaOrderExt saOrderExt, CuMemberBonusRange cuMemberBonusRange, CuMemberRetailRangeExt sourceMemberRangeExt,
|
||||||
CuMemberRetailRangeExt targetMemberRangeExt) {
|
CuMemberRetailRangeExt targetMemberRangeExt) {
|
||||||
|
@ -710,32 +689,13 @@ public abstract class BonusSettleHandle {
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 获得 报单服务费收益的备注
|
* 获得 平级收益的备注
|
||||||
*
|
*
|
||||||
* @param saOrderExt 订单编号
|
* @param saOrderExt 订单编号
|
||||||
* @param cuMemberBonusRange 报单服务费
|
* @param cuMemberBonusRange 报单服务费
|
||||||
* @param sourceMemberRangeExt 提供奖金的人
|
* @param sourceMemberRangeExt 提供奖金的人
|
||||||
* @param targetMemberRangeExt 获得奖金的人
|
* @param targetMemberRangeExt 获得奖金的人
|
||||||
*/
|
*/
|
||||||
protected void oriRangeRemark(SaOrderExt saOrderExt, CuMemberBonusRange cuMemberBonusRange, CuMemberRangeExt sourceMemberRangeExt,
|
|
||||||
CuMemberRangeExt targetMemberRangeExt) {
|
|
||||||
String remark = String.format(BonusMsgConstants.ORI_RANGE, saOrderExt.getOrderCode(),
|
|
||||||
sourceMemberRangeExt.getMemberCode() + sourceMemberRangeExt.getMemberName(),
|
|
||||||
targetMemberRangeExt.getMemberCode() + targetMemberRangeExt.getMemberName(),
|
|
||||||
cuMemberBonusRange.getCalAchieve(), targetMemberRangeExt.getRangeAwardsValue());
|
|
||||||
cuMemberBonusRange.setRemark(remark);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @param saOrderExt 订单编号
|
|
||||||
* @param cuMemberBonusRange 报单服务费
|
|
||||||
* @param sourceMemberRangeExt 提供奖金的人
|
|
||||||
* @param targetMemberRangeExt 获得奖金的人
|
|
||||||
* @Description: 获得 报单服务费收益的备注
|
|
||||||
* @return: String
|
|
||||||
* @Author: sui q
|
|
||||||
* @Date: 2022/11/17 11:22
|
|
||||||
*/
|
|
||||||
protected void oriRetailRangeRemark(SaOrderExt saOrderExt, CuMemberBonusRange cuMemberBonusRange, CuMemberRetailRangeExt sourceMemberRangeExt,
|
protected void oriRetailRangeRemark(SaOrderExt saOrderExt, CuMemberBonusRange cuMemberBonusRange, CuMemberRetailRangeExt sourceMemberRangeExt,
|
||||||
CuMemberRetailRangeExt targetMemberRangeExt) {
|
CuMemberRetailRangeExt targetMemberRangeExt) {
|
||||||
String remark = String.format(BonusMsgConstants.ORI_RANGE, saOrderExt.getOrderCode(),
|
String remark = String.format(BonusMsgConstants.ORI_RANGE, saOrderExt.getOrderCode(),
|
||||||
|
|
|
@ -1278,10 +1278,10 @@ public class BonusSettleRangeHandle extends BonusSettleHandle {
|
||||||
// // 直推级差收益
|
// // 直推级差收益
|
||||||
// BigDecimal calBonusIncome = BigDecimal.ZERO;
|
// BigDecimal calBonusIncome = BigDecimal.ZERO;
|
||||||
|
|
||||||
// 商品价格(没有乘商品数量)
|
// 商品最终价格
|
||||||
BigDecimal waresPrice = saOrderItems.getWaresPrice();
|
BigDecimal waresPrice = saOrderItems.getWaresPrice();
|
||||||
// 商品数量
|
// 商品数量
|
||||||
Integer waresQuantity = saOrderItems.getWaresQuantity();
|
BigDecimal waresQuantityBig = new BigDecimal(saOrderItems.getWaresQuantity());
|
||||||
// 前一个会员等级
|
// 前一个会员等级
|
||||||
int beforeGradeValue = 0;
|
int beforeGradeValue = 0;
|
||||||
// 前一个会员等级的平级收益人数
|
// 前一个会员等级的平级收益人数
|
||||||
|
@ -1320,19 +1320,19 @@ public class BonusSettleRangeHandle extends BonusSettleHandle {
|
||||||
// 前一个会员等级为0,肯定为第一次处理,直接处理直推级差收益
|
// 前一个会员等级为0,肯定为第一次处理,直接处理直推级差收益
|
||||||
if (EGrade.HAI_FAN.getValue() == calGradeValue) {
|
if (EGrade.HAI_FAN.getValue() == calGradeValue) {
|
||||||
// VIP,拿1份40
|
// VIP,拿1份40
|
||||||
rangeBonusIncome = RetailConstants.RANGE_BONUS;
|
rangeBonusIncome = RetailConstants.RANGE_BONUS.multiply(waresQuantityBig);
|
||||||
} else if (EGrade.YOU_KE.getValue() == calGradeValue) {
|
} else if (EGrade.YOU_KE.getValue() == calGradeValue) {
|
||||||
// SVIP,拿2份40
|
// SVIP,拿2份40
|
||||||
rangeBonusIncome = RetailConstants.RANGE_BONUS.multiply(new BigDecimal("2"));
|
rangeBonusIncome = RetailConstants.RANGE_BONUS.multiply(waresQuantityBig).multiply(new BigDecimal("2"));
|
||||||
} else if (EGrade.MAKER.getValue() == calGradeValue) {
|
} else if (EGrade.MAKER.getValue() == calGradeValue) {
|
||||||
// 卓越,拿3份40
|
// 卓越,拿3份40
|
||||||
rangeBonusIncome = RetailConstants.RANGE_BONUS.multiply(new BigDecimal("3"));
|
rangeBonusIncome = RetailConstants.RANGE_BONUS.multiply(waresQuantityBig).multiply(new BigDecimal("3"));
|
||||||
} else if (EGrade.VIP.getValue() == calGradeValue) {
|
} else if (EGrade.VIP.getValue() == calGradeValue) {
|
||||||
// 首席,拿4份40
|
// 首席,拿4份40
|
||||||
rangeBonusIncome = RetailConstants.RANGE_BONUS.multiply(new BigDecimal("4"));
|
rangeBonusIncome = RetailConstants.RANGE_BONUS.multiply(waresQuantityBig).multiply(new BigDecimal("4"));
|
||||||
} else if (EGrade.S_VIP.getValue() == calGradeValue) {
|
} else if (EGrade.S_VIP.getValue() == calGradeValue) {
|
||||||
// 合伙人,拿5份40
|
// 合伙人,拿5份40
|
||||||
rangeBonusIncome = RetailConstants.RANGE_BONUS.multiply(new BigDecimal("5"));
|
rangeBonusIncome = RetailConstants.RANGE_BONUS.multiply(waresQuantityBig).multiply(new BigDecimal("5"));
|
||||||
}
|
}
|
||||||
// 赋值前一个会员等级
|
// 赋值前一个会员等级
|
||||||
beforeGradeValue = calGradeValue;
|
beforeGradeValue = calGradeValue;
|
||||||
|
@ -1361,7 +1361,7 @@ public class BonusSettleRangeHandle extends BonusSettleHandle {
|
||||||
int tmpGradeVal = (calGradeValue - beforeGradeValue) / 10;
|
int tmpGradeVal = (calGradeValue - beforeGradeValue) / 10;
|
||||||
|
|
||||||
// 新等级的直推级差收益
|
// 新等级的直推级差收益
|
||||||
rangeBonusIncome = RetailConstants.RANGE_BONUS.multiply(new BigDecimal(tmpGradeVal));
|
rangeBonusIncome = RetailConstants.RANGE_BONUS.multiply(waresQuantityBig).multiply(new BigDecimal(tmpGradeVal));
|
||||||
// 直推级差收益 = 新等级的直推级差收益 - 上一等级的平级收益
|
// 直推级差收益 = 新等级的直推级差收益 - 上一等级的平级收益
|
||||||
rangeBonusIncome = rangeBonusIncome.subtract(beforeSameBonus);
|
rangeBonusIncome = rangeBonusIncome.subtract(beforeSameBonus);
|
||||||
|
|
||||||
|
@ -1382,7 +1382,8 @@ public class BonusSettleRangeHandle extends BonusSettleHandle {
|
||||||
int pkBonusItems = getPkBonusItems(bonusConfigDTO, targetMemberRangeExt.getPkSettleCountry(), EBonusItems.RETAIL_RANGE_INCOME.getValue());
|
int pkBonusItems = getPkBonusItems(bonusConfigDTO, targetMemberRangeExt.getPkSettleCountry(), EBonusItems.RETAIL_RANGE_INCOME.getValue());
|
||||||
CuMemberBonusRange cuMemberBonusRange = getCuMemberRetailBonusRange(saOrderExt, targetMemberRangeExt, cuMemberBonus, pkBonusItems);
|
CuMemberBonusRange cuMemberBonusRange = getCuMemberRetailBonusRange(saOrderExt, targetMemberRangeExt, cuMemberBonus, pkBonusItems);
|
||||||
cuMemberBonusRange.setCalValue(BigDecimal.ZERO);
|
cuMemberBonusRange.setCalValue(BigDecimal.ZERO);
|
||||||
cuMemberBonusRange.setPretaxIncome(rangeBonusIncome.multiply(new BigDecimal(waresQuantity)));
|
cuMemberBonusRange.setCalAchieve(waresPrice);
|
||||||
|
cuMemberBonusRange.setPretaxIncome(rangeBonusIncome);
|
||||||
cuMemberBonusRange.setPkRange(targetMemberRangeExt.getPkGrade());
|
cuMemberBonusRange.setPkRange(targetMemberRangeExt.getPkGrade());
|
||||||
cuMemberBonusRange.setPkBeforeRange(sourceMemberRangeExt.getPkGrade());
|
cuMemberBonusRange.setPkBeforeRange(sourceMemberRangeExt.getPkGrade());
|
||||||
cuMemberBonusRange.setPkOrderItems(saOrderItems.getPkId());
|
cuMemberBonusRange.setPkOrderItems(saOrderItems.getPkId());
|
||||||
|
@ -1400,8 +1401,9 @@ public class BonusSettleRangeHandle extends BonusSettleHandle {
|
||||||
targetMemberRangeExt.getIncomeStatus(), targetMemberRangeExt.getPkSettleCountry(), targetMemberRangeExt.getPkRate() == null ? saOrderExt.getPkRate() : targetMemberRangeExt.getPkRate());
|
targetMemberRangeExt.getIncomeStatus(), targetMemberRangeExt.getPkSettleCountry(), targetMemberRangeExt.getPkRate() == null ? saOrderExt.getPkRate() : targetMemberRangeExt.getPkRate());
|
||||||
int pkBonusItems = getPkBonusItems(bonusConfigDTO, targetMemberRangeExt.getPkSettleCountry(), EBonusItems.RETAIL_SAME_LEVEL_INCOME.getValue());
|
int pkBonusItems = getPkBonusItems(bonusConfigDTO, targetMemberRangeExt.getPkSettleCountry(), EBonusItems.RETAIL_SAME_LEVEL_INCOME.getValue());
|
||||||
CuMemberBonusRange oriMemberBonusRange = getCuMemberRetailBonusRange(saOrderExt, targetMemberRangeExt, cuMemberBonus, pkBonusItems);
|
CuMemberBonusRange oriMemberBonusRange = getCuMemberRetailBonusRange(saOrderExt, targetMemberRangeExt, cuMemberBonus, pkBonusItems);
|
||||||
oriMemberBonusRange.setCalValue(BigDecimal.valueOf(2));
|
oriMemberBonusRange.setCalValue(RetailConstants.SAME_RATIO);
|
||||||
oriMemberBonusRange.setPretaxIncome(sameBonusIncome.multiply(new BigDecimal(waresQuantity)));
|
oriMemberBonusRange.setCalAchieve(waresPrice);
|
||||||
|
oriMemberBonusRange.setPretaxIncome(sameBonusIncome);
|
||||||
oriMemberBonusRange.setPkRange(targetMemberRangeExt.getPkGrade());
|
oriMemberBonusRange.setPkRange(targetMemberRangeExt.getPkGrade());
|
||||||
oriMemberBonusRange.setPkBeforeRange(sourceMemberRangeExt.getPkGrade());
|
oriMemberBonusRange.setPkBeforeRange(sourceMemberRangeExt.getPkGrade());
|
||||||
oriMemberBonusRange.setPkOrderItems(saOrderItems.getPkId());
|
oriMemberBonusRange.setPkOrderItems(saOrderItems.getPkId());
|
||||||
|
|
|
@ -9,27 +9,11 @@ import java.math.BigDecimal;
|
||||||
import java.util.Date;
|
import java.util.Date;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @description: 奖金明细表
|
* 奖金明细表
|
||||||
* @author: sui q
|
|
||||||
* @time: 2023/5/20 15:31
|
|
||||||
* @classname: CuMemberBonusVO
|
|
||||||
* @package_name: com.hzs.member.bonus.vo
|
|
||||||
* version 1.0.0
|
|
||||||
*/
|
*/
|
||||||
@Data
|
@Data
|
||||||
public class CuMemberBonusVO implements Serializable {
|
public class CuMemberBonusVO implements Serializable {
|
||||||
|
|
||||||
// /**
|
|
||||||
// * 需要转换人民币的
|
|
||||||
// */
|
|
||||||
// public static final String[] INCOME_ARRAY = new String[]{
|
|
||||||
// "directIncome", "expandIncome", "expandNoCapping", "expandCapping",
|
|
||||||
// "coachIncome", "shareIncome", "serviceIncome", "cloudDirectIncome",
|
|
||||||
// "cloudPurIncome", "cloudRepurIncome", "repurPushIncome", "repurRangeIncome", "repurExpandIncome",
|
|
||||||
// "repurCoupon", "repurCouponShare", "backPoints", "serviceSpend",
|
|
||||||
// "globalPoints", "carAwardPoints", "storeIncome", "hiFunIncome",
|
|
||||||
// "makerDirectIncome", "makerShareIncome", "makerRealSubtotal", "purRealSubtotal",
|
|
||||||
// "cloudRealSubtotal", "repurRealSubtotal", "repurCouponSubtotal", "realIncomeTotal"};
|
|
||||||
/**
|
/**
|
||||||
* 主键
|
* 主键
|
||||||
*/
|
*/
|
||||||
|
@ -102,185 +86,60 @@ public class CuMemberBonusVO implements Serializable {
|
||||||
*/
|
*/
|
||||||
private Integer grantStatus;
|
private Integer grantStatus;
|
||||||
|
|
||||||
// /**
|
/**
|
||||||
// * 直推收益
|
* 需要转换人民币的
|
||||||
// */
|
*/
|
||||||
// @Excel(name = "直推收益", scale = 2)
|
public static final String[] INCOME_ARRAY = new String[]{
|
||||||
// private BigDecimal directIncomeOri;
|
"backPoints", "retailRangeIncome", "retailSameLevelIncome", "retailAreaIncome",
|
||||||
//
|
"retailBenefitRangeIncome", "retailBenefitAvgIncome",
|
||||||
// /**
|
"retailBenefitIncome", "retailRealSubtotal", "realIncomeTotal"};
|
||||||
// * 直推收益
|
|
||||||
// */
|
|
||||||
// @Excel(name = "直推收益($)", scale = 2)
|
private BigDecimal retailRangeIncome;
|
||||||
// private BigDecimal directIncome;
|
/**
|
||||||
//
|
* 直推收益
|
||||||
// /**
|
*/
|
||||||
// * 拓展收益
|
@Excel(name = "直推收益", scale = 2)
|
||||||
// */
|
private BigDecimal retailRangeIncomeOri;
|
||||||
// @Excel(name = "拓展收益", scale = 2)
|
|
||||||
// private BigDecimal expandIncomeOri;
|
private BigDecimal retailSameLevelIncome;
|
||||||
//
|
/**
|
||||||
// /**
|
* 平级收益
|
||||||
// * 拓展收益
|
*/
|
||||||
// */
|
@Excel(name = "平级收益", scale = 2)
|
||||||
// @Excel(name = "拓展收益($)", scale = 2)
|
private BigDecimal retailSameLevelIncomeOri;
|
||||||
// private BigDecimal expandIncome;
|
|
||||||
//
|
private BigDecimal retailAreaIncome;
|
||||||
// /**
|
/**
|
||||||
// * 拓展无封 (拓展收益按等级正常比例结算,并 拓展收益按等级正常比例结算 无封顶)
|
* 区域分红
|
||||||
// */
|
*/
|
||||||
// private BigDecimal expandNoCapping;
|
@Excel(name = "区域分红", scale = 2)
|
||||||
//
|
private BigDecimal retailAreaIncomeOri;
|
||||||
// /**
|
|
||||||
// * 拓展封顶 (拓展收益按等级正常比例结算,不按4-N结算,根据配置的封顶值限制最大收益)
|
/**
|
||||||
// */
|
* 新零售福利极差收益
|
||||||
// private BigDecimal expandCapping;
|
*/
|
||||||
//
|
private BigDecimal retailBenefitRangeIncome;
|
||||||
//
|
|
||||||
// /**
|
@Excel(name = " 福利极差收益", scale = 2)
|
||||||
// * 拓展无封 (拓展收益按等级正常比例结算,并 拓展收益按等级正常比例结算 无封顶)
|
private BigDecimal retailBenefitRangeIncomeOri;
|
||||||
// */
|
|
||||||
// private BigDecimal expandNoCappingOri;
|
/**
|
||||||
//
|
* 新零售福利平均收益
|
||||||
// /**
|
*/
|
||||||
// * 拓展封顶 (拓展收益按等级正常比例结算,不按4-N结算,根据配置的封顶值限制最大收益)
|
private BigDecimal retailBenefitAvgIncome;
|
||||||
// */
|
|
||||||
// private BigDecimal expandCappingOri;
|
@Excel(name = " 福利平均收益", scale = 2)
|
||||||
//
|
private BigDecimal retailBenefitAvgIncomeOri;
|
||||||
// /**
|
|
||||||
// * 辅导收益
|
/**
|
||||||
// */
|
* 新零售福利加权收益
|
||||||
// @Excel(name = "辅导收益", scale = 2)
|
*/
|
||||||
// private BigDecimal coachIncomeOri;
|
private BigDecimal retailBenefitIncome;
|
||||||
//
|
|
||||||
// /**
|
@Excel(name = " 福利加权收益", scale = 2)
|
||||||
// * 辅导收益
|
private BigDecimal retailBenefitIncomeOri;
|
||||||
// */
|
|
||||||
// @Excel(name = "辅导收益($)", scale = 2)
|
|
||||||
// private BigDecimal coachIncome;
|
|
||||||
//
|
|
||||||
// /**
|
|
||||||
// * 分红收益
|
|
||||||
// */
|
|
||||||
// @Excel(name = "分红收益", scale = 2)
|
|
||||||
// private BigDecimal shareIncomeOri;
|
|
||||||
//
|
|
||||||
// /**
|
|
||||||
// * 分红收益
|
|
||||||
// */
|
|
||||||
// @Excel(name = "分红收益($)", scale = 2)
|
|
||||||
// private BigDecimal shareIncome;
|
|
||||||
//
|
|
||||||
// /**
|
|
||||||
// * 报单收益
|
|
||||||
// */
|
|
||||||
// @Excel(name = "报单收益", scale = 2)
|
|
||||||
// private BigDecimal serviceIncomeOri;
|
|
||||||
//
|
|
||||||
// /**
|
|
||||||
// * 报单收益
|
|
||||||
// */
|
|
||||||
// @Excel(name = "服务收益($)", scale = 2)
|
|
||||||
// private BigDecimal serviceIncome;
|
|
||||||
//
|
|
||||||
//
|
|
||||||
// /**
|
|
||||||
// * 云代直推收益
|
|
||||||
// */
|
|
||||||
// @Excel(name = "云代直推收益", scale = 2)
|
|
||||||
// private BigDecimal cloudDirectIncomeOri;
|
|
||||||
//
|
|
||||||
// /**
|
|
||||||
// * 云代直推收益
|
|
||||||
// */
|
|
||||||
// @Excel(name = "云代直推收益($)", scale = 2)
|
|
||||||
// private BigDecimal cloudDirectIncome;
|
|
||||||
//
|
|
||||||
// /**
|
|
||||||
// * 云代首购收益
|
|
||||||
// */
|
|
||||||
// @Excel(name = "云代首购收益", scale = 2)
|
|
||||||
// private BigDecimal cloudPurIncomeOri;
|
|
||||||
//
|
|
||||||
// /**
|
|
||||||
// * 云代首购收益
|
|
||||||
// */
|
|
||||||
// @Excel(name = "云代首购收益($)", scale = 2)
|
|
||||||
// private BigDecimal cloudPurIncome;
|
|
||||||
//
|
|
||||||
// /**
|
|
||||||
// * 云代复购收益
|
|
||||||
// */
|
|
||||||
// @Excel(name = "云代复购收益", scale = 2)
|
|
||||||
// private BigDecimal cloudRepurIncomeOri;
|
|
||||||
//
|
|
||||||
// /**
|
|
||||||
// * 云代复购收益
|
|
||||||
// */
|
|
||||||
// @Excel(name = "云代复购收益($)", scale = 2)
|
|
||||||
// private BigDecimal cloudRepurIncome;
|
|
||||||
//
|
|
||||||
// /**
|
|
||||||
// * 复购级差收益
|
|
||||||
// */
|
|
||||||
// @Excel(name = "复购推荐收益", scale = 2)
|
|
||||||
// private BigDecimal repurPushIncomeOri;
|
|
||||||
//
|
|
||||||
// /**
|
|
||||||
// * 复购级差收益
|
|
||||||
// */
|
|
||||||
// @Excel(name = "复购推荐收益", scale = 2)
|
|
||||||
// private BigDecimal repurPushIncome;
|
|
||||||
//
|
|
||||||
// /**
|
|
||||||
// * 复购级差收益
|
|
||||||
// */
|
|
||||||
// @Excel(name = "复购级差收益", scale = 2)
|
|
||||||
// private BigDecimal repurRangeIncomeOri;
|
|
||||||
//
|
|
||||||
// /**
|
|
||||||
// * 复购级差收益
|
|
||||||
// */
|
|
||||||
// @Excel(name = "复购级差收益($)", scale = 2)
|
|
||||||
// private BigDecimal repurRangeIncome;
|
|
||||||
//
|
|
||||||
//
|
|
||||||
// /**
|
|
||||||
// * 复购拓展收益
|
|
||||||
// */
|
|
||||||
// @Excel(name = "复购拓展收益", scale = 2)
|
|
||||||
// private BigDecimal repurExpandIncomeOri;
|
|
||||||
//
|
|
||||||
// /**
|
|
||||||
// * 复购拓展收益
|
|
||||||
// */
|
|
||||||
// @Excel(name = "复购拓展收益($)", scale = 2)
|
|
||||||
// private BigDecimal repurExpandIncome;
|
|
||||||
//
|
|
||||||
// /**
|
|
||||||
// * 复购卷
|
|
||||||
// */
|
|
||||||
// @Excel(name = "复购卷", scale = 2)
|
|
||||||
// private BigDecimal repurCouponOri;
|
|
||||||
//
|
|
||||||
// /**
|
|
||||||
// * 复购卷
|
|
||||||
// */
|
|
||||||
// @Excel(name = "复购卷($)", scale = 2)
|
|
||||||
// private BigDecimal repurCoupon;
|
|
||||||
//
|
|
||||||
// /**
|
|
||||||
// * 复购券均分收益
|
|
||||||
// */
|
|
||||||
// @Excel(name = "复购券均分", scale = 2)
|
|
||||||
// private BigDecimal repurCouponShareOri;
|
|
||||||
//
|
|
||||||
// /**
|
|
||||||
// * 复购券均分收益
|
|
||||||
// */
|
|
||||||
// @Excel(name = "复购券均分($)", scale = 2)
|
|
||||||
// private BigDecimal repurCouponShare;
|
|
||||||
//
|
|
||||||
/**
|
/**
|
||||||
* 商城重消
|
* 商城重消
|
||||||
*/
|
*/
|
||||||
|
@ -290,184 +149,11 @@ public class CuMemberBonusVO implements Serializable {
|
||||||
/**
|
/**
|
||||||
* 商城重消
|
* 商城重消
|
||||||
*/
|
*/
|
||||||
@Excel(name = "商城重消($)", scale = 2)
|
|
||||||
private BigDecimal backPoints;
|
private BigDecimal backPoints;
|
||||||
//
|
|
||||||
// /**
|
|
||||||
// * 平台服务费
|
|
||||||
// */
|
|
||||||
// @Excel(name = "平台服务费", scale = 2)
|
|
||||||
// private BigDecimal serviceSpendOri;
|
|
||||||
//
|
|
||||||
// /**
|
|
||||||
// * 平台服务费
|
|
||||||
// */
|
|
||||||
// @Excel(name = "平台服务费($)", scale = 2)
|
|
||||||
// private BigDecimal serviceSpend;
|
|
||||||
//
|
|
||||||
// /**
|
|
||||||
// * 环球积分
|
|
||||||
// */
|
|
||||||
// @Excel(name = "直推极差", scale = 2)
|
|
||||||
// private BigDecimal globalPointsOri;
|
|
||||||
//
|
|
||||||
// /**
|
|
||||||
// * 环球积分
|
|
||||||
// */
|
|
||||||
// @Excel(name = "直推极差($)", scale = 2)
|
|
||||||
// private BigDecimal globalPoints;
|
|
||||||
//
|
|
||||||
// /**
|
|
||||||
// * 车奖积分
|
|
||||||
// */
|
|
||||||
// @Excel(name = "车奖积分", scale = 2)
|
|
||||||
// private BigDecimal carAwardPointsOri;
|
|
||||||
//
|
|
||||||
//
|
|
||||||
// /**
|
|
||||||
// * 车奖积分
|
|
||||||
// */
|
|
||||||
// @Excel(name = "车奖积分($)", scale = 2)
|
|
||||||
// private BigDecimal carAwardPoints;
|
|
||||||
//
|
|
||||||
// /**
|
|
||||||
// * 店铺收益
|
|
||||||
// */
|
|
||||||
// @Excel(name = "店铺收益", scale = 2)
|
|
||||||
// private BigDecimal storeIncomeOri;
|
|
||||||
//
|
|
||||||
// /**
|
|
||||||
// * 店铺收益
|
|
||||||
// */
|
|
||||||
// @Excel(name = "店铺收益($)", scale = 2)
|
|
||||||
// private BigDecimal storeIncome;
|
|
||||||
//
|
|
||||||
// /**
|
|
||||||
// * 嗨粉推荐收益
|
|
||||||
// */
|
|
||||||
// @Excel(name = "嗨粉推荐收益", scale = 2)
|
|
||||||
// private BigDecimal hiFunIncomeOri;
|
|
||||||
//
|
|
||||||
// /**
|
|
||||||
// * 嗨粉推荐收益
|
|
||||||
// */
|
|
||||||
// @Excel(name = "嗨粉推荐收益($)", scale = 2)
|
|
||||||
// private BigDecimal hiFunIncome;
|
|
||||||
//
|
|
||||||
// /**
|
|
||||||
// * 首购实发小计
|
|
||||||
// */
|
|
||||||
// @Excel(name = "首购实发小计", scale = 2)
|
|
||||||
// private BigDecimal purRealSubtotalOri;
|
|
||||||
//
|
|
||||||
// /**
|
|
||||||
// * 首购实发小计
|
|
||||||
// */
|
|
||||||
// @Excel(name = "首购实发小计($)", scale = 2)
|
|
||||||
// private BigDecimal purRealSubtotal;
|
|
||||||
//
|
|
||||||
// /**
|
|
||||||
// * 云代实发小计
|
|
||||||
// */
|
|
||||||
// @Excel(name = "云代实发小计", scale = 2)
|
|
||||||
// private BigDecimal cloudRealSubtotalOri;
|
|
||||||
//
|
|
||||||
// /**
|
|
||||||
// * 云代实发小计
|
|
||||||
// */
|
|
||||||
// @Excel(name = "云代实发小计($)", scale = 2)
|
|
||||||
// private BigDecimal cloudRealSubtotal;
|
|
||||||
//
|
|
||||||
// /**
|
|
||||||
// * 复购实发小计
|
|
||||||
// */
|
|
||||||
// @Excel(name = "复购实发小计", scale = 2)
|
|
||||||
// private BigDecimal repurRealSubtotalOri;
|
|
||||||
//
|
|
||||||
// /**
|
|
||||||
// * 复购实发小计
|
|
||||||
// */
|
|
||||||
// @Excel(name = "复购实发小计($)", scale = 2)
|
|
||||||
// private BigDecimal repurRealSubtotal;
|
|
||||||
//
|
|
||||||
// /**
|
|
||||||
// * 复购券小计
|
|
||||||
// */
|
|
||||||
// @Excel(name = "复购券实发小计", scale = 2)
|
|
||||||
// private BigDecimal repurCouponSubtotalOri;
|
|
||||||
//
|
|
||||||
// /**
|
|
||||||
// * 复购券小计
|
|
||||||
// */
|
|
||||||
// @Excel(name = "复购券实发小计($)", scale = 2)
|
|
||||||
// private BigDecimal repurCouponSubtotal;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 需要转换人民币的
|
|
||||||
*/
|
|
||||||
public static final String[] INCOME_ARRAY = new String[]{
|
|
||||||
"backPoints","retailRangeIncome", "retailSameLevelIncome", "retailAreaIncome",
|
|
||||||
"retailBenefitRangeIncome","retailBenefitAvgIncome",
|
|
||||||
"retailBenefitIncome","retailRealSubtotal","realIncomeTotal"};
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 新零售极差收益
|
|
||||||
*/
|
|
||||||
@Excel(name = "新零售极差收益($)", scale = 2)
|
|
||||||
private BigDecimal retailRangeIncome;
|
|
||||||
|
|
||||||
@Excel(name = " 新零售极差收益", scale = 2)
|
|
||||||
private BigDecimal retailRangeIncomeOri;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 新零售平级收益
|
|
||||||
*/
|
|
||||||
@Excel(name = "平级收益($)", scale = 2)
|
|
||||||
private BigDecimal retailSameLevelIncome;
|
|
||||||
|
|
||||||
@Excel(name = " 平级收益", scale = 2)
|
|
||||||
private BigDecimal retailSameLevelIncomeOri;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 新零售区域收益
|
|
||||||
*/
|
|
||||||
@Excel(name = "区域收益($)", scale = 2)
|
|
||||||
private BigDecimal retailAreaIncome;
|
|
||||||
|
|
||||||
@Excel(name = " 区域收益", scale = 2)
|
|
||||||
private BigDecimal retailAreaIncomeOri;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 新零售福利极差收益
|
|
||||||
*/
|
|
||||||
@Excel(name = "福利极差收益($)", scale = 2)
|
|
||||||
private BigDecimal retailBenefitRangeIncome;
|
|
||||||
|
|
||||||
@Excel(name = " 福利极差收益", scale = 2)
|
|
||||||
private BigDecimal retailBenefitRangeIncomeOri;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 新零售福利平均收益
|
|
||||||
*/
|
|
||||||
@Excel(name = "福利平均收益($)", scale = 2)
|
|
||||||
private BigDecimal retailBenefitAvgIncome;
|
|
||||||
|
|
||||||
@Excel(name = " 福利平均收益", scale = 2)
|
|
||||||
private BigDecimal retailBenefitAvgIncomeOri;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 新零售福利加权收益
|
|
||||||
*/
|
|
||||||
@Excel(name = "福利加权收益($)", scale = 2)
|
|
||||||
private BigDecimal retailBenefitIncome;
|
|
||||||
|
|
||||||
@Excel(name = " 福利加权收益", scale = 2)
|
|
||||||
private BigDecimal retailBenefitIncomeOri;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 新零售收益小计
|
* 新零售收益小计
|
||||||
*/
|
*/
|
||||||
@Excel(name = "收益小计($)", scale = 2)
|
|
||||||
private BigDecimal retailRealSubtotal;
|
private BigDecimal retailRealSubtotal;
|
||||||
|
|
||||||
@Excel(name = " 收益小计", scale = 2)
|
@Excel(name = " 收益小计", scale = 2)
|
||||||
|
@ -479,10 +165,8 @@ public class CuMemberBonusVO implements Serializable {
|
||||||
@Excel(name = "实发收益总计", scale = 2)
|
@Excel(name = "实发收益总计", scale = 2)
|
||||||
private BigDecimal realIncomeTotalOri;
|
private BigDecimal realIncomeTotalOri;
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 实发收益总计
|
* 实发收益总计
|
||||||
*/
|
*/
|
||||||
@Excel(name = "实发收益总计($)", scale = 2)
|
|
||||||
private BigDecimal realIncomeTotal;
|
private BigDecimal realIncomeTotal;
|
||||||
}
|
}
|
||||||
|
|
|
@ -298,8 +298,11 @@
|
||||||
</if>
|
</if>
|
||||||
order by cp.settle_date desc
|
order by cp.settle_date desc
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
<select id="queryMemberBonusByConditionForServer" resultMap="CuMemberBonus">
|
<select id="queryMemberBonusByConditionForServer" resultMap="CuMemberBonus">
|
||||||
select cm.member_code,cm.member_name,cm.pk_settle_grade,cm.pk_awards,bv.vertex_name,ct.team_name,
|
select cm.member_code, cm.member_name,
|
||||||
|
cm.pk_settle_grade, cm.pk_awards,
|
||||||
|
bv.vertex_name, ct.team_name,
|
||||||
cb.period,cp.settle_date,cb.direct_income,cb.expand_income,cb.expand_no_capping,
|
cb.period,cp.settle_date,cb.direct_income,cb.expand_income,cb.expand_no_capping,
|
||||||
cb.expand_capping,cb.coach_income,cb.share_income,cb.service_income,cb.back_points,cb.service_spend,
|
cb.expand_capping,cb.coach_income,cb.share_income,cb.service_income,cb.back_points,cb.service_spend,
|
||||||
cb.pur_real_subtotal,cb.repur_push_income,cb.repur_range_income,cb.repur_expand_income,cb.repur_real_subtotal,
|
cb.pur_real_subtotal,cb.repur_push_income,cb.repur_range_income,cb.repur_expand_income,cb.repur_real_subtotal,
|
||||||
|
@ -311,9 +314,7 @@
|
||||||
cb.retail_benefit_range_income,cb.retail_benefit_avg_income,
|
cb.retail_benefit_range_income,cb.retail_benefit_avg_income,
|
||||||
cb.retail_benefit_income,cb.retail_real_subtotal,
|
cb.retail_benefit_income,cb.retail_real_subtotal,
|
||||||
cb.real_income_total,
|
cb.real_income_total,
|
||||||
cm.pk_vertex,
|
cm.pk_vertex, cm.service_code, cm.nick_name
|
||||||
cm.service_code,
|
|
||||||
cm.nick_name
|
|
||||||
from cu_member_bonus cb
|
from cu_member_bonus cb
|
||||||
inner join cu_member cm
|
inner join cu_member cm
|
||||||
on cb.pk_member = cm.pk_id
|
on cb.pk_member = cm.pk_id
|
||||||
|
|
|
@ -1,13 +1,11 @@
|
||||||
package com.hzs.system.config.controller.manage;
|
package com.hzs.system.config.controller.manage;
|
||||||
|
|
||||||
|
|
||||||
import cn.hutool.core.bean.BeanUtil;
|
import cn.hutool.core.bean.BeanUtil;
|
||||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||||
import com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper;
|
import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper;
|
||||||
import com.hzs.common.core.annotation.Log;
|
import com.hzs.common.core.annotation.Log;
|
||||||
import com.hzs.common.core.constant.CacheConstants;
|
import com.hzs.common.core.constant.CacheConstants;
|
||||||
import com.hzs.common.core.constant.msg.ConfigMsgConstants;
|
import com.hzs.common.core.constant.msg.ConfigMsgConstants;
|
||||||
import com.hzs.common.core.domain.R;
|
|
||||||
import com.hzs.common.core.enums.*;
|
import com.hzs.common.core.enums.*;
|
||||||
import com.hzs.common.core.service.RedisService;
|
import com.hzs.common.core.service.RedisService;
|
||||||
import com.hzs.common.core.utils.StringUtils;
|
import com.hzs.common.core.utils.StringUtils;
|
||||||
|
@ -19,10 +17,8 @@ import com.hzs.common.domain.system.config.BdBonusItems;
|
||||||
import com.hzs.common.domain.system.config.ext.BdBonusItemsExt;
|
import com.hzs.common.domain.system.config.ext.BdBonusItemsExt;
|
||||||
import com.hzs.common.security.utils.SecurityUtils;
|
import com.hzs.common.security.utils.SecurityUtils;
|
||||||
import com.hzs.common.util.TransactionUtils;
|
import com.hzs.common.util.TransactionUtils;
|
||||||
import com.hzs.system.base.ITransactionServiceApi;
|
|
||||||
import com.hzs.system.config.service.IBdBonusItemsService;
|
import com.hzs.system.config.service.IBdBonusItemsService;
|
||||||
import com.hzs.system.config.vo.ApiBdBonusItemsVO;
|
import com.hzs.system.config.vo.ApiBdBonusItemsVO;
|
||||||
import org.apache.dubbo.config.annotation.DubboReference;
|
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
import org.springframework.web.bind.annotation.*;
|
import org.springframework.web.bind.annotation.*;
|
||||||
|
|
||||||
|
@ -32,12 +28,7 @@ import java.util.Date;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* <p>
|
|
||||||
* 奖项配置 前端控制器
|
* 奖项配置 前端控制器
|
||||||
* </p>
|
|
||||||
*
|
|
||||||
* @author zhangjing
|
|
||||||
* @since 2022-11-09
|
|
||||||
*/
|
*/
|
||||||
@RestController
|
@RestController
|
||||||
@RequestMapping("/manage/bd-bonus-items")
|
@RequestMapping("/manage/bd-bonus-items")
|
||||||
|
@ -45,79 +36,63 @@ public class BdBonusItemsController extends BaseController {
|
||||||
|
|
||||||
@Autowired
|
@Autowired
|
||||||
private IBdBonusItemsService bonusItemsService;
|
private IBdBonusItemsService bonusItemsService;
|
||||||
@DubboReference
|
@Autowired
|
||||||
private ITransactionServiceApi iTransactionServiceApi;
|
|
||||||
private RedisService redisService;
|
private RedisService redisService;
|
||||||
|
|
||||||
@Autowired
|
|
||||||
public void setRedisService(RedisService redisService) {
|
|
||||||
this.redisService = redisService;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @description: 查询奖项配置列表
|
* 查询奖项配置列表
|
||||||
* @author: zhang jing
|
|
||||||
* @date: 2022/8/30 10:20
|
|
||||||
* @param: [bonusItems]
|
|
||||||
* @return: com.hzs.common.core.web.page.TableDataInfo
|
|
||||||
**/
|
**/
|
||||||
@Log(module = EOperationModule.BONUS_CONFIG, business = EOperationBusiness.BONUS_ITEMS, method = EOperationMethod.SELECT)
|
@Log(module = EOperationModule.BONUS_CONFIG, business = EOperationBusiness.BONUS_ITEMS, method = EOperationMethod.SELECT)
|
||||||
@GetMapping("/list")
|
@GetMapping("/list")
|
||||||
public TableDataInfo list(BdBonusItems bonusItems) {
|
public TableDataInfo list(BdBonusItems bonusItems) {
|
||||||
startPage();
|
|
||||||
QueryWrapper<BdBonusItems> queryWrapper = new QueryWrapper();
|
|
||||||
queryWrapper.eq("PK_COUNTRY", SecurityUtils.getPkCountry());
|
|
||||||
if(StringUtils.isNotNull(bonusItems.getBonusName())){
|
|
||||||
queryWrapper.eq("BONUS_NAME",bonusItems.getBonusName());
|
|
||||||
}
|
|
||||||
queryWrapper.orderByAsc("PK_ID");
|
|
||||||
List<BdBonusItemsExt> listExt = new ArrayList<>();
|
List<BdBonusItemsExt> listExt = new ArrayList<>();
|
||||||
|
|
||||||
|
startPage();
|
||||||
|
LambdaQueryWrapper<BdBonusItems> queryWrapper = new LambdaQueryWrapper<>();
|
||||||
|
queryWrapper.eq(BdBonusItems::getPkCountry, SecurityUtils.getPkCountry());
|
||||||
|
if (StringUtils.isNotNull(bonusItems.getBonusName())) {
|
||||||
|
queryWrapper.eq(BdBonusItems::getBonusName, bonusItems.getBonusName());
|
||||||
|
}
|
||||||
|
queryWrapper.orderByAsc(BdBonusItems::getPkId);
|
||||||
List<BdBonusItems> list = bonusItemsService.list(queryWrapper);
|
List<BdBonusItems> list = bonusItemsService.list(queryWrapper);
|
||||||
list.forEach(item -> listExt.add(BeanUtil.copyProperties(item, BdBonusItemsExt.class)));
|
list.forEach(item -> listExt.add(BeanUtil.copyProperties(item, BdBonusItemsExt.class)));
|
||||||
|
|
||||||
TableDataInfo tableDataInfo = getDataTable(list);
|
TableDataInfo tableDataInfo = getDataTable(list);
|
||||||
tableDataInfo.setRows(listExt);
|
tableDataInfo.setRows(listExt);
|
||||||
return tableDataInfo;
|
return tableDataInfo;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @description: 导出
|
* 导出
|
||||||
* @author: zhang jing
|
|
||||||
* @date: 2023/4/4 9:56
|
|
||||||
* @param: [response, bonusItems]
|
|
||||||
* @return: void
|
|
||||||
**/
|
**/
|
||||||
@Log(module = EOperationModule.BONUS_CONFIG, business = EOperationBusiness.BONUS_ITEMS, method = EOperationMethod.EXPORT)
|
@Log(module = EOperationModule.BONUS_CONFIG, business = EOperationBusiness.BONUS_ITEMS, method = EOperationMethod.EXPORT)
|
||||||
@PostMapping("/export")
|
@PostMapping("/export")
|
||||||
public void export(HttpServletResponse response, BdBonusItems bonusItems) {
|
public void export(HttpServletResponse response, BdBonusItems bonusItems) {
|
||||||
QueryWrapper<BdBonusItems> queryWrapper = new QueryWrapper();
|
LambdaQueryWrapper<BdBonusItems> queryWrapper = new LambdaQueryWrapper<>();
|
||||||
queryWrapper.eq("PK_COUNTRY", SecurityUtils.getPkCountry());
|
queryWrapper.eq(BdBonusItems::getPkCountry, SecurityUtils.getPkCountry());
|
||||||
if (StringUtils.isNotNull(bonusItems.getBonusName())) {
|
if (StringUtils.isNotNull(bonusItems.getBonusName())) {
|
||||||
queryWrapper.eq("BONUS_NAME",bonusItems.getBonusName());
|
queryWrapper.eq(BdBonusItems::getBonusName, bonusItems.getBonusName());
|
||||||
}
|
}
|
||||||
queryWrapper.orderByAsc("PK_ID");
|
queryWrapper.orderByAsc(BdBonusItems::getPkId);
|
||||||
List<BdBonusItemsExt> listExt = new ArrayList<>();
|
List<BdBonusItemsExt> listExt = new ArrayList<>();
|
||||||
List<BdBonusItems> list = bonusItemsService.list(queryWrapper);
|
List<BdBonusItems> list = bonusItemsService.list(queryWrapper);
|
||||||
list.forEach(item -> listExt.add(BeanUtil.copyProperties(item, BdBonusItemsExt.class)));
|
list.forEach(item -> listExt.add(BeanUtil.copyProperties(item, BdBonusItemsExt.class)));
|
||||||
ExcelUtil<BdBonusItemsExt> util = new ExcelUtil<>(BdBonusItemsExt.class);
|
ExcelUtil<BdBonusItemsExt> util = new ExcelUtil<>(BdBonusItemsExt.class);
|
||||||
util.exportExcel(response, listExt, "奖项配置");
|
util.exportExcel(response, listExt, "奖项配置");
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @description: 查询奖项配置列表(下拉选)
|
* 查询奖项配置列表(下拉选)
|
||||||
* @author: zhang jing
|
|
||||||
* @date: 2022/8/30 10:20
|
|
||||||
* @param: [bonusItems]
|
|
||||||
* @return: com.hzs.common.core.web.page.TableDataInfo
|
|
||||||
**/
|
**/
|
||||||
@Log(module = EOperationModule.BONUS_CONFIG, business = EOperationBusiness.BONUS_ITEMS, method = EOperationMethod.SELECT)
|
@Log(module = EOperationModule.BONUS_CONFIG, business = EOperationBusiness.BONUS_ITEMS, method = EOperationMethod.SELECT)
|
||||||
@GetMapping("/listNoPage")
|
@GetMapping("/listNoPage")
|
||||||
public TableDataInfo listNoPage(BdBonusItems bonusItems) {
|
public TableDataInfo listNoPage(BdBonusItems bonusItems) {
|
||||||
QueryWrapper<BdBonusItems> queryWrapper = new QueryWrapper();
|
LambdaQueryWrapper<BdBonusItems> queryWrapper = new LambdaQueryWrapper<>();
|
||||||
queryWrapper.eq("PK_COUNTRY", SecurityUtils.getPkCountry());
|
queryWrapper.eq(BdBonusItems::getPkCountry, SecurityUtils.getPkCountry());
|
||||||
if (StringUtils.isNotNull(bonusItems.getBonusName())) {
|
if (StringUtils.isNotNull(bonusItems.getBonusName())) {
|
||||||
queryWrapper.eq("BONUS_NAME",bonusItems.getBonusName());
|
queryWrapper.eq(BdBonusItems::getBonusName, bonusItems.getBonusName());
|
||||||
}
|
}
|
||||||
queryWrapper.orderByAsc("PK_ID");
|
queryWrapper.orderByAsc(BdBonusItems::getPkId);
|
||||||
List<ApiBdBonusItemsVO> listVO = new ArrayList<>();
|
List<ApiBdBonusItemsVO> listVO = new ArrayList<>();
|
||||||
List<BdBonusItems> list = bonusItemsService.list(queryWrapper);
|
List<BdBonusItems> list = bonusItemsService.list(queryWrapper);
|
||||||
list.forEach(item -> listVO.add(BeanUtil.copyProperties(item, ApiBdBonusItemsVO.class)));
|
list.forEach(item -> listVO.add(BeanUtil.copyProperties(item, ApiBdBonusItemsVO.class)));
|
||||||
|
@ -125,11 +100,7 @@ public class BdBonusItemsController extends BaseController {
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @description: 生成奖项
|
* 生成奖项
|
||||||
* @author: zhang jing
|
|
||||||
* @date: 2022/10/22 9:54
|
|
||||||
* @param: [grade]
|
|
||||||
* @return: com.hzs.common.core.web.domain.AjaxResult
|
|
||||||
**/
|
**/
|
||||||
@Log(module = EOperationModule.BONUS_CONFIG, business = EOperationBusiness.BONUS_ITEMS, method = EOperationMethod.INSERT)
|
@Log(module = EOperationModule.BONUS_CONFIG, business = EOperationBusiness.BONUS_ITEMS, method = EOperationMethod.INSERT)
|
||||||
@PostMapping("/generate")
|
@PostMapping("/generate")
|
||||||
|
@ -137,13 +108,8 @@ public class BdBonusItemsController extends BaseController {
|
||||||
return AjaxResult.success(bonusItemsService.generate(bonusItems));
|
return AjaxResult.success(bonusItemsService.generate(bonusItems));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @description: 修改奖项配置
|
* 修改奖项配置
|
||||||
* @author: zhang jing
|
|
||||||
* @date: 2022/8/30 10:21
|
|
||||||
* @param: [bonusItems]
|
|
||||||
* @return: com.hzs.common.core.web.domain.AjaxResult
|
|
||||||
**/
|
**/
|
||||||
@Log(module = EOperationModule.BONUS_CONFIG, business = EOperationBusiness.BONUS_ITEMS, method = EOperationMethod.UPDATE)
|
@Log(module = EOperationModule.BONUS_CONFIG, business = EOperationBusiness.BONUS_ITEMS, method = EOperationMethod.UPDATE)
|
||||||
@PostMapping("/update")
|
@PostMapping("/update")
|
||||||
|
@ -170,34 +136,14 @@ public class BdBonusItemsController extends BaseController {
|
||||||
if (StringUtils.isNull(bonusItems.getWithdrawalDate())) {
|
if (StringUtils.isNull(bonusItems.getWithdrawalDate())) {
|
||||||
return AjaxResult.error(TransactionUtils.getContent(ConfigMsgConstants.WITHDRAWAL_DATE_NOT_NULL));
|
return AjaxResult.error(TransactionUtils.getContent(ConfigMsgConstants.WITHDRAWAL_DATE_NOT_NULL));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
//字段翻译保存到数据库
|
|
||||||
if(null!=bonusItems.getPkTransaction()){
|
|
||||||
R<Boolean> b = iTransactionServiceApi.updateTransaction(pkCountry,
|
|
||||||
bonusItems.getBonusName(),bonusItems.getPkTransaction(), true);
|
|
||||||
}else{
|
|
||||||
//字段翻译保存到数据库
|
|
||||||
R<Integer> pkTransaction= iTransactionServiceApi.createTransaction(pkCountry, ETransactionKey.BD_BONUS_ITEMS,
|
|
||||||
bonusItems.getBonusName(), EYesNo.YES, EYesNo.NO);
|
|
||||||
bonusItems.setPkTransaction(pkTransaction.getData());
|
|
||||||
}
|
|
||||||
bonusItems.setPkModified(SecurityUtils.getUserId());
|
bonusItems.setPkModified(SecurityUtils.getUserId());
|
||||||
bonusItems.setModifiedTime(new Date());
|
bonusItems.setModifiedTime(new Date());
|
||||||
redisService.deleteObject(CacheConstants.BD_BONUS_ITEMS + pkCountry);
|
redisService.deleteObject(CacheConstants.BD_BONUS_ITEMS + pkCountry);
|
||||||
return toAjax(bonusItemsService.updateById(bonusItems));
|
return toAjax(bonusItemsService.updateById(bonusItems));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @description: 查询单条奖项配置
|
* 查询单条奖项配置
|
||||||
* @author: zhang jing
|
|
||||||
* @date: 2022/8/30 10:21
|
|
||||||
* @param: [pkId]
|
|
||||||
* @return: com.hzs.common.core.web.domain.AjaxResult
|
|
||||||
**/
|
**/
|
||||||
@Log(module = EOperationModule.BONUS_CONFIG, business = EOperationBusiness.BONUS_ITEMS, method = EOperationMethod.SELECT)
|
@Log(module = EOperationModule.BONUS_CONFIG, business = EOperationBusiness.BONUS_ITEMS, method = EOperationMethod.SELECT)
|
||||||
@GetMapping("/getOne/{pkId}")
|
@GetMapping("/getOne/{pkId}")
|
||||||
|
@ -207,30 +153,18 @@ public class BdBonusItemsController extends BaseController {
|
||||||
return AjaxResult.success(bonusItemsExt);
|
return AjaxResult.success(bonusItemsExt);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @description: 删除奖项配置
|
* 删除奖项配置
|
||||||
* @author: zhang jing
|
|
||||||
* @date: 2022/8/30 10:21
|
|
||||||
* @param: [pkId]
|
|
||||||
* @return: com.hzs.common.core.web.domain.AjaxResult
|
|
||||||
**/
|
**/
|
||||||
@Log(module = EOperationModule.BONUS_CONFIG, business = EOperationBusiness.BONUS_ITEMS, method = EOperationMethod.DELETE)
|
@Log(module = EOperationModule.BONUS_CONFIG, business = EOperationBusiness.BONUS_ITEMS, method = EOperationMethod.DELETE)
|
||||||
@DeleteMapping("/{pkId}")
|
@DeleteMapping("/{pkId}")
|
||||||
public AjaxResult delete(@PathVariable Long pkId) {
|
public AjaxResult delete(@PathVariable Long pkId) {
|
||||||
UpdateWrapper<BdBonusItems> updateWrapper = new UpdateWrapper<>();
|
LambdaUpdateWrapper<BdBonusItems> updateWrapper = new LambdaUpdateWrapper<>();
|
||||||
updateWrapper.eq("PK_ID", pkId);
|
updateWrapper.eq(BdBonusItems::getPkId, pkId);
|
||||||
updateWrapper.set("DEL_FLAG", EDelFlag.DELETE.getValue());
|
updateWrapper.set(BdBonusItems::getDelFlag, EDelFlag.DELETE.getValue());
|
||||||
updateWrapper.set("PK_MODIFIED", SecurityUtils.getUserId());
|
updateWrapper.set(BdBonusItems::getPkModified, SecurityUtils.getUserId());
|
||||||
updateWrapper.set("MODIFIED_TIME", new Date());
|
updateWrapper.set(BdBonusItems::getModifiedTime, new Date());
|
||||||
redisService.deleteObject(CacheConstants.BD_BONUS_ITEMS + SecurityUtils.getPkCountry());
|
redisService.deleteObject(CacheConstants.BD_BONUS_ITEMS + SecurityUtils.getPkCountry());
|
||||||
//删除翻译
|
|
||||||
BdBonusItems bdBonusItems=bonusItemsService.getById(pkId);
|
|
||||||
List<Long> pkIdList=new ArrayList<>();
|
|
||||||
if(null!=bdBonusItems.getPkTransaction()){
|
|
||||||
pkIdList.add(bdBonusItems.getPkTransaction().longValue());
|
|
||||||
R<Boolean> b=iTransactionServiceApi.removeTransactionByPkId(pkIdList);
|
|
||||||
}
|
|
||||||
return toAjax(bonusItemsService.update(updateWrapper));
|
return toAjax(bonusItemsService.update(updateWrapper));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -52,7 +52,10 @@ public class BonusMsgConstants {
|
||||||
|
|
||||||
public static String RETAIL_BENEFIT_AVG_INCOME = "获得%f月福利平均收益,结算月%s。";
|
public static String RETAIL_BENEFIT_AVG_INCOME = "获得%f月福利平均收益,结算月%s。";
|
||||||
|
|
||||||
public static String RETAIL_AREA_INCOME = "订单编号%s,%s为%s贡献了区域收益,区域收益%f,收益县%s。";
|
/**
|
||||||
|
* 区域分红说明
|
||||||
|
*/
|
||||||
|
public static String RETAIL_AREA_INCOME = "订单编号%s,%s为%s贡献了区域分红,区域分红%f,收益县%s。";
|
||||||
|
|
||||||
public static String RETAIL_BENEFIT_INCOME = "获得%f月福利加权收益,结算月%s。";
|
public static String RETAIL_BENEFIT_INCOME = "获得%f月福利加权收益,结算月%s。";
|
||||||
|
|
||||||
|
@ -110,10 +113,16 @@ public class BonusMsgConstants {
|
||||||
// public static String SHARE_RANGE = "MSG_BONUS_017";
|
// public static String SHARE_RANGE = "MSG_BONUS_017";
|
||||||
public static String SHARE_RANGE = "订单编号%s,%s为%s贡献了复购极差收益,计算业绩%f,前一极差等级名称%s,当前极差等级名称%s。";
|
public static String SHARE_RANGE = "订单编号%s,%s为%s贡献了复购极差收益,计算业绩%f,前一极差等级名称%s,当前极差等级名称%s。";
|
||||||
|
|
||||||
public static String RANGE = "订单编号%s,%s为%s贡献了极差收益,计算业绩%f,前一极差等级名称%s,当前极差等级名称%s。";
|
|
||||||
|
|
||||||
public static String RETAIL_RANGE = "订单编号%s,%s为%s贡献了福利极差收益,计算业绩%f,前一极差等级名称%s,当前极差等级名称%s。";
|
public static String RETAIL_RANGE = "订单编号%s,%s为%s贡献了福利极差收益,计算业绩%f,前一极差等级名称%s,当前极差等级名称%s。";
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 直推级差收益说明
|
||||||
|
*/
|
||||||
|
public static String RANGE = "订单编号%s,%s为%s贡献了直推级差收益,计算金额%f,前一级差等级名称%s,当前级差等级名称%s。";
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 平级收益
|
||||||
|
*/
|
||||||
public static String ORI_RANGE = "订单编号%s,%s为%s贡献了平级收益,计算业绩%f,等级名称%s。";
|
public static String ORI_RANGE = "订单编号%s,%s为%s贡献了平级收益,计算业绩%f,等级名称%s。";
|
||||||
|
|
||||||
public static String LE_SHARE_RANGE = "订单编号%s,%s为%s贡献了复购极差收益,收益%f。";
|
public static String LE_SHARE_RANGE = "订单编号%s,%s为%s贡献了复购极差收益,收益%f。";
|
||||||
|
|
|
@ -5,11 +5,7 @@ import lombok.AllArgsConstructor;
|
||||||
import lombok.Getter;
|
import lombok.Getter;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @Description: 奖金收益状态 奖金明细表
|
* 奖金收益状态 奖金明细表
|
||||||
* @Author: sui q
|
|
||||||
* @Time: 2022/11/10 16:03
|
|
||||||
* @Classname: EBonusIncomeStatus
|
|
||||||
* @PackageName: com.hzs.common.core.enums
|
|
||||||
*/
|
*/
|
||||||
@AllArgsConstructor
|
@AllArgsConstructor
|
||||||
@Getter
|
@Getter
|
||||||
|
|
|
@ -224,7 +224,7 @@ public class CuMemberBonus extends BaseEntity {
|
||||||
private BigDecimal makerRealSubtotal;
|
private BigDecimal makerRealSubtotal;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 新零售极差收益
|
* 新零售直推收益
|
||||||
*/
|
*/
|
||||||
@TableField("RETAIL_RANGE_INCOME")
|
@TableField("RETAIL_RANGE_INCOME")
|
||||||
private BigDecimal retailRangeIncome;
|
private BigDecimal retailRangeIncome;
|
||||||
|
@ -236,7 +236,7 @@ public class CuMemberBonus extends BaseEntity {
|
||||||
private BigDecimal retailSameLevelIncome;
|
private BigDecimal retailSameLevelIncome;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 新零售区域收益
|
* 新零售区域分红
|
||||||
*/
|
*/
|
||||||
@TableField("RETAIL_AREA_INCOME")
|
@TableField("RETAIL_AREA_INCOME")
|
||||||
private BigDecimal retailAreaIncome;
|
private BigDecimal retailAreaIncome;
|
||||||
|
|
|
@ -381,7 +381,7 @@ public class CuBonusVertexStatis extends BaseEntity {
|
||||||
private BigDecimal retailConsumePv;
|
private BigDecimal retailConsumePv;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 新零售极差收益
|
* 新零售直推收益
|
||||||
*/
|
*/
|
||||||
@TableField("RETAIL_RANGE_INCOME")
|
@TableField("RETAIL_RANGE_INCOME")
|
||||||
private BigDecimal retailRangeIncome;
|
private BigDecimal retailRangeIncome;
|
||||||
|
|
|
@ -6,12 +6,7 @@ import lombok.Data;
|
||||||
import lombok.EqualsAndHashCode;
|
import lombok.EqualsAndHashCode;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* <p>
|
|
||||||
* 奖项配置
|
* 奖项配置
|
||||||
* </p>
|
|
||||||
*
|
|
||||||
* @author zhangjing
|
|
||||||
* @since 2022-11-09
|
|
||||||
*/
|
*/
|
||||||
@Data
|
@Data
|
||||||
@EqualsAndHashCode(callSuper = true)
|
@EqualsAndHashCode(callSuper = true)
|
||||||
|
@ -24,6 +19,7 @@ public class BdBonusItemsExt extends BdBonusItems {
|
||||||
*/
|
*/
|
||||||
@Excel(name = "结算周期", sort = 2)
|
@Excel(name = "结算周期", sort = 2)
|
||||||
private String settleTypeVal;
|
private String settleTypeVal;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 公布日期
|
* 公布日期
|
||||||
*/
|
*/
|
||||||
|
@ -42,8 +38,4 @@ public class BdBonusItemsExt extends BdBonusItems {
|
||||||
@Excel(name = "可提现日期", sort = 6)
|
@Excel(name = "可提现日期", sort = 6)
|
||||||
private String withdrawalDateVal;
|
private String withdrawalDateVal;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue