forked from angelo/java-retail-app
				
			Compare commits
	
		
			2 Commits
		
	
	
		
			12ccce74df
			...
			ddec95414b
		
	
	| Author | SHA1 | Date | 
|---|---|---|
| 
							
							
								
								 | 
						ddec95414b | |
| 
							
							
								
								 | 
						93959a13d5 | 
| 
						 | 
				
			
			@ -30,6 +30,7 @@ import org.apache.dubbo.config.annotation.DubboReference;
 | 
			
		|||
import org.springframework.beans.factory.annotation.Autowired;
 | 
			
		||||
import org.springframework.stereotype.Component;
 | 
			
		||||
 | 
			
		||||
import javax.annotation.Resource;
 | 
			
		||||
import java.math.BigDecimal;
 | 
			
		||||
import java.time.temporal.ChronoUnit;
 | 
			
		||||
import java.util.*;
 | 
			
		||||
| 
						 | 
				
			
			@ -48,7 +49,8 @@ public class BonusSettleRangeHandle extends BonusSettleHandle {
 | 
			
		|||
    private IBonusOrderService iBonusOrderService;
 | 
			
		||||
    @Autowired
 | 
			
		||||
    private ICuMemberGradeService iCuMemberGradeService;
 | 
			
		||||
    @Autowired
 | 
			
		||||
 | 
			
		||||
    @Resource
 | 
			
		||||
    private CuMemberRetailRangeMapper cuMemberRetailRangeMapper;
 | 
			
		||||
 | 
			
		||||
    @DubboReference
 | 
			
		||||
| 
						 | 
				
			
			@ -321,40 +323,42 @@ public class BonusSettleRangeHandle extends BonusSettleHandle {
 | 
			
		|||
                if (targetGradeValue > beforeGradeValue) {
 | 
			
		||||
                    // 当前会员等级大于上一个会员等级
 | 
			
		||||
                    if (EGrade.HAI_FAN.getValue() == targetGradeValue) {
 | 
			
		||||
                        // V1 推拿 60
 | 
			
		||||
                        // V1 推拿 30
 | 
			
		||||
                        rangeBonusIncome = RetailConstants.V1_V1;
 | 
			
		||||
                        // 前面累计的奖金
 | 
			
		||||
                        totalBonus = RetailConstants.V1_V1;
 | 
			
		||||
                    } else if (EGrade.YOU_KE.getValue() == targetGradeValue) {
 | 
			
		||||
                        // V2 推拿 80,或者减去之前累计
 | 
			
		||||
                        // V2 推拿 40,或者减去之前累计
 | 
			
		||||
                        rangeBonusIncome = RetailConstants.V2_V1.subtract(totalBonus);
 | 
			
		||||
                        // 前面累计的奖金
 | 
			
		||||
                        totalBonus = RetailConstants.V2_V1;
 | 
			
		||||
                    } else if (EGrade.MAKER.getValue() == targetGradeValue) {
 | 
			
		||||
                        // V3 推拿 100,或者减去之前累计
 | 
			
		||||
                        // V3 推拿 50,或者减去之前累计
 | 
			
		||||
                        rangeBonusIncome = RetailConstants.V3_V1.subtract(totalBonus);
 | 
			
		||||
                        // 前面累计的奖金
 | 
			
		||||
                        totalBonus = RetailConstants.V3_V1;
 | 
			
		||||
                    } else if (EGrade.VIP.getValue() == targetGradeValue) {
 | 
			
		||||
                        // V4 推拿 200,或者减去之前累计
 | 
			
		||||
                        // V4 推拿 100,或者减去之前累计
 | 
			
		||||
                        rangeBonusIncome = RetailConstants.V4_V1.subtract(totalBonus);
 | 
			
		||||
                        // 前面累计的奖金
 | 
			
		||||
                        totalBonus = RetailConstants.V4_V1;
 | 
			
		||||
                    } else if (EGrade.S_VIP.getValue() == targetGradeValue) {
 | 
			
		||||
                        // V5 推拿 208,或者减去之前累计
 | 
			
		||||
                        // V5 推拿 104,或者减去之前累计
 | 
			
		||||
                        rangeBonusIncome = RetailConstants.V5_V1.subtract(totalBonus);
 | 
			
		||||
                        // 前面累计的奖金
 | 
			
		||||
                        totalBonus = RetailConstants.V5_V1;
 | 
			
		||||
                    } else if (EGrade.BRANCH_COMPANY.getValue() == targetGradeValue) {
 | 
			
		||||
                        // V6 推拿 220 ,或者减去之前累计
 | 
			
		||||
                        rangeBonusIncome = RetailConstants.V6_V1.subtract(totalBonus);
 | 
			
		||||
                    } else if (EGrade.REGION.getValue() == targetGradeValue
 | 
			
		||||
                            || EGrade.DIRECTOR.getValue() == targetGradeValue) {
 | 
			
		||||
                        // V6、V7 推拿 110 ,或者减去之前累计
 | 
			
		||||
                        // 前一等级不是V6、V7
 | 
			
		||||
                        rangeBonusIncome = RetailConstants.V6_V7_V1.subtract(totalBonus);
 | 
			
		||||
                        // 前面累计的奖金
 | 
			
		||||
                        totalBonus = RetailConstants.V6_V1;
 | 
			
		||||
                        totalBonus = RetailConstants.V6_V7_V1;
 | 
			
		||||
                    } else if (EGrade.COMPANY.getValue() == targetGradeValue) {
 | 
			
		||||
                        // V7 推拿 240,或者减去之前累计
 | 
			
		||||
                        rangeBonusIncome = RetailConstants.V7_V1.subtract(totalBonus);
 | 
			
		||||
                        // V8 推拿 120,或者减去之前累计
 | 
			
		||||
                        rangeBonusIncome = RetailConstants.V8_V1.subtract(totalBonus);
 | 
			
		||||
                        // 前面累计的奖金
 | 
			
		||||
                        totalBonus = RetailConstants.V7_V1;
 | 
			
		||||
                        totalBonus = RetailConstants.V8_V1;
 | 
			
		||||
                    }
 | 
			
		||||
                    // 前一级会员等级
 | 
			
		||||
                    beforeGradeValue = targetGradeValue;
 | 
			
		||||
| 
						 | 
				
			
			@ -388,16 +392,17 @@ public class BonusSettleRangeHandle extends BonusSettleHandle {
 | 
			
		|||
                        rangeBonusIncome = RetailConstants.V5_V2.subtract(totalBonus);
 | 
			
		||||
                        // 前面累计的奖金
 | 
			
		||||
                        totalBonus = RetailConstants.V5_V2;
 | 
			
		||||
                    } else if (EGrade.BRANCH_COMPANY.getValue() == targetGradeValue) {
 | 
			
		||||
                        // V6 推拿 1100,或者减去之前累计
 | 
			
		||||
                        rangeBonusIncome = RetailConstants.V6_V2.subtract(totalBonus);
 | 
			
		||||
                    } else if (EGrade.REGION.getValue() == targetGradeValue
 | 
			
		||||
                            || EGrade.DIRECTOR.getValue() == targetGradeValue) {
 | 
			
		||||
                        // V6、V7 推拿 1100,或者减去之前累计
 | 
			
		||||
                        rangeBonusIncome = RetailConstants.V6_V7_V2.subtract(totalBonus);
 | 
			
		||||
                        // 前面累计的奖金
 | 
			
		||||
                        totalBonus = RetailConstants.V6_V2;
 | 
			
		||||
                        totalBonus = RetailConstants.V6_V7_V2;
 | 
			
		||||
                    } else if (EGrade.COMPANY.getValue() == targetGradeValue) {
 | 
			
		||||
                        // V7 推拿 1200,或者减去之前累计
 | 
			
		||||
                        rangeBonusIncome = RetailConstants.V7_V2.subtract(totalBonus);
 | 
			
		||||
                        // V8 推拿 1200,或者减去之前累计
 | 
			
		||||
                        rangeBonusIncome = RetailConstants.V8_V2.subtract(totalBonus);
 | 
			
		||||
                        // 前面累计的奖金
 | 
			
		||||
                        totalBonus = RetailConstants.V7_V2;
 | 
			
		||||
                        totalBonus = RetailConstants.V8_V2;
 | 
			
		||||
                    }
 | 
			
		||||
                    // 前一级会员等级
 | 
			
		||||
                    beforeGradeValue = targetGradeValue;
 | 
			
		||||
| 
						 | 
				
			
			@ -431,16 +436,17 @@ public class BonusSettleRangeHandle extends BonusSettleHandle {
 | 
			
		|||
                        rangeBonusIncome = RetailConstants.V5_V3.subtract(totalBonus);
 | 
			
		||||
                        // 前面累计的奖金
 | 
			
		||||
                        totalBonus = RetailConstants.V5_V3;
 | 
			
		||||
                    } else if (EGrade.BRANCH_COMPANY.getValue() == targetGradeValue) {
 | 
			
		||||
                        // V6 推拿 2200,或者减去之前累计
 | 
			
		||||
                        rangeBonusIncome = RetailConstants.V6_V3.subtract(totalBonus);
 | 
			
		||||
                    } else if (EGrade.REGION.getValue() == targetGradeValue
 | 
			
		||||
                            || EGrade.DIRECTOR.getValue() == targetGradeValue) {
 | 
			
		||||
                        // V6、V7 推拿 2200,或者减去之前累计
 | 
			
		||||
                        rangeBonusIncome = RetailConstants.V6_V7_V3.subtract(totalBonus);
 | 
			
		||||
                        // 前面累计的奖金
 | 
			
		||||
                        totalBonus = RetailConstants.V6_V3;
 | 
			
		||||
                        totalBonus = RetailConstants.V6_V7_V3;
 | 
			
		||||
                    } else if (EGrade.COMPANY.getValue() == targetGradeValue) {
 | 
			
		||||
                        // V7 推拿 2400,或者减去之前累计
 | 
			
		||||
                        rangeBonusIncome = RetailConstants.V7_V3.subtract(totalBonus);
 | 
			
		||||
                        // V8 推拿 2400,或者减去之前累计
 | 
			
		||||
                        rangeBonusIncome = RetailConstants.V8_V3.subtract(totalBonus);
 | 
			
		||||
                        // 前面累计的奖金
 | 
			
		||||
                        totalBonus = RetailConstants.V7_V3;
 | 
			
		||||
                        totalBonus = RetailConstants.V8_V3;
 | 
			
		||||
                    }
 | 
			
		||||
                    // 前一级会员等级
 | 
			
		||||
                    beforeGradeValue = targetGradeValue;
 | 
			
		||||
| 
						 | 
				
			
			@ -490,16 +496,17 @@ public class BonusSettleRangeHandle extends BonusSettleHandle {
 | 
			
		|||
                        rangeBonusIncome = RetailConstants.V5_V4.subtract(totalBonus);
 | 
			
		||||
                        // 前面累计的奖金
 | 
			
		||||
                        totalBonus = RetailConstants.V5_V4;
 | 
			
		||||
                    } else if (EGrade.BRANCH_COMPANY.getValue() == targetGradeValue) {
 | 
			
		||||
                        // V6 推拿 4400,或者减去之前累计
 | 
			
		||||
                        rangeBonusIncome = RetailConstants.V6_V4.subtract(totalBonus);
 | 
			
		||||
                    } else if (EGrade.REGION.getValue() == targetGradeValue
 | 
			
		||||
                            || EGrade.DIRECTOR.getValue() == targetGradeValue) {
 | 
			
		||||
                        // V6、V7 推拿 4400,或者减去之前累计
 | 
			
		||||
                        rangeBonusIncome = RetailConstants.V6_V7_V4.subtract(totalBonus);
 | 
			
		||||
                        // 前面累计的奖金
 | 
			
		||||
                        totalBonus = RetailConstants.V6_V4;
 | 
			
		||||
                        totalBonus = RetailConstants.V6_V7_V4;
 | 
			
		||||
                    } else if (EGrade.COMPANY.getValue() == targetGradeValue) {
 | 
			
		||||
                        // V7 推拿 4800,或者减去之前累计
 | 
			
		||||
                        rangeBonusIncome = RetailConstants.V7_V4.subtract(totalBonus);
 | 
			
		||||
                        // V8 推拿 4800,或者减去之前累计
 | 
			
		||||
                        rangeBonusIncome = RetailConstants.V8_V4.subtract(totalBonus);
 | 
			
		||||
                        // 前面累计的奖金
 | 
			
		||||
                        totalBonus = RetailConstants.V7_V4;
 | 
			
		||||
                        totalBonus = RetailConstants.V8_V4;
 | 
			
		||||
                    }
 | 
			
		||||
                    // 前一级会员等级
 | 
			
		||||
                    beforeGradeValue = targetGradeValue;
 | 
			
		||||
| 
						 | 
				
			
			@ -520,30 +527,31 @@ public class BonusSettleRangeHandle extends BonusSettleHandle {
 | 
			
		|||
                        v3Count++;
 | 
			
		||||
                    }
 | 
			
		||||
                }
 | 
			
		||||
            } else if (EGrade.BRANCH_COMPANY.getValue() == orderGradeValue) {
 | 
			
		||||
                // 订单是分公司
 | 
			
		||||
            } else if (EGrade.REGION.getValue() == orderGradeValue) {
 | 
			
		||||
                // 订单是区域代理
 | 
			
		||||
                if (targetGradeValue >= EGrade.VIP.getValue() && targetGradeValue > beforeGradeValue) {
 | 
			
		||||
                    // 博羚店主以上才有级差 并且 当前等级大于之前等级
 | 
			
		||||
                    if (EGrade.VIP.getValue() == targetGradeValue) {
 | 
			
		||||
                        // 博羚店主拿 50000
 | 
			
		||||
                        // 博羚店主 拿 50000
 | 
			
		||||
                        rangeBonusIncome = RetailConstants.V4_V6.subtract(totalBonus);
 | 
			
		||||
                        // 前面累计的奖金
 | 
			
		||||
                        totalBonus = RetailConstants.V4_V6;
 | 
			
		||||
                    } else if (EGrade.S_VIP.getValue() == targetGradeValue) {
 | 
			
		||||
                        // 高级店主拿 52000,或者减去之前累计
 | 
			
		||||
                        // 高级店主 拿 52000,或者减去之前累计
 | 
			
		||||
                        rangeBonusIncome = RetailConstants.V5_V6.subtract(totalBonus);
 | 
			
		||||
                        // 前面累计的奖金
 | 
			
		||||
                        totalBonus = RetailConstants.V5_V6;
 | 
			
		||||
                    } else if (EGrade.BRANCH_COMPANY.getValue() == targetGradeValue) {
 | 
			
		||||
                        // 分公司拿 55000,或者减去之前累计
 | 
			
		||||
                        rangeBonusIncome = RetailConstants.V6_V6.subtract(totalBonus);
 | 
			
		||||
                    } else if (EGrade.REGION.getValue() == targetGradeValue
 | 
			
		||||
                            || EGrade.DIRECTOR.getValue() == targetGradeValue) {
 | 
			
		||||
                        // 区域代理、董事代理 拿 55000,或者减去之前累计
 | 
			
		||||
                        rangeBonusIncome = RetailConstants.V6_V7_V6.subtract(totalBonus);
 | 
			
		||||
                        // 前面累计的奖金
 | 
			
		||||
                        totalBonus = RetailConstants.V6_V6;
 | 
			
		||||
                        totalBonus = RetailConstants.V6_V7_V6;
 | 
			
		||||
                    } else if (EGrade.COMPANY.getValue() == targetGradeValue) {
 | 
			
		||||
                        // 总公司拿 60000,或者减去之前累计
 | 
			
		||||
                        rangeBonusIncome = RetailConstants.V7_V6.subtract(totalBonus);
 | 
			
		||||
                        // 总公司 拿 60000,或者减去之前累计
 | 
			
		||||
                        rangeBonusIncome = RetailConstants.V8_V6.subtract(totalBonus);
 | 
			
		||||
                        // 前面累计的奖金
 | 
			
		||||
                        totalBonus = RetailConstants.V7_V6;
 | 
			
		||||
                        totalBonus = RetailConstants.V8_V6;
 | 
			
		||||
                    }
 | 
			
		||||
                    // 前一级会员等级
 | 
			
		||||
                    beforeGradeValue = targetGradeValue;
 | 
			
		||||
| 
						 | 
				
			
			@ -656,16 +664,17 @@ public class BonusSettleRangeHandle extends BonusSettleHandle {
 | 
			
		|||
                    rangeBonusIncome = RetailConstants.REPURCHASE_V5.multiply(boxNum).subtract(totalBonus);
 | 
			
		||||
                    // 前面累计的奖金
 | 
			
		||||
                    totalBonus = totalBonus.add(RetailConstants.REPURCHASE_V5.multiply(boxNum).subtract(totalBonus));
 | 
			
		||||
                } else if (EGrade.BRANCH_COMPANY.getValue() == targetGradeValue) {
 | 
			
		||||
                    // V6 拿 22,或者减去之前累计
 | 
			
		||||
                    rangeBonusIncome = RetailConstants.REPURCHASE_V6.multiply(boxNum).subtract(totalBonus);
 | 
			
		||||
                } else if (EGrade.REGION.getValue() == targetGradeValue
 | 
			
		||||
                        || EGrade.DIRECTOR.getValue() == targetGradeValue) {
 | 
			
		||||
                    // V6、V7 拿 22,或者减去之前累计
 | 
			
		||||
                    rangeBonusIncome = RetailConstants.REPURCHASE_V6_V7.multiply(boxNum).subtract(totalBonus);
 | 
			
		||||
                    // 前面累计的奖金
 | 
			
		||||
                    totalBonus = totalBonus.add(RetailConstants.REPURCHASE_V6.multiply(boxNum).subtract(totalBonus));
 | 
			
		||||
                    totalBonus = totalBonus.add(RetailConstants.REPURCHASE_V6_V7.multiply(boxNum).subtract(totalBonus));
 | 
			
		||||
                } else if (EGrade.COMPANY.getValue() == targetGradeValue) {
 | 
			
		||||
                    // V7 拿 24,或者减去之前累计
 | 
			
		||||
                    rangeBonusIncome = RetailConstants.REPURCHASE_V7.multiply(boxNum).subtract(totalBonus);
 | 
			
		||||
                    // V8 拿 24,或者减去之前累计
 | 
			
		||||
                    rangeBonusIncome = RetailConstants.REPURCHASE_V8.multiply(boxNum).subtract(totalBonus);
 | 
			
		||||
                    // 前面累计的奖金
 | 
			
		||||
                    totalBonus = totalBonus.add(RetailConstants.REPURCHASE_V7.multiply(boxNum).subtract(totalBonus));
 | 
			
		||||
                    totalBonus = totalBonus.add(RetailConstants.REPURCHASE_V8.multiply(boxNum).subtract(totalBonus));
 | 
			
		||||
                }
 | 
			
		||||
                // 前一级会员等级
 | 
			
		||||
                beforeGradeValue = targetGradeValue;
 | 
			
		||||
| 
						 | 
				
			
			@ -711,8 +720,10 @@ public class BonusSettleRangeHandle extends BonusSettleHandle {
 | 
			
		|||
                memberBonusRangeList.add(cuMemberBonusRange);
 | 
			
		||||
            }
 | 
			
		||||
 | 
			
		||||
            // 2025.08.13 添加分公司级差收益,每1盒(4个产品)第一分公司4元,第二分公司4元,公司6元,总拨出14元
 | 
			
		||||
            if (EGrade.BRANCH_COMPANY.getValue() == targetMemberRangeExt.getGradeValue() && branch < 2) {
 | 
			
		||||
            // 2025.08.13 添加 代理 级差收益,每1盒(4个产品)区域代理4元,董事代理4元,公司6元,总拨出14元
 | 
			
		||||
            if ((EGrade.REGION.getValue() == targetMemberRangeExt.getGradeValue()
 | 
			
		||||
                    && EGrade.DIRECTOR.getValue() == targetMemberRangeExt.getGradeValue())
 | 
			
		||||
                    && branch < 2) {
 | 
			
		||||
                // 等级是分公司 并且 发放次数小于2
 | 
			
		||||
                this.calculateRetailRepurCompanyRangeBonus(sourceMemberRangeExt, targetMemberRangeExt, cuMemberBonusMap, bonusConfigDTO,
 | 
			
		||||
                        period, saOrderExt, boxNum, memberBonusRangeList, branch);
 | 
			
		||||
| 
						 | 
				
			
			@ -731,9 +742,10 @@ public class BonusSettleRangeHandle extends BonusSettleHandle {
 | 
			
		|||
                                                       Map<Long, CuMemberBonus> cuMemberBonusMap, BonusConfigDTO bonusConfigDTO, Integer period,
 | 
			
		||||
                                                       SaOrderExt saOrderExt, BigDecimal boxNum, List<CuMemberBonusRange> memberBonusRangeList,
 | 
			
		||||
                                                       int branch) {
 | 
			
		||||
        // 2025.08.13 二级分公司,一级总公司复购级差
 | 
			
		||||
        // 2025.08.13 二级代理,一级总公司复购级差
 | 
			
		||||
        BigDecimal calValue = BigDecimal.ZERO;
 | 
			
		||||
        if (EGrade.BRANCH_COMPANY.getValue() == targetMemberRangeExt.getGradeValue()) {
 | 
			
		||||
        if (EGrade.REGION.getValue() == targetMemberRangeExt.getGradeValue()
 | 
			
		||||
                || EGrade.DIRECTOR.getValue() == targetMemberRangeExt.getGradeValue()) {
 | 
			
		||||
            // 分公司奖金
 | 
			
		||||
            calValue = RetailConstants.BRANCH;
 | 
			
		||||
        } else if (EGrade.COMPANY.getValue() == targetMemberRangeExt.getGradeValue()) {
 | 
			
		||||
| 
						 | 
				
			
			@ -801,7 +813,7 @@ public class BonusSettleRangeHandle extends BonusSettleHandle {
 | 
			
		|||
        CuMemberRetailRegion retailRegion = regionMap.get(saOrderExt.getRecCounty());
 | 
			
		||||
        if (null != retailRegion) {
 | 
			
		||||
            CuMemberRetailRangeExt targetMemberRangeExt = memberRangeExtMap.get(retailRegion.getPkMember());
 | 
			
		||||
            if(ObjectUtil.isEmpty(targetMemberRangeExt)){
 | 
			
		||||
            if (ObjectUtil.isEmpty(targetMemberRangeExt)) {
 | 
			
		||||
                targetMemberRangeExt = cuMemberRetailRangeMapper.queryCuMemberRetailRangeByMemberId(rangeTableName, retailRegion.getPkMember());
 | 
			
		||||
                memberRangeExtMap.put(retailRegion.getPkMember(), targetMemberRangeExt);
 | 
			
		||||
            }
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -4,23 +4,16 @@ import cn.hutool.core.bean.BeanUtil;
 | 
			
		|||
import com.hzs.common.core.annotation.RepeatSubmitSimple;
 | 
			
		||||
import com.hzs.common.core.constant.msg.FinanceMsgConstants;
 | 
			
		||||
import com.hzs.common.core.enums.EApproveStatus;
 | 
			
		||||
import com.hzs.common.core.enums.EVerificationModule;
 | 
			
		||||
import com.hzs.common.core.enums.EYesNo;
 | 
			
		||||
import com.hzs.common.core.utils.StringUtils;
 | 
			
		||||
import com.hzs.common.core.web.controller.BaseController;
 | 
			
		||||
import com.hzs.common.core.web.domain.AjaxResult;
 | 
			
		||||
import com.hzs.common.domain.member.account.CuMemberBusinessLicense;
 | 
			
		||||
import com.hzs.common.domain.member.base.CuMember;
 | 
			
		||||
import com.hzs.common.domain.system.config.BdTradeConfig;
 | 
			
		||||
import com.hzs.common.domain.system.config.BdTradeWhiteConfig;
 | 
			
		||||
import com.hzs.common.security.utils.SecurityUtils;
 | 
			
		||||
import com.hzs.common.util.TransactionUtils;
 | 
			
		||||
import com.hzs.member.account.service.ICuMemberAuthenticationService;
 | 
			
		||||
import com.hzs.member.account.service.ICuMemberBaseService;
 | 
			
		||||
import com.hzs.member.account.service.ICuMemberBusinessLicenseService;
 | 
			
		||||
import com.hzs.member.account.vo.CuMemberAuthenticationVO;
 | 
			
		||||
import com.hzs.member.account.vo.CuMemberBusinessLicenseVO;
 | 
			
		||||
import com.hzs.member.base.service.ICuMemberService;
 | 
			
		||||
import org.springframework.beans.factory.annotation.Autowired;
 | 
			
		||||
import org.springframework.web.bind.annotation.*;
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			@ -34,14 +27,9 @@ import java.util.Date;
 | 
			
		|||
public class ApiCuMemberBusinessLicenseController extends BaseController {
 | 
			
		||||
 | 
			
		||||
    @Autowired
 | 
			
		||||
    private ICuMemberBusinessLicenseService cuMemberBusinessLicenseService;
 | 
			
		||||
    private ICuMemberBusinessLicenseService iCuMemberBusinessLicenseService;
 | 
			
		||||
    @Autowired
 | 
			
		||||
    private ICuMemberService iCuMemberService;
 | 
			
		||||
    @Autowired
 | 
			
		||||
    private ICuMemberBaseService iCuMemberBaseService;
 | 
			
		||||
    @Autowired
 | 
			
		||||
    private ICuMemberAuthenticationService authenticationService;
 | 
			
		||||
 | 
			
		||||
    private ICuMemberAuthenticationService iCuMemberAuthenticationService;
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * 保存营业执照
 | 
			
		||||
| 
						 | 
				
			
			@ -57,7 +45,7 @@ public class ApiCuMemberBusinessLicenseController extends BaseController {
 | 
			
		|||
            Long pkMember = SecurityUtils.getUserId();
 | 
			
		||||
            Integer pkCountry = SecurityUtils.getPkCountry();
 | 
			
		||||
            //查询是否已实名认证
 | 
			
		||||
            CuMemberAuthenticationVO authenticationVO = authenticationService.selectCuMemberAuthenticationByPkMember(CuMemberAuthenticationVO.builder().pkMember(pkMember).pkCountry(pkCountry).build());
 | 
			
		||||
            CuMemberAuthenticationVO authenticationVO = iCuMemberAuthenticationService.selectCuMemberAuthenticationByPkMember(CuMemberAuthenticationVO.builder().pkMember(pkMember).pkCountry(pkCountry).build());
 | 
			
		||||
            //验证实名认证的真实姓名与法人的姓名是否一致
 | 
			
		||||
            if (null != authenticationVO) {
 | 
			
		||||
                String accountName = authenticationVO.getAccountName();
 | 
			
		||||
| 
						 | 
				
			
			@ -72,14 +60,12 @@ public class ApiCuMemberBusinessLicenseController extends BaseController {
 | 
			
		|||
            CuMemberBusinessLicense memberBusinessLicense = BeanUtil.copyProperties(businessLicense, CuMemberBusinessLicense.class);
 | 
			
		||||
            memberBusinessLicense.setApproveStatus(EApproveStatus.ALREADY_SUBMIT.getValue());
 | 
			
		||||
            memberBusinessLicense.setPkCreator(pkMember);
 | 
			
		||||
            return toAjax(cuMemberBusinessLicenseService.save(memberBusinessLicense));
 | 
			
		||||
            return toAjax(iCuMemberBusinessLicenseService.save(memberBusinessLicense));
 | 
			
		||||
        } else {
 | 
			
		||||
            return VerifyParameters(businessLicense);
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * 保存营业执照
 | 
			
		||||
     *
 | 
			
		||||
| 
						 | 
				
			
			@ -92,7 +78,7 @@ public class ApiCuMemberBusinessLicenseController extends BaseController {
 | 
			
		|||
        //参数校验
 | 
			
		||||
        if (VerifyParameters(businessLicense).equals(AjaxResult.success())) {
 | 
			
		||||
            //查询是否已实名认证
 | 
			
		||||
            CuMemberAuthenticationVO authenticationVO = authenticationService.selectCuMemberAuthenticationByPkMember(CuMemberAuthenticationVO.builder().pkMember(SecurityUtils.getUserId()).pkCountry(SecurityUtils.getPkCountry()).build());
 | 
			
		||||
            CuMemberAuthenticationVO authenticationVO = iCuMemberAuthenticationService.selectCuMemberAuthenticationByPkMember(CuMemberAuthenticationVO.builder().pkMember(SecurityUtils.getUserId()).pkCountry(SecurityUtils.getPkCountry()).build());
 | 
			
		||||
            //验证实名认证的真实姓名与法人的姓名是否一致
 | 
			
		||||
            if (null != authenticationVO) {
 | 
			
		||||
                String accountName = authenticationVO.getAccountName();
 | 
			
		||||
| 
						 | 
				
			
			@ -106,14 +92,12 @@ public class ApiCuMemberBusinessLicenseController extends BaseController {
 | 
			
		|||
            memberBusinessLicense.setModifiedTime(new Date());
 | 
			
		||||
            memberBusinessLicense.setPkModified(SecurityUtils.getUserId());
 | 
			
		||||
            memberBusinessLicense.setApproveStatus(EApproveStatus.ALREADY_SUBMIT.getValue());
 | 
			
		||||
            return toAjax(cuMemberBusinessLicenseService.updateById(memberBusinessLicense));
 | 
			
		||||
            return toAjax(iCuMemberBusinessLicenseService.updateById(memberBusinessLicense));
 | 
			
		||||
        } else {
 | 
			
		||||
            return VerifyParameters(businessLicense);
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * 查看详情
 | 
			
		||||
     *
 | 
			
		||||
| 
						 | 
				
			
			@ -121,37 +105,9 @@ public class ApiCuMemberBusinessLicenseController extends BaseController {
 | 
			
		|||
     */
 | 
			
		||||
    @GetMapping("/detail")
 | 
			
		||||
    public AjaxResult showDetail() {
 | 
			
		||||
        return AjaxResult.success(cuMemberBusinessLicenseService.selectBusinessLicenseById(SecurityUtils.getUserId(), SecurityUtils.getPkCountry()));
 | 
			
		||||
        return AjaxResult.success(iCuMemberBusinessLicenseService.selectBusinessLicenseById(SecurityUtils.getUserId(), SecurityUtils.getPkCountry()));
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * 是否上传营业执照
 | 
			
		||||
     *
 | 
			
		||||
     * @param businessModule 1:提现 2:转账 (来源枚举EBusinessModule)
 | 
			
		||||
     * @return AjaxResult
 | 
			
		||||
     */
 | 
			
		||||
    @GetMapping("/is-exist")
 | 
			
		||||
    public AjaxResult isExistBusinessLicence(Integer businessModule) {
 | 
			
		||||
        String flag = EYesNo.YES.getValue();
 | 
			
		||||
        Long pkMember = SecurityUtils.getUserId();
 | 
			
		||||
        Integer pkCountry = SecurityUtils.getPkCountry();
 | 
			
		||||
        //查询配置白名单
 | 
			
		||||
        BdTradeWhiteConfig bdTradeWhiteConfig = iCuMemberBaseService.selectConfigWhite(pkMember, pkCountry, businessModule);
 | 
			
		||||
        if (null == bdTradeWhiteConfig) {
 | 
			
		||||
            //查询是否配置营业执照
 | 
			
		||||
            BdTradeConfig bdTradeConfig = iCuMemberBaseService.selectConfigTrade(pkMember, pkCountry, businessModule, EVerificationModule.BUSINESS_LICENSE);
 | 
			
		||||
            //配置后才进行验证
 | 
			
		||||
            if (null != bdTradeConfig) {
 | 
			
		||||
                //查询是否完成经销商认证
 | 
			
		||||
                CuMember cuMember = iCuMemberService.queryMember(pkMember);
 | 
			
		||||
                flag = null != cuMember && cuMember.getIsDealer().equals(EYesNo.YES.getIntValue()) ? EYesNo.YES.getValue() : EYesNo.NO.getValue();
 | 
			
		||||
            }
 | 
			
		||||
        }
 | 
			
		||||
        return AjaxResult.success().put("flag", flag);
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * 校验参数
 | 
			
		||||
     *
 | 
			
		||||
| 
						 | 
				
			
			@ -173,5 +129,4 @@ public class ApiCuMemberBusinessLicenseController extends BaseController {
 | 
			
		|||
        return AjaxResult.success();
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
}
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -599,10 +599,6 @@ public interface CuMemberMapper extends BaseMapper<CuMember> {
 | 
			
		|||
     */
 | 
			
		||||
    BdTradeWhiteConfig selectMemberByUnderBlood(@Param("pkMember") Long pkMember, @Param("memberType") Integer memberType);
 | 
			
		||||
 | 
			
		||||
    int validateCompanyCount(@Param("gradeValue") Integer gradeValue);
 | 
			
		||||
 | 
			
		||||
    int validateBranchOfficeCount(@Param("areaId") Integer areaId, @Param("userId") Long userId);
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * 查询博羚店主会员
 | 
			
		||||
     *
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -868,10 +868,6 @@ public interface ICuMemberService extends IService<CuMember> {
 | 
			
		|||
     */
 | 
			
		||||
    BdTradeWhiteConfig selectMemberByUnderBlood(Long pkMember, Integer memberType);
 | 
			
		||||
 | 
			
		||||
    int validateCompanyCount();
 | 
			
		||||
 | 
			
		||||
    int validateBranchOfficeCount(Integer areaId, Long userId);
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * 查询博羚店主会员
 | 
			
		||||
     *
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -1492,8 +1492,8 @@ public class CuMemberBusinessServiceImpl implements ICuMemberBusinessService {
 | 
			
		|||
        saveLevelUpgrade(cuMember, EUpgradeType.BUY_UPGRADE.getValue(), saOrder, 0);
 | 
			
		||||
 | 
			
		||||
        if (EGrade.VIP.getValue() == gradeDTO.getGradeValue()
 | 
			
		||||
                || EGrade.BRANCH_COMPANY.getValue() == gradeDTO.getGradeValue()) {
 | 
			
		||||
            // 店主、分公司级别,判断处理区域
 | 
			
		||||
                || EGrade.REGION.getValue() == gradeDTO.getGradeValue()) {
 | 
			
		||||
            // 店主、代理级别,判断处理区域
 | 
			
		||||
            if (null != saOrder.getRegionProvince()
 | 
			
		||||
                    && null != saOrder.getRegionCity()) {
 | 
			
		||||
                iCuMemberRetailRegionService.mergeMemberRetailRegion(CuMemberRetailRegion.builder()
 | 
			
		||||
| 
						 | 
				
			
			@ -1524,8 +1524,8 @@ public class CuMemberBusinessServiceImpl implements ICuMemberBusinessService {
 | 
			
		|||
            saveLevelUpgrade(cuMember, EUpgradeType.BUY_UPGRADE.getValue(), saOrder, saOrder.getPkGradeOld());
 | 
			
		||||
 | 
			
		||||
            if (EGrade.VIP.getValue() == gradeDTO.getGradeValue()
 | 
			
		||||
                    || EGrade.BRANCH_COMPANY.getValue() == gradeDTO.getGradeValue()) {
 | 
			
		||||
                // 店主、分公司级别,判断处理区域
 | 
			
		||||
                    || EGrade.REGION.getValue() == gradeDTO.getGradeValue()) {
 | 
			
		||||
                // 店主、代理级别,判断处理区域
 | 
			
		||||
                if (null != saOrder.getRegionProvince()
 | 
			
		||||
                        && null != saOrder.getRegionCity()) {
 | 
			
		||||
                    iCuMemberRetailRegionService.mergeMemberRetailRegion(CuMemberRetailRegion.builder()
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -3138,16 +3138,6 @@ public class CuMemberServiceImpl extends ServiceImpl<CuMemberMapper, CuMember> i
 | 
			
		|||
        return baseMapper.selectMemberByUnderBlood(pkMember, memberType);
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    @Override
 | 
			
		||||
    public int validateCompanyCount() {
 | 
			
		||||
        return baseMapper.validateCompanyCount(EGrade.COMPANY.getValue());
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    @Override
 | 
			
		||||
    public int validateBranchOfficeCount(Integer areaId, Long userId) {
 | 
			
		||||
        return baseMapper.validateBranchOfficeCount(areaId, userId);
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    @Override
 | 
			
		||||
    public CuMember getShopkeeperMember(Long pkMember) {
 | 
			
		||||
        return baseMapper.getShopkeeperMember(pkMember);
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -118,7 +118,7 @@ public class CuBonusVertexStatisTotalVO {
 | 
			
		|||
    private BigDecimal repurchaseAllAmount = BigDecimal.ZERO;
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * (复购直推收益+复购级差收益+复购拓展收益)*80% +海粉直推
 | 
			
		||||
     * (复购直推收益+复购级差收益+复购拓展收益)*80%
 | 
			
		||||
     * (复购级差+复购拓展 ) *0.8 +海粉直推
 | 
			
		||||
     */
 | 
			
		||||
    @Excel(name = "复购拨出金额(¥)", scale = 2)
 | 
			
		||||
| 
						 | 
				
			
			@ -127,7 +127,7 @@ public class CuBonusVertexStatisTotalVO {
 | 
			
		|||
 | 
			
		||||
    /**
 | 
			
		||||
     * (复购级差+复购拓展 ) *0.8 +海粉直推
 | 
			
		||||
     * 复购拨出比例(%) = (((复购直推收益+复购级差收益+复购拓展收益)*80%)+海粉直推)/复购总奖金(复购订单+海粉订单)
 | 
			
		||||
     * 复购拨出比例(%) = (((复购直推收益+复购级差收益+复购拓展收益)*80%))/复购总奖金(复购订单)
 | 
			
		||||
     */
 | 
			
		||||
    @Excel(name = "复购拨出比例(%)", scale = 2)
 | 
			
		||||
    @BigDecimalFormat
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -2371,18 +2371,6 @@
 | 
			
		|||
                and t0.category = 0)
 | 
			
		||||
        where rownum = 1
 | 
			
		||||
    </select>
 | 
			
		||||
    <select id="validateCompanyCount" resultType="java.lang.Integer">
 | 
			
		||||
        select count(pk_id)
 | 
			
		||||
        from cu_member
 | 
			
		||||
        where PK_SETTLE_GRADE in (select pk_id from BD_GRADE where GRADE_VALUE = #{gradeValue})
 | 
			
		||||
    </select>
 | 
			
		||||
    <select id="validateBranchOfficeCount" resultType="java.lang.Integer">
 | 
			
		||||
        select count(pk_id)
 | 
			
		||||
        from cu_member
 | 
			
		||||
        where PK_AREA_ID is not null
 | 
			
		||||
          and pk_area_id = #{areaId}
 | 
			
		||||
          and pk_id != #{userId}
 | 
			
		||||
    </select>
 | 
			
		||||
 | 
			
		||||
    <!-- 查询博羚店主会员 -->
 | 
			
		||||
    <select id="getShopkeeperMember" resultType="com.hzs.common.domain.member.base.CuMember">
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -243,11 +243,11 @@ public class RetailOrderServiceImpl implements IRetailOrderService {
 | 
			
		|||
            }
 | 
			
		||||
            Integer createPkGrade = createMember.getPkSettleGrade();
 | 
			
		||||
            BdGrade createGrade = gradeList.stream().filter(tmpData -> tmpData.getPkId().equals(createPkGrade)).findFirst().get();
 | 
			
		||||
            if (EGrade.BRANCH_COMPANY.getValue() == createGrade.getGradeValue()) {
 | 
			
		||||
            if (EGrade.REGION.getValue() == createGrade.getGradeValue()
 | 
			
		||||
                    || EGrade.DIRECTOR.getValue() == createGrade.getGradeValue()) {
 | 
			
		||||
                // 发货方式:提货中心
 | 
			
		||||
                saOrderExt.setDeliveryWay(EDelivery.PICK.getValue());
 | 
			
		||||
            }
 | 
			
		||||
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        return saOrderExt;
 | 
			
		||||
| 
						 | 
				
			
			@ -908,7 +908,6 @@ public class RetailOrderServiceImpl implements IRetailOrderService {
 | 
			
		|||
                    && boxWaresList.contains(waresDetailExt.getWaresCode())
 | 
			
		||||
                    && EYesNo.NO.getIntValue() == waresDetailExt.getIsGift()
 | 
			
		||||
            ) {
 | 
			
		||||
                // 2025.03.11 添加需求,复购专区、重消专区,指定盒数商品每月每人限购50件(赠品排除)
 | 
			
		||||
                waresNumMap.merge(waresDetailExt.getWaresCode(), waresDetailExt.getWaresQuantity(), Integer::sum);
 | 
			
		||||
                waresNameMap.put(waresDetailExt.getWaresCode(), waresDetailExt.getWaresName());
 | 
			
		||||
            }
 | 
			
		||||
| 
						 | 
				
			
			@ -925,8 +924,9 @@ public class RetailOrderServiceImpl implements IRetailOrderService {
 | 
			
		|||
                    || EGrade.S_VIP.getValue() == bdGrade.getGradeValue()) {
 | 
			
		||||
                // 会员、VIP、合伙人,每月限购10套
 | 
			
		||||
                limitNum = RetailConstants.V4_LIMIT;
 | 
			
		||||
            } else if (EGrade.BRANCH_COMPANY.getValue() == bdGrade.getGradeValue()) {
 | 
			
		||||
                // 分公司,每月限购25套
 | 
			
		||||
            } else if (EGrade.REGION.getValue() == bdGrade.getGradeValue()
 | 
			
		||||
                    || EGrade.DIRECTOR.getValue() == bdGrade.getGradeValue()) {
 | 
			
		||||
                // 区域代理、董事代理,每月限购25套
 | 
			
		||||
                limitNum = RetailConstants.V6_LIMIT;
 | 
			
		||||
            } else if (EGrade.COMPANY.getValue() == bdGrade.getGradeValue()) {
 | 
			
		||||
                // 总公司,不限购给一个很大的值
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -2161,8 +2161,8 @@ public class SaOrderServiceImpl extends ServiceImpl<SaOrderMapper, SaOrder> impl
 | 
			
		|||
 | 
			
		||||
            // 当前会员等级
 | 
			
		||||
            BdGrade memberGrade = gradeList.stream().filter(tmpGrade -> tmpGrade.getPkId().equals(updateGradeMember.getPkSettleGrade())).findFirst().get();
 | 
			
		||||
            if (memberGrade.getGradeValue().compareTo(EGrade.BRANCH_COMPANY.getValue()) >= 0) {
 | 
			
		||||
                // 会员等级大于等于分公司,不能通过升级进行购买了
 | 
			
		||||
            if (memberGrade.getGradeValue().compareTo(EGrade.REGION.getValue()) >= 0) {
 | 
			
		||||
                // 会员等级大于等于区域代理,不能通过升级进行购买了
 | 
			
		||||
                throw new ServiceException("当前已经是可以购买的最高等级");
 | 
			
		||||
            }
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -49,11 +49,11 @@ public class MemberFrameworkConstants {
 | 
			
		|||
     */
 | 
			
		||||
    public static final String S_VIP = "https://hzs-in.oss-cn-beijing.aliyuncs.com/test-new/20230428/5a4f6f65-dccb-486d-b3b9-3b60e6bbbcec.png";
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * 区代
 | 
			
		||||
     */
 | 
			
		||||
    public static final String COUNTY_AGENT = "https://hzs-in.oss-cn-beijing.aliyuncs.com/test-new/20230524/16244e18-77e1-4e20-8821-af3428671d8a.png";
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * 市代
 | 
			
		||||
     */
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -16,8 +16,8 @@ public class RetailConstants {
 | 
			
		|||
 | 
			
		||||
    /**
 | 
			
		||||
     * 2025.08.13 添加分公司级差收益,每1盒(4个产品)
 | 
			
		||||
     * 第一分公司4元
 | 
			
		||||
     * 第二分公司4元
 | 
			
		||||
     * 第一分公司4元 -- 区域代理
 | 
			
		||||
     * 第二分公司4元 -- 董事代理
 | 
			
		||||
     * 公司6元
 | 
			
		||||
     * 总拨出14元
 | 
			
		||||
     */
 | 
			
		||||
| 
						 | 
				
			
			@ -26,21 +26,21 @@ public class RetailConstants {
 | 
			
		|||
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * 会员 推 会员 60
 | 
			
		||||
     * VIP 推 会员 80
 | 
			
		||||
     * 合伙人 推 会员 100
 | 
			
		||||
     * 博羚店主 推 会员 200
 | 
			
		||||
     * 高级店主 推 会员 208
 | 
			
		||||
     * 分公司 推 会员 220
 | 
			
		||||
     * 总公司 推 会员 240
 | 
			
		||||
     * 会员 推 会员 30
 | 
			
		||||
     * VIP 推 会员 40
 | 
			
		||||
     * 合伙人 推 会员 50
 | 
			
		||||
     * 博羚店主 推 会员 100
 | 
			
		||||
     * 高级店主 推 会员 104
 | 
			
		||||
     * 区域代理、董事代理 推 会员 110
 | 
			
		||||
     * 总公司 推 会员 120
 | 
			
		||||
     */
 | 
			
		||||
    public static final BigDecimal V1_V1 = new BigDecimal("60");
 | 
			
		||||
    public static final BigDecimal V2_V1 = new BigDecimal("80");
 | 
			
		||||
    public static final BigDecimal V3_V1 = new BigDecimal("100");
 | 
			
		||||
    public static final BigDecimal V4_V1 = new BigDecimal("200");
 | 
			
		||||
    public static final BigDecimal V5_V1 = new BigDecimal("208");
 | 
			
		||||
    public static final BigDecimal V6_V1 = new BigDecimal("220");
 | 
			
		||||
    public static final BigDecimal V7_V1 = new BigDecimal("240");
 | 
			
		||||
    public static final BigDecimal V1_V1 = new BigDecimal("30");
 | 
			
		||||
    public static final BigDecimal V2_V1 = new BigDecimal("40");
 | 
			
		||||
    public static final BigDecimal V3_V1 = new BigDecimal("50");
 | 
			
		||||
    public static final BigDecimal V4_V1 = new BigDecimal("100");
 | 
			
		||||
    public static final BigDecimal V5_V1 = new BigDecimal("104");
 | 
			
		||||
    public static final BigDecimal V6_V7_V1 = new BigDecimal("110");
 | 
			
		||||
    public static final BigDecimal V8_V1 = new BigDecimal("120");
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * 会员 推 VIP 300
 | 
			
		||||
| 
						 | 
				
			
			@ -48,7 +48,7 @@ public class RetailConstants {
 | 
			
		|||
     * 合伙人 推 VIP 500
 | 
			
		||||
     * 博羚店主 推 VIP 1000
 | 
			
		||||
     * 高级店主 推 VIP 1040
 | 
			
		||||
     * 分公司 推 VIP 1100
 | 
			
		||||
     * 区域代理、董事代理 推 VIP 1100
 | 
			
		||||
     * 总公司 推 VIP 1200
 | 
			
		||||
     */
 | 
			
		||||
    public static final BigDecimal V1_V2 = new BigDecimal("300");
 | 
			
		||||
| 
						 | 
				
			
			@ -56,8 +56,8 @@ public class RetailConstants {
 | 
			
		|||
    public static final BigDecimal V3_V2 = new BigDecimal("500");
 | 
			
		||||
    public static final BigDecimal V4_V2 = new BigDecimal("1000");
 | 
			
		||||
    public static final BigDecimal V5_V2 = new BigDecimal("1040");
 | 
			
		||||
    public static final BigDecimal V6_V2 = new BigDecimal("1100");
 | 
			
		||||
    public static final BigDecimal V7_V2 = new BigDecimal("1200");
 | 
			
		||||
    public static final BigDecimal V6_V7_V2 = new BigDecimal("1100");
 | 
			
		||||
    public static final BigDecimal V8_V2 = new BigDecimal("1200");
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * 会员 推 合伙人 600
 | 
			
		||||
| 
						 | 
				
			
			@ -67,7 +67,7 @@ public class RetailConstants {
 | 
			
		|||
     * 合伙人3 推 合伙人 1300
 | 
			
		||||
     * 博羚店主 推 合伙人 2000
 | 
			
		||||
     * 高级店主 推 合伙人 2080
 | 
			
		||||
     * 分公司 推 合伙人 2200
 | 
			
		||||
     * 区域代理、董事代理 推 合伙人 2200
 | 
			
		||||
     * 总公司 推 合伙人 2400
 | 
			
		||||
     */
 | 
			
		||||
    public static final BigDecimal V1_V3 = new BigDecimal("600");
 | 
			
		||||
| 
						 | 
				
			
			@ -77,8 +77,8 @@ public class RetailConstants {
 | 
			
		|||
    public static final BigDecimal V3_V3_3 = new BigDecimal("1300");
 | 
			
		||||
    public static final BigDecimal V4_V3 = new BigDecimal("2000");
 | 
			
		||||
    public static final BigDecimal V5_V3 = new BigDecimal("2080");
 | 
			
		||||
    public static final BigDecimal V6_V3 = new BigDecimal("2200");
 | 
			
		||||
    public static final BigDecimal V7_V3 = new BigDecimal("2400");
 | 
			
		||||
    public static final BigDecimal V6_V7_V3 = new BigDecimal("2200");
 | 
			
		||||
    public static final BigDecimal V8_V3 = new BigDecimal("2400");
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * 会员 推 博羚店主 1200
 | 
			
		||||
| 
						 | 
				
			
			@ -88,7 +88,7 @@ public class RetailConstants {
 | 
			
		|||
     * 合伙人3 推 博羚店主 2600
 | 
			
		||||
     * 博羚店主 推 博羚店主 4000
 | 
			
		||||
     * 高级店主 推 博羚店主 4160
 | 
			
		||||
     * 分公司 推 博羚店主 4400
 | 
			
		||||
     * 区域代理、董事代理 推 博羚店主 4400
 | 
			
		||||
     * 总公司 推 博羚店主 4800
 | 
			
		||||
     */
 | 
			
		||||
    public static final BigDecimal V1_V4 = new BigDecimal("1200");
 | 
			
		||||
| 
						 | 
				
			
			@ -98,19 +98,19 @@ public class RetailConstants {
 | 
			
		|||
    public static final BigDecimal V3_V4_3 = new BigDecimal("2600");
 | 
			
		||||
    public static final BigDecimal V4_V4 = new BigDecimal("4000");
 | 
			
		||||
    public static final BigDecimal V5_V4 = new BigDecimal("4160");
 | 
			
		||||
    public static final BigDecimal V6_V4 = new BigDecimal("4400");
 | 
			
		||||
    public static final BigDecimal V7_V4 = new BigDecimal("4800");
 | 
			
		||||
    public static final BigDecimal V6_V7_V4 = new BigDecimal("4400");
 | 
			
		||||
    public static final BigDecimal V8_V4 = new BigDecimal("4800");
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * 博羚店主 推 分公司 50000
 | 
			
		||||
     * 高级店主 推 分公司 52000
 | 
			
		||||
     * 分公司 推 分公司 55000
 | 
			
		||||
     * 区域代理、董事代理 推 分公司 55000
 | 
			
		||||
     * 总公司 推 分公司 60000
 | 
			
		||||
     */
 | 
			
		||||
    public static final BigDecimal V4_V6 = new BigDecimal("50000");
 | 
			
		||||
    public static final BigDecimal V5_V6 = new BigDecimal("52000");
 | 
			
		||||
    public static final BigDecimal V6_V6 = new BigDecimal("55000");
 | 
			
		||||
    public static final BigDecimal V7_V6 = new BigDecimal("60000");
 | 
			
		||||
    public static final BigDecimal V6_V7_V6 = new BigDecimal("55000");
 | 
			
		||||
    public static final BigDecimal V8_V6 = new BigDecimal("60000");
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * 复购:
 | 
			
		||||
| 
						 | 
				
			
			@ -121,7 +121,7 @@ public class RetailConstants {
 | 
			
		|||
     * 合伙人3 拿 13
 | 
			
		||||
     * 博羚店主 拿 20
 | 
			
		||||
     * 高级店主 拿 20.8
 | 
			
		||||
     * 分公司 拿 22
 | 
			
		||||
     * 区域代理、董事代理 拿 22
 | 
			
		||||
     * 总公司 拿 24
 | 
			
		||||
     */
 | 
			
		||||
    public static final BigDecimal REPURCHASE_V1 = new BigDecimal("6");
 | 
			
		||||
| 
						 | 
				
			
			@ -131,8 +131,8 @@ public class RetailConstants {
 | 
			
		|||
    public static final BigDecimal REPURCHASE_V3_3 = new BigDecimal("13");
 | 
			
		||||
    public static final BigDecimal REPURCHASE_V4 = new BigDecimal("20");
 | 
			
		||||
    public static final BigDecimal REPURCHASE_V5 = new BigDecimal("20.8");
 | 
			
		||||
    public static final BigDecimal REPURCHASE_V6 = new BigDecimal("22");
 | 
			
		||||
    public static final BigDecimal REPURCHASE_V7 = new BigDecimal("24");
 | 
			
		||||
    public static final BigDecimal REPURCHASE_V6_V7 = new BigDecimal("22");
 | 
			
		||||
    public static final BigDecimal REPURCHASE_V8 = new BigDecimal("24");
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * 会员、VIP、合伙人 每月可购买1套(4盒)
 | 
			
		||||
| 
						 | 
				
			
			@ -141,8 +141,8 @@ public class RetailConstants {
 | 
			
		|||
     * 总公司 不限购给一个很大的值
 | 
			
		||||
     */
 | 
			
		||||
    public static final Integer V1_LIMIT = 1;
 | 
			
		||||
    public static final Integer V4_LIMIT = 10;
 | 
			
		||||
    public static final Integer V6_LIMIT = 25;
 | 
			
		||||
    public static final Integer V4_LIMIT = 10000;
 | 
			
		||||
    public static final Integer V6_LIMIT = 10000;
 | 
			
		||||
    public static final Integer V7_LIMIT = 10000;
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -55,13 +55,18 @@ public enum EGrade {
 | 
			
		|||
    S_VIP(6, 70, "V5", 0, EnumsPrefixConstants.GRADE + "70", MemberFrameworkConstants.S_VIP),
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * 分公司
 | 
			
		||||
     * 区域代理
 | 
			
		||||
     */
 | 
			
		||||
    BRANCH_COMPANY(7, 80, "V6", 0, EnumsPrefixConstants.GRADE + "80", MemberFrameworkConstants.COUNTY_AGENT),
 | 
			
		||||
    REGION(7, 80, "V6", 0, EnumsPrefixConstants.GRADE + "80", MemberFrameworkConstants.COUNTY_AGENT),
 | 
			
		||||
    /**
 | 
			
		||||
     * 董事代理
 | 
			
		||||
     */
 | 
			
		||||
    DIRECTOR(8, 90, "V7", 0, EnumsPrefixConstants.GRADE + "90", MemberFrameworkConstants.COUNTY_AGENT),
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * 总公司
 | 
			
		||||
     */
 | 
			
		||||
    COMPANY(8, 90, "V7", 0, EnumsPrefixConstants.GRADE + "90", MemberFrameworkConstants.CITY_AGENT),
 | 
			
		||||
    COMPANY(9, 100, "V8", 0, EnumsPrefixConstants.GRADE + "100", MemberFrameworkConstants.CITY_AGENT),
 | 
			
		||||
 | 
			
		||||
    ;
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -9,8 +9,6 @@ import org.springframework.web.multipart.MultipartFile;
 | 
			
		|||
 | 
			
		||||
/**
 | 
			
		||||
 * 文件类型工具类
 | 
			
		||||
 *
 | 
			
		||||
 * @author hzs
 | 
			
		||||
 */
 | 
			
		||||
public class FileTypeUtils {
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
		Reference in New Issue