Compare commits
	
		
			12 Commits
		
	
	
		
			e06a9cc363
			...
			8bea3e39b6
		
	
	| Author | SHA1 | Date | 
|---|---|---|
| 
							
							
								
								 | 
						8bea3e39b6 | |
| 
							
							
								
								 | 
						4ff23dadbd | |
| 
							
							
								
								 | 
						82f0ab78a0 | |
| 
							
							
								
								 | 
						d19e7b15aa | |
| 
							
							
								
								 | 
						ae3b75ae33 | |
| 
							
							
								
								 | 
						a0f69be043 | |
| 
							
							
								
								 | 
						88c0c939fd | |
| 
							
							
								 | 
						9ccd411aa6 | |
| 
							
							
								
								 | 
						eaa6c9d117 | |
| 
							
							
								
								 | 
						4b9db13ef4 | |
| 
							
							
								
								 | 
						93498d45af | |
| 
							
							
								
								 | 
						d21e31a84f | 
| 
						 | 
					@ -38,4 +38,14 @@ public interface IMemberJobServiceApi {
 | 
				
			||||||
     * @return R<CuMemberRecharge>
 | 
					     * @return R<CuMemberRecharge>
 | 
				
			||||||
     */
 | 
					     */
 | 
				
			||||||
    R<CuMemberRecharge> selectRechargeTotalAmount(Date startDate, Date endDate);
 | 
					    R<CuMemberRecharge> selectRechargeTotalAmount(Date startDate, Date endDate);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    /**
 | 
				
			||||||
 | 
					     * 自动清理垃圾数据
 | 
				
			||||||
 | 
					     *  CU_MEMBER_AWARDS
 | 
				
			||||||
 | 
					     *  CU_MEMBER_LEVEL
 | 
				
			||||||
 | 
					     *  CU_MEMBER_GRADE
 | 
				
			||||||
 | 
					     * @return
 | 
				
			||||||
 | 
					     */
 | 
				
			||||||
 | 
					    R autoDeleteGarbageData();
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -37,21 +37,11 @@ public class BonusConfigDTO implements Serializable {
 | 
				
			||||||
     */
 | 
					     */
 | 
				
			||||||
    private Map<String, BonusDirectDTO> bonusDirectDtoMap;
 | 
					    private Map<String, BonusDirectDTO> bonusDirectDtoMap;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    /**
 | 
					 | 
				
			||||||
     * 嗨粉直推奖励配置 key 第一个键国家主键 ,第二个键 range_type+pk_level
 | 
					 | 
				
			||||||
     */
 | 
					 | 
				
			||||||
    private Map<Integer, List<BonusHiPinkDTO>> bonusHiPinkDtoMap;
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
    /**
 | 
					    /**
 | 
				
			||||||
     * 一次性补差 key 国家作为主键,只有一条
 | 
					     * 一次性补差 key 国家作为主键,只有一条
 | 
				
			||||||
     */
 | 
					     */
 | 
				
			||||||
    private Map<Integer, BonusDifferenceDTO> bonusDifferenceDtoMap;
 | 
					    private Map<Integer, BonusDifferenceDTO> bonusDifferenceDtoMap;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    /**
 | 
					 | 
				
			||||||
     * 奖金4-N配置 国家
 | 
					 | 
				
			||||||
     */
 | 
					 | 
				
			||||||
    private Map<Integer, BonusExpandDTO> bonusExpandMap;
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
    /**
 | 
					    /**
 | 
				
			||||||
     * 复购推荐奖励配置 key第一个键国家主键,第二个键 代数
 | 
					     * 复购推荐奖励配置 key第一个键国家主键,第二个键 代数
 | 
				
			||||||
     */
 | 
					     */
 | 
				
			||||||
| 
						 | 
					@ -84,7 +74,6 @@ public class BonusConfigDTO implements Serializable {
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    private List<BdAwards> awardsList;
 | 
					    private List<BdAwards> awardsList;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					 | 
				
			||||||
    /**
 | 
					    /**
 | 
				
			||||||
     * 奖金扣项 需要主键 奖金主键
 | 
					     * 奖金扣项 需要主键 奖金主键
 | 
				
			||||||
     */
 | 
					     */
 | 
				
			||||||
| 
						 | 
					@ -95,9 +84,4 @@ public class BonusConfigDTO implements Serializable {
 | 
				
			||||||
     */
 | 
					     */
 | 
				
			||||||
    private Map<String, BdBonusService> bonusServiceMap;
 | 
					    private Map<String, BdBonusService> bonusServiceMap;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    /**
 | 
					 | 
				
			||||||
     * 云代奖金 需要主键 国家+收益类型
 | 
					 | 
				
			||||||
     */
 | 
					 | 
				
			||||||
    private Map<String, BdBonusCloud> bonusCloudMap;
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -113,16 +113,16 @@ public class GradeDTO implements Serializable {
 | 
				
			||||||
    /**
 | 
					    /**
 | 
				
			||||||
     * 购买盒数
 | 
					     * 购买盒数
 | 
				
			||||||
     */
 | 
					     */
 | 
				
			||||||
    private Integer boxNumber;
 | 
					    private BigDecimal boxNumber;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    /**
 | 
					    /**
 | 
				
			||||||
     * 累计盒数
 | 
					     * 累计盒数
 | 
				
			||||||
     */
 | 
					     */
 | 
				
			||||||
    private Integer boxTotal;
 | 
					    private BigDecimal boxTotal;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    /**
 | 
					    /**
 | 
				
			||||||
     * 小市场盒数
 | 
					     * 小市场盒数
 | 
				
			||||||
     */
 | 
					     */
 | 
				
			||||||
    private Integer boxSmallTotal;
 | 
					    private BigDecimal boxSmallTotal;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -6,6 +6,7 @@ import com.hzs.member.account.IMemberJobServiceApi;
 | 
				
			||||||
import com.hzs.member.account.service.ICuMemberAccountDetailService;
 | 
					import com.hzs.member.account.service.ICuMemberAccountDetailService;
 | 
				
			||||||
import com.hzs.member.account.service.ICuMemberRechargeService;
 | 
					import com.hzs.member.account.service.ICuMemberRechargeService;
 | 
				
			||||||
import com.hzs.member.account.service.ICuMemberWithdrawService;
 | 
					import com.hzs.member.account.service.ICuMemberWithdrawService;
 | 
				
			||||||
 | 
					import com.hzs.member.base.mapper.DeleteGarbageDataMapper;
 | 
				
			||||||
import lombok.extern.slf4j.Slf4j;
 | 
					import lombok.extern.slf4j.Slf4j;
 | 
				
			||||||
import org.apache.dubbo.config.annotation.DubboService;
 | 
					import org.apache.dubbo.config.annotation.DubboService;
 | 
				
			||||||
import org.springframework.beans.factory.annotation.Autowired;
 | 
					import org.springframework.beans.factory.annotation.Autowired;
 | 
				
			||||||
| 
						 | 
					@ -35,6 +36,10 @@ public class IMemberJobServiceProvider implements IMemberJobServiceApi {
 | 
				
			||||||
    @Autowired
 | 
					    @Autowired
 | 
				
			||||||
    private ICuMemberRechargeService memberRechargeService;
 | 
					    private ICuMemberRechargeService memberRechargeService;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    @Autowired
 | 
				
			||||||
 | 
					    private DeleteGarbageDataMapper deleteGarbageDataMapper;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    @Override
 | 
					    @Override
 | 
				
			||||||
    public R insertAccountDetail() {
 | 
					    public R insertAccountDetail() {
 | 
				
			||||||
        try {
 | 
					        try {
 | 
				
			||||||
| 
						 | 
					@ -64,4 +69,12 @@ public class IMemberJobServiceProvider implements IMemberJobServiceApi {
 | 
				
			||||||
       return R.ok(memberRechargeService.selectRechargeTotalAmount(startDate, endDate));
 | 
					       return R.ok(memberRechargeService.selectRechargeTotalAmount(startDate, endDate));
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    @Override
 | 
				
			||||||
 | 
					    public R autoDeleteGarbageData() {
 | 
				
			||||||
 | 
					        deleteGarbageDataMapper.deleteMemberAwards(30);
 | 
				
			||||||
 | 
					        deleteGarbageDataMapper.deleteMemberLevel(30);
 | 
				
			||||||
 | 
					        deleteGarbageDataMapper.deleteMemberGrade(30);
 | 
				
			||||||
 | 
					        return R.ok();
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -0,0 +1,22 @@
 | 
				
			||||||
 | 
					package com.hzs.member.base.mapper;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					import com.baomidou.mybatisplus.core.mapper.BaseMapper;
 | 
				
			||||||
 | 
					import com.hzs.common.domain.member.base.CuMemberAgent;
 | 
				
			||||||
 | 
					import org.apache.ibatis.annotations.Param;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					import java.util.Date;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					/**
 | 
				
			||||||
 | 
					 * <p>
 | 
				
			||||||
 | 
					 * 会员信息-代理商信息 Mapper 接口
 | 
				
			||||||
 | 
					 * </p>
 | 
				
			||||||
 | 
					 *
 | 
				
			||||||
 | 
					 * @author hzs
 | 
				
			||||||
 | 
					 * @since 2022-08-31
 | 
				
			||||||
 | 
					 */
 | 
				
			||||||
 | 
					public interface DeleteGarbageDataMapper extends BaseMapper {
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    void deleteMemberAwards(@Param("days") Integer days);
 | 
				
			||||||
 | 
					    void deleteMemberLevel(@Param("days") Integer days);
 | 
				
			||||||
 | 
					    void deleteMemberGrade(@Param("days") Integer days);
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
| 
						 | 
					@ -115,7 +115,10 @@ public class RetailMemberController extends BaseController {
 | 
				
			||||||
                CuMemberRetailAchieveVO retailAchieve = iCuMemberRetailAchieveService.selectMemberSumAchieve(userId, pkCountry, systemType);
 | 
					                CuMemberRetailAchieveVO retailAchieve = iCuMemberRetailAchieveService.selectMemberSumAchieve(userId, pkCountry, systemType);
 | 
				
			||||||
                log.info("retailAchieve : {}", JSONUtil.toJsonStr(retailAchieve));
 | 
					                log.info("retailAchieve : {}", JSONUtil.toJsonStr(retailAchieve));
 | 
				
			||||||
                if(ObjectUtil.isNotEmpty(retailAchieve.getArealPv())
 | 
					                if(ObjectUtil.isNotEmpty(retailAchieve.getArealPv())
 | 
				
			||||||
                        && retailAchieve.getArealPv().compareTo(SysConstants.TOTAL_AREA_PV) >= 0){
 | 
					                        && retailAchieve.getArealPv().compareTo(SysConstants.TOTAL_AREA_PV) >= 0
 | 
				
			||||||
 | 
					                        && retailAchieve.getSmallAreaPv().compareTo(SysConstants.SMALL_AREA_PV) >=0
 | 
				
			||||||
 | 
					                ){
 | 
				
			||||||
 | 
					
 | 
				
			||||||
                    return AjaxResult.success(RetailMemberRegionVO.builder()
 | 
					                    return AjaxResult.success(RetailMemberRegionVO.builder()
 | 
				
			||||||
                            .regionStatus(EYesNo.YES.getIntValue())
 | 
					                            .regionStatus(EYesNo.YES.getIntValue())
 | 
				
			||||||
                            .build());
 | 
					                            .build());
 | 
				
			||||||
| 
						 | 
					@ -173,7 +176,9 @@ public class RetailMemberController extends BaseController {
 | 
				
			||||||
            }
 | 
					            }
 | 
				
			||||||
            if(EYesNo.YES.getIntValue() == cuMemberRetailRegionExt.getIsActivate()){
 | 
					            if(EYesNo.YES.getIntValue() == cuMemberRetailRegionExt.getIsActivate()){
 | 
				
			||||||
                CuMemberRetailAchieveVO retailAchieve = iCuMemberRetailAchieveService.selectMemberSumAchieve(userId, pkCountry, systemType);
 | 
					                CuMemberRetailAchieveVO retailAchieve = iCuMemberRetailAchieveService.selectMemberSumAchieve(userId, pkCountry, systemType);
 | 
				
			||||||
                if(retailAchieve.getArealPv().compareTo(SysConstants.TOTAL_AREA_PV) >= 0){
 | 
					                if(retailAchieve.getArealPv().compareTo(SysConstants.TOTAL_AREA_PV) >= 0
 | 
				
			||||||
 | 
					                        && retailAchieve.getSmallAreaPv().compareTo(SysConstants.SMALL_AREA_PV) >=0
 | 
				
			||||||
 | 
					                ){
 | 
				
			||||||
                    canSet = true;
 | 
					                    canSet = true;
 | 
				
			||||||
                }
 | 
					                }
 | 
				
			||||||
            }
 | 
					            }
 | 
				
			||||||
| 
						 | 
					@ -220,22 +225,25 @@ public class RetailMemberController extends BaseController {
 | 
				
			||||||
        }
 | 
					        }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        // 校验区域是否被占用
 | 
					        // 校验区域是否被占用
 | 
				
			||||||
        CuMemberRetailRegion cuMemberRetailRegion = iCuMemberRetailRegionService.getOne(Wrappers.<CuMemberRetailRegion>lambdaQuery()
 | 
					//        CuMemberRetailRegion cuMemberRetailRegion = iCuMemberRetailRegionService.getOne(Wrappers.<CuMemberRetailRegion>lambdaQuery()
 | 
				
			||||||
                .eq(CuMemberRetailRegion::getProvince, param.getProvince())
 | 
					//                .eq(CuMemberRetailRegion::getProvince, param.getProvince())
 | 
				
			||||||
                .eq(CuMemberRetailRegion::getCity, param.getCity())
 | 
					//                .eq(CuMemberRetailRegion::getCity, param.getCity())
 | 
				
			||||||
                .eq(CuMemberRetailRegion::getCounty, param.getCounty())
 | 
					//                .eq(CuMemberRetailRegion::getCounty, param.getCounty())
 | 
				
			||||||
                .eq(CuMemberRetailRegion::getEffective, EYesNo.YES.getIntValue())
 | 
					//                .eq(CuMemberRetailRegion::getEffective, EYesNo.YES.getIntValue())
 | 
				
			||||||
                .eq(CuMemberRetailRegion::getSystemType, systemType)
 | 
					//                .eq(CuMemberRetailRegion::getSystemType, systemType)
 | 
				
			||||||
        );
 | 
					//        );
 | 
				
			||||||
        if (null != cuMemberRetailRegion) {
 | 
					//        if (null != cuMemberRetailRegion) {
 | 
				
			||||||
            if (userId.equals(cuMemberRetailRegion.getPkMember())) {
 | 
					//            if (userId.equals(cuMemberRetailRegion.getPkMember())) {
 | 
				
			||||||
                // 当前收益区域就是当前会员,不需要处理
 | 
					//                // 当前收益区域就是当前会员,不需要处理
 | 
				
			||||||
                return AjaxResult.success();
 | 
					//                return AjaxResult.success();
 | 
				
			||||||
            } else {
 | 
					//            } else {
 | 
				
			||||||
                return AjaxResult.error("当前区域已经被占用");
 | 
					//                return AjaxResult.error("当前区域已经被占用");
 | 
				
			||||||
            }
 | 
					//            }
 | 
				
			||||||
 | 
					//        }
 | 
				
			||||||
 | 
					        int cuMemberRetailRegion = iCuMemberRetailRegionService.validateBindCount(param, EYesNo.YES.getIntValue(), SecurityUtils.getSystemType(), param.getPkMember());
 | 
				
			||||||
 | 
					        if (cuMemberRetailRegion > 0) {
 | 
				
			||||||
 | 
					            return AjaxResult.error("当前区域已经被占用");
 | 
				
			||||||
        }
 | 
					        }
 | 
				
			||||||
 | 
					 | 
				
			||||||
        param.setPkId(cuMemberRetailRegionExt.getPkId());
 | 
					        param.setPkId(cuMemberRetailRegionExt.getPkId());
 | 
				
			||||||
        param.setPkMember(userId);
 | 
					        param.setPkMember(userId);
 | 
				
			||||||
        param.setPkCountry(pkCountry);
 | 
					        param.setPkCountry(pkCountry);
 | 
				
			||||||
| 
						 | 
					@ -260,7 +268,6 @@ public class RetailMemberController extends BaseController {
 | 
				
			||||||
        PageUtils.clearPage();
 | 
					        PageUtils.clearPage();
 | 
				
			||||||
        List<BdArea> areaList = iCuMemberRetailRegionService.listChooseRegion(SecurityUtils.getSystemType());
 | 
					        List<BdArea> areaList = iCuMemberRetailRegionService.listChooseRegion(SecurityUtils.getSystemType());
 | 
				
			||||||
        if (CollectionUtil.isEmpty(areaList)) {
 | 
					        if (CollectionUtil.isEmpty(areaList)) {
 | 
				
			||||||
            log.info("region-tree: 111");
 | 
					 | 
				
			||||||
            return AjaxResult.success();
 | 
					            return AjaxResult.success();
 | 
				
			||||||
        }
 | 
					        }
 | 
				
			||||||
        TreeNodeConfig treeNodeConfig = new TreeNodeConfig();
 | 
					        TreeNodeConfig treeNodeConfig = new TreeNodeConfig();
 | 
				
			||||||
| 
						 | 
					@ -273,7 +280,6 @@ public class RetailMemberController extends BaseController {
 | 
				
			||||||
                    tree.setParentId(treeNode.getParent().toString());
 | 
					                    tree.setParentId(treeNode.getParent().toString());
 | 
				
			||||||
                    tree.setName(treeNode.getName());
 | 
					                    tree.setName(treeNode.getName());
 | 
				
			||||||
                });
 | 
					                });
 | 
				
			||||||
        log.info("region-tree: 222");
 | 
					 | 
				
			||||||
        return AjaxResult.success(build);
 | 
					        return AjaxResult.success(build);
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -152,13 +152,14 @@ public class CuMemberRetailRegionController extends BaseController {
 | 
				
			||||||
            return AjaxResult.error(ConfigMsgConstants.MEMBER_RETAIL_REGION_REPEAT);
 | 
					            return AjaxResult.error(ConfigMsgConstants.MEMBER_RETAIL_REGION_REPEAT);
 | 
				
			||||||
        }
 | 
					        }
 | 
				
			||||||
        // 校验区域是否被占用
 | 
					        // 校验区域是否被占用
 | 
				
			||||||
        int cuMemberRetailRegion = cuMemberRetailRegionService.count(Wrappers.<CuMemberRetailRegion>lambdaQuery()
 | 
					//        int cuMemberRetailRegion = cuMemberRetailRegionService.count(Wrappers.<CuMemberRetailRegion>lambdaQuery()
 | 
				
			||||||
                .eq(CuMemberRetailRegion::getProvince, mrrExt.getProvince())
 | 
					//                .eq(CuMemberRetailRegion::getProvince, mrrExt.getProvince())
 | 
				
			||||||
                .eq(CuMemberRetailRegion::getCity, mrrExt.getCity())
 | 
					//                .eq(CuMemberRetailRegion::getCity, mrrExt.getCity())
 | 
				
			||||||
                .eq(CuMemberRetailRegion::getCounty, mrrExt.getCounty())
 | 
					//                .eq(CuMemberRetailRegion::getCounty, mrrExt.getCounty())
 | 
				
			||||||
                .eq(CuMemberRetailRegion::getEffective, EYesNo.YES.getIntValue())
 | 
					//                .eq(CuMemberRetailRegion::getEffective, EYesNo.YES.getIntValue())
 | 
				
			||||||
                .eq(CuMemberRetailRegion::getSystemType, systemType)
 | 
					//                .eq(CuMemberRetailRegion::getSystemType, systemType)
 | 
				
			||||||
        );
 | 
					//        );
 | 
				
			||||||
 | 
					        int cuMemberRetailRegion = cuMemberRetailRegionService.validateBindCount(mrrExt, EYesNo.YES.getIntValue(), SecurityUtils.getSystemType(), mrrExt.getPkMember());
 | 
				
			||||||
        if (cuMemberRetailRegion > 0) {
 | 
					        if (cuMemberRetailRegion > 0) {
 | 
				
			||||||
            return AjaxResult.error("当前区域已经被占用");
 | 
					            return AjaxResult.error("当前区域已经被占用");
 | 
				
			||||||
        }
 | 
					        }
 | 
				
			||||||
| 
						 | 
					@ -195,19 +196,21 @@ public class CuMemberRetailRegionController extends BaseController {
 | 
				
			||||||
        }
 | 
					        }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        // 校验区域是否被占用
 | 
					        // 校验区域是否被占用
 | 
				
			||||||
        int cuMemberRetailRegion = cuMemberRetailRegionService.count(Wrappers.<CuMemberRetailRegion>lambdaQuery()
 | 
					//        int cuMemberRetailRegion = cuMemberRetailRegionService.count(Wrappers.<CuMemberRetailRegion>lambdaQuery()
 | 
				
			||||||
                .eq(CuMemberRetailRegion::getProvince, mrrExt.getProvince())
 | 
					//                .eq(CuMemberRetailRegion::getProvince, mrrExt.getProvince())
 | 
				
			||||||
                .eq(CuMemberRetailRegion::getCity, mrrExt.getCity())
 | 
					//                .eq(CuMemberRetailRegion::getCity, mrrExt.getCity())
 | 
				
			||||||
                .eq(CuMemberRetailRegion::getCounty, mrrExt.getCounty())
 | 
					//                .eq(CuMemberRetailRegion::getCounty, mrrExt.getCounty())
 | 
				
			||||||
                .eq(CuMemberRetailRegion::getEffective, EYesNo.YES.getIntValue())
 | 
					//                .eq(CuMemberRetailRegion::getEffective, EYesNo.YES.getIntValue())
 | 
				
			||||||
                .eq(CuMemberRetailRegion::getSystemType, SecurityUtils.getSystemType())
 | 
					//                .eq(CuMemberRetailRegion::getSystemType, SecurityUtils.getSystemType())
 | 
				
			||||||
                .ne(CuMemberRetailRegion::getPkId, mrrExt.getPkId())
 | 
					//                .ne(CuMemberRetailRegion::getPkId, mrrExt.getPkId())
 | 
				
			||||||
        );
 | 
					//        );
 | 
				
			||||||
 | 
					        int cuMemberRetailRegion = cuMemberRetailRegionService.validateBindCount(mrrExt, EYesNo.YES.getIntValue(), SecurityUtils.getSystemType(), mrrExt.getPkMember());
 | 
				
			||||||
        if (cuMemberRetailRegion > 0) {
 | 
					        if (cuMemberRetailRegion > 0) {
 | 
				
			||||||
            return AjaxResult.error("当前区域已经被占用");
 | 
					            return AjaxResult.error("当前区域已经被占用");
 | 
				
			||||||
        }
 | 
					        }
 | 
				
			||||||
        mrrExt.setPkModified(SecurityUtils.getUserId());
 | 
					        mrrExt.setPkModified(SecurityUtils.getUserId());
 | 
				
			||||||
        mrrExt.setModifiedTime(new Date());
 | 
					        mrrExt.setModifiedTime(new Date());
 | 
				
			||||||
 | 
					        mrrExt.setRegionVertexPkId(cuMemberRetailRegionService.getRegionVertexPkIdByPkMember(mrrExt.getPkMember()));
 | 
				
			||||||
        return toAjax(cuMemberRetailRegionService.updateById(mrrExt));
 | 
					        return toAjax(cuMemberRetailRegionService.updateById(mrrExt));
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -8,6 +8,7 @@ import com.hzs.retail.member.vo.CuMemberRetailDataStatisticsDetailVO;
 | 
				
			||||||
import com.hzs.retail.member.vo.MarketDynamicsDetailVO;
 | 
					import com.hzs.retail.member.vo.MarketDynamicsDetailVO;
 | 
				
			||||||
import org.apache.ibatis.annotations.Param;
 | 
					import org.apache.ibatis.annotations.Param;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					import java.math.BigDecimal;
 | 
				
			||||||
import java.util.List;
 | 
					import java.util.List;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
/**
 | 
					/**
 | 
				
			||||||
| 
						 | 
					@ -61,7 +62,7 @@ public interface CuMemberRetailRangeMapper extends BaseMapper<CuMemberRetailRang
 | 
				
			||||||
     * @param cuMemberAchieveVO 入参
 | 
					     * @param cuMemberAchieveVO 入参
 | 
				
			||||||
     * @return CuMemberRetailAchieveVO
 | 
					     * @return CuMemberRetailAchieveVO
 | 
				
			||||||
     */
 | 
					     */
 | 
				
			||||||
    Integer selectMemberBoxNoWaterInjection(CuMemberRetailAchieveVO cuMemberAchieveVO);
 | 
					    BigDecimal selectMemberBoxNoWaterInjection(CuMemberRetailAchieveVO cuMemberAchieveVO);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    /**
 | 
					    /**
 | 
				
			||||||
| 
						 | 
					@ -70,7 +71,7 @@ public interface CuMemberRetailRangeMapper extends BaseMapper<CuMemberRetailRang
 | 
				
			||||||
     * @param cuMemberAchieveVO 入参
 | 
					     * @param cuMemberAchieveVO 入参
 | 
				
			||||||
     * @return CuMemberRetailAchieveVO
 | 
					     * @return CuMemberRetailAchieveVO
 | 
				
			||||||
     */
 | 
					     */
 | 
				
			||||||
    Integer selectMemberBoxWaterInjection(CuMemberRetailAchieveVO cuMemberAchieveVO);
 | 
					    BigDecimal selectMemberBoxWaterInjection(CuMemberRetailAchieveVO cuMemberAchieveVO);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    /**
 | 
					    /**
 | 
				
			||||||
| 
						 | 
					@ -79,7 +80,7 @@ public interface CuMemberRetailRangeMapper extends BaseMapper<CuMemberRetailRang
 | 
				
			||||||
     * @param cuMemberAchieveVO 入参
 | 
					     * @param cuMemberAchieveVO 入参
 | 
				
			||||||
     * @return CuMemberRetailAchieveVO
 | 
					     * @return CuMemberRetailAchieveVO
 | 
				
			||||||
     */
 | 
					     */
 | 
				
			||||||
    Integer selectMemberTotalBox(CuMemberRetailAchieveVO cuMemberAchieveVO);
 | 
					    BigDecimal selectMemberTotalBox(CuMemberRetailAchieveVO cuMemberAchieveVO);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    /**
 | 
					    /**
 | 
				
			||||||
     * 查询会员业绩
 | 
					     * 查询会员业绩
 | 
				
			||||||
| 
						 | 
					@ -184,7 +185,7 @@ public interface CuMemberRetailRangeMapper extends BaseMapper<CuMemberRetailRang
 | 
				
			||||||
     * @param param 入参
 | 
					     * @param param 入参
 | 
				
			||||||
     * @return Integer
 | 
					     * @return Integer
 | 
				
			||||||
     */
 | 
					     */
 | 
				
			||||||
    Integer selectSelfNewBox(CuMemberRetailAchieveVO param);
 | 
					    BigDecimal selectSelfNewBox(CuMemberRetailAchieveVO param);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    /**
 | 
					    /**
 | 
				
			||||||
     * 查询会员大小区盒数(市场动态)
 | 
					     * 查询会员大小区盒数(市场动态)
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -4,6 +4,7 @@ import com.baomidou.mybatisplus.core.mapper.BaseMapper;
 | 
				
			||||||
import com.hzs.common.domain.retail.member.CuMemberRetailRegion;
 | 
					import com.hzs.common.domain.retail.member.CuMemberRetailRegion;
 | 
				
			||||||
import com.hzs.common.domain.retail.member.ext.CuMemberRetailRegionExt;
 | 
					import com.hzs.common.domain.retail.member.ext.CuMemberRetailRegionExt;
 | 
				
			||||||
import com.hzs.common.domain.system.base.BdArea;
 | 
					import com.hzs.common.domain.system.base.BdArea;
 | 
				
			||||||
 | 
					import com.hzs.retail.member.param.RetailMemberRegionParam;
 | 
				
			||||||
import com.hzs.retail.member.vo.UnboundAreaVO;
 | 
					import com.hzs.retail.member.vo.UnboundAreaVO;
 | 
				
			||||||
import org.apache.ibatis.annotations.Param;
 | 
					import org.apache.ibatis.annotations.Param;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
| 
						 | 
					@ -32,7 +33,7 @@ public interface CuMemberRetailRegionMapper extends BaseMapper<CuMemberRetailReg
 | 
				
			||||||
     * @param systemType 系统类型
 | 
					     * @param systemType 系统类型
 | 
				
			||||||
     * @return
 | 
					     * @return
 | 
				
			||||||
     */
 | 
					     */
 | 
				
			||||||
    List<BdArea> listChooseRegion(@Param("systemType") Integer systemType);
 | 
					    List<BdArea> listChooseRegion(@Param("systemType") Integer systemType, @Param("userId") Long userId);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    /**
 | 
					    /**
 | 
				
			||||||
     * 插入收益区域
 | 
					     * 插入收益区域
 | 
				
			||||||
| 
						 | 
					@ -99,4 +100,9 @@ public interface CuMemberRetailRegionMapper extends BaseMapper<CuMemberRetailReg
 | 
				
			||||||
                         @Param("county") Integer county,
 | 
					                         @Param("county") Integer county,
 | 
				
			||||||
                         @Param("systemType") Integer systemType);
 | 
					                         @Param("systemType") Integer systemType);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    int validateBindCountA(@Param("mrrExt") CuMemberRetailRegionExt mrrExt, @Param("yesOrNoValue") Integer yesOrNoValue, @Param("systemType") Integer systemType, @Param("pkId") Long pkId);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    int validateBindCountB(@Param("mrrExt") RetailMemberRegionParam mrrExt, @Param("yesOrNoValue") Integer yesOrNoValue, @Param("systemType") Integer systemType, @Param("pkId") Long pkId);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    Long getRegionVertexPkIdByPkMember(@Param("pkMember") Long pkMember);
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -6,6 +6,7 @@ import com.hzs.common.domain.retail.member.ext.CuMemberRetailRegionExt;
 | 
				
			||||||
import com.hzs.common.domain.system.base.BdArea;
 | 
					import com.hzs.common.domain.system.base.BdArea;
 | 
				
			||||||
import com.hzs.retail.member.param.RetailMemberRegionParam;
 | 
					import com.hzs.retail.member.param.RetailMemberRegionParam;
 | 
				
			||||||
import com.hzs.retail.member.vo.UnboundAreaVO;
 | 
					import com.hzs.retail.member.vo.UnboundAreaVO;
 | 
				
			||||||
 | 
					import org.apache.ibatis.annotations.Param;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
import java.util.List;
 | 
					import java.util.List;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
| 
						 | 
					@ -84,4 +85,9 @@ public interface ICuMemberRetailRegionService extends IService<CuMemberRetailReg
 | 
				
			||||||
     */
 | 
					     */
 | 
				
			||||||
    void handleRepeatRegion();
 | 
					    void handleRepeatRegion();
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    int validateBindCount(CuMemberRetailRegionExt mrrExt, Integer yesOrNoValue, Integer systemType, Long pkId);
 | 
				
			||||||
 | 
					    int validateBindCount(RetailMemberRegionParam mrrExt, Integer yesOrNoValue, Integer systemType, Long pkId);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    Long getRegionVertexPkIdByPkMember(Long pkMember);
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -79,9 +79,9 @@ public class CuMemberRetailAchieveServiceImpl extends ServiceImpl<CuMemberRetail
 | 
				
			||||||
        Integer enableStatus = cuMember.getIsActivate();
 | 
					        Integer enableStatus = cuMember.getIsActivate();
 | 
				
			||||||
        if (null != enableStatus && enableStatus.equals(EYesNo.YES.getIntValue())) {
 | 
					        if (null != enableStatus && enableStatus.equals(EYesNo.YES.getIntValue())) {
 | 
				
			||||||
            //查询总盒数
 | 
					            //查询总盒数
 | 
				
			||||||
            Integer totalBox = baseMapper.selectMemberTotalBox(memberAchieveVO);
 | 
					            BigDecimal totalBox = baseMapper.selectMemberTotalBox(memberAchieveVO);
 | 
				
			||||||
            if (null != totalBox) {
 | 
					            if (null != totalBox) {
 | 
				
			||||||
                Integer maxBox = 0;
 | 
					                BigDecimal maxBox = BigDecimal.ZERO;
 | 
				
			||||||
                //查询是否配置注水
 | 
					                //查询是否配置注水
 | 
				
			||||||
                Integer total = baseMapper.selectWaterInjection(cuMember.getMemberCode());
 | 
					                Integer total = baseMapper.selectWaterInjection(cuMember.getMemberCode());
 | 
				
			||||||
                if (null != total && total > 0) {
 | 
					                if (null != total && total > 0) {
 | 
				
			||||||
| 
						 | 
					@ -91,18 +91,20 @@ public class CuMemberRetailAchieveServiceImpl extends ServiceImpl<CuMemberRetail
 | 
				
			||||||
                    //查询无注水最大盒数
 | 
					                    //查询无注水最大盒数
 | 
				
			||||||
                    maxBox = baseMapper.selectMemberBoxNoWaterInjection(memberAchieveVO);
 | 
					                    maxBox = baseMapper.selectMemberBoxNoWaterInjection(memberAchieveVO);
 | 
				
			||||||
                }
 | 
					                }
 | 
				
			||||||
                memberRetailAchieveVO = CuMemberRetailAchieveVO.builder().totalBox(totalBox).smallAreaBox(totalBox - maxBox).build();
 | 
					//                memberRetailAchieveVO = CuMemberRetailAchieveVO.builder().totalBox(totalBox).smallAreaBox(totalBox - maxBox).build();
 | 
				
			||||||
 | 
					                memberRetailAchieveVO = CuMemberRetailAchieveVO.builder().totalBox(totalBox).smallAreaBox(totalBox.subtract(maxBox)).build();
 | 
				
			||||||
                //总盒数大于2800的时候显示2800
 | 
					                //总盒数大于2800的时候显示2800
 | 
				
			||||||
                GradeDTO lastGrate = gradeServiceApi.getGradeByGradeValue(EGrade.S_VIP.getValue(), pkCountry).getData();
 | 
					                GradeDTO lastGrate = gradeServiceApi.getGradeByGradeValue(EGrade.S_VIP.getValue(), pkCountry).getData();
 | 
				
			||||||
                //配置中的总盒数
 | 
					                //配置中的总盒数
 | 
				
			||||||
                Integer totalBoxConfig = lastGrate.getBoxTotal();
 | 
					                BigDecimal totalBoxConfig = lastGrate.getBoxTotal();
 | 
				
			||||||
                Integer totalBoxMax = memberRetailAchieveVO.getTotalBox() > totalBoxConfig ? totalBoxConfig : memberRetailAchieveVO.getTotalBox();
 | 
					//                BigDecimal totalBoxMax = memberRetailAchieveVO.getTotalBox() > totalBoxConfig ? totalBoxConfig : memberRetailAchieveVO.getTotalBox();
 | 
				
			||||||
 | 
					                BigDecimal totalBoxMax = memberRetailAchieveVO.getTotalBox().compareTo(totalBoxConfig) > 0 ? totalBoxConfig : memberRetailAchieveVO.getTotalBox();
 | 
				
			||||||
                memberRetailAchieveVO.setTotalBox(totalBoxMax);
 | 
					                memberRetailAchieveVO.setTotalBox(totalBoxMax);
 | 
				
			||||||
            } else {
 | 
					            } else {
 | 
				
			||||||
                memberRetailAchieveVO = CuMemberRetailAchieveVO.builder().totalBox(0).smallAreaBox(0).build();
 | 
					                memberRetailAchieveVO = CuMemberRetailAchieveVO.builder().totalBox(BigDecimal.ZERO).smallAreaBox(BigDecimal.ZERO).build();
 | 
				
			||||||
            }
 | 
					            }
 | 
				
			||||||
        } else {
 | 
					        } else {
 | 
				
			||||||
            memberRetailAchieveVO = CuMemberRetailAchieveVO.builder().totalBox(0).smallAreaBox(0).build();
 | 
					            memberRetailAchieveVO = CuMemberRetailAchieveVO.builder().totalBox(BigDecimal.ZERO).smallAreaBox(BigDecimal.ZERO).build();
 | 
				
			||||||
        }
 | 
					        }
 | 
				
			||||||
        return memberRetailAchieveVO;
 | 
					        return memberRetailAchieveVO;
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
| 
						 | 
					@ -470,7 +472,7 @@ public class CuMemberRetailAchieveServiceImpl extends ServiceImpl<CuMemberRetail
 | 
				
			||||||
        Integer systemType = param.getSystemType();
 | 
					        Integer systemType = param.getSystemType();
 | 
				
			||||||
        //判断会员是否激活
 | 
					        //判断会员是否激活
 | 
				
			||||||
        if (!isActivate(pkMember)) {
 | 
					        if (!isActivate(pkMember)) {
 | 
				
			||||||
            return CuMemberRetailAchieveVO.builder().bigAreaBox(0).smallAreaBox(0).build();
 | 
					            return CuMemberRetailAchieveVO.builder().bigAreaBox(BigDecimal.ZERO).smallAreaBox(BigDecimal.ZERO).build();
 | 
				
			||||||
        }
 | 
					        }
 | 
				
			||||||
        //查询直推会员
 | 
					        //查询直推会员
 | 
				
			||||||
        List<Long> pkMemberList = baseMapper.selectDirectPushByPkMember(pkMember, systemType);
 | 
					        List<Long> pkMemberList = baseMapper.selectDirectPushByPkMember(pkMember, systemType);
 | 
				
			||||||
| 
						 | 
					@ -478,23 +480,29 @@ public class CuMemberRetailAchieveServiceImpl extends ServiceImpl<CuMemberRetail
 | 
				
			||||||
            //查询参数
 | 
					            //查询参数
 | 
				
			||||||
            getParam(param);
 | 
					            getParam(param);
 | 
				
			||||||
            //查询自己的业绩
 | 
					            //查询自己的业绩
 | 
				
			||||||
            Integer selfBox = baseMapper.selectSelfNewBox(param);
 | 
					            BigDecimal selfBox = baseMapper.selectSelfNewBox(param);
 | 
				
			||||||
            pkMemberList.remove(pkBigMember);
 | 
					            pkMemberList.remove(pkBigMember);
 | 
				
			||||||
            param.setPkMemberList(pkMemberList);
 | 
					            param.setPkMemberList(pkMemberList);
 | 
				
			||||||
            CuMemberRetailAchieveVO cuMemberRetailAchieveVO = baseMapper.selectMemberBigSmallBox(param);
 | 
					            CuMemberRetailAchieveVO cuMemberRetailAchieveVO = baseMapper.selectMemberBigSmallBox(param);
 | 
				
			||||||
            if (null != cuMemberRetailAchieveVO) {
 | 
					            if (null != cuMemberRetailAchieveVO) {
 | 
				
			||||||
                cuMemberRetailAchieveVO.setPkBigMember(pkBigMember);
 | 
					                cuMemberRetailAchieveVO.setPkBigMember(pkBigMember);
 | 
				
			||||||
                Integer selfNewBox = null == selfBox ? 0 : selfBox;
 | 
					//                BigDecimal selfNewBox = null == selfBox ? 0 : selfBox;
 | 
				
			||||||
 | 
					                BigDecimal selfNewBox = BigDecimal.ZERO;
 | 
				
			||||||
 | 
					                if(ObjectUtil.isNotEmpty(selfBox)){
 | 
				
			||||||
 | 
					                    selfNewBox = selfBox;
 | 
				
			||||||
 | 
					                }
 | 
				
			||||||
                //判断大小市场增加自己新增的盒数
 | 
					                //判断大小市场增加自己新增的盒数
 | 
				
			||||||
                if (!pkMember.equals(pkBigMember)) {
 | 
					                if (!pkMember.equals(pkBigMember)) {
 | 
				
			||||||
                    cuMemberRetailAchieveVO.setSmallAreaBox(cuMemberRetailAchieveVO.getSmallAreaBox() + selfNewBox);
 | 
					//                    cuMemberRetailAchieveVO.setSmallAreaBox(cuMemberRetailAchieveVO.getSmallAreaBox() + selfNewBox);
 | 
				
			||||||
 | 
					                    cuMemberRetailAchieveVO.setSmallAreaBox(cuMemberRetailAchieveVO.getSmallAreaBox().add(selfNewBox));
 | 
				
			||||||
                } else {
 | 
					                } else {
 | 
				
			||||||
                    cuMemberRetailAchieveVO.setBigAreaBox(cuMemberRetailAchieveVO.getBigAreaBox() + selfNewBox);
 | 
					//                    cuMemberRetailAchieveVO.setBigAreaBox(cuMemberRetailAchieveVO.getBigAreaBox() + selfNewBox);
 | 
				
			||||||
 | 
					                    cuMemberRetailAchieveVO.setBigAreaBox(cuMemberRetailAchieveVO.getBigAreaBox().add(selfNewBox));
 | 
				
			||||||
                }
 | 
					                }
 | 
				
			||||||
            }
 | 
					            }
 | 
				
			||||||
            return cuMemberRetailAchieveVO;
 | 
					            return cuMemberRetailAchieveVO;
 | 
				
			||||||
        }
 | 
					        }
 | 
				
			||||||
        return CuMemberRetailAchieveVO.builder().bigAreaBox(0).smallAreaBox(0).build();
 | 
					        return CuMemberRetailAchieveVO.builder().bigAreaBox(BigDecimal.ZERO).smallAreaBox(BigDecimal.ZERO).build();
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -10,6 +10,7 @@ import com.hzs.common.core.service.RedisService;
 | 
				
			||||||
import com.hzs.common.domain.retail.member.CuMemberRetailRegion;
 | 
					import com.hzs.common.domain.retail.member.CuMemberRetailRegion;
 | 
				
			||||||
import com.hzs.common.domain.retail.member.ext.CuMemberRetailRegionExt;
 | 
					import com.hzs.common.domain.retail.member.ext.CuMemberRetailRegionExt;
 | 
				
			||||||
import com.hzs.common.domain.system.base.BdArea;
 | 
					import com.hzs.common.domain.system.base.BdArea;
 | 
				
			||||||
 | 
					import com.hzs.common.security.utils.SecurityUtils;
 | 
				
			||||||
import com.hzs.retail.member.mapper.CuMemberRetailRegionMapper;
 | 
					import com.hzs.retail.member.mapper.CuMemberRetailRegionMapper;
 | 
				
			||||||
import com.hzs.retail.member.param.RetailMemberRegionParam;
 | 
					import com.hzs.retail.member.param.RetailMemberRegionParam;
 | 
				
			||||||
import com.hzs.retail.member.service.ICuMemberRetailAchieveService;
 | 
					import com.hzs.retail.member.service.ICuMemberRetailAchieveService;
 | 
				
			||||||
| 
						 | 
					@ -73,6 +74,7 @@ public class CuMemberRetailRegionServiceImpl extends ServiceImpl<CuMemberRetailR
 | 
				
			||||||
                    .systemType(param.getSystemType())
 | 
					                    .systemType(param.getSystemType())
 | 
				
			||||||
                    .build();
 | 
					                    .build();
 | 
				
			||||||
            retailRegion.setPkCreator(param.getPkMember());
 | 
					            retailRegion.setPkCreator(param.getPkMember());
 | 
				
			||||||
 | 
					            retailRegion.setRegionVertexPkId(baseMapper.getRegionVertexPkIdByPkMember(retailRegion.getPkMember()));
 | 
				
			||||||
            if (baseMapper.insertData(retailRegion) == 0) {
 | 
					            if (baseMapper.insertData(retailRegion) == 0) {
 | 
				
			||||||
                throw new ServiceException("选择区域失败,请刷新后重试");
 | 
					                throw new ServiceException("选择区域失败,请刷新后重试");
 | 
				
			||||||
            }
 | 
					            }
 | 
				
			||||||
| 
						 | 
					@ -84,7 +86,7 @@ public class CuMemberRetailRegionServiceImpl extends ServiceImpl<CuMemberRetailR
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    @Override
 | 
					    @Override
 | 
				
			||||||
    public List<BdArea> listChooseRegion(Integer systemType) {
 | 
					    public List<BdArea> listChooseRegion(Integer systemType) {
 | 
				
			||||||
        return baseMapper.listChooseRegion(systemType);
 | 
					        return baseMapper.listChooseRegion(systemType, SecurityUtils.getUserId());
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    @Override
 | 
					    @Override
 | 
				
			||||||
| 
						 | 
					@ -204,4 +206,19 @@ public class CuMemberRetailRegionServiceImpl extends ServiceImpl<CuMemberRetailR
 | 
				
			||||||
        }
 | 
					        }
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    @Override
 | 
				
			||||||
 | 
					    public int validateBindCount(CuMemberRetailRegionExt mrrExt, Integer yesOrNoValue, Integer systemType, Long pkId) {
 | 
				
			||||||
 | 
					        return baseMapper.validateBindCountA(mrrExt, yesOrNoValue, systemType, pkId);
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    @Override
 | 
				
			||||||
 | 
					    public int validateBindCount(RetailMemberRegionParam mrrExt, Integer yesOrNoValue, Integer systemType, Long pkId) {
 | 
				
			||||||
 | 
					        return baseMapper.validateBindCountB(mrrExt, yesOrNoValue, systemType, pkId);
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    @Override
 | 
				
			||||||
 | 
					    public Long getRegionVertexPkIdByPkMember(Long pkMember) {
 | 
				
			||||||
 | 
					        return baseMapper.getRegionVertexPkIdByPkMember(pkMember);
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -41,11 +41,11 @@ public class DataStatisticsUtil {
 | 
				
			||||||
        // 激活判断上一天的ENABLE_STATUS 0为正常 1为当天激活 不计算日结数据
 | 
					        // 激活判断上一天的ENABLE_STATUS 0为正常 1为当天激活 不计算日结数据
 | 
				
			||||||
        if(EYesNo.NO.getIntValue() == cuMember.getIsActivate()){
 | 
					        if(EYesNo.NO.getIntValue() == cuMember.getIsActivate()){
 | 
				
			||||||
            return CuMemberRetailDataStatisticsResultVO.builder()
 | 
					            return CuMemberRetailDataStatisticsResultVO.builder()
 | 
				
			||||||
                    .totalBoxNum(0)
 | 
					                    .totalBoxNum(BigDecimal.ZERO)
 | 
				
			||||||
                    .totalPv(BigDecimal.ZERO)
 | 
					                    .totalPv(BigDecimal.ZERO)
 | 
				
			||||||
                    .bigRangeTotalBoxNum(0)
 | 
					                    .bigRangeTotalBoxNum(BigDecimal.ZERO)
 | 
				
			||||||
                    .bigRangeTotalPv(BigDecimal.ZERO)
 | 
					                    .bigRangeTotalPv(BigDecimal.ZERO)
 | 
				
			||||||
                    .smallRangeTotalBoxNum(0)
 | 
					                    .smallRangeTotalBoxNum(BigDecimal.ZERO)
 | 
				
			||||||
                    .smallRangeTotalPv(BigDecimal.ZERO)
 | 
					                    .smallRangeTotalPv(BigDecimal.ZERO)
 | 
				
			||||||
                    .build();
 | 
					                    .build();
 | 
				
			||||||
        }
 | 
					        }
 | 
				
			||||||
| 
						 | 
					@ -62,9 +62,10 @@ public class DataStatisticsUtil {
 | 
				
			||||||
        }
 | 
					        }
 | 
				
			||||||
        CuMemberRetailDataStatisticsDetailVO bigRangeBox = getBigRangeBoxDetailVO(detailVOList, pkId);
 | 
					        CuMemberRetailDataStatisticsDetailVO bigRangeBox = getBigRangeBoxDetailVO(detailVOList, pkId);
 | 
				
			||||||
        CuMemberRetailDataStatisticsDetailVO bigRangePv = getBigRangePVDetailVO(detailVOList, pkId);
 | 
					        CuMemberRetailDataStatisticsDetailVO bigRangePv = getBigRangePVDetailVO(detailVOList, pkId);
 | 
				
			||||||
        Integer smallRangeTotalBoxNum = total.getTotalBoxNum() - bigRangeBox.getTotalBoxNum();
 | 
					//        BigDecimal smallRangeTotalBoxNum = total.getTotalBoxNum() - bigRangeBox.getTotalBoxNum();
 | 
				
			||||||
        if(smallRangeTotalBoxNum < 0){
 | 
					        BigDecimal smallRangeTotalBoxNum = total.getTotalBoxNum().subtract(bigRangeBox.getTotalBoxNum());
 | 
				
			||||||
            smallRangeTotalBoxNum = 0;
 | 
					        if(smallRangeTotalBoxNum.compareTo(BigDecimal.ZERO) < 0){
 | 
				
			||||||
 | 
					            smallRangeTotalBoxNum = BigDecimal.ZERO;
 | 
				
			||||||
        }
 | 
					        }
 | 
				
			||||||
        BigDecimal smallRangeTotalPv = total.getTotalPv().subtract(bigRangePv.getTotalPv());
 | 
					        BigDecimal smallRangeTotalPv = total.getTotalPv().subtract(bigRangePv.getTotalPv());
 | 
				
			||||||
        if(smallRangeTotalPv.compareTo(BigDecimal.ZERO) < 0){
 | 
					        if(smallRangeTotalPv.compareTo(BigDecimal.ZERO) < 0){
 | 
				
			||||||
| 
						 | 
					@ -86,15 +87,23 @@ public class DataStatisticsUtil {
 | 
				
			||||||
    public static void calcDetailVOTotalField(List<CuMemberRetailDataStatisticsDetailVO> detailVOList, Long pkId){
 | 
					    public static void calcDetailVOTotalField(List<CuMemberRetailDataStatisticsDetailVO> detailVOList, Long pkId){
 | 
				
			||||||
        detailVOList.stream().forEach(detailVO -> {
 | 
					        detailVOList.stream().forEach(detailVO -> {
 | 
				
			||||||
            detailVO.setTotalBoxNum(
 | 
					            detailVO.setTotalBoxNum(
 | 
				
			||||||
                    detailVO.getConsumeBoxNum()         // 个人累计消费盒数(日结)
 | 
					                    detailVO.getConsumeBoxNum()
 | 
				
			||||||
//                     + detailVO.getNewBoxNum()          // 个人新增盒数(日结)
 | 
					                    .add(detailVO.getTeamBoxNum())
 | 
				
			||||||
                     + detailVO.getTeamBoxNum()         // 团队累计消费盒数(日结)
 | 
					                    .add(detailVO.getSNewBoxNum())
 | 
				
			||||||
//                     + detailVO.getTeamNewBoxNum()      // 团队新增盒数(日结)
 | 
					                    .add(detailVO.getSTeamNewBoxNum())
 | 
				
			||||||
                     + detailVO.getSNewBoxNum()         // 个人新增消费盒数(秒结)
 | 
					                    .add(detailVO.getBigBoxNum())
 | 
				
			||||||
                     + detailVO.getSTeamNewBoxNum()     // 团队新增盒数(秒结)
 | 
					                    .add(detailVO.getSmallBoxNum())
 | 
				
			||||||
                     + detailVO.getBigBoxNum()          // 个人注水大区盒数(日结)
 | 
					 | 
				
			||||||
                     + detailVO.getSmallBoxNum()        // 个人注水小区盒数(日结)
 | 
					 | 
				
			||||||
            );
 | 
					            );
 | 
				
			||||||
 | 
					//            detailVO.setTotalBoxNum(
 | 
				
			||||||
 | 
					//                    detailVO.getConsumeBoxNum()         // 个人累计消费盒数(日结)
 | 
				
			||||||
 | 
					////                     + detailVO.getNewBoxNum()          // 个人新增盒数(日结)
 | 
				
			||||||
 | 
					//                     + detailVO.getTeamBoxNum()         // 团队累计消费盒数(日结)
 | 
				
			||||||
 | 
					////                     + detailVO.getTeamNewBoxNum()      // 团队新增盒数(日结)
 | 
				
			||||||
 | 
					//                     + detailVO.getSNewBoxNum()         // 个人新增消费盒数(秒结)
 | 
				
			||||||
 | 
					//                     + detailVO.getSTeamNewBoxNum()     // 团队新增盒数(秒结)
 | 
				
			||||||
 | 
					//                     + detailVO.getBigBoxNum()          // 个人注水大区盒数(日结)
 | 
				
			||||||
 | 
					//                     + detailVO.getSmallBoxNum()        // 个人注水小区盒数(日结)
 | 
				
			||||||
 | 
					//            );
 | 
				
			||||||
            detailVO.setTotalPv(
 | 
					            detailVO.setTotalPv(
 | 
				
			||||||
                    detailVO.getConsumePv()
 | 
					                    detailVO.getConsumePv()
 | 
				
			||||||
//                    .add(detailVO.getNewConsumePv())
 | 
					//                    .add(detailVO.getNewConsumePv())
 | 
				
			||||||
| 
						 | 
					@ -112,10 +121,11 @@ public class DataStatisticsUtil {
 | 
				
			||||||
     */
 | 
					     */
 | 
				
			||||||
    public static void excludeDailySettlementData(List<CuMemberRetailDataStatisticsDetailVO> detailVOList){
 | 
					    public static void excludeDailySettlementData(List<CuMemberRetailDataStatisticsDetailVO> detailVOList){
 | 
				
			||||||
        detailVOList.stream().forEach(detailVO -> {
 | 
					        detailVOList.stream().forEach(detailVO -> {
 | 
				
			||||||
            detailVO.setTotalBoxNum(
 | 
					            detailVO.setTotalBoxNum(detailVO.getTotalBoxNum().subtract(detailVO.getTeamBoxNum()));
 | 
				
			||||||
                    detailVO.getTotalBoxNum()
 | 
					//            detailVO.setTotalBoxNum(
 | 
				
			||||||
                    - detailVO.getTeamBoxNum()          // 团队累计消费盒数(日结)
 | 
					//                    detailVO.getTotalBoxNum()
 | 
				
			||||||
            );
 | 
					//                    - detailVO.getTeamBoxNum()          // 团队累计消费盒数(日结)
 | 
				
			||||||
 | 
					//            );
 | 
				
			||||||
            detailVO.setTotalPv(
 | 
					            detailVO.setTotalPv(
 | 
				
			||||||
                    detailVO.getTotalPv().subtract(detailVO.getTeamConsumePv())
 | 
					                    detailVO.getTotalPv().subtract(detailVO.getTeamConsumePv())
 | 
				
			||||||
            );
 | 
					            );
 | 
				
			||||||
| 
						 | 
					@ -130,11 +140,12 @@ public class DataStatisticsUtil {
 | 
				
			||||||
    public static void excludeWaterInjectionData(List<CuMemberRetailDataStatisticsDetailVO> detailVOList, Long pkId){
 | 
					    public static void excludeWaterInjectionData(List<CuMemberRetailDataStatisticsDetailVO> detailVOList, Long pkId){
 | 
				
			||||||
        detailVOList.stream().forEach(detailVO -> {
 | 
					        detailVOList.stream().forEach(detailVO -> {
 | 
				
			||||||
            if(!detailVO.getPkId().equals(pkId)){
 | 
					            if(!detailVO.getPkId().equals(pkId)){
 | 
				
			||||||
                detailVO.setTotalBoxNum(
 | 
					                detailVO.setTotalBoxNum(detailVO.getTotalBoxNum().subtract(detailVO.getBigBoxNum()).subtract(detailVO.getSmallBoxNum()));
 | 
				
			||||||
                        detailVO.getTotalBoxNum()
 | 
					//                detailVO.setTotalBoxNum(
 | 
				
			||||||
                                - detailVO.getBigBoxNum()               // 注水大区
 | 
					//                        detailVO.getTotalBoxNum()
 | 
				
			||||||
                                - detailVO.getSmallBoxNum()             // 注水小区
 | 
					//                                - detailVO.getBigBoxNum()               // 注水大区
 | 
				
			||||||
                );
 | 
					//                                - detailVO.getSmallBoxNum()             // 注水小区
 | 
				
			||||||
 | 
					//                );
 | 
				
			||||||
            }
 | 
					            }
 | 
				
			||||||
        });
 | 
					        });
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
| 
						 | 
					@ -151,22 +162,23 @@ public class DataStatisticsUtil {
 | 
				
			||||||
        if(ObjectUtil.isNotEmpty(detailVO)){
 | 
					        if(ObjectUtil.isNotEmpty(detailVO)){
 | 
				
			||||||
            CuMemberRetailDataStatisticsDetailVO selfVirtualDetailVO = getCuMemberRetailDataStatisticsDetailVO(detailVO);
 | 
					            CuMemberRetailDataStatisticsDetailVO selfVirtualDetailVO = getCuMemberRetailDataStatisticsDetailVO(detailVO);
 | 
				
			||||||
            detailVOList.add(selfVirtualDetailVO);
 | 
					            detailVOList.add(selfVirtualDetailVO);
 | 
				
			||||||
            if(detailVO.getBigBoxNum() >0 || detailVO.getSmallBoxNum() > 0){
 | 
					//            if(detailVO.getBigBoxNum() > 0 || detailVO.getSmallBoxNum() > 0){
 | 
				
			||||||
 | 
					            if(detailVO.getBigBoxNum().compareTo(BigDecimal.ZERO) >= 0 || detailVO.getSmallBoxNum().compareTo(BigDecimal.ZERO) >= 0){
 | 
				
			||||||
                CuMemberRetailDataStatisticsDetailVO bigRangeVirtualDetailVO = CuMemberRetailDataStatisticsDetailVO.builder()
 | 
					                CuMemberRetailDataStatisticsDetailVO bigRangeVirtualDetailVO = CuMemberRetailDataStatisticsDetailVO.builder()
 | 
				
			||||||
                        .pkId(BIG_RANGE_VIRTUAL_ID)
 | 
					                        .pkId(BIG_RANGE_VIRTUAL_ID)
 | 
				
			||||||
                        .memberCode(BIG_RANGE_VIRTUAL_NAME)
 | 
					                        .memberCode(BIG_RANGE_VIRTUAL_NAME)
 | 
				
			||||||
                        .totalBoxNum(detailVO.getBigBoxNum())
 | 
					                        .totalBoxNum(detailVO.getBigBoxNum())
 | 
				
			||||||
                        .totalPv(BigDecimal.ZERO)
 | 
					                        .totalPv(BigDecimal.ZERO)
 | 
				
			||||||
                        .bigBoxNum(0)
 | 
					                        .bigBoxNum(BigDecimal.ZERO)
 | 
				
			||||||
                        .smallBoxNum(0)
 | 
					                        .smallBoxNum(BigDecimal.ZERO)
 | 
				
			||||||
                        .build();
 | 
					                        .build();
 | 
				
			||||||
                CuMemberRetailDataStatisticsDetailVO smallRangeVirtualDetailVO = CuMemberRetailDataStatisticsDetailVO.builder()
 | 
					                CuMemberRetailDataStatisticsDetailVO smallRangeVirtualDetailVO = CuMemberRetailDataStatisticsDetailVO.builder()
 | 
				
			||||||
                        .pkId(SMALL_RANGE_VIRTUAL_ID)
 | 
					                        .pkId(SMALL_RANGE_VIRTUAL_ID)
 | 
				
			||||||
                        .memberCode(SMALL_RANGE_VIRTUAL_NAME)
 | 
					                        .memberCode(SMALL_RANGE_VIRTUAL_NAME)
 | 
				
			||||||
                        .totalBoxNum(detailVO.getSmallBoxNum())
 | 
					                        .totalBoxNum(detailVO.getSmallBoxNum())
 | 
				
			||||||
                        .totalPv(BigDecimal.ZERO)
 | 
					                        .totalPv(BigDecimal.ZERO)
 | 
				
			||||||
                        .bigBoxNum(0)
 | 
					                        .bigBoxNum(BigDecimal.ZERO)
 | 
				
			||||||
                        .smallBoxNum(0)
 | 
					                        .smallBoxNum(BigDecimal.ZERO)
 | 
				
			||||||
                        .build();
 | 
					                        .build();
 | 
				
			||||||
                detailVOList.add(bigRangeVirtualDetailVO);
 | 
					                detailVOList.add(bigRangeVirtualDetailVO);
 | 
				
			||||||
                detailVOList.add(smallRangeVirtualDetailVO);
 | 
					                detailVOList.add(smallRangeVirtualDetailVO);
 | 
				
			||||||
| 
						 | 
					@ -181,15 +193,19 @@ public class DataStatisticsUtil {
 | 
				
			||||||
                .memberCode(SELF_VIRTUAL_NAME)
 | 
					                .memberCode(SELF_VIRTUAL_NAME)
 | 
				
			||||||
                .totalBoxNum(
 | 
					                .totalBoxNum(
 | 
				
			||||||
                        detailVO.getConsumeBoxNum()
 | 
					                        detailVO.getConsumeBoxNum()
 | 
				
			||||||
//                        + detailVO.getNewBoxNum()
 | 
					                                .add(detailVO.getSNewBoxNum())
 | 
				
			||||||
                        + detailVO.getSNewBoxNum()
 | 
					 | 
				
			||||||
                )
 | 
					                )
 | 
				
			||||||
 | 
					//                .totalBoxNum(
 | 
				
			||||||
 | 
					//                        detailVO.getConsumeBoxNum()
 | 
				
			||||||
 | 
					////                        + detailVO.getNewBoxNum()
 | 
				
			||||||
 | 
					//                        + detailVO.getSNewBoxNum()
 | 
				
			||||||
 | 
					//                )
 | 
				
			||||||
                .totalPv(
 | 
					                .totalPv(
 | 
				
			||||||
                        detailVO.getConsumePv()
 | 
					                        detailVO.getConsumePv()
 | 
				
			||||||
                                .add(detailVO.getSNewConsumePv())
 | 
					                                .add(detailVO.getSNewConsumePv())
 | 
				
			||||||
                )
 | 
					                )
 | 
				
			||||||
                .bigBoxNum(0)
 | 
					                .bigBoxNum(BigDecimal.ZERO)
 | 
				
			||||||
                .smallBoxNum(0)
 | 
					                .smallBoxNum(BigDecimal.ZERO)
 | 
				
			||||||
                .build();
 | 
					                .build();
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
| 
						 | 
					@ -199,7 +215,7 @@ public class DataStatisticsUtil {
 | 
				
			||||||
     */
 | 
					     */
 | 
				
			||||||
    public static List<CuMemberRetailDataStatisticsDetailVO> getSmallRangeList(List<CuMemberRetailDataStatisticsDetailVO> detailVOList){
 | 
					    public static List<CuMemberRetailDataStatisticsDetailVO> getSmallRangeList(List<CuMemberRetailDataStatisticsDetailVO> detailVOList){
 | 
				
			||||||
        List<CuMemberRetailDataStatisticsDetailVO> result = new ArrayList<>();
 | 
					        List<CuMemberRetailDataStatisticsDetailVO> result = new ArrayList<>();
 | 
				
			||||||
        Integer maxTotalBoxNum = getMaxTotalBoxNum(detailVOList);
 | 
					        BigDecimal maxTotalBoxNum = getMaxTotalBoxNum(detailVOList);
 | 
				
			||||||
        if (maxTotalBoxNum == null) {
 | 
					        if (maxTotalBoxNum == null) {
 | 
				
			||||||
            return new ArrayList<>(detailVOList);
 | 
					            return new ArrayList<>(detailVOList);
 | 
				
			||||||
        }
 | 
					        }
 | 
				
			||||||
| 
						 | 
					@ -248,17 +264,19 @@ public class DataStatisticsUtil {
 | 
				
			||||||
        return result;
 | 
					        return result;
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    private static Integer getMaxTotalBoxNum(List<CuMemberRetailDataStatisticsDetailVO> detailVOList) {
 | 
					    private static BigDecimal getMaxTotalBoxNum(List<CuMemberRetailDataStatisticsDetailVO> detailVOList) {
 | 
				
			||||||
        return detailVOList.stream()
 | 
					        return detailVOList.stream()
 | 
				
			||||||
                .map(CuMemberRetailDataStatisticsDetailVO::getTotalBoxNum)
 | 
					                .map(CuMemberRetailDataStatisticsDetailVO::getTotalBoxNum)
 | 
				
			||||||
                .filter(Objects::nonNull)
 | 
					                .filter(Objects::nonNull)
 | 
				
			||||||
                .max(Integer::compare)
 | 
					//                .max(Integer::compare)
 | 
				
			||||||
 | 
					                .max(BigDecimal::compareTo)
 | 
				
			||||||
                .orElse(null);
 | 
					                .orElse(null);
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
    private static CuMemberRetailDataStatisticsDetailVO getBigRangeBoxDetailVO(List<CuMemberRetailDataStatisticsDetailVO> detailVOList, Long pkId){
 | 
					    private static CuMemberRetailDataStatisticsDetailVO getBigRangeBoxDetailVO(List<CuMemberRetailDataStatisticsDetailVO> detailVOList, Long pkId){
 | 
				
			||||||
        return detailVOList.stream()
 | 
					        return detailVOList.stream()
 | 
				
			||||||
                .filter(vo -> vo.getTotalBoxNum() != null && !vo.getPkId().equals(pkId))
 | 
					                .filter(vo -> vo.getTotalBoxNum() != null && !vo.getPkId().equals(pkId))
 | 
				
			||||||
                .max(Comparator.comparingInt(CuMemberRetailDataStatisticsDetailVO::getTotalBoxNum))
 | 
					//                .max(Comparator.comparingInt(CuMemberRetailDataStatisticsDetailVO::getTotalBoxNum))
 | 
				
			||||||
 | 
					                .max(Comparator.comparing(CuMemberRetailDataStatisticsDetailVO::getTotalBoxNum, BigDecimal::compareTo))
 | 
				
			||||||
                .orElse(null);
 | 
					                .orElse(null);
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
    private static CuMemberRetailDataStatisticsDetailVO getBigRangePVDetailVO(List<CuMemberRetailDataStatisticsDetailVO> detailVOList, Long pkId){
 | 
					    private static CuMemberRetailDataStatisticsDetailVO getBigRangePVDetailVO(List<CuMemberRetailDataStatisticsDetailVO> detailVOList, Long pkId){
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -52,7 +52,7 @@ public class CuMemberRetailAchieveVO implements Serializable {
 | 
				
			||||||
    /**
 | 
					    /**
 | 
				
			||||||
     * 盒数
 | 
					     * 盒数
 | 
				
			||||||
     */
 | 
					     */
 | 
				
			||||||
    private Integer boxs;
 | 
					    private BigDecimal boxs;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    /**
 | 
					    /**
 | 
				
			||||||
     * 状态
 | 
					     * 状态
 | 
				
			||||||
| 
						 | 
					@ -62,18 +62,18 @@ public class CuMemberRetailAchieveVO implements Serializable {
 | 
				
			||||||
    /**
 | 
					    /**
 | 
				
			||||||
     * 总盒数
 | 
					     * 总盒数
 | 
				
			||||||
     */
 | 
					     */
 | 
				
			||||||
    private Integer totalBox;
 | 
					    private BigDecimal totalBox;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    /**
 | 
					    /**
 | 
				
			||||||
     * 小市场盒数
 | 
					     * 小市场盒数
 | 
				
			||||||
     */
 | 
					     */
 | 
				
			||||||
    private Integer smallAreaBox;
 | 
					    private BigDecimal smallAreaBox;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    /**
 | 
					    /**
 | 
				
			||||||
     * 大市场盒数
 | 
					     * 大市场盒数
 | 
				
			||||||
     */
 | 
					     */
 | 
				
			||||||
    private Integer bigAreaBox;
 | 
					    private BigDecimal bigAreaBox;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    /**
 | 
					    /**
 | 
				
			||||||
     * 小区业绩
 | 
					     * 小区业绩
 | 
				
			||||||
| 
						 | 
					@ -171,19 +171,19 @@ public class CuMemberRetailAchieveVO implements Serializable {
 | 
				
			||||||
    /**
 | 
					    /**
 | 
				
			||||||
     * 今日盒数
 | 
					     * 今日盒数
 | 
				
			||||||
     */
 | 
					     */
 | 
				
			||||||
    private Integer realTimeBox;
 | 
					    private BigDecimal realTimeBox;
 | 
				
			||||||
    /**
 | 
					    /**
 | 
				
			||||||
     * 昨日盒数
 | 
					     * 昨日盒数
 | 
				
			||||||
     */
 | 
					     */
 | 
				
			||||||
    private Integer yesterdayBox;
 | 
					    private BigDecimal yesterdayBox;
 | 
				
			||||||
    /**
 | 
					    /**
 | 
				
			||||||
     * 本月盒数
 | 
					     * 本月盒数
 | 
				
			||||||
     */
 | 
					     */
 | 
				
			||||||
    private Integer monthBox;
 | 
					    private BigDecimal monthBox;
 | 
				
			||||||
    /**
 | 
					    /**
 | 
				
			||||||
     * 上月盒数
 | 
					     * 上月盒数
 | 
				
			||||||
     */
 | 
					     */
 | 
				
			||||||
    private Integer upMonthBox;
 | 
					    private BigDecimal upMonthBox;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    /**
 | 
					    /**
 | 
				
			||||||
     * 等级
 | 
					     * 等级
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -54,28 +54,28 @@ public class CuMemberRetailDataStatisticsDetailVO implements Serializable {
 | 
				
			||||||
    /**
 | 
					    /**
 | 
				
			||||||
     * 日结表-个人累计消费盒数
 | 
					     * 日结表-个人累计消费盒数
 | 
				
			||||||
     */
 | 
					     */
 | 
				
			||||||
    private Integer consumeBoxNum;
 | 
					    private BigDecimal consumeBoxNum;
 | 
				
			||||||
    /**
 | 
					    /**
 | 
				
			||||||
     * 日结表-个人当日新消费盒数
 | 
					     * 日结表-个人当日新消费盒数
 | 
				
			||||||
     */
 | 
					     */
 | 
				
			||||||
    private Integer newBoxNum;
 | 
					    private BigDecimal newBoxNum;
 | 
				
			||||||
    /**
 | 
					    /**
 | 
				
			||||||
     * 日结表-个人伞下累计消费盒数
 | 
					     * 日结表-个人伞下累计消费盒数
 | 
				
			||||||
     */
 | 
					     */
 | 
				
			||||||
    private Integer teamBoxNum;
 | 
					    private BigDecimal teamBoxNum;
 | 
				
			||||||
    /**
 | 
					    /**
 | 
				
			||||||
     * 日结表-个人伞下新消费盒数
 | 
					     * 日结表-个人伞下新消费盒数
 | 
				
			||||||
     */
 | 
					     */
 | 
				
			||||||
    private Integer teamNewBoxNum;
 | 
					    private BigDecimal teamNewBoxNum;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    /**
 | 
					    /**
 | 
				
			||||||
     * 秒结表-个人新消费盒数
 | 
					     * 秒结表-个人新消费盒数
 | 
				
			||||||
     */
 | 
					     */
 | 
				
			||||||
    private Integer sNewBoxNum;
 | 
					    private BigDecimal sNewBoxNum;
 | 
				
			||||||
    /**
 | 
					    /**
 | 
				
			||||||
     * 秒结表-团队新消费盒数
 | 
					     * 秒结表-团队新消费盒数
 | 
				
			||||||
     */
 | 
					     */
 | 
				
			||||||
    private Integer sTeamNewBoxNum;
 | 
					    private BigDecimal sTeamNewBoxNum;
 | 
				
			||||||
    /**
 | 
					    /**
 | 
				
			||||||
     * 秒结表-个人新消费pv
 | 
					     * 秒结表-个人新消费pv
 | 
				
			||||||
     */
 | 
					     */
 | 
				
			||||||
| 
						 | 
					@ -85,7 +85,7 @@ public class CuMemberRetailDataStatisticsDetailVO implements Serializable {
 | 
				
			||||||
     */
 | 
					     */
 | 
				
			||||||
    private BigDecimal sTeamNewPv;
 | 
					    private BigDecimal sTeamNewPv;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    private Integer sTeamBoxNum;
 | 
					    private BigDecimal sTeamBoxNum;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    /**
 | 
					    /**
 | 
				
			||||||
     * 个人总业绩
 | 
					     * 个人总业绩
 | 
				
			||||||
| 
						 | 
					@ -94,16 +94,16 @@ public class CuMemberRetailDataStatisticsDetailVO implements Serializable {
 | 
				
			||||||
    /**
 | 
					    /**
 | 
				
			||||||
     * 个人总盒数
 | 
					     * 个人总盒数
 | 
				
			||||||
     */
 | 
					     */
 | 
				
			||||||
    private Integer totalBoxNum;
 | 
					    private BigDecimal totalBoxNum;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    /**
 | 
					    /**
 | 
				
			||||||
     * 注水大区
 | 
					     * 注水大区
 | 
				
			||||||
     */
 | 
					     */
 | 
				
			||||||
    private Integer bigBoxNum;
 | 
					    private BigDecimal bigBoxNum;
 | 
				
			||||||
    /**
 | 
					    /**
 | 
				
			||||||
     * 注水小区
 | 
					     * 注水小区
 | 
				
			||||||
     */
 | 
					     */
 | 
				
			||||||
    private Integer smallBoxNum;
 | 
					    private BigDecimal smallBoxNum;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    @Override
 | 
					    @Override
 | 
				
			||||||
    public CuMemberRetailDataStatisticsDetailVO clone() {
 | 
					    public CuMemberRetailDataStatisticsDetailVO clone() {
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -33,15 +33,15 @@ public class CuMemberRetailDataStatisticsResultVO implements Serializable {
 | 
				
			||||||
    /**
 | 
					    /**
 | 
				
			||||||
     *  总盒数
 | 
					     *  总盒数
 | 
				
			||||||
     */
 | 
					     */
 | 
				
			||||||
    private Integer totalBoxNum;
 | 
					    private BigDecimal totalBoxNum;
 | 
				
			||||||
    /**
 | 
					    /**
 | 
				
			||||||
     * 大区盒数
 | 
					     * 大区盒数
 | 
				
			||||||
     */
 | 
					     */
 | 
				
			||||||
    private Integer bigRangeTotalBoxNum;
 | 
					    private BigDecimal bigRangeTotalBoxNum;
 | 
				
			||||||
    /**
 | 
					    /**
 | 
				
			||||||
     * 小区盒数
 | 
					     * 小区盒数
 | 
				
			||||||
     */
 | 
					     */
 | 
				
			||||||
    private Integer smallRangeTotalBoxNum;
 | 
					    private BigDecimal smallRangeTotalBoxNum;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    /**
 | 
					    /**
 | 
				
			||||||
     * 总业绩
 | 
					     * 总业绩
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -69,7 +69,7 @@
 | 
				
			||||||
    </sql>
 | 
					    </sql>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    <select id="selectMemberBoxNoWaterInjection" resultType="integer">
 | 
					    <select id="selectMemberBoxNoWaterInjection" resultType="java.math.BigDecimal">
 | 
				
			||||||
        SELECT nvl(max(smallAreaBox), 0) smallareabox
 | 
					        SELECT nvl(max(smallAreaBox), 0) smallareabox
 | 
				
			||||||
        from
 | 
					        from
 | 
				
			||||||
        (
 | 
					        (
 | 
				
			||||||
| 
						 | 
					@ -90,14 +90,14 @@
 | 
				
			||||||
    </select>
 | 
					    </select>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    <select id="selectMemberBoxWaterInjection" resultType="integer">
 | 
					    <select id="selectMemberBoxWaterInjection" resultType="java.math.BigDecimal">
 | 
				
			||||||
        SELECT NVL(mr.big_box_num, 0) smallAreaBox
 | 
					        SELECT NVL(mr.big_box_num, 0) smallAreaBox
 | 
				
			||||||
        FROM ${memberRetailTable} mr
 | 
					        FROM ${memberRetailTable} mr
 | 
				
			||||||
        WHERE mr.category = 0
 | 
					        WHERE mr.category = 0
 | 
				
			||||||
          AND mr.pk_member = #{pkMember}
 | 
					          AND mr.pk_member = #{pkMember}
 | 
				
			||||||
    </select>
 | 
					    </select>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    <select id="selectMemberTotalBox" resultType="integer">
 | 
					    <select id="selectMemberTotalBox" resultType="java.math.BigDecimal">
 | 
				
			||||||
        SELECT nvl(sum(totalAreaBox), 0) totalAreaBox
 | 
					        SELECT nvl(sum(totalAreaBox), 0) totalAreaBox
 | 
				
			||||||
        FROM (SELECT NVL(mr.team_box_num + mr.consume_box_num, 0) totalAreaBox
 | 
					        FROM (SELECT NVL(mr.team_box_num + mr.consume_box_num, 0) totalAreaBox
 | 
				
			||||||
              FROM ${memberRetailTable} mr
 | 
					              FROM ${memberRetailTable} mr
 | 
				
			||||||
| 
						 | 
					@ -531,7 +531,7 @@
 | 
				
			||||||
    </select>
 | 
					    </select>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    <select id="selectSelfNewBox" resultType="integer">
 | 
					    <select id="selectSelfNewBox" resultType="java.math.BigDecimal">
 | 
				
			||||||
        SELECT nvl(sum(box), 0) box
 | 
					        SELECT nvl(sum(box), 0) box
 | 
				
			||||||
        FROM (
 | 
					        FROM (
 | 
				
			||||||
        <if test="isFirst != null and isFirst == 0">
 | 
					        <if test="isFirst != null and isFirst == 0">
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -0,0 +1,23 @@
 | 
				
			||||||
 | 
					<?xml version="1.0" encoding="UTF-8"?>
 | 
				
			||||||
 | 
					<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
 | 
				
			||||||
 | 
					<mapper namespace="com.hzs.member.base.mapper.DeleteGarbageDataMapper">
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    <delete id="deleteMemberAwards" parameterType="java.lang.Integer">
 | 
				
			||||||
 | 
					        delete from CU_MEMBER_AWARDS
 | 
				
			||||||
 | 
					        where
 | 
				
			||||||
 | 
					            CREATION_TIME <![CDATA[ < ]]> (SYSDATE - #{days})
 | 
				
			||||||
 | 
					            and DEL_FLAG = 1
 | 
				
			||||||
 | 
					    </delete>
 | 
				
			||||||
 | 
					    <delete id="deleteMemberLevel" parameterType="java.lang.Integer">
 | 
				
			||||||
 | 
					        delete from CU_MEMBER_LEVEL
 | 
				
			||||||
 | 
					        where
 | 
				
			||||||
 | 
					            CREATION_TIME <![CDATA[ < ]]> (SYSDATE - #{days})
 | 
				
			||||||
 | 
					            and DEL_FLAG = 1
 | 
				
			||||||
 | 
					    </delete>
 | 
				
			||||||
 | 
					    <delete id="deleteMemberGrade" parameterType="java.lang.Integer">
 | 
				
			||||||
 | 
					        delete from CU_MEMBER_GRADE
 | 
				
			||||||
 | 
					        where
 | 
				
			||||||
 | 
					            CREATION_TIME <![CDATA[ < ]]> (SYSDATE - #{days})
 | 
				
			||||||
 | 
					            and DEL_FLAG = 1
 | 
				
			||||||
 | 
					    </delete>
 | 
				
			||||||
 | 
					</mapper>
 | 
				
			||||||
| 
						 | 
					@ -42,6 +42,18 @@
 | 
				
			||||||
        where ba.del_flag = 0
 | 
					        where ba.del_flag = 0
 | 
				
			||||||
          and ba.pk_country = 1
 | 
					          and ba.pk_country = 1
 | 
				
			||||||
          and ba.ENABLE_STATE = 0
 | 
					          and ba.ENABLE_STATE = 0
 | 
				
			||||||
 | 
					          and ba.pk_id not in (
 | 
				
			||||||
 | 
					            SELECT
 | 
				
			||||||
 | 
					                COUNTY
 | 
				
			||||||
 | 
					            FROM
 | 
				
			||||||
 | 
					                CU_MEMBER_RETAIL_REGION cmrr
 | 
				
			||||||
 | 
					                    INNER JOIN cu_member cm ON cmrr.pk_member = cm.pk_id
 | 
				
			||||||
 | 
					                    LEFT JOIN BD_VERTEX bv ON cm.PK_VERTEX = bv.PK_ID
 | 
				
			||||||
 | 
					                    LEFT JOIN BD_REGION_VERTEX brv ON bv.REGION_VERTEX_PK_ID = brv.PK_ID
 | 
				
			||||||
 | 
					            where 1=1
 | 
				
			||||||
 | 
					              and cm.pk_id = ${userId}
 | 
				
			||||||
 | 
					              and cmrr.system_type = #{systemType}
 | 
				
			||||||
 | 
					          )
 | 
				
			||||||
          and ba.pk_id not in (select cmrr.county
 | 
					          and ba.pk_id not in (select cmrr.county
 | 
				
			||||||
                               from cu_member_retail_region cmrr
 | 
					                               from cu_member_retail_region cmrr
 | 
				
			||||||
                               where cmrr.del_flag = 0
 | 
					                               where cmrr.del_flag = 0
 | 
				
			||||||
| 
						 | 
					@ -62,7 +74,9 @@
 | 
				
			||||||
            source,
 | 
					            source,
 | 
				
			||||||
            creation_time,
 | 
					            creation_time,
 | 
				
			||||||
            pk_creator,
 | 
					            pk_creator,
 | 
				
			||||||
            system_type)
 | 
					            system_type,
 | 
				
			||||||
 | 
					            REGION_VERTEX_PK_ID
 | 
				
			||||||
 | 
					            )
 | 
				
			||||||
        select cu_member_retail_region_seq.nextval,
 | 
					        select cu_member_retail_region_seq.nextval,
 | 
				
			||||||
               #{retailRegion.pkMember},
 | 
					               #{retailRegion.pkMember},
 | 
				
			||||||
               #{retailRegion.province},
 | 
					               #{retailRegion.province},
 | 
				
			||||||
| 
						 | 
					@ -71,16 +85,22 @@
 | 
				
			||||||
               #{retailRegion.source},
 | 
					               #{retailRegion.source},
 | 
				
			||||||
               sysdate,
 | 
					               sysdate,
 | 
				
			||||||
               #{retailRegion.pkCreator},
 | 
					               #{retailRegion.pkCreator},
 | 
				
			||||||
               #{retailRegion.systemType}
 | 
					               #{retailRegion.systemType},
 | 
				
			||||||
 | 
					               #{retailRegion.regionVertexPkId}
 | 
				
			||||||
        from dual
 | 
					        from dual
 | 
				
			||||||
        where not exists(select 1
 | 
					        where not exists(select 1
 | 
				
			||||||
                         from cu_member_retail_region cmrr
 | 
					                         from cu_member_retail_region cmrr
 | 
				
			||||||
 | 
					                                  INNER JOIN cu_member cm ON cmrr.pk_member = cm.pk_id
 | 
				
			||||||
 | 
					                                  LEFT JOIN BD_VERTEX bv ON cm.PK_VERTEX = bv.PK_ID
 | 
				
			||||||
 | 
					                                  LEFT JOIN BD_REGION_VERTEX brv ON bv.REGION_VERTEX_PK_ID = brv.PK_ID
 | 
				
			||||||
                         where cmrr.province = #{retailRegion.province}
 | 
					                         where cmrr.province = #{retailRegion.province}
 | 
				
			||||||
                           and cmrr.city = #{retailRegion.city}
 | 
					                           and cmrr.city = #{retailRegion.city}
 | 
				
			||||||
                           and cmrr.county = #{retailRegion.county}
 | 
					                           and cmrr.county = #{retailRegion.county}
 | 
				
			||||||
                           and cmrr.del_flag = 0
 | 
					                           and cmrr.del_flag = 0
 | 
				
			||||||
                           and cmrr.effective = 0
 | 
					                           and cmrr.effective = 0
 | 
				
			||||||
                           and cmrr.system_type = #{retailRegion.systemType})
 | 
					                           and cmrr.system_type = #{retailRegion.systemType}
 | 
				
			||||||
 | 
					                           AND cm.pk_id = #{retailRegion.pkMember}
 | 
				
			||||||
 | 
					        )
 | 
				
			||||||
    </insert>
 | 
					    </insert>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    <!--    未绑定收益区域-->
 | 
					    <!--    未绑定收益区域-->
 | 
				
			||||||
| 
						 | 
					@ -124,7 +144,9 @@
 | 
				
			||||||
        p.name provinceVal,
 | 
					        p.name provinceVal,
 | 
				
			||||||
        c.name cityVal,
 | 
					        c.name cityVal,
 | 
				
			||||||
        pc.name countyVal,
 | 
					        pc.name countyVal,
 | 
				
			||||||
        bg.GRADE_NAME gradeName
 | 
					        bg.GRADE_NAME gradeName,
 | 
				
			||||||
 | 
					        brv.pk_id as regionVertexPkId,
 | 
				
			||||||
 | 
					        brv.name as regionVertexName
 | 
				
			||||||
        FROM CU_MEMBER_RETAIL_REGION CRR
 | 
					        FROM CU_MEMBER_RETAIL_REGION CRR
 | 
				
			||||||
        INNER JOIN CU_MEMBER CM
 | 
					        INNER JOIN CU_MEMBER CM
 | 
				
			||||||
        ON CRR.PK_MEMBER = CM.PK_ID
 | 
					        ON CRR.PK_MEMBER = CM.PK_ID
 | 
				
			||||||
| 
						 | 
					@ -138,6 +160,8 @@
 | 
				
			||||||
        LEFT JOIN BD_AREA PC
 | 
					        LEFT JOIN BD_AREA PC
 | 
				
			||||||
        ON PC.PK_ID = CRR.COUNTY
 | 
					        ON PC.PK_ID = CRR.COUNTY
 | 
				
			||||||
        AND PC.DEL_FLAG = 0
 | 
					        AND PC.DEL_FLAG = 0
 | 
				
			||||||
 | 
					        left join BD_REGION_VERTEX brv
 | 
				
			||||||
 | 
					        on brv.pk_id = crr.REGION_VERTEX_PK_ID
 | 
				
			||||||
        where CRR.DEL_FLAG = 0
 | 
					        where CRR.DEL_FLAG = 0
 | 
				
			||||||
        <if test="pkCountry != null">
 | 
					        <if test="pkCountry != null">
 | 
				
			||||||
            and CRR.PK_COUNTRY = #{pkCountry}
 | 
					            and CRR.PK_COUNTRY = #{pkCountry}
 | 
				
			||||||
| 
						 | 
					@ -181,6 +205,9 @@
 | 
				
			||||||
        <if test="source!=null">
 | 
					        <if test="source!=null">
 | 
				
			||||||
            and CRR.source=#{source}
 | 
					            and CRR.source=#{source}
 | 
				
			||||||
        </if>
 | 
					        </if>
 | 
				
			||||||
 | 
					        <if test="regionVertexPkId != null">
 | 
				
			||||||
 | 
					            and brv.pk_id = #{regionVertexPkId}
 | 
				
			||||||
 | 
					        </if>
 | 
				
			||||||
        order by CRR.CREATION_TIME desc
 | 
					        order by CRR.CREATION_TIME desc
 | 
				
			||||||
    </select>
 | 
					    </select>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
| 
						 | 
					@ -239,6 +266,66 @@
 | 
				
			||||||
        group by cmrr.province, cmrr.city, cmrr.county
 | 
					        group by cmrr.province, cmrr.city, cmrr.county
 | 
				
			||||||
        having count(1) > 1
 | 
					        having count(1) > 1
 | 
				
			||||||
    </select>
 | 
					    </select>
 | 
				
			||||||
 | 
					    <select id="validateBindCountA" resultType="java.lang.Integer">
 | 
				
			||||||
 | 
					        SELECT
 | 
				
			||||||
 | 
					            COUNT(DISTINCT cmrr.pk_member)
 | 
				
			||||||
 | 
					        FROM
 | 
				
			||||||
 | 
					        CU_MEMBER_RETAIL_REGION cmrr
 | 
				
			||||||
 | 
					        where 1=1
 | 
				
			||||||
 | 
					        <if test="mrrExt.province != null">
 | 
				
			||||||
 | 
					            and cmrr.PROVINCE = #{mrrExt.province}
 | 
				
			||||||
 | 
					        </if>
 | 
				
			||||||
 | 
					        <if test="mrrExt.city != null">
 | 
				
			||||||
 | 
					            and cmrr.CITY = #{mrrExt.city}
 | 
				
			||||||
 | 
					        </if>
 | 
				
			||||||
 | 
					        <if test="mrrExt.county != null">
 | 
				
			||||||
 | 
					            and cmrr.COUNTY = #{mrrExt.county}
 | 
				
			||||||
 | 
					        </if>
 | 
				
			||||||
 | 
					        <if test="yesOrNoValue != null">
 | 
				
			||||||
 | 
					            and cmrr.EFFECTIVE = #{yesOrNoValue}
 | 
				
			||||||
 | 
					        </if>
 | 
				
			||||||
 | 
					        <if test="systemType != null">
 | 
				
			||||||
 | 
					            and cmrr.SYSTEM_TYPE = #{systemType}
 | 
				
			||||||
 | 
					        </if>
 | 
				
			||||||
 | 
					        and cmrr.del_flag = 0
 | 
				
			||||||
 | 
					        AND cmrr.PK_MEMBER IN (select pk_id from CU_MEMBER where PK_VERTEX in (select pk_id from BD_VERTEX where REGION_VERTEX_PK_ID in (select REGION_VERTEX_PK_ID from BD_VERTEX where pk_id in (select PK_VERTEX FROM cu_member WHERE PK_ID = #{pkId} )) and DEL_FLAG = 0))
 | 
				
			||||||
 | 
					    </select>
 | 
				
			||||||
 | 
					    <select id="validateBindCountB" resultType="java.lang.Integer">
 | 
				
			||||||
 | 
					        SELECT
 | 
				
			||||||
 | 
					            COUNT(DISTINCT cmrr.pk_member)
 | 
				
			||||||
 | 
					        FROM
 | 
				
			||||||
 | 
					            CU_MEMBER_RETAIL_REGION cmrr
 | 
				
			||||||
 | 
					        where 1=1
 | 
				
			||||||
 | 
					        <if test="mrrExt.province != null">
 | 
				
			||||||
 | 
					            and cmrr.PROVINCE = #{mrrExt.province}
 | 
				
			||||||
 | 
					        </if>
 | 
				
			||||||
 | 
					        <if test="mrrExt.city != null">
 | 
				
			||||||
 | 
					            and cmrr.CITY = #{mrrExt.city}
 | 
				
			||||||
 | 
					        </if>
 | 
				
			||||||
 | 
					        <if test="mrrExt.county != null">
 | 
				
			||||||
 | 
					            and cmrr.COUNTY = #{mrrExt.county}
 | 
				
			||||||
 | 
					        </if>
 | 
				
			||||||
 | 
					        <if test="yesOrNoValue != null">
 | 
				
			||||||
 | 
					            and cmrr.EFFECTIVE = #{yesOrNoValue}
 | 
				
			||||||
 | 
					        </if>
 | 
				
			||||||
 | 
					        <if test="systemType != null">
 | 
				
			||||||
 | 
					            and cmrr.SYSTEM_TYPE = #{systemType}
 | 
				
			||||||
 | 
					        </if>
 | 
				
			||||||
 | 
					        and cmrr.del_flag = 0
 | 
				
			||||||
 | 
					        AND cmrr.PK_MEMBER IN (select pk_id from CU_MEMBER where PK_VERTEX in (select pk_id from BD_VERTEX where REGION_VERTEX_PK_ID in (select REGION_VERTEX_PK_ID from BD_VERTEX where pk_id in (select PK_VERTEX FROM cu_member WHERE PK_ID = #{pkId} )) and DEL_FLAG = 0))
 | 
				
			||||||
 | 
					    <!--
 | 
				
			||||||
 | 
					    GROUP BY
 | 
				
			||||||
 | 
					    NVL(TO_CHAR(brv.PK_ID), 'NULL_GROUP')
 | 
				
			||||||
 | 
					     -->
 | 
				
			||||||
 | 
					</select>
 | 
				
			||||||
 | 
					    <select id="getRegionVertexPkIdByPkMember" resultType="java.lang.Long" parameterType="java.lang.Long">
 | 
				
			||||||
 | 
					        SELECT
 | 
				
			||||||
 | 
					            REGION_VERTEX_PK_ID
 | 
				
			||||||
 | 
					        FROM
 | 
				
			||||||
 | 
					            BD_VERTEX
 | 
				
			||||||
 | 
					        WHERE
 | 
				
			||||||
 | 
					            pk_id IN (select PK_VERTEX FROM cu_member cm WHERE cm.pk_id = #{pkMember} )
 | 
				
			||||||
 | 
					    </select>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    <!-- 更新非最新区域其它数据 -->
 | 
					    <!-- 更新非最新区域其它数据 -->
 | 
				
			||||||
    <update id="updateRepeatDate">
 | 
					    <update id="updateRepeatDate">
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -0,0 +1,19 @@
 | 
				
			||||||
 | 
					package com.hzs.system.base.controller.api;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					import org.springframework.web.bind.annotation.RequestMapping;
 | 
				
			||||||
 | 
					import org.springframework.web.bind.annotation.RestController;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					/**
 | 
				
			||||||
 | 
					 * <p>
 | 
				
			||||||
 | 
					 * 区域体系分组配置表 前端控制器
 | 
				
			||||||
 | 
					 * </p>
 | 
				
			||||||
 | 
					 *
 | 
				
			||||||
 | 
					 * @author sangelxiu1
 | 
				
			||||||
 | 
					 * @since 2025-06-25
 | 
				
			||||||
 | 
					 */
 | 
				
			||||||
 | 
					@RestController
 | 
				
			||||||
 | 
					@RequestMapping("/com.hzs.common.domain/bd-region-vertex")
 | 
				
			||||||
 | 
					public class ApiRegionVertexController {
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
| 
						 | 
					@ -0,0 +1,59 @@
 | 
				
			||||||
 | 
					package com.hzs.system.base.controller.manage;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					import com.hzs.common.core.web.controller.BaseController;
 | 
				
			||||||
 | 
					import com.hzs.common.core.web.domain.AjaxResult;
 | 
				
			||||||
 | 
					import com.hzs.common.core.web.page.TableDataInfo;
 | 
				
			||||||
 | 
					import com.hzs.common.domain.system.base.BdRegionVertex;
 | 
				
			||||||
 | 
					import com.hzs.system.base.service.IBdRegionVertexService;
 | 
				
			||||||
 | 
					import org.springframework.beans.factory.annotation.Autowired;
 | 
				
			||||||
 | 
					import org.springframework.web.bind.annotation.*;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					import java.util.List;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					/**
 | 
				
			||||||
 | 
					 * <p>
 | 
				
			||||||
 | 
					 * 区域体系分组配置表 前端控制器
 | 
				
			||||||
 | 
					 * </p>
 | 
				
			||||||
 | 
					 *
 | 
				
			||||||
 | 
					 * @author sangelxiu1
 | 
				
			||||||
 | 
					 * @since 2025-06-25
 | 
				
			||||||
 | 
					 */
 | 
				
			||||||
 | 
					@RestController
 | 
				
			||||||
 | 
					@RequestMapping("/manage/bd-region-vertex")
 | 
				
			||||||
 | 
					public class BdRegionVertexController extends BaseController {
 | 
				
			||||||
 | 
					    @Autowired
 | 
				
			||||||
 | 
					    private IBdRegionVertexService bdRegionVertexService;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    @GetMapping("/list")
 | 
				
			||||||
 | 
					    public TableDataInfo list(BdRegionVertex param) {
 | 
				
			||||||
 | 
					        startPage();
 | 
				
			||||||
 | 
					        List<BdRegionVertex> list = bdRegionVertexService.getList(param);
 | 
				
			||||||
 | 
					        return getDataTable(list);
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    @GetMapping("/getAll")
 | 
				
			||||||
 | 
					    public AjaxResult getAll() {
 | 
				
			||||||
 | 
					        List<BdRegionVertex> list = bdRegionVertexService.getList(null);
 | 
				
			||||||
 | 
					        return AjaxResult.success(list);
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
 | 
					    @PostMapping("/add")
 | 
				
			||||||
 | 
					    public AjaxResult add(@RequestBody BdRegionVertex param) {
 | 
				
			||||||
 | 
					        bdRegionVertexService.add(param);
 | 
				
			||||||
 | 
					        return AjaxResult.success();
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
 | 
					    @PostMapping("/update")
 | 
				
			||||||
 | 
					    public AjaxResult update(@RequestBody BdRegionVertex param) {
 | 
				
			||||||
 | 
					        bdRegionVertexService.update(param);
 | 
				
			||||||
 | 
					        return AjaxResult.success();
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
 | 
					    @PostMapping("/delete")
 | 
				
			||||||
 | 
					    public AjaxResult delete(@RequestBody BdRegionVertex param) {
 | 
				
			||||||
 | 
					        bdRegionVertexService.delete(param);
 | 
				
			||||||
 | 
					        return AjaxResult.success();
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
 | 
					    @GetMapping("/getById")
 | 
				
			||||||
 | 
					    public AjaxResult getById(BdRegionVertex param) {
 | 
				
			||||||
 | 
					        return AjaxResult.success(bdRegionVertexService.getById(param));
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
| 
						 | 
					@ -0,0 +1,17 @@
 | 
				
			||||||
 | 
					package com.hzs.system.base.mapper;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					import com.baomidou.mybatisplus.core.mapper.BaseMapper;
 | 
				
			||||||
 | 
					import com.hzs.common.domain.system.base.BdRegionVertex;
 | 
				
			||||||
 | 
					import feign.Param;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					/**
 | 
				
			||||||
 | 
					 * <p>
 | 
				
			||||||
 | 
					 * 区域体系分组配置表 Mapper 接口
 | 
				
			||||||
 | 
					 * </p>
 | 
				
			||||||
 | 
					 *
 | 
				
			||||||
 | 
					 * @author sangelxiu1
 | 
				
			||||||
 | 
					 * @since 2025-06-25
 | 
				
			||||||
 | 
					 */
 | 
				
			||||||
 | 
					public interface BdRegionVertexMapper extends BaseMapper<BdRegionVertex> {
 | 
				
			||||||
 | 
					    int validateMappingCount(@Param("pkId") Long pkId);
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
| 
						 | 
					@ -0,0 +1,24 @@
 | 
				
			||||||
 | 
					package com.hzs.system.base.service;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					import com.baomidou.mybatisplus.extension.service.IService;
 | 
				
			||||||
 | 
					import com.hzs.common.domain.system.base.BdRegionVertex;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					import java.util.List;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					/**
 | 
				
			||||||
 | 
					 * <p>
 | 
				
			||||||
 | 
					 * 区域体系分组配置表 服务类
 | 
				
			||||||
 | 
					 * </p>
 | 
				
			||||||
 | 
					 *
 | 
				
			||||||
 | 
					 * @author sangelxiu1
 | 
				
			||||||
 | 
					 * @since 2025-06-25
 | 
				
			||||||
 | 
					 */
 | 
				
			||||||
 | 
					public interface IBdRegionVertexService extends IService<BdRegionVertex> {
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    List<BdRegionVertex> getList(BdRegionVertex param);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    void add(BdRegionVertex param);
 | 
				
			||||||
 | 
					    void delete(BdRegionVertex param);
 | 
				
			||||||
 | 
					    void update(BdRegionVertex param);
 | 
				
			||||||
 | 
					    BdRegionVertex getById(BdRegionVertex param);
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
| 
						 | 
					@ -0,0 +1,110 @@
 | 
				
			||||||
 | 
					package com.hzs.system.base.service.impl;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					import cn.hutool.core.util.ObjectUtil;
 | 
				
			||||||
 | 
					import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
 | 
				
			||||||
 | 
					import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
 | 
				
			||||||
 | 
					import com.hzs.common.core.enums.EDelFlag;
 | 
				
			||||||
 | 
					import com.hzs.common.core.exception.ServiceException;
 | 
				
			||||||
 | 
					import com.hzs.common.core.utils.StringUtils;
 | 
				
			||||||
 | 
					import com.hzs.common.domain.system.base.BdRegionVertex;
 | 
				
			||||||
 | 
					import com.hzs.common.security.utils.SecurityUtils;
 | 
				
			||||||
 | 
					import com.hzs.system.base.mapper.BdRegionVertexMapper;
 | 
				
			||||||
 | 
					import com.hzs.system.base.service.IBdRegionVertexService;
 | 
				
			||||||
 | 
					import org.springframework.stereotype.Service;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					import java.util.Date;
 | 
				
			||||||
 | 
					import java.util.List;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					/**
 | 
				
			||||||
 | 
					 * <p>
 | 
				
			||||||
 | 
					 * 区域体系分组配置表 服务实现类
 | 
				
			||||||
 | 
					 * </p>
 | 
				
			||||||
 | 
					 *
 | 
				
			||||||
 | 
					 * @author sangelxiu1
 | 
				
			||||||
 | 
					 * @since 2025-06-25
 | 
				
			||||||
 | 
					 */
 | 
				
			||||||
 | 
					@Service
 | 
				
			||||||
 | 
					public class BdRegionVertexServiceImpl extends ServiceImpl<BdRegionVertexMapper, BdRegionVertex> implements IBdRegionVertexService {
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    @Override
 | 
				
			||||||
 | 
					    public List<BdRegionVertex> getList(BdRegionVertex param) {
 | 
				
			||||||
 | 
					        LambdaQueryWrapper<BdRegionVertex> queryWrapper = new LambdaQueryWrapper<>();
 | 
				
			||||||
 | 
					        if(ObjectUtil.isNotEmpty(param)){
 | 
				
			||||||
 | 
					            if(StringUtils.isNotEmpty(param.getName())){
 | 
				
			||||||
 | 
					                queryWrapper.like(BdRegionVertex::getName, param.getName());
 | 
				
			||||||
 | 
					            }
 | 
				
			||||||
 | 
					        }
 | 
				
			||||||
 | 
					        return baseMapper.selectList(queryWrapper);
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    @Override
 | 
				
			||||||
 | 
					    public void add(BdRegionVertex param) {
 | 
				
			||||||
 | 
					        if(ObjectUtil.isNotEmpty(param)){
 | 
				
			||||||
 | 
					            if(StringUtils.isEmpty(param.getName())){
 | 
				
			||||||
 | 
					                throw new ServiceException("区域体系分组名称不能为空!");
 | 
				
			||||||
 | 
					            }
 | 
				
			||||||
 | 
					        }
 | 
				
			||||||
 | 
					        LambdaQueryWrapper<BdRegionVertex> queryWrapper = new LambdaQueryWrapper<>();
 | 
				
			||||||
 | 
					        queryWrapper.eq(BdRegionVertex::getName, param.getName());
 | 
				
			||||||
 | 
					        queryWrapper.eq(BdRegionVertex::getDelFlag, EDelFlag.UN_DELETE.getValue());
 | 
				
			||||||
 | 
					        int sameNameCount = baseMapper.selectCount(queryWrapper);
 | 
				
			||||||
 | 
					        if(sameNameCount > 0){
 | 
				
			||||||
 | 
					            throw new ServiceException("已存在相同的区域体系分组名称!");
 | 
				
			||||||
 | 
					        }
 | 
				
			||||||
 | 
					        param.setPkCreator(SecurityUtils.getUserId());
 | 
				
			||||||
 | 
					        param.setCreationTime(new Date());
 | 
				
			||||||
 | 
					        param.setPkModified(param.getPkCreator());
 | 
				
			||||||
 | 
					        param.setModifiedTime(param.getModifiedTime());
 | 
				
			||||||
 | 
					        param.setDelFlag(EDelFlag.UN_DELETE.getValue());
 | 
				
			||||||
 | 
					        baseMapper.insert(param);
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    @Override
 | 
				
			||||||
 | 
					    public void delete(BdRegionVertex param) {
 | 
				
			||||||
 | 
					        // 验证是否已被引用
 | 
				
			||||||
 | 
					        if(ObjectUtil.isNotEmpty(param)){
 | 
				
			||||||
 | 
					            if(ObjectUtil.isEmpty(param.getPkId())){
 | 
				
			||||||
 | 
					                throw new ServiceException("区域体系分组主键不能为空!");
 | 
				
			||||||
 | 
					            }
 | 
				
			||||||
 | 
					        }
 | 
				
			||||||
 | 
					        int validateMappingCount = baseMapper.validateMappingCount(param.getPkId());
 | 
				
			||||||
 | 
					        if(validateMappingCount > 0){
 | 
				
			||||||
 | 
					            throw new ServiceException("存在已引用此配置的体系信息, 不允许删除!");
 | 
				
			||||||
 | 
					        }
 | 
				
			||||||
 | 
					        baseMapper.deleteById(param.getPkId());
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    @Override
 | 
				
			||||||
 | 
					    public void update(BdRegionVertex param) {
 | 
				
			||||||
 | 
					        if(ObjectUtil.isNotEmpty(param)){
 | 
				
			||||||
 | 
					            if(ObjectUtil.isEmpty(param.getPkId())){
 | 
				
			||||||
 | 
					                throw new ServiceException("区域体系分组主键不能为空!");
 | 
				
			||||||
 | 
					            }
 | 
				
			||||||
 | 
					            if(StringUtils.isEmpty(param.getName())){
 | 
				
			||||||
 | 
					                throw new ServiceException("区域体系分组名称不能为空!");
 | 
				
			||||||
 | 
					            }
 | 
				
			||||||
 | 
					        }
 | 
				
			||||||
 | 
					        LambdaQueryWrapper<BdRegionVertex> queryWrapper = new LambdaQueryWrapper<>();
 | 
				
			||||||
 | 
					        queryWrapper.eq(BdRegionVertex::getName, param.getName());
 | 
				
			||||||
 | 
					        queryWrapper.ne(BdRegionVertex::getPkId, param.getPkId());
 | 
				
			||||||
 | 
					        queryWrapper.eq(BdRegionVertex::getDelFlag, EDelFlag.UN_DELETE.getValue());
 | 
				
			||||||
 | 
					        int sameNameCount = baseMapper.selectCount(queryWrapper);
 | 
				
			||||||
 | 
					        if(sameNameCount > 0){
 | 
				
			||||||
 | 
					            throw new ServiceException("已存在相同的区域体系分组名称!");
 | 
				
			||||||
 | 
					        }
 | 
				
			||||||
 | 
					        param.setPkModified(SecurityUtils.getUserId());
 | 
				
			||||||
 | 
					        param.setModifiedTime(new Date());
 | 
				
			||||||
 | 
					        param.setDelFlag(EDelFlag.UN_DELETE.getValue());
 | 
				
			||||||
 | 
					        baseMapper.updateById(param);
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    @Override
 | 
				
			||||||
 | 
					    public BdRegionVertex getById(BdRegionVertex param) {
 | 
				
			||||||
 | 
					        if(ObjectUtil.isNotEmpty(param)){
 | 
				
			||||||
 | 
					            if(ObjectUtil.isEmpty(param.getPkId())){
 | 
				
			||||||
 | 
					                throw new ServiceException("区域体系分组主键不能为空!");
 | 
				
			||||||
 | 
					            }
 | 
				
			||||||
 | 
					        }
 | 
				
			||||||
 | 
					        return baseMapper.selectById(param.getPkId());
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
| 
						 | 
					@ -0,0 +1,8 @@
 | 
				
			||||||
 | 
					package com.hzs.system.base.vo;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					import com.hzs.common.domain.system.base.BdRegionVertex;
 | 
				
			||||||
 | 
					import lombok.Data;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					@Data
 | 
				
			||||||
 | 
					public class BdRegionVertexVo extends BdRegionVertex {
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
| 
						 | 
					@ -34,9 +34,6 @@ import java.util.List;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
/**
 | 
					/**
 | 
				
			||||||
 * 奖衔配置前端控制器
 | 
					 * 奖衔配置前端控制器
 | 
				
			||||||
 *
 | 
					 | 
				
			||||||
 * @author zhangjing
 | 
					 | 
				
			||||||
 * @since 2022-09-08
 | 
					 | 
				
			||||||
 */
 | 
					 */
 | 
				
			||||||
@Slf4j
 | 
					@Slf4j
 | 
				
			||||||
@RestController
 | 
					@RestController
 | 
				
			||||||
| 
						 | 
					@ -44,27 +41,18 @@ import java.util.List;
 | 
				
			||||||
public class BdAwardsController extends BaseController {
 | 
					public class BdAwardsController extends BaseController {
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    @Autowired
 | 
					    @Autowired
 | 
				
			||||||
    private IBdAwardsService awardsService;
 | 
					    private IBdAwardsService iBdAwardsService;
 | 
				
			||||||
    @Autowired
 | 
					    @Autowired
 | 
				
			||||||
    private IBdNoticeService noticeService;
 | 
					    private IBdNoticeService iBdNoticeService;
 | 
				
			||||||
 | 
					    @Autowired
 | 
				
			||||||
 | 
					    private RedisService redisService;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    @DubboReference
 | 
					    @DubboReference
 | 
				
			||||||
    ITransactionServiceApi iTransactionServiceApi;
 | 
					    ITransactionServiceApi iTransactionServiceApi;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    private RedisService redisService;
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
    @Autowired
 | 
					 | 
				
			||||||
    public void setRedisService(RedisService redisService) {
 | 
					 | 
				
			||||||
        this.redisService = redisService;
 | 
					 | 
				
			||||||
    }
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
 | 
					
 | 
				
			||||||
    /**
 | 
					    /**
 | 
				
			||||||
     * @description: 查询奖衔配置列表
 | 
					     * 查询奖衔配置列表
 | 
				
			||||||
     * @author: zhang jing
 | 
					 | 
				
			||||||
     * @date: 2022/8/30 10:20
 | 
					 | 
				
			||||||
     * @param: [awards]
 | 
					 | 
				
			||||||
     * @return: com.hzs.common.core.web.page.TableDataInfo
 | 
					 | 
				
			||||||
     **/
 | 
					     **/
 | 
				
			||||||
    @Log(module = EOperationModule.LEVEL_CONFIG, business = EOperationBusiness.AWARD_CONTROL, method = EOperationMethod.SELECT)
 | 
					    @Log(module = EOperationModule.LEVEL_CONFIG, business = EOperationBusiness.AWARD_CONTROL, method = EOperationMethod.SELECT)
 | 
				
			||||||
    @GetMapping("/list")
 | 
					    @GetMapping("/list")
 | 
				
			||||||
| 
						 | 
					@ -78,15 +66,15 @@ public class BdAwardsController extends BaseController {
 | 
				
			||||||
        }
 | 
					        }
 | 
				
			||||||
        queryWrapper.orderByAsc(BdAwards::getAwardsValue);
 | 
					        queryWrapper.orderByAsc(BdAwards::getAwardsValue);
 | 
				
			||||||
        List<BdAwardsExt> listExt = new ArrayList<>();
 | 
					        List<BdAwardsExt> listExt = new ArrayList<>();
 | 
				
			||||||
        List<BdAwards> list = awardsService.list(queryWrapper);
 | 
					        List<BdAwards> list = iBdAwardsService.list(queryWrapper);
 | 
				
			||||||
        list.forEach(item -> listExt.add(BeanUtil.copyProperties(item, BdAwardsExt.class)));
 | 
					        list.forEach(item -> listExt.add(BeanUtil.copyProperties(item, BdAwardsExt.class)));
 | 
				
			||||||
        if (CollectionUtil.isNotEmpty(listExt)) {
 | 
					        if (CollectionUtil.isNotEmpty(listExt)) {
 | 
				
			||||||
            for (BdAwardsExt ae : listExt) {
 | 
					            for (BdAwardsExt ae : listExt) {
 | 
				
			||||||
                if (StringUtils.isNotNull(ae.getPkCheckAwardsLeft())) {
 | 
					                if (StringUtils.isNotNull(ae.getPkCheckAwardsLeft())) {
 | 
				
			||||||
                    ae.setPkCheckAwardsLeft(noticeService.getAwardsTranslateValue(ae.getPkCheckAwardsLeft(), null));
 | 
					                    ae.setPkCheckAwardsLeft(iBdNoticeService.getAwardsTranslateValue(ae.getPkCheckAwardsLeft(), null));
 | 
				
			||||||
                }
 | 
					                }
 | 
				
			||||||
                if (StringUtils.isNotNull(ae.getPkCheckAwardsRight())) {
 | 
					                if (StringUtils.isNotNull(ae.getPkCheckAwardsRight())) {
 | 
				
			||||||
                    ae.setPkCheckAwardsRight(noticeService.getAwardsTranslateValue(ae.getPkCheckAwardsRight(), null));
 | 
					                    ae.setPkCheckAwardsRight(iBdNoticeService.getAwardsTranslateValue(ae.getPkCheckAwardsRight(), null));
 | 
				
			||||||
                }
 | 
					                }
 | 
				
			||||||
            }
 | 
					            }
 | 
				
			||||||
        }
 | 
					        }
 | 
				
			||||||
| 
						 | 
					@ -94,11 +82,7 @@ public class BdAwardsController extends BaseController {
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    /**
 | 
					    /**
 | 
				
			||||||
     * @description: 导出奖衔配置
 | 
					     * 导出奖衔配置
 | 
				
			||||||
     * @author: zhang jing
 | 
					 | 
				
			||||||
     * @date: 2023/3/9 15:32
 | 
					 | 
				
			||||||
     * @param: [response, awards]
 | 
					 | 
				
			||||||
     * @return: void
 | 
					 | 
				
			||||||
     **/
 | 
					     **/
 | 
				
			||||||
    @Log(module = EOperationModule.LEVEL_CONFIG, business = EOperationBusiness.AWARD_CONTROL, method = EOperationMethod.SELECT)
 | 
					    @Log(module = EOperationModule.LEVEL_CONFIG, business = EOperationBusiness.AWARD_CONTROL, method = EOperationMethod.SELECT)
 | 
				
			||||||
    @PostMapping("/export")
 | 
					    @PostMapping("/export")
 | 
				
			||||||
| 
						 | 
					@ -112,12 +96,12 @@ public class BdAwardsController extends BaseController {
 | 
				
			||||||
        }
 | 
					        }
 | 
				
			||||||
        queryWrapper.orderByAsc(BdAwards::getAwardsValue);
 | 
					        queryWrapper.orderByAsc(BdAwards::getAwardsValue);
 | 
				
			||||||
        List<BdAwardsExt> listExt = new ArrayList<>();
 | 
					        List<BdAwardsExt> listExt = new ArrayList<>();
 | 
				
			||||||
        List<BdAwards> list = awardsService.list(queryWrapper);
 | 
					        List<BdAwards> list = iBdAwardsService.list(queryWrapper);
 | 
				
			||||||
        list.forEach(item -> listExt.add(BeanUtil.copyProperties(item, BdAwardsExt.class)));
 | 
					        list.forEach(item -> listExt.add(BeanUtil.copyProperties(item, BdAwardsExt.class)));
 | 
				
			||||||
        if (CollectionUtil.isNotEmpty(listExt)) {
 | 
					        if (CollectionUtil.isNotEmpty(listExt)) {
 | 
				
			||||||
            for (BdAwardsExt ae : listExt) {
 | 
					            for (BdAwardsExt ae : listExt) {
 | 
				
			||||||
                ae.setPkCheckAwardsLeft(noticeService.getAwardsTranslateValue(ae.getPkCheckAwardsLeft(), null));
 | 
					                ae.setPkCheckAwardsLeft(iBdNoticeService.getAwardsTranslateValue(ae.getPkCheckAwardsLeft(), null));
 | 
				
			||||||
                ae.setPkCheckAwardsRight(noticeService.getAwardsTranslateValue(ae.getPkCheckAwardsRight(), null));
 | 
					                ae.setPkCheckAwardsRight(iBdNoticeService.getAwardsTranslateValue(ae.getPkCheckAwardsRight(), null));
 | 
				
			||||||
            }
 | 
					            }
 | 
				
			||||||
        }
 | 
					        }
 | 
				
			||||||
        ExcelUtil<BdAwardsExt> util = new ExcelUtil<>(BdAwardsExt.class);
 | 
					        ExcelUtil<BdAwardsExt> util = new ExcelUtil<>(BdAwardsExt.class);
 | 
				
			||||||
| 
						 | 
					@ -125,11 +109,7 @@ public class BdAwardsController extends BaseController {
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    /**
 | 
					    /**
 | 
				
			||||||
     * @description: 真实奖衔下拉选
 | 
					     * 真实奖衔下拉选
 | 
				
			||||||
     * @author: zhang jing
 | 
					 | 
				
			||||||
     * @date: 2022/10/27 10:15
 | 
					 | 
				
			||||||
     * @param: [awards]
 | 
					 | 
				
			||||||
     * @return: com.hzs.common.core.web.page.TableDataInfo
 | 
					 | 
				
			||||||
     **/
 | 
					     **/
 | 
				
			||||||
    @Log(module = EOperationModule.LEVEL_CONFIG, business = EOperationBusiness.AWARD_CONTROL, method = EOperationMethod.SELECT)
 | 
					    @Log(module = EOperationModule.LEVEL_CONFIG, business = EOperationBusiness.AWARD_CONTROL, method = EOperationMethod.SELECT)
 | 
				
			||||||
    @GetMapping("/awardsList")
 | 
					    @GetMapping("/awardsList")
 | 
				
			||||||
| 
						 | 
					@ -137,7 +117,7 @@ public class BdAwardsController extends BaseController {
 | 
				
			||||||
        LambdaQueryWrapper<BdAwards> queryWrapper = new LambdaQueryWrapper<>();
 | 
					        LambdaQueryWrapper<BdAwards> queryWrapper = new LambdaQueryWrapper<>();
 | 
				
			||||||
        queryWrapper.eq(BdAwards::getPkCountry, SecurityUtils.getPkCountry());
 | 
					        queryWrapper.eq(BdAwards::getPkCountry, SecurityUtils.getPkCountry());
 | 
				
			||||||
        queryWrapper.orderByAsc(BdAwards::getAwardsValue);
 | 
					        queryWrapper.orderByAsc(BdAwards::getAwardsValue);
 | 
				
			||||||
        List<BdAwards> list = awardsService.list(queryWrapper);
 | 
					        List<BdAwards> list = iBdAwardsService.list(queryWrapper);
 | 
				
			||||||
        List<BdAwardsExt> listExt = new ArrayList<>();
 | 
					        List<BdAwardsExt> listExt = new ArrayList<>();
 | 
				
			||||||
        for (BdAwards ba : list) {
 | 
					        for (BdAwards ba : list) {
 | 
				
			||||||
            BdAwardsExt baExt = new BdAwardsExt();
 | 
					            BdAwardsExt baExt = new BdAwardsExt();
 | 
				
			||||||
| 
						 | 
					@ -159,7 +139,7 @@ public class BdAwardsController extends BaseController {
 | 
				
			||||||
        LambdaQueryWrapper<BdAwards> queryWrapper = new LambdaQueryWrapper<>();
 | 
					        LambdaQueryWrapper<BdAwards> queryWrapper = new LambdaQueryWrapper<>();
 | 
				
			||||||
        queryWrapper.eq(BdAwards::getPkCountry, SecurityUtils.getPkCountry());
 | 
					        queryWrapper.eq(BdAwards::getPkCountry, SecurityUtils.getPkCountry());
 | 
				
			||||||
        queryWrapper.orderByAsc(BdAwards::getAwardsValue);
 | 
					        queryWrapper.orderByAsc(BdAwards::getAwardsValue);
 | 
				
			||||||
        List<BdAwards> list = awardsService.list(queryWrapper);
 | 
					        List<BdAwards> list = iBdAwardsService.list(queryWrapper);
 | 
				
			||||||
        List<BdAwardsExt> listExt = new ArrayList<>();
 | 
					        List<BdAwardsExt> listExt = new ArrayList<>();
 | 
				
			||||||
        for (BdAwards ba : list) {
 | 
					        for (BdAwards ba : list) {
 | 
				
			||||||
            BdAwardsExt baExt = new BdAwardsExt();
 | 
					            BdAwardsExt baExt = new BdAwardsExt();
 | 
				
			||||||
| 
						 | 
					@ -172,11 +152,7 @@ public class BdAwardsController extends BaseController {
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    /**
 | 
					    /**
 | 
				
			||||||
     * @description: 辅导分红列表
 | 
					     * 辅导分红列表
 | 
				
			||||||
     * @author: zhang jing
 | 
					 | 
				
			||||||
     * @date: 2022/10/27 10:15
 | 
					 | 
				
			||||||
     * @param: [awards]
 | 
					 | 
				
			||||||
     * @return: com.hzs.common.core.web.page.TableDataInfo
 | 
					 | 
				
			||||||
     **/
 | 
					     **/
 | 
				
			||||||
    @Log(module = EOperationModule.LEVEL_CONFIG, business = EOperationBusiness.AWARD_CONTROL, method = EOperationMethod.SELECT)
 | 
					    @Log(module = EOperationModule.LEVEL_CONFIG, business = EOperationBusiness.AWARD_CONTROL, method = EOperationMethod.SELECT)
 | 
				
			||||||
    @GetMapping("/coachBonusList")
 | 
					    @GetMapping("/coachBonusList")
 | 
				
			||||||
| 
						 | 
					@ -185,7 +161,7 @@ public class BdAwardsController extends BaseController {
 | 
				
			||||||
        queryWrapper.eq(BdAwards::getPkCountry, SecurityUtils.getPkCountry());
 | 
					        queryWrapper.eq(BdAwards::getPkCountry, SecurityUtils.getPkCountry());
 | 
				
			||||||
        queryWrapper.eq(BdAwards::getSystemType, ESystemType.DEFAULT.getValue());
 | 
					        queryWrapper.eq(BdAwards::getSystemType, ESystemType.DEFAULT.getValue());
 | 
				
			||||||
        queryWrapper.orderByAsc(BdAwards::getAwardsValue);
 | 
					        queryWrapper.orderByAsc(BdAwards::getAwardsValue);
 | 
				
			||||||
        List<BdAwards> list = awardsService.list(queryWrapper);
 | 
					        List<BdAwards> list = iBdAwardsService.list(queryWrapper);
 | 
				
			||||||
        List<BdAwardsExt> listExt = new ArrayList<>();
 | 
					        List<BdAwardsExt> listExt = new ArrayList<>();
 | 
				
			||||||
        for (BdAwards ba : list) {
 | 
					        for (BdAwards ba : list) {
 | 
				
			||||||
            BdAwardsExt baExt = new BdAwardsExt();
 | 
					            BdAwardsExt baExt = new BdAwardsExt();
 | 
				
			||||||
| 
						 | 
					@ -200,11 +176,7 @@ public class BdAwardsController extends BaseController {
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    /**
 | 
					    /**
 | 
				
			||||||
     * @description: 环球积分列表+车奖积分列表
 | 
					     * 环球积分列表+车奖积分列表
 | 
				
			||||||
     * @author: zhang jing
 | 
					 | 
				
			||||||
     * @date: 2022/11/2 9:16
 | 
					 | 
				
			||||||
     * @param: [awards]
 | 
					 | 
				
			||||||
     * @return: com.hzs.common.core.web.page.TableDataInfo
 | 
					 | 
				
			||||||
     **/
 | 
					     **/
 | 
				
			||||||
    @Log(module = EOperationModule.LEVEL_CONFIG, business = EOperationBusiness.AWARD_CONTROL, method = EOperationMethod.SELECT)
 | 
					    @Log(module = EOperationModule.LEVEL_CONFIG, business = EOperationBusiness.AWARD_CONTROL, method = EOperationMethod.SELECT)
 | 
				
			||||||
    @GetMapping("/integralList")
 | 
					    @GetMapping("/integralList")
 | 
				
			||||||
| 
						 | 
					@ -213,7 +185,7 @@ public class BdAwardsController extends BaseController {
 | 
				
			||||||
        queryWrapper.eq(BdAwards::getPkCountry, SecurityUtils.getPkCountry());
 | 
					        queryWrapper.eq(BdAwards::getPkCountry, SecurityUtils.getPkCountry());
 | 
				
			||||||
        queryWrapper.eq(BdAwards::getSystemType, ESystemType.DEFAULT.getValue());
 | 
					        queryWrapper.eq(BdAwards::getSystemType, ESystemType.DEFAULT.getValue());
 | 
				
			||||||
        queryWrapper.orderByAsc(BdAwards::getAwardsValue);
 | 
					        queryWrapper.orderByAsc(BdAwards::getAwardsValue);
 | 
				
			||||||
        List<BdAwards> list = awardsService.list(queryWrapper);
 | 
					        List<BdAwards> list = iBdAwardsService.list(queryWrapper);
 | 
				
			||||||
        List<BdAwardsExt> listExt = new ArrayList<>();
 | 
					        List<BdAwardsExt> listExt = new ArrayList<>();
 | 
				
			||||||
        if (CollectionUtil.isNotEmpty(list)) {
 | 
					        if (CollectionUtil.isNotEmpty(list)) {
 | 
				
			||||||
            for (BdAwards ba : list) {
 | 
					            for (BdAwards ba : list) {
 | 
				
			||||||
| 
						 | 
					@ -230,11 +202,7 @@ public class BdAwardsController extends BaseController {
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    /**
 | 
					    /**
 | 
				
			||||||
     * @description: 新增奖衔配置
 | 
					     * 新增奖衔配置
 | 
				
			||||||
     * @author: zhang jing
 | 
					 | 
				
			||||||
     * @date: 2022/8/30 10:21
 | 
					 | 
				
			||||||
     * @param: [awards]
 | 
					 | 
				
			||||||
     * @return: com.hzs.common.core.web.domain.AjaxResult
 | 
					 | 
				
			||||||
     **/
 | 
					     **/
 | 
				
			||||||
    @Log(module = EOperationModule.LEVEL_CONFIG, business = EOperationBusiness.AWARD_CONTROL, method = EOperationMethod.INSERT)
 | 
					    @Log(module = EOperationModule.LEVEL_CONFIG, business = EOperationBusiness.AWARD_CONTROL, method = EOperationMethod.INSERT)
 | 
				
			||||||
    @PostMapping("/generate")
 | 
					    @PostMapping("/generate")
 | 
				
			||||||
| 
						 | 
					@ -246,25 +214,10 @@ public class BdAwardsController extends BaseController {
 | 
				
			||||||
        if (StringUtils.isEmpty(awards.getAwardsName())) {
 | 
					        if (StringUtils.isEmpty(awards.getAwardsName())) {
 | 
				
			||||||
            return AjaxResult.error(TransactionUtils.getContent(ConfigMsgConstants.AWARDS_NAME_NOT_NULL));
 | 
					            return AjaxResult.error(TransactionUtils.getContent(ConfigMsgConstants.AWARDS_NAME_NOT_NULL));
 | 
				
			||||||
        }
 | 
					        }
 | 
				
			||||||
        if (StringUtils.isNull(awards.getCommunityCheck())) {
 | 
					 | 
				
			||||||
            return AjaxResult.error(TransactionUtils.getContent(ConfigMsgConstants.COMMUNITY_CHECK_NOT_NULL));
 | 
					 | 
				
			||||||
        }
 | 
					 | 
				
			||||||
        if (StringUtils.isNull(awards.getCommunityCheckEnd())) {
 | 
					 | 
				
			||||||
            return AjaxResult.error(TransactionUtils.getContent(ConfigMsgConstants.COMMUNITY_CHECK_END_NOT_NULL));
 | 
					 | 
				
			||||||
        }
 | 
					 | 
				
			||||||
        if (StringUtils.isNull(awards.getPurchaseCheck())) {
 | 
					 | 
				
			||||||
            return AjaxResult.error(TransactionUtils.getContent(ConfigMsgConstants.PURCHASE_CHECK_NOT_NULL));
 | 
					 | 
				
			||||||
        }
 | 
					 | 
				
			||||||
        if (StringUtils.isNull(awards.getShareCheck())) {
 | 
					 | 
				
			||||||
            return AjaxResult.error(TransactionUtils.getContent(ConfigMsgConstants.SHARE_CHECK_NOT_NULL));
 | 
					 | 
				
			||||||
        }
 | 
					 | 
				
			||||||
        if (StringUtils.isNull(awards.getColor())) {
 | 
					        if (StringUtils.isNull(awards.getColor())) {
 | 
				
			||||||
            return AjaxResult.error(TransactionUtils.getContent(ConfigMsgConstants.COLOR_NOT_NULL));
 | 
					            return AjaxResult.error(TransactionUtils.getContent(ConfigMsgConstants.COLOR_NOT_NULL));
 | 
				
			||||||
        }
 | 
					        }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        if ((null == awards.getPkCheckAwardsLeft() || null == awards.getPkCheckAwardsRight()) && StringUtils.isNotNull(awards.getRelationType())) {
 | 
					 | 
				
			||||||
            return AjaxResult.error(TransactionUtils.getContent(ConfigMsgConstants.LEFT_RIGHT_AWARDS_NAME_NOT_NULL));
 | 
					 | 
				
			||||||
        }
 | 
					 | 
				
			||||||
        awards.setPkCountry(SecurityUtils.getPkCountry());
 | 
					        awards.setPkCountry(SecurityUtils.getPkCountry());
 | 
				
			||||||
        awards.setPkCreator(SecurityUtils.getUserId());
 | 
					        awards.setPkCreator(SecurityUtils.getUserId());
 | 
				
			||||||
        awards.setCreationTime(new Date());
 | 
					        awards.setCreationTime(new Date());
 | 
				
			||||||
| 
						 | 
					@ -273,7 +226,7 @@ public class BdAwardsController extends BaseController {
 | 
				
			||||||
        queryWrapper.eq(BdAwards::getPkCountry, SecurityUtils.getPkCountry());
 | 
					        queryWrapper.eq(BdAwards::getPkCountry, SecurityUtils.getPkCountry());
 | 
				
			||||||
        queryWrapper.eq(BdAwards::getAwardsValue, awards.getAwardsValue());
 | 
					        queryWrapper.eq(BdAwards::getAwardsValue, awards.getAwardsValue());
 | 
				
			||||||
        queryWrapper.eq(BdAwards::getSystemType, ESystemType.DEFAULT.getValue());
 | 
					        queryWrapper.eq(BdAwards::getSystemType, ESystemType.DEFAULT.getValue());
 | 
				
			||||||
        List<BdAwards> list1 = awardsService.list(queryWrapper);
 | 
					        List<BdAwards> list1 = iBdAwardsService.list(queryWrapper);
 | 
				
			||||||
        if (CollectionUtil.isNotEmpty(list1)) {
 | 
					        if (CollectionUtil.isNotEmpty(list1)) {
 | 
				
			||||||
            return AjaxResult.error((ConfigMsgConstants.DATA_REPEAT));
 | 
					            return AjaxResult.error((ConfigMsgConstants.DATA_REPEAT));
 | 
				
			||||||
        }
 | 
					        }
 | 
				
			||||||
| 
						 | 
					@ -283,17 +236,13 @@ public class BdAwardsController extends BaseController {
 | 
				
			||||||
        awards.setPkTransaction(pkTransaction.getData());
 | 
					        awards.setPkTransaction(pkTransaction.getData());
 | 
				
			||||||
        redisService.deleteObjectByKey(CacheConstants.BD_AWARDS + pkCountry);
 | 
					        redisService.deleteObjectByKey(CacheConstants.BD_AWARDS + pkCountry);
 | 
				
			||||||
        awards.setSystemType(ESystemType.DEFAULT.getValue());
 | 
					        awards.setSystemType(ESystemType.DEFAULT.getValue());
 | 
				
			||||||
        awardsService.save(awards);
 | 
					        iBdAwardsService.save(awards);
 | 
				
			||||||
        return AjaxResult.success();
 | 
					        return AjaxResult.success();
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    /**
 | 
					    /**
 | 
				
			||||||
     * @description: 修改奖衔配置
 | 
					     * 修改奖衔配置
 | 
				
			||||||
     * @author: zhang jing
 | 
					 | 
				
			||||||
     * @date: 2022/8/30 10:21
 | 
					 | 
				
			||||||
     * @param: [awards]
 | 
					 | 
				
			||||||
     * @return: com.hzs.common.core.web.domain.AjaxResult
 | 
					 | 
				
			||||||
     **/
 | 
					     **/
 | 
				
			||||||
    @Log(module = EOperationModule.LEVEL_CONFIG, business = EOperationBusiness.AWARD_CONTROL, method = EOperationMethod.UPDATE)
 | 
					    @Log(module = EOperationModule.LEVEL_CONFIG, business = EOperationBusiness.AWARD_CONTROL, method = EOperationMethod.UPDATE)
 | 
				
			||||||
    @PostMapping("/update")
 | 
					    @PostMapping("/update")
 | 
				
			||||||
| 
						 | 
					@ -305,38 +254,23 @@ public class BdAwardsController extends BaseController {
 | 
				
			||||||
        if (StringUtils.isEmpty(awards.getAwardsName())) {
 | 
					        if (StringUtils.isEmpty(awards.getAwardsName())) {
 | 
				
			||||||
            return AjaxResult.error(TransactionUtils.getContent(ConfigMsgConstants.AWARDS_NAME_NOT_NULL));
 | 
					            return AjaxResult.error(TransactionUtils.getContent(ConfigMsgConstants.AWARDS_NAME_NOT_NULL));
 | 
				
			||||||
        }
 | 
					        }
 | 
				
			||||||
        if (StringUtils.isNull(awards.getCommunityCheck())) {
 | 
					 | 
				
			||||||
            return AjaxResult.error(TransactionUtils.getContent(ConfigMsgConstants.COMMUNITY_CHECK_NOT_NULL));
 | 
					 | 
				
			||||||
        }
 | 
					 | 
				
			||||||
        if (StringUtils.isNull(awards.getCommunityCheckEnd())) {
 | 
					 | 
				
			||||||
            return AjaxResult.error(TransactionUtils.getContent(ConfigMsgConstants.COMMUNITY_CHECK_END_NOT_NULL));
 | 
					 | 
				
			||||||
        }
 | 
					 | 
				
			||||||
        if (StringUtils.isNull(awards.getPurchaseCheck())) {
 | 
					 | 
				
			||||||
            return AjaxResult.error(TransactionUtils.getContent(ConfigMsgConstants.PURCHASE_CHECK_NOT_NULL));
 | 
					 | 
				
			||||||
        }
 | 
					 | 
				
			||||||
        if (StringUtils.isNull(awards.getShareCheck())) {
 | 
					 | 
				
			||||||
            return AjaxResult.error(TransactionUtils.getContent(ConfigMsgConstants.SHARE_CHECK_NOT_NULL));
 | 
					 | 
				
			||||||
        }
 | 
					 | 
				
			||||||
        if (StringUtils.isNull(awards.getColor())) {
 | 
					        if (StringUtils.isNull(awards.getColor())) {
 | 
				
			||||||
            return AjaxResult.error(TransactionUtils.getContent(ConfigMsgConstants.COLOR_NOT_NULL));
 | 
					            return AjaxResult.error(TransactionUtils.getContent(ConfigMsgConstants.COLOR_NOT_NULL));
 | 
				
			||||||
        }
 | 
					        }
 | 
				
			||||||
        if ((null == awards.getPkCheckAwardsLeft() || null == awards.getPkCheckAwardsRight()) && StringUtils.isNotNull(awards.getRelationType())) {
 | 
					 | 
				
			||||||
            return AjaxResult.error(TransactionUtils.getContent(ConfigMsgConstants.LEFT_RIGHT_AWARDS_NAME_NOT_NULL));
 | 
					 | 
				
			||||||
        }
 | 
					 | 
				
			||||||
 | 
					
 | 
				
			||||||
        LambdaQueryWrapper<BdAwards> queryWrapper = new LambdaQueryWrapper<>();
 | 
					        LambdaQueryWrapper<BdAwards> queryWrapper = new LambdaQueryWrapper<>();
 | 
				
			||||||
        queryWrapper.eq(BdAwards::getPkCountry, SecurityUtils.getPkCountry());
 | 
					        queryWrapper.eq(BdAwards::getPkCountry, SecurityUtils.getPkCountry());
 | 
				
			||||||
        queryWrapper.eq(BdAwards::getAwardsValue, awards.getAwardsValue());
 | 
					        queryWrapper.eq(BdAwards::getAwardsValue, awards.getAwardsValue());
 | 
				
			||||||
        queryWrapper.eq(BdAwards::getSystemType, ESystemType.DEFAULT.getValue());
 | 
					        queryWrapper.eq(BdAwards::getSystemType, ESystemType.DEFAULT.getValue());
 | 
				
			||||||
        queryWrapper.ne(BdAwards::getPkId, awards.getPkId());
 | 
					        queryWrapper.ne(BdAwards::getPkId, awards.getPkId());
 | 
				
			||||||
        List<BdAwards> list1 = awardsService.list(queryWrapper);
 | 
					        List<BdAwards> list1 = iBdAwardsService.list(queryWrapper);
 | 
				
			||||||
        if (CollectionUtil.isNotEmpty(list1)) {
 | 
					        if (CollectionUtil.isNotEmpty(list1)) {
 | 
				
			||||||
            return AjaxResult.error(TransactionUtils.getContent(ConfigMsgConstants.DATA_REPEAT));
 | 
					            return AjaxResult.error(TransactionUtils.getContent(ConfigMsgConstants.DATA_REPEAT));
 | 
				
			||||||
        }
 | 
					        }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        //字段翻译保存到数据库
 | 
					        //字段翻译保存到数据库
 | 
				
			||||||
        if (null != awards.getPkTransaction()) {
 | 
					        if (null != awards.getPkTransaction()) {
 | 
				
			||||||
            R<Boolean> b = iTransactionServiceApi.updateTransaction(pkCountry,
 | 
					            iTransactionServiceApi.updateTransaction(pkCountry,
 | 
				
			||||||
                    awards.getAwardsName(), awards.getPkTransaction(), true);
 | 
					                    awards.getAwardsName(), awards.getPkTransaction(), true);
 | 
				
			||||||
        } else {
 | 
					        } else {
 | 
				
			||||||
            R<Integer> pkTransaction = iTransactionServiceApi.createTransaction(pkCountry, ETransactionKey.AWARDS,
 | 
					            R<Integer> pkTransaction = iTransactionServiceApi.createTransaction(pkCountry, ETransactionKey.AWARDS,
 | 
				
			||||||
| 
						 | 
					@ -346,15 +280,11 @@ public class BdAwardsController extends BaseController {
 | 
				
			||||||
        awards.setPkModified(SecurityUtils.getUserId());
 | 
					        awards.setPkModified(SecurityUtils.getUserId());
 | 
				
			||||||
        awards.setModifiedTime(new Date());
 | 
					        awards.setModifiedTime(new Date());
 | 
				
			||||||
        redisService.deleteObjectByKey(CacheConstants.BD_AWARDS + pkCountry);
 | 
					        redisService.deleteObjectByKey(CacheConstants.BD_AWARDS + pkCountry);
 | 
				
			||||||
        return toAjax(awardsService.updateById(awards));
 | 
					        return toAjax(iBdAwardsService.updateById(awards));
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    /**
 | 
					    /**
 | 
				
			||||||
     * @description: 修改启用禁用
 | 
					     * 修改启用禁用
 | 
				
			||||||
     * @author: zhang jing
 | 
					 | 
				
			||||||
     * @date: 2023/4/24 14:30
 | 
					 | 
				
			||||||
     * @param: [gradeExt]
 | 
					 | 
				
			||||||
     * @return: com.hzs.common.core.web.domain.AjaxResult
 | 
					 | 
				
			||||||
     **/
 | 
					     **/
 | 
				
			||||||
    @Log(module = EOperationModule.LEVEL_CONFIG, business = EOperationBusiness.AWARD_CONTROL, method = EOperationMethod.UPDATE)
 | 
					    @Log(module = EOperationModule.LEVEL_CONFIG, business = EOperationBusiness.AWARD_CONTROL, method = EOperationMethod.UPDATE)
 | 
				
			||||||
    @PostMapping("/updateState")
 | 
					    @PostMapping("/updateState")
 | 
				
			||||||
| 
						 | 
					@ -370,17 +300,13 @@ public class BdAwardsController extends BaseController {
 | 
				
			||||||
        updateWrapper.eq(BdAwards::getPkId, awards.getPkId());
 | 
					        updateWrapper.eq(BdAwards::getPkId, awards.getPkId());
 | 
				
			||||||
        updateWrapper.set(BdAwards::getPkModified, SecurityUtils.getUserId());
 | 
					        updateWrapper.set(BdAwards::getPkModified, SecurityUtils.getUserId());
 | 
				
			||||||
        updateWrapper.set(BdAwards::getModifiedTime, new Date());
 | 
					        updateWrapper.set(BdAwards::getModifiedTime, new Date());
 | 
				
			||||||
        awardsService.update(updateWrapper);
 | 
					        iBdAwardsService.update(updateWrapper);
 | 
				
			||||||
        redisService.deleteObjectByKey(CacheConstants.BD_AWARDS + SecurityUtils.getPkCountry());
 | 
					        redisService.deleteObjectByKey(CacheConstants.BD_AWARDS + SecurityUtils.getPkCountry());
 | 
				
			||||||
        return AjaxResult.success();
 | 
					        return AjaxResult.success();
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    /**
 | 
					    /**
 | 
				
			||||||
     * @description: 修改辅导分红
 | 
					     * 修改辅导分红
 | 
				
			||||||
     * @author: zhang jing
 | 
					 | 
				
			||||||
     * @date: 2022/10/31 19:39
 | 
					 | 
				
			||||||
     * @param: [awards]
 | 
					 | 
				
			||||||
     * @return: com.hzs.common.core.web.domain.AjaxResult
 | 
					 | 
				
			||||||
     **/
 | 
					     **/
 | 
				
			||||||
    @Log(module = EOperationModule.LEVEL_CONFIG, business = EOperationBusiness.AWARD_CONTROL, method = EOperationMethod.UPDATE)
 | 
					    @Log(module = EOperationModule.LEVEL_CONFIG, business = EOperationBusiness.AWARD_CONTROL, method = EOperationMethod.UPDATE)
 | 
				
			||||||
    @PostMapping("/updateCoachBonus")
 | 
					    @PostMapping("/updateCoachBonus")
 | 
				
			||||||
| 
						 | 
					@ -388,7 +314,7 @@ public class BdAwardsController extends BaseController {
 | 
				
			||||||
        List<BdAwards> awardsList = new ArrayList<>();
 | 
					        List<BdAwards> awardsList = new ArrayList<>();
 | 
				
			||||||
        if (CollectionUtil.isNotEmpty(awardsExt.getAwardsList())) {
 | 
					        if (CollectionUtil.isNotEmpty(awardsExt.getAwardsList())) {
 | 
				
			||||||
            for (BdAwards awards : awardsExt.getAwardsList()) {
 | 
					            for (BdAwards awards : awardsExt.getAwardsList()) {
 | 
				
			||||||
                BdAwards awardsOld = awardsService.getById(awards.getPkId());
 | 
					                BdAwards awardsOld = iBdAwardsService.getById(awards.getPkId());
 | 
				
			||||||
                if (StringUtils.isNull(awards.getPkId())) {
 | 
					                if (StringUtils.isNull(awards.getPkId())) {
 | 
				
			||||||
                    return AjaxResult.error(TransactionUtils.getContent(ConfigMsgConstants.PK_GRADE_AWARDS_NOT_NULL));
 | 
					                    return AjaxResult.error(TransactionUtils.getContent(ConfigMsgConstants.PK_GRADE_AWARDS_NOT_NULL));
 | 
				
			||||||
                }
 | 
					                }
 | 
				
			||||||
| 
						 | 
					@ -411,18 +337,14 @@ public class BdAwardsController extends BaseController {
 | 
				
			||||||
            }
 | 
					            }
 | 
				
			||||||
            awardsExt.setAwardsList(awardsList);
 | 
					            awardsExt.setAwardsList(awardsList);
 | 
				
			||||||
            redisService.deleteObjectByKey(CacheConstants.BD_AWARDS_COACH + SecurityUtils.getPkCountry());
 | 
					            redisService.deleteObjectByKey(CacheConstants.BD_AWARDS_COACH + SecurityUtils.getPkCountry());
 | 
				
			||||||
            return AjaxResult.success(awardsService.updateAwards(awardsExt));
 | 
					            return AjaxResult.success(iBdAwardsService.updateAwards(awardsExt));
 | 
				
			||||||
        } else {
 | 
					        } else {
 | 
				
			||||||
            return AjaxResult.error();
 | 
					            return AjaxResult.error();
 | 
				
			||||||
        }
 | 
					        }
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    /**
 | 
					    /**
 | 
				
			||||||
     * @description: 修改环球积分
 | 
					     * 修改环球积分
 | 
				
			||||||
     * @author: zhang jing
 | 
					 | 
				
			||||||
     * @date: 2022/11/2 9:38
 | 
					 | 
				
			||||||
     * @param: [awardsExt]
 | 
					 | 
				
			||||||
     * @return: com.hzs.common.core.web.domain.AjaxResult
 | 
					 | 
				
			||||||
     **/
 | 
					     **/
 | 
				
			||||||
    @Log(module = EOperationModule.LEVEL_CONFIG, business = EOperationBusiness.AWARD_CONTROL, method = EOperationMethod.UPDATE)
 | 
					    @Log(module = EOperationModule.LEVEL_CONFIG, business = EOperationBusiness.AWARD_CONTROL, method = EOperationMethod.UPDATE)
 | 
				
			||||||
    @PostMapping("/updategLobalIntegral")
 | 
					    @PostMapping("/updategLobalIntegral")
 | 
				
			||||||
| 
						 | 
					@ -440,18 +362,14 @@ public class BdAwardsController extends BaseController {
 | 
				
			||||||
                awards.setPkModified(SecurityUtils.getUserId());
 | 
					                awards.setPkModified(SecurityUtils.getUserId());
 | 
				
			||||||
                awards.setModifiedTime(new Date());
 | 
					                awards.setModifiedTime(new Date());
 | 
				
			||||||
            }
 | 
					            }
 | 
				
			||||||
            return AjaxResult.success(awardsService.updateLobalIntegral(awardsExt));
 | 
					            return AjaxResult.success(iBdAwardsService.updateLobalIntegral(awardsExt));
 | 
				
			||||||
        } else {
 | 
					        } else {
 | 
				
			||||||
            return AjaxResult.error();
 | 
					            return AjaxResult.error();
 | 
				
			||||||
        }
 | 
					        }
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    /**
 | 
					    /**
 | 
				
			||||||
     * @description: 修改车奖积分
 | 
					     * 修改车奖积分
 | 
				
			||||||
     * @author: zhang jing
 | 
					 | 
				
			||||||
     * @date: 2022/11/2 9:38
 | 
					 | 
				
			||||||
     * @param: [awardsExt]
 | 
					 | 
				
			||||||
     * @return: com.hzs.common.core.web.domain.AjaxResult
 | 
					 | 
				
			||||||
     **/
 | 
					     **/
 | 
				
			||||||
    @Log(module = EOperationModule.LEVEL_CONFIG, business = EOperationBusiness.AWARD_CONTROL, method = EOperationMethod.UPDATE)
 | 
					    @Log(module = EOperationModule.LEVEL_CONFIG, business = EOperationBusiness.AWARD_CONTROL, method = EOperationMethod.UPDATE)
 | 
				
			||||||
    @PostMapping("/updategCarAwardPoints")
 | 
					    @PostMapping("/updategCarAwardPoints")
 | 
				
			||||||
| 
						 | 
					@ -469,7 +387,7 @@ public class BdAwardsController extends BaseController {
 | 
				
			||||||
                awards.setPkModified(SecurityUtils.getUserId());
 | 
					                awards.setPkModified(SecurityUtils.getUserId());
 | 
				
			||||||
                awards.setModifiedTime(new Date());
 | 
					                awards.setModifiedTime(new Date());
 | 
				
			||||||
            }
 | 
					            }
 | 
				
			||||||
            return AjaxResult.success(awardsService.updateGlobalIntegral(awardsExt));
 | 
					            return AjaxResult.success(iBdAwardsService.updateGlobalIntegral(awardsExt));
 | 
				
			||||||
        } else {
 | 
					        } else {
 | 
				
			||||||
            return AjaxResult.error();
 | 
					            return AjaxResult.error();
 | 
				
			||||||
        }
 | 
					        }
 | 
				
			||||||
| 
						 | 
					@ -477,26 +395,17 @@ public class BdAwardsController extends BaseController {
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    /**
 | 
					    /**
 | 
				
			||||||
     * @description: 查询单条奖衔配置
 | 
					     * 查询单条奖衔配置
 | 
				
			||||||
     * @author: zhang jing
 | 
					 | 
				
			||||||
     * @date: 2022/8/30 10:21
 | 
					 | 
				
			||||||
     * @param: [pkId]
 | 
					 | 
				
			||||||
     * @return: com.hzs.common.core.web.domain.AjaxResult
 | 
					 | 
				
			||||||
     **/
 | 
					     **/
 | 
				
			||||||
    @Log(module = EOperationModule.LEVEL_CONFIG, business = EOperationBusiness.AWARD_CONTROL, method = EOperationMethod.SELECT)
 | 
					    @Log(module = EOperationModule.LEVEL_CONFIG, business = EOperationBusiness.AWARD_CONTROL, method = EOperationMethod.SELECT)
 | 
				
			||||||
    @GetMapping("/getOne/{pkId}")
 | 
					    @GetMapping("/getOne/{pkId}")
 | 
				
			||||||
    public AjaxResult getOne(@PathVariable Long pkId) {
 | 
					    public AjaxResult getOne(@PathVariable Long pkId) {
 | 
				
			||||||
        BdAwards awards = awardsService.getById(pkId);
 | 
					        return AjaxResult.success(iBdAwardsService.getById(pkId));
 | 
				
			||||||
        return AjaxResult.success(awards);
 | 
					 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    /**
 | 
					    /**
 | 
				
			||||||
     * @description: 删除奖衔配置
 | 
					     * 删除奖衔配置
 | 
				
			||||||
     * @author: zhang jing
 | 
					 | 
				
			||||||
     * @date: 2022/8/30 10:21
 | 
					 | 
				
			||||||
     * @param: [pkId]
 | 
					 | 
				
			||||||
     * @return: com.hzs.common.core.web.domain.AjaxResult
 | 
					 | 
				
			||||||
     **/
 | 
					     **/
 | 
				
			||||||
    @Log(module = EOperationModule.LEVEL_CONFIG, business = EOperationBusiness.AWARD_CONTROL, method = EOperationMethod.DELETE)
 | 
					    @Log(module = EOperationModule.LEVEL_CONFIG, business = EOperationBusiness.AWARD_CONTROL, method = EOperationMethod.DELETE)
 | 
				
			||||||
    @DeleteMapping("/{pkId}")
 | 
					    @DeleteMapping("/{pkId}")
 | 
				
			||||||
| 
						 | 
					@ -508,11 +417,11 @@ public class BdAwardsController extends BaseController {
 | 
				
			||||||
        updateWrapper.set(BdAwards::getModifiedTime, new Date());
 | 
					        updateWrapper.set(BdAwards::getModifiedTime, new Date());
 | 
				
			||||||
        redisService.deleteObjectByKey(CacheConstants.BD_AWARDS + SecurityUtils.getPkCountry());
 | 
					        redisService.deleteObjectByKey(CacheConstants.BD_AWARDS + SecurityUtils.getPkCountry());
 | 
				
			||||||
        redisService.deleteObjectByKey(CacheConstants.BD_AWARDS_COACH + SecurityUtils.getPkCountry());
 | 
					        redisService.deleteObjectByKey(CacheConstants.BD_AWARDS_COACH + SecurityUtils.getPkCountry());
 | 
				
			||||||
        Integer count = awardsService.checkGradeAwards(null, null, pkId);
 | 
					        Integer count = iBdAwardsService.checkGradeAwards(null, null, pkId);
 | 
				
			||||||
        if (count > 0) {
 | 
					        if (count > 0) {
 | 
				
			||||||
            return AjaxResult.error(TransactionUtils.getContent(ConfigMsgConstants.ENABLE_STATE_NOT_DELETE));
 | 
					            return AjaxResult.error(TransactionUtils.getContent(ConfigMsgConstants.ENABLE_STATE_NOT_DELETE));
 | 
				
			||||||
        }
 | 
					        }
 | 
				
			||||||
        return AjaxResult.success(awardsService.update(updateWrapper));
 | 
					        return AjaxResult.success(iBdAwardsService.update(updateWrapper));
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -1,63 +0,0 @@
 | 
				
			||||||
package com.hzs.system.config.controller.manage;
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
import cn.hutool.core.bean.BeanUtil;
 | 
					 | 
				
			||||||
import cn.hutool.core.collection.CollectionUtil;
 | 
					 | 
				
			||||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
 | 
					 | 
				
			||||||
import com.hzs.common.core.annotation.Log;
 | 
					 | 
				
			||||||
import com.hzs.common.core.constant.msg.ConfigMsgConstants;
 | 
					 | 
				
			||||||
import com.hzs.common.core.enums.EOperationBusiness;
 | 
					 | 
				
			||||||
import com.hzs.common.core.enums.EOperationMethod;
 | 
					 | 
				
			||||||
import com.hzs.common.core.enums.EOperationModule;
 | 
					 | 
				
			||||||
import com.hzs.common.core.web.controller.BaseController;
 | 
					 | 
				
			||||||
import com.hzs.common.core.web.page.TableDataInfo;
 | 
					 | 
				
			||||||
import com.hzs.common.domain.system.config.BdBonusExpand;
 | 
					 | 
				
			||||||
import com.hzs.common.domain.system.config.ext.BdBonusExpandExt;
 | 
					 | 
				
			||||||
import com.hzs.common.security.utils.SecurityUtils;
 | 
					 | 
				
			||||||
import com.hzs.common.util.TransactionUtils;
 | 
					 | 
				
			||||||
import com.hzs.system.config.service.IBdBonusExpandService;
 | 
					 | 
				
			||||||
import org.springframework.beans.factory.annotation.Autowired;
 | 
					 | 
				
			||||||
import org.springframework.web.bind.annotation.GetMapping;
 | 
					 | 
				
			||||||
import org.springframework.web.bind.annotation.RequestMapping;
 | 
					 | 
				
			||||||
import org.springframework.web.bind.annotation.RestController;
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
import java.util.ArrayList;
 | 
					 | 
				
			||||||
import java.util.List;
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
/**
 | 
					 | 
				
			||||||
 * <p>
 | 
					 | 
				
			||||||
 * 奖金4—N配置
 | 
					 | 
				
			||||||
 前端控制器
 | 
					 | 
				
			||||||
 * </p>
 | 
					 | 
				
			||||||
 *
 | 
					 | 
				
			||||||
 * @author hzs
 | 
					 | 
				
			||||||
 * @since 2022-10-31
 | 
					 | 
				
			||||||
 */
 | 
					 | 
				
			||||||
@RestController
 | 
					 | 
				
			||||||
@RequestMapping("/manage/bd-bonus-expand")
 | 
					 | 
				
			||||||
public class BdBonusExpandController extends BaseController {
 | 
					 | 
				
			||||||
    @Autowired
 | 
					 | 
				
			||||||
    IBdBonusExpandService bonusExpandService;
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
    @Log(module = EOperationModule.LEVEL_CONFIG,business = EOperationBusiness.GRADE, method = EOperationMethod.SELECT)
 | 
					 | 
				
			||||||
    @GetMapping("/list")
 | 
					 | 
				
			||||||
    public TableDataInfo list(BdBonusExpand bonusExpand) {
 | 
					 | 
				
			||||||
        QueryWrapper<BdBonusExpand> queryWrapper = new QueryWrapper();
 | 
					 | 
				
			||||||
        queryWrapper.eq("PK_COUNTRY", SecurityUtils.getPkCountry());
 | 
					 | 
				
			||||||
        queryWrapper.orderByDesc("CREATION_TIME");
 | 
					 | 
				
			||||||
        List<BdBonusExpand> list = bonusExpandService.list(queryWrapper);
 | 
					 | 
				
			||||||
        List<BdBonusExpandExt> listExt=new ArrayList<>();
 | 
					 | 
				
			||||||
        if(CollectionUtil.isNotEmpty(list)){
 | 
					 | 
				
			||||||
            for(BdBonusExpand be : list){
 | 
					 | 
				
			||||||
                BdBonusExpandExt bee = BeanUtil.copyProperties(be, BdBonusExpandExt.class);
 | 
					 | 
				
			||||||
                bee.setExpandName(TransactionUtils.getContent(ConfigMsgConstants.FOUR_N_DISPOSE));
 | 
					 | 
				
			||||||
                listExt.add(bee);
 | 
					 | 
				
			||||||
            }
 | 
					 | 
				
			||||||
        }else{
 | 
					 | 
				
			||||||
            BdBonusExpandExt bee = new BdBonusExpandExt();
 | 
					 | 
				
			||||||
            bee.setExpandName(TransactionUtils.getContent(ConfigMsgConstants.FOUR_N_DISPOSE));
 | 
					 | 
				
			||||||
            listExt.add(bee);
 | 
					 | 
				
			||||||
        }
 | 
					 | 
				
			||||||
        return getDataTable(listExt);
 | 
					 | 
				
			||||||
    }
 | 
					 | 
				
			||||||
}
 | 
					 | 
				
			||||||
| 
						 | 
					@ -17,7 +17,6 @@ import com.hzs.common.core.web.page.TableDataInfo;
 | 
				
			||||||
import com.hzs.common.domain.system.base.BdCountry;
 | 
					import com.hzs.common.domain.system.base.BdCountry;
 | 
				
			||||||
import com.hzs.common.domain.system.config.BdGrade;
 | 
					import com.hzs.common.domain.system.config.BdGrade;
 | 
				
			||||||
import com.hzs.common.domain.system.config.BdGradeScope;
 | 
					import com.hzs.common.domain.system.config.BdGradeScope;
 | 
				
			||||||
import com.hzs.common.domain.system.config.ext.BdBonusExpandExt;
 | 
					 | 
				
			||||||
import com.hzs.common.domain.system.config.ext.BdGradeExt;
 | 
					import com.hzs.common.domain.system.config.ext.BdGradeExt;
 | 
				
			||||||
import com.hzs.common.domain.system.ext.BdGradeScopeExt;
 | 
					import com.hzs.common.domain.system.ext.BdGradeScopeExt;
 | 
				
			||||||
import com.hzs.common.security.utils.SecurityUtils;
 | 
					import com.hzs.common.security.utils.SecurityUtils;
 | 
				
			||||||
| 
						 | 
					@ -38,9 +37,6 @@ import java.util.List;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
/**
 | 
					/**
 | 
				
			||||||
 * 等级配置表 前端控制器
 | 
					 * 等级配置表 前端控制器
 | 
				
			||||||
 *
 | 
					 | 
				
			||||||
 * @author zhangjing
 | 
					 | 
				
			||||||
 * @since 2022-09-08
 | 
					 | 
				
			||||||
 */
 | 
					 */
 | 
				
			||||||
@Slf4j
 | 
					@Slf4j
 | 
				
			||||||
@RestController
 | 
					@RestController
 | 
				
			||||||
| 
						 | 
					@ -57,13 +53,8 @@ public class BdGradeController extends BaseController {
 | 
				
			||||||
    private IBdAwardsService awardsService;
 | 
					    private IBdAwardsService awardsService;
 | 
				
			||||||
    @Autowired
 | 
					    @Autowired
 | 
				
			||||||
    private IBdNoticeService noticeService;
 | 
					    private IBdNoticeService noticeService;
 | 
				
			||||||
 | 
					 | 
				
			||||||
    private RedisService redisService;
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
    @Autowired
 | 
					    @Autowired
 | 
				
			||||||
    public void setRedisService(RedisService redisService) {
 | 
					    private RedisService redisService;
 | 
				
			||||||
        this.redisService = redisService;
 | 
					 | 
				
			||||||
    }
 | 
					 | 
				
			||||||
 | 
					
 | 
				
			||||||
    /**
 | 
					    /**
 | 
				
			||||||
     * @description: 查询等级配置列表
 | 
					     * @description: 查询等级配置列表
 | 
				
			||||||
| 
						 | 
					@ -362,18 +353,6 @@ public class BdGradeController extends BaseController {
 | 
				
			||||||
    @Log(module = EOperationModule.LEVEL_CONFIG, business = EOperationBusiness.GRADE, method = EOperationMethod.UPDATE)
 | 
					    @Log(module = EOperationModule.LEVEL_CONFIG, business = EOperationBusiness.GRADE, method = EOperationMethod.UPDATE)
 | 
				
			||||||
    @PostMapping("/updateExpand")
 | 
					    @PostMapping("/updateExpand")
 | 
				
			||||||
    public AjaxResult updateExpand(@RequestBody BdGradeExt gradeExt) {
 | 
					    public AjaxResult updateExpand(@RequestBody BdGradeExt gradeExt) {
 | 
				
			||||||
        if (CollectionUtil.isNotEmpty(gradeExt.getBonusExpands())) {
 | 
					 | 
				
			||||||
            for (BdBonusExpandExt bee : gradeExt.getBonusExpands()) {
 | 
					 | 
				
			||||||
                if (StringUtils.isNull(bee.getExpandNumber())) {
 | 
					 | 
				
			||||||
                    return AjaxResult.error(TransactionUtils.getContent(ConfigMsgConstants.EXPAND_NUMBER_NOT_NULL));
 | 
					 | 
				
			||||||
                }
 | 
					 | 
				
			||||||
                if (StringUtils.isNull(bee.getExpandRatio())) {
 | 
					 | 
				
			||||||
                    return AjaxResult.error(TransactionUtils.getContent(ConfigMsgConstants.EXPAND_RATIO_NOT_NULL));
 | 
					 | 
				
			||||||
                }
 | 
					 | 
				
			||||||
            }
 | 
					 | 
				
			||||||
        } else {
 | 
					 | 
				
			||||||
            return AjaxResult.error(TransactionUtils.getContent(ConfigMsgConstants.BONUS_EXPANDS_NOT_NULL));
 | 
					 | 
				
			||||||
        }
 | 
					 | 
				
			||||||
        if (CollectionUtil.isNotEmpty(gradeExt.getExpandList())) {
 | 
					        if (CollectionUtil.isNotEmpty(gradeExt.getExpandList())) {
 | 
				
			||||||
            for (BdGrade bg : gradeExt.getExpandList()) {
 | 
					            for (BdGrade bg : gradeExt.getExpandList()) {
 | 
				
			||||||
                if (StringUtils.isNull(bg.getPkId())) {
 | 
					                if (StringUtils.isNull(bg.getPkId())) {
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -11,7 +11,6 @@ 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;
 | 
				
			||||||
import com.hzs.common.core.utils.poi.ExcelUtil;
 | 
					 | 
				
			||||||
import com.hzs.common.core.web.controller.BaseController;
 | 
					import com.hzs.common.core.web.controller.BaseController;
 | 
				
			||||||
import com.hzs.common.core.web.domain.AjaxResult;
 | 
					import com.hzs.common.core.web.domain.AjaxResult;
 | 
				
			||||||
import com.hzs.common.core.web.page.TableDataInfo;
 | 
					import com.hzs.common.core.web.page.TableDataInfo;
 | 
				
			||||||
| 
						 | 
					@ -27,16 +26,12 @@ 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.*;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
import javax.servlet.http.HttpServletResponse;
 | 
					 | 
				
			||||||
import java.util.ArrayList;
 | 
					import java.util.ArrayList;
 | 
				
			||||||
import java.util.Date;
 | 
					import java.util.Date;
 | 
				
			||||||
import java.util.List;
 | 
					import java.util.List;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
/**
 | 
					/**
 | 
				
			||||||
 * 新零售奖衔配置前端控制器
 | 
					 * 新零售奖衔配置前端控制器
 | 
				
			||||||
 *
 | 
					 | 
				
			||||||
 * @author zhangjing
 | 
					 | 
				
			||||||
 * @since 2022-09-08
 | 
					 | 
				
			||||||
 */
 | 
					 */
 | 
				
			||||||
@Slf4j
 | 
					@Slf4j
 | 
				
			||||||
@RestController
 | 
					@RestController
 | 
				
			||||||
| 
						 | 
					@ -44,27 +39,18 @@ import java.util.List;
 | 
				
			||||||
public class BdRetailAwardsController extends BaseController {
 | 
					public class BdRetailAwardsController extends BaseController {
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    @Autowired
 | 
					    @Autowired
 | 
				
			||||||
    private IBdAwardsService awardsService;
 | 
					    private IBdAwardsService iBdAwardsService;
 | 
				
			||||||
    @Autowired
 | 
					    @Autowired
 | 
				
			||||||
    private IBdNoticeService noticeService;
 | 
					    private IBdNoticeService iBdNoticeService;
 | 
				
			||||||
 | 
					    @Autowired
 | 
				
			||||||
 | 
					    private RedisService redisService;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    @DubboReference
 | 
					    @DubboReference
 | 
				
			||||||
    ITransactionServiceApi iTransactionServiceApi;
 | 
					    ITransactionServiceApi iTransactionServiceApi;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    private RedisService redisService;
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
    @Autowired
 | 
					 | 
				
			||||||
    public void setRedisService(RedisService redisService) {
 | 
					 | 
				
			||||||
        this.redisService = redisService;
 | 
					 | 
				
			||||||
    }
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
 | 
					
 | 
				
			||||||
    /**
 | 
					    /**
 | 
				
			||||||
     * @description: 查询奖衔配置列表
 | 
					     * 查询奖衔配置列表
 | 
				
			||||||
     * @author: zhang jing
 | 
					 | 
				
			||||||
     * @date: 2022/8/30 10:20
 | 
					 | 
				
			||||||
     * @param: [awards]
 | 
					 | 
				
			||||||
     * @return: com.hzs.common.core.web.page.TableDataInfo
 | 
					 | 
				
			||||||
     **/
 | 
					     **/
 | 
				
			||||||
    @Log(module = EOperationModule.LEVEL_CONFIG, business = EOperationBusiness.AWARD_CONTROL, method = EOperationMethod.SELECT)
 | 
					    @Log(module = EOperationModule.LEVEL_CONFIG, business = EOperationBusiness.AWARD_CONTROL, method = EOperationMethod.SELECT)
 | 
				
			||||||
    @GetMapping("/list")
 | 
					    @GetMapping("/list")
 | 
				
			||||||
| 
						 | 
					@ -77,15 +63,15 @@ public class BdRetailAwardsController extends BaseController {
 | 
				
			||||||
        }
 | 
					        }
 | 
				
			||||||
        queryWrapper.orderByAsc(BdAwards::getAwardsValue);
 | 
					        queryWrapper.orderByAsc(BdAwards::getAwardsValue);
 | 
				
			||||||
        List<BdAwardsExt> listExt = new ArrayList<>();
 | 
					        List<BdAwardsExt> listExt = new ArrayList<>();
 | 
				
			||||||
        List<BdAwards> list = awardsService.list(queryWrapper);
 | 
					        List<BdAwards> list = iBdAwardsService.list(queryWrapper);
 | 
				
			||||||
        list.forEach(item -> listExt.add(BeanUtil.copyProperties(item, BdAwardsExt.class)));
 | 
					        list.forEach(item -> listExt.add(BeanUtil.copyProperties(item, BdAwardsExt.class)));
 | 
				
			||||||
        if (CollectionUtil.isNotEmpty(listExt)) {
 | 
					        if (CollectionUtil.isNotEmpty(listExt)) {
 | 
				
			||||||
            for (BdAwardsExt ae : listExt) {
 | 
					            for (BdAwardsExt ae : listExt) {
 | 
				
			||||||
                if (StringUtils.isNotNull(ae.getPkCheckAwardsLeft())) {
 | 
					                if (StringUtils.isNotNull(ae.getPkCheckAwardsLeft())) {
 | 
				
			||||||
                    ae.setPkCheckAwardsLeft(noticeService.getAwardsTranslateValue(ae.getPkCheckAwardsLeft(), null));
 | 
					                    ae.setPkCheckAwardsLeft(iBdNoticeService.getAwardsTranslateValue(ae.getPkCheckAwardsLeft(), null));
 | 
				
			||||||
                }
 | 
					                }
 | 
				
			||||||
                if (StringUtils.isNotNull(ae.getPkCheckAwardsRight())) {
 | 
					                if (StringUtils.isNotNull(ae.getPkCheckAwardsRight())) {
 | 
				
			||||||
                    ae.setPkCheckAwardsRight(noticeService.getAwardsTranslateValue(ae.getPkCheckAwardsRight(), null));
 | 
					                    ae.setPkCheckAwardsRight(iBdNoticeService.getAwardsTranslateValue(ae.getPkCheckAwardsRight(), null));
 | 
				
			||||||
                }
 | 
					                }
 | 
				
			||||||
            }
 | 
					            }
 | 
				
			||||||
        }
 | 
					        }
 | 
				
			||||||
| 
						 | 
					@ -93,41 +79,7 @@ public class BdRetailAwardsController extends BaseController {
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    /**
 | 
					    /**
 | 
				
			||||||
     * @description: 导出奖衔配置
 | 
					     * 真实奖衔下拉选
 | 
				
			||||||
     * @author: zhang jing
 | 
					 | 
				
			||||||
     * @date: 2023/3/9 15:32
 | 
					 | 
				
			||||||
     * @param: [response, awards]
 | 
					 | 
				
			||||||
     * @return: void
 | 
					 | 
				
			||||||
     **/
 | 
					 | 
				
			||||||
    @Log(module = EOperationModule.LEVEL_CONFIG, business = EOperationBusiness.AWARD_CONTROL, method = EOperationMethod.SELECT)
 | 
					 | 
				
			||||||
    @PostMapping("/export")
 | 
					 | 
				
			||||||
    public void export(HttpServletResponse response, BdAwards awards) {
 | 
					 | 
				
			||||||
        startPage();
 | 
					 | 
				
			||||||
        LambdaQueryWrapper<BdAwards> queryWrapper = new LambdaQueryWrapper<>();
 | 
					 | 
				
			||||||
        queryWrapper.eq(BdAwards::getPkCountry, SecurityUtils.getPkCountry());
 | 
					 | 
				
			||||||
        if (StringUtils.isNotNull(awards.getAwardsName())) {
 | 
					 | 
				
			||||||
            queryWrapper.eq(BdAwards::getAwardsName, awards.getAwardsName());
 | 
					 | 
				
			||||||
        }
 | 
					 | 
				
			||||||
        queryWrapper.orderByAsc(BdAwards::getAwardsValue);
 | 
					 | 
				
			||||||
        List<BdAwardsExt> listExt = new ArrayList<>();
 | 
					 | 
				
			||||||
        List<BdAwards> list = awardsService.list(queryWrapper);
 | 
					 | 
				
			||||||
        list.forEach(item -> listExt.add(BeanUtil.copyProperties(item, BdAwardsExt.class)));
 | 
					 | 
				
			||||||
        if (CollectionUtil.isNotEmpty(listExt)) {
 | 
					 | 
				
			||||||
            for (BdAwardsExt ae : listExt) {
 | 
					 | 
				
			||||||
                ae.setPkCheckAwardsLeft(noticeService.getAwardsTranslateValue(ae.getPkCheckAwardsLeft(), null));
 | 
					 | 
				
			||||||
                ae.setPkCheckAwardsRight(noticeService.getAwardsTranslateValue(ae.getPkCheckAwardsRight(), null));
 | 
					 | 
				
			||||||
            }
 | 
					 | 
				
			||||||
        }
 | 
					 | 
				
			||||||
        ExcelUtil<BdAwardsExt> util = new ExcelUtil<>(BdAwardsExt.class);
 | 
					 | 
				
			||||||
        util.exportExcel(response, listExt, "奖衔配置");
 | 
					 | 
				
			||||||
    }
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
    /**
 | 
					 | 
				
			||||||
     * @description: 真实奖衔下拉选
 | 
					 | 
				
			||||||
     * @author: zhang jing
 | 
					 | 
				
			||||||
     * @date: 2022/10/27 10:15
 | 
					 | 
				
			||||||
     * @param: [awards]
 | 
					 | 
				
			||||||
     * @return: com.hzs.common.core.web.page.TableDataInfo
 | 
					 | 
				
			||||||
     **/
 | 
					     **/
 | 
				
			||||||
    @Log(module = EOperationModule.LEVEL_CONFIG, business = EOperationBusiness.AWARD_CONTROL, method = EOperationMethod.SELECT)
 | 
					    @Log(module = EOperationModule.LEVEL_CONFIG, business = EOperationBusiness.AWARD_CONTROL, method = EOperationMethod.SELECT)
 | 
				
			||||||
    @GetMapping("/awardsList")
 | 
					    @GetMapping("/awardsList")
 | 
				
			||||||
| 
						 | 
					@ -136,7 +88,7 @@ public class BdRetailAwardsController extends BaseController {
 | 
				
			||||||
        queryWrapper.eq(BdAwards::getPkCountry, SecurityUtils.getPkCountry());
 | 
					        queryWrapper.eq(BdAwards::getPkCountry, SecurityUtils.getPkCountry());
 | 
				
			||||||
        // 原接口,默认为会员系统
 | 
					        // 原接口,默认为会员系统
 | 
				
			||||||
        queryWrapper.orderByAsc(BdAwards::getAwardsValue);
 | 
					        queryWrapper.orderByAsc(BdAwards::getAwardsValue);
 | 
				
			||||||
        List<BdAwards> list = awardsService.list(queryWrapper);
 | 
					        List<BdAwards> list = iBdAwardsService.list(queryWrapper);
 | 
				
			||||||
        List<BdAwardsExt> listExt = new ArrayList<>();
 | 
					        List<BdAwardsExt> listExt = new ArrayList<>();
 | 
				
			||||||
        for (BdAwards ba : list) {
 | 
					        for (BdAwards ba : list) {
 | 
				
			||||||
            BdAwardsExt baExt = new BdAwardsExt();
 | 
					            BdAwardsExt baExt = new BdAwardsExt();
 | 
				
			||||||
| 
						 | 
					@ -148,13 +100,8 @@ public class BdRetailAwardsController extends BaseController {
 | 
				
			||||||
        return getDataTable(listExt);
 | 
					        return getDataTable(listExt);
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					 | 
				
			||||||
    /**
 | 
					    /**
 | 
				
			||||||
     * @description: 新增奖衔配置
 | 
					     * 新增奖衔配置
 | 
				
			||||||
     * @author: zhang jing
 | 
					 | 
				
			||||||
     * @date: 2022/8/30 10:21
 | 
					 | 
				
			||||||
     * @param: [awards]
 | 
					 | 
				
			||||||
     * @return: com.hzs.common.core.web.domain.AjaxResult
 | 
					 | 
				
			||||||
     **/
 | 
					     **/
 | 
				
			||||||
    @Log(module = EOperationModule.LEVEL_CONFIG, business = EOperationBusiness.AWARD_CONTROL, method = EOperationMethod.INSERT)
 | 
					    @Log(module = EOperationModule.LEVEL_CONFIG, business = EOperationBusiness.AWARD_CONTROL, method = EOperationMethod.INSERT)
 | 
				
			||||||
    @PostMapping("/generate")
 | 
					    @PostMapping("/generate")
 | 
				
			||||||
| 
						 | 
					@ -166,25 +113,10 @@ public class BdRetailAwardsController extends BaseController {
 | 
				
			||||||
        if (StringUtils.isEmpty(awards.getAwardsName())) {
 | 
					        if (StringUtils.isEmpty(awards.getAwardsName())) {
 | 
				
			||||||
            return AjaxResult.error(TransactionUtils.getContent(ConfigMsgConstants.AWARDS_NAME_NOT_NULL));
 | 
					            return AjaxResult.error(TransactionUtils.getContent(ConfigMsgConstants.AWARDS_NAME_NOT_NULL));
 | 
				
			||||||
        }
 | 
					        }
 | 
				
			||||||
        if (StringUtils.isNull(awards.getCommunityCheck())) {
 | 
					 | 
				
			||||||
            return AjaxResult.error(TransactionUtils.getContent(ConfigMsgConstants.COMMUNITY_CHECK_NOT_NULL));
 | 
					 | 
				
			||||||
        }
 | 
					 | 
				
			||||||
        if (StringUtils.isNull(awards.getCommunityCheckEnd())) {
 | 
					 | 
				
			||||||
            return AjaxResult.error(TransactionUtils.getContent(ConfigMsgConstants.COMMUNITY_CHECK_END_NOT_NULL));
 | 
					 | 
				
			||||||
        }
 | 
					 | 
				
			||||||
        if (StringUtils.isNull(awards.getPurchaseCheck())) {
 | 
					 | 
				
			||||||
            return AjaxResult.error(TransactionUtils.getContent(ConfigMsgConstants.PURCHASE_CHECK_NOT_NULL));
 | 
					 | 
				
			||||||
        }
 | 
					 | 
				
			||||||
        if (StringUtils.isNull(awards.getShareCheck())) {
 | 
					 | 
				
			||||||
            return AjaxResult.error(TransactionUtils.getContent(ConfigMsgConstants.SHARE_CHECK_NOT_NULL));
 | 
					 | 
				
			||||||
        }
 | 
					 | 
				
			||||||
        if (StringUtils.isNull(awards.getColor())) {
 | 
					        if (StringUtils.isNull(awards.getColor())) {
 | 
				
			||||||
            return AjaxResult.error(TransactionUtils.getContent(ConfigMsgConstants.COLOR_NOT_NULL));
 | 
					            return AjaxResult.error(TransactionUtils.getContent(ConfigMsgConstants.COLOR_NOT_NULL));
 | 
				
			||||||
        }
 | 
					        }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        if ((null == awards.getPkCheckAwardsLeft() || null == awards.getPkCheckAwardsRight()) && StringUtils.isNotNull(awards.getRelationType())) {
 | 
					 | 
				
			||||||
            return AjaxResult.error(TransactionUtils.getContent(ConfigMsgConstants.LEFT_RIGHT_AWARDS_NAME_NOT_NULL));
 | 
					 | 
				
			||||||
        }
 | 
					 | 
				
			||||||
        awards.setPkCountry(SecurityUtils.getPkCountry());
 | 
					        awards.setPkCountry(SecurityUtils.getPkCountry());
 | 
				
			||||||
        awards.setPkCreator(SecurityUtils.getUserId());
 | 
					        awards.setPkCreator(SecurityUtils.getUserId());
 | 
				
			||||||
        awards.setCreationTime(new Date());
 | 
					        awards.setCreationTime(new Date());
 | 
				
			||||||
| 
						 | 
					@ -192,7 +124,7 @@ public class BdRetailAwardsController extends BaseController {
 | 
				
			||||||
        LambdaQueryWrapper<BdAwards> queryWrapper = new LambdaQueryWrapper<>();
 | 
					        LambdaQueryWrapper<BdAwards> queryWrapper = new LambdaQueryWrapper<>();
 | 
				
			||||||
        queryWrapper.eq(BdAwards::getPkCountry, SecurityUtils.getPkCountry());
 | 
					        queryWrapper.eq(BdAwards::getPkCountry, SecurityUtils.getPkCountry());
 | 
				
			||||||
        queryWrapper.eq(BdAwards::getAwardsValue, awards.getAwardsValue());
 | 
					        queryWrapper.eq(BdAwards::getAwardsValue, awards.getAwardsValue());
 | 
				
			||||||
        List<BdAwards> list1 = awardsService.list(queryWrapper);
 | 
					        List<BdAwards> list1 = iBdAwardsService.list(queryWrapper);
 | 
				
			||||||
        if (CollectionUtil.isNotEmpty(list1)) {
 | 
					        if (CollectionUtil.isNotEmpty(list1)) {
 | 
				
			||||||
            return AjaxResult.error((ConfigMsgConstants.DATA_REPEAT));
 | 
					            return AjaxResult.error((ConfigMsgConstants.DATA_REPEAT));
 | 
				
			||||||
        }
 | 
					        }
 | 
				
			||||||
| 
						 | 
					@ -201,17 +133,12 @@ public class BdRetailAwardsController extends BaseController {
 | 
				
			||||||
                awards.getAwardsName(), EYesNo.YES, EYesNo.NO);
 | 
					                awards.getAwardsName(), EYesNo.YES, EYesNo.NO);
 | 
				
			||||||
        awards.setPkTransaction(pkTransaction.getData());
 | 
					        awards.setPkTransaction(pkTransaction.getData());
 | 
				
			||||||
        redisService.deleteObjectByKey(CacheConstants.BD_AWARDS + pkCountry);
 | 
					        redisService.deleteObjectByKey(CacheConstants.BD_AWARDS + pkCountry);
 | 
				
			||||||
        awardsService.save(awards);
 | 
					        iBdAwardsService.save(awards);
 | 
				
			||||||
        return AjaxResult.success();
 | 
					        return AjaxResult.success();
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					 | 
				
			||||||
    /**
 | 
					    /**
 | 
				
			||||||
     * @description: 修改奖衔配置
 | 
					     * 修改奖衔配置
 | 
				
			||||||
     * @author: zhang jing
 | 
					 | 
				
			||||||
     * @date: 2022/8/30 10:21
 | 
					 | 
				
			||||||
     * @param: [awards]
 | 
					 | 
				
			||||||
     * @return: com.hzs.common.core.web.domain.AjaxResult
 | 
					 | 
				
			||||||
     **/
 | 
					     **/
 | 
				
			||||||
    @Log(module = EOperationModule.LEVEL_CONFIG, business = EOperationBusiness.AWARD_CONTROL, method = EOperationMethod.UPDATE)
 | 
					    @Log(module = EOperationModule.LEVEL_CONFIG, business = EOperationBusiness.AWARD_CONTROL, method = EOperationMethod.UPDATE)
 | 
				
			||||||
    @PostMapping("/update")
 | 
					    @PostMapping("/update")
 | 
				
			||||||
| 
						 | 
					@ -223,37 +150,22 @@ public class BdRetailAwardsController extends BaseController {
 | 
				
			||||||
        if (StringUtils.isEmpty(awards.getAwardsName())) {
 | 
					        if (StringUtils.isEmpty(awards.getAwardsName())) {
 | 
				
			||||||
            return AjaxResult.error(TransactionUtils.getContent(ConfigMsgConstants.AWARDS_NAME_NOT_NULL));
 | 
					            return AjaxResult.error(TransactionUtils.getContent(ConfigMsgConstants.AWARDS_NAME_NOT_NULL));
 | 
				
			||||||
        }
 | 
					        }
 | 
				
			||||||
        if (StringUtils.isNull(awards.getCommunityCheck())) {
 | 
					 | 
				
			||||||
            return AjaxResult.error(TransactionUtils.getContent(ConfigMsgConstants.COMMUNITY_CHECK_NOT_NULL));
 | 
					 | 
				
			||||||
        }
 | 
					 | 
				
			||||||
        if (StringUtils.isNull(awards.getCommunityCheckEnd())) {
 | 
					 | 
				
			||||||
            return AjaxResult.error(TransactionUtils.getContent(ConfigMsgConstants.COMMUNITY_CHECK_END_NOT_NULL));
 | 
					 | 
				
			||||||
        }
 | 
					 | 
				
			||||||
        if (StringUtils.isNull(awards.getPurchaseCheck())) {
 | 
					 | 
				
			||||||
            return AjaxResult.error(TransactionUtils.getContent(ConfigMsgConstants.PURCHASE_CHECK_NOT_NULL));
 | 
					 | 
				
			||||||
        }
 | 
					 | 
				
			||||||
        if (StringUtils.isNull(awards.getShareCheck())) {
 | 
					 | 
				
			||||||
            return AjaxResult.error(TransactionUtils.getContent(ConfigMsgConstants.SHARE_CHECK_NOT_NULL));
 | 
					 | 
				
			||||||
        }
 | 
					 | 
				
			||||||
        if (StringUtils.isNull(awards.getColor())) {
 | 
					        if (StringUtils.isNull(awards.getColor())) {
 | 
				
			||||||
            return AjaxResult.error(TransactionUtils.getContent(ConfigMsgConstants.COLOR_NOT_NULL));
 | 
					            return AjaxResult.error(TransactionUtils.getContent(ConfigMsgConstants.COLOR_NOT_NULL));
 | 
				
			||||||
        }
 | 
					        }
 | 
				
			||||||
        if ((null == awards.getPkCheckAwardsLeft() || null == awards.getPkCheckAwardsRight()) && StringUtils.isNotNull(awards.getRelationType())) {
 | 
					 | 
				
			||||||
            return AjaxResult.error(TransactionUtils.getContent(ConfigMsgConstants.LEFT_RIGHT_AWARDS_NAME_NOT_NULL));
 | 
					 | 
				
			||||||
        }
 | 
					 | 
				
			||||||
 | 
					
 | 
				
			||||||
        LambdaQueryWrapper<BdAwards> queryWrapper = new LambdaQueryWrapper<>();
 | 
					        LambdaQueryWrapper<BdAwards> queryWrapper = new LambdaQueryWrapper<>();
 | 
				
			||||||
        queryWrapper.eq(BdAwards::getPkCountry, SecurityUtils.getPkCountry());
 | 
					        queryWrapper.eq(BdAwards::getPkCountry, SecurityUtils.getPkCountry());
 | 
				
			||||||
        queryWrapper.eq(BdAwards::getAwardsValue, awards.getAwardsValue());
 | 
					        queryWrapper.eq(BdAwards::getAwardsValue, awards.getAwardsValue());
 | 
				
			||||||
        queryWrapper.ne(BdAwards::getPkId, awards.getPkId());
 | 
					        queryWrapper.ne(BdAwards::getPkId, awards.getPkId());
 | 
				
			||||||
        List<BdAwards> list1 = awardsService.list(queryWrapper);
 | 
					        List<BdAwards> list1 = iBdAwardsService.list(queryWrapper);
 | 
				
			||||||
        if (CollectionUtil.isNotEmpty(list1)) {
 | 
					        if (CollectionUtil.isNotEmpty(list1)) {
 | 
				
			||||||
            return AjaxResult.error(TransactionUtils.getContent(ConfigMsgConstants.DATA_REPEAT));
 | 
					            return AjaxResult.error(TransactionUtils.getContent(ConfigMsgConstants.DATA_REPEAT));
 | 
				
			||||||
        }
 | 
					        }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        //字段翻译保存到数据库
 | 
					        //字段翻译保存到数据库
 | 
				
			||||||
        if (null != awards.getPkTransaction()) {
 | 
					        if (null != awards.getPkTransaction()) {
 | 
				
			||||||
            R<Boolean> b = iTransactionServiceApi.updateTransaction(pkCountry,
 | 
					            iTransactionServiceApi.updateTransaction(pkCountry,
 | 
				
			||||||
                    awards.getAwardsName(), awards.getPkTransaction(), true);
 | 
					                    awards.getAwardsName(), awards.getPkTransaction(), true);
 | 
				
			||||||
        } else {
 | 
					        } else {
 | 
				
			||||||
            R<Integer> pkTransaction = iTransactionServiceApi.createTransaction(pkCountry, ETransactionKey.AWARDS,
 | 
					            R<Integer> pkTransaction = iTransactionServiceApi.createTransaction(pkCountry, ETransactionKey.AWARDS,
 | 
				
			||||||
| 
						 | 
					@ -263,15 +175,11 @@ public class BdRetailAwardsController extends BaseController {
 | 
				
			||||||
        awards.setPkModified(SecurityUtils.getUserId());
 | 
					        awards.setPkModified(SecurityUtils.getUserId());
 | 
				
			||||||
        awards.setModifiedTime(new Date());
 | 
					        awards.setModifiedTime(new Date());
 | 
				
			||||||
        redisService.deleteObjectByKey(CacheConstants.BD_AWARDS + pkCountry);
 | 
					        redisService.deleteObjectByKey(CacheConstants.BD_AWARDS + pkCountry);
 | 
				
			||||||
        return toAjax(awardsService.updateById(awards));
 | 
					        return toAjax(iBdAwardsService.updateById(awards));
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    /**
 | 
					    /**
 | 
				
			||||||
     * @description: 修改启用禁用
 | 
					     * 修改启用禁用
 | 
				
			||||||
     * @author: zhang jing
 | 
					 | 
				
			||||||
     * @date: 2023/4/24 14:30
 | 
					 | 
				
			||||||
     * @param: [gradeExt]
 | 
					 | 
				
			||||||
     * @return: com.hzs.common.core.web.domain.AjaxResult
 | 
					 | 
				
			||||||
     **/
 | 
					     **/
 | 
				
			||||||
    @Log(module = EOperationModule.LEVEL_CONFIG, business = EOperationBusiness.AWARD_CONTROL, method = EOperationMethod.UPDATE)
 | 
					    @Log(module = EOperationModule.LEVEL_CONFIG, business = EOperationBusiness.AWARD_CONTROL, method = EOperationMethod.UPDATE)
 | 
				
			||||||
    @PostMapping("/updateState")
 | 
					    @PostMapping("/updateState")
 | 
				
			||||||
| 
						 | 
					@ -287,32 +195,23 @@ public class BdRetailAwardsController extends BaseController {
 | 
				
			||||||
        updateWrapper.eq(BdAwards::getPkId, awards.getPkId());
 | 
					        updateWrapper.eq(BdAwards::getPkId, awards.getPkId());
 | 
				
			||||||
        updateWrapper.set(BdAwards::getPkModified, SecurityUtils.getUserId());
 | 
					        updateWrapper.set(BdAwards::getPkModified, SecurityUtils.getUserId());
 | 
				
			||||||
        updateWrapper.set(BdAwards::getModifiedTime, new Date());
 | 
					        updateWrapper.set(BdAwards::getModifiedTime, new Date());
 | 
				
			||||||
        awardsService.update(updateWrapper);
 | 
					        iBdAwardsService.update(updateWrapper);
 | 
				
			||||||
        redisService.deleteObjectByKey(CacheConstants.BD_AWARDS + SecurityUtils.getPkCountry());
 | 
					        redisService.deleteObjectByKey(CacheConstants.BD_AWARDS + SecurityUtils.getPkCountry());
 | 
				
			||||||
        return AjaxResult.success();
 | 
					        return AjaxResult.success();
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    /**
 | 
					    /**
 | 
				
			||||||
     * @description: 查询单条奖衔配置
 | 
					     * 查询单条奖衔配置
 | 
				
			||||||
     * @author: zhang jing
 | 
					 | 
				
			||||||
     * @date: 2022/8/30 10:21
 | 
					 | 
				
			||||||
     * @param: [pkId]
 | 
					 | 
				
			||||||
     * @return: com.hzs.common.core.web.domain.AjaxResult
 | 
					 | 
				
			||||||
     **/
 | 
					     **/
 | 
				
			||||||
    @Log(module = EOperationModule.LEVEL_CONFIG, business = EOperationBusiness.AWARD_CONTROL, method = EOperationMethod.SELECT)
 | 
					    @Log(module = EOperationModule.LEVEL_CONFIG, business = EOperationBusiness.AWARD_CONTROL, method = EOperationMethod.SELECT)
 | 
				
			||||||
    @GetMapping("/getOne/{pkId}")
 | 
					    @GetMapping("/getOne/{pkId}")
 | 
				
			||||||
    public AjaxResult getOne(@PathVariable Long pkId) {
 | 
					    public AjaxResult getOne(@PathVariable Long pkId) {
 | 
				
			||||||
        BdAwards awards = awardsService.getById(pkId);
 | 
					        return AjaxResult.success(iBdAwardsService.getById(pkId));
 | 
				
			||||||
        return AjaxResult.success(awards);
 | 
					 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    /**
 | 
					    /**
 | 
				
			||||||
     * @description: 删除奖衔配置
 | 
					     * 删除奖衔配置
 | 
				
			||||||
     * @author: zhang jing
 | 
					 | 
				
			||||||
     * @date: 2022/8/30 10:21
 | 
					 | 
				
			||||||
     * @param: [pkId]
 | 
					 | 
				
			||||||
     * @return: com.hzs.common.core.web.domain.AjaxResult
 | 
					 | 
				
			||||||
     **/
 | 
					     **/
 | 
				
			||||||
    @Log(module = EOperationModule.LEVEL_CONFIG, business = EOperationBusiness.AWARD_CONTROL, method = EOperationMethod.DELETE)
 | 
					    @Log(module = EOperationModule.LEVEL_CONFIG, business = EOperationBusiness.AWARD_CONTROL, method = EOperationMethod.DELETE)
 | 
				
			||||||
    @DeleteMapping("/{pkId}")
 | 
					    @DeleteMapping("/{pkId}")
 | 
				
			||||||
| 
						 | 
					@ -324,11 +223,11 @@ public class BdRetailAwardsController extends BaseController {
 | 
				
			||||||
        updateWrapper.set(BdAwards::getModifiedTime, new Date());
 | 
					        updateWrapper.set(BdAwards::getModifiedTime, new Date());
 | 
				
			||||||
        redisService.deleteObjectByKey(CacheConstants.BD_AWARDS + SecurityUtils.getPkCountry());
 | 
					        redisService.deleteObjectByKey(CacheConstants.BD_AWARDS + SecurityUtils.getPkCountry());
 | 
				
			||||||
        redisService.deleteObjectByKey(CacheConstants.BD_AWARDS_COACH + SecurityUtils.getPkCountry());
 | 
					        redisService.deleteObjectByKey(CacheConstants.BD_AWARDS_COACH + SecurityUtils.getPkCountry());
 | 
				
			||||||
        Integer count = awardsService.checkGradeAwards(null, null, pkId);
 | 
					        Integer count = iBdAwardsService.checkGradeAwards(null, null, pkId);
 | 
				
			||||||
        if (count > 0) {
 | 
					        if (count > 0) {
 | 
				
			||||||
            return AjaxResult.error(TransactionUtils.getContent(ConfigMsgConstants.ENABLE_STATE_NOT_DELETE));
 | 
					            return AjaxResult.error(TransactionUtils.getContent(ConfigMsgConstants.ENABLE_STATE_NOT_DELETE));
 | 
				
			||||||
        }
 | 
					        }
 | 
				
			||||||
        return AjaxResult.success(awardsService.update(updateWrapper));
 | 
					        return AjaxResult.success(iBdAwardsService.update(updateWrapper));
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -103,6 +103,7 @@ public class BdVertexController extends BaseController {
 | 
				
			||||||
        bdVertex.setPkCreator(SecurityUtils.getUserId());
 | 
					        bdVertex.setPkCreator(SecurityUtils.getUserId());
 | 
				
			||||||
        bdVertex.setPkMember(mb.getPkId());
 | 
					        bdVertex.setPkMember(mb.getPkId());
 | 
				
			||||||
        bdVertex.setSystemType(systemType);
 | 
					        bdVertex.setSystemType(systemType);
 | 
				
			||||||
 | 
					        bdVertex.setRegionVertexPkId(vertexParam.getRegionVertexPkId());
 | 
				
			||||||
        vertexService.save(bdVertex);
 | 
					        vertexService.save(bdVertex);
 | 
				
			||||||
        return AjaxResult.success();
 | 
					        return AjaxResult.success();
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
| 
						 | 
					@ -141,6 +142,7 @@ public class BdVertexController extends BaseController {
 | 
				
			||||||
        bdVertex.setPkMember(mb.getPkId());
 | 
					        bdVertex.setPkMember(mb.getPkId());
 | 
				
			||||||
        bdVertex.setModifiedTime(new Date());
 | 
					        bdVertex.setModifiedTime(new Date());
 | 
				
			||||||
        bdVertex.setPkModified(SecurityUtils.getUserId());
 | 
					        bdVertex.setPkModified(SecurityUtils.getUserId());
 | 
				
			||||||
 | 
					        bdVertex.setRegionVertexPkId(vertexParam.getRegionVertexPkId());
 | 
				
			||||||
        if (null == bdVertex.getPkParent()) {
 | 
					        if (null == bdVertex.getPkParent()) {
 | 
				
			||||||
            bdVertex.setPkParent(0);
 | 
					            bdVertex.setPkParent(0);
 | 
				
			||||||
        }
 | 
					        }
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -1,17 +1,11 @@
 | 
				
			||||||
package com.hzs.system.config.mapper;
 | 
					package com.hzs.system.config.mapper;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					 | 
				
			||||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
 | 
					import com.baomidou.mybatisplus.core.mapper.BaseMapper;
 | 
				
			||||||
import com.hzs.common.domain.system.config.BdBonusCloud;
 | 
					import com.hzs.common.domain.system.config.BdBonusCloud;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
/**
 | 
					/**
 | 
				
			||||||
 * <p>
 | 
					 * 云代配置
 | 
				
			||||||
 *  云代配置
 | 
					 * Mapper 接口
 | 
				
			||||||
 Mapper 接口
 | 
					 | 
				
			||||||
 * </p>
 | 
					 | 
				
			||||||
 *
 | 
					 | 
				
			||||||
 * @author zhangjing
 | 
					 | 
				
			||||||
 * @since 2022-11-01
 | 
					 | 
				
			||||||
 */
 | 
					 */
 | 
				
			||||||
public interface BdBonusCloudMapper extends BaseMapper<BdBonusCloud> {
 | 
					public interface BdBonusCloudMapper extends BaseMapper<BdBonusCloud> {
 | 
				
			||||||
 | 
					
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -1,11 +0,0 @@
 | 
				
			||||||
package com.hzs.system.config.mapper;
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
 | 
					 | 
				
			||||||
import com.hzs.common.domain.system.config.BdBonusExpand;
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
/**
 | 
					 | 
				
			||||||
 * 奖金4—N配置
 | 
					 | 
				
			||||||
 */
 | 
					 | 
				
			||||||
public interface BdBonusExpandMapper extends BaseMapper<BdBonusExpand> {
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
}
 | 
					 | 
				
			||||||
| 
						 | 
					@ -1,16 +1,10 @@
 | 
				
			||||||
package com.hzs.system.config.mapper;
 | 
					package com.hzs.system.config.mapper;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					 | 
				
			||||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
 | 
					import com.baomidou.mybatisplus.core.mapper.BaseMapper;
 | 
				
			||||||
import com.hzs.common.domain.system.config.BdBonusHiPink;
 | 
					import com.hzs.common.domain.system.config.BdBonusHiPink;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
/**
 | 
					/**
 | 
				
			||||||
 * <p>
 | 
					 | 
				
			||||||
 * 嗨粉直推奖励配置 Mapper 接口
 | 
					 * 嗨粉直推奖励配置 Mapper 接口
 | 
				
			||||||
 * </p>
 | 
					 | 
				
			||||||
 *
 | 
					 | 
				
			||||||
 * @author zhangjing
 | 
					 | 
				
			||||||
 * @since 2022-11-03
 | 
					 | 
				
			||||||
 */
 | 
					 */
 | 
				
			||||||
public interface BdBonusHiPinkMapper extends BaseMapper<BdBonusHiPink> {
 | 
					public interface BdBonusHiPinkMapper extends BaseMapper<BdBonusHiPink> {
 | 
				
			||||||
 | 
					
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -57,4 +57,6 @@ public class VertexParam {
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    private Integer pkParent;
 | 
					    private Integer pkParent;
 | 
				
			||||||
    private Integer sort;
 | 
					    private Integer sort;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    private Long regionVertexPkId;
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -36,18 +36,12 @@ public class BonusItemsServiceProvider implements IBonusItemsServiceApi {
 | 
				
			||||||
    @Autowired
 | 
					    @Autowired
 | 
				
			||||||
    private IBdBonusDirectLoopService bdBonusDirectLoopService;
 | 
					    private IBdBonusDirectLoopService bdBonusDirectLoopService;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    @Autowired
 | 
					 | 
				
			||||||
    private IBdBonusHiPinkService bdBonusHiPinkService;
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
    @Autowired
 | 
					    @Autowired
 | 
				
			||||||
    private IBdBonusDirectService bdBonusDirectService;
 | 
					    private IBdBonusDirectService bdBonusDirectService;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    @Autowired
 | 
					    @Autowired
 | 
				
			||||||
    private IBdBonusDifferenceService bdBonusDifferenceService;
 | 
					    private IBdBonusDifferenceService bdBonusDifferenceService;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    @Autowired
 | 
					 | 
				
			||||||
    private IBdBonusExpandService bdBonusExpandService;
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
    @Autowired
 | 
					    @Autowired
 | 
				
			||||||
    private IBdGradeService gradeService;
 | 
					    private IBdGradeService gradeService;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
| 
						 | 
					@ -69,9 +63,6 @@ public class BonusItemsServiceProvider implements IBonusItemsServiceApi {
 | 
				
			||||||
    @Autowired
 | 
					    @Autowired
 | 
				
			||||||
    private IBdRepoDirectPushService bdRepoDirectPushService;
 | 
					    private IBdRepoDirectPushService bdRepoDirectPushService;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    @Autowired
 | 
					 | 
				
			||||||
    private IBdBonusCloudService bdBonusCloudService;
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
    @Override
 | 
					    @Override
 | 
				
			||||||
    public R<List<BdBonusItemsExt>> queryBonusItems(Integer pkCountry) {
 | 
					    public R<List<BdBonusItemsExt>> queryBonusItems(Integer pkCountry) {
 | 
				
			||||||
        return R.ok(bonusItemsService.queryBonusItems(pkCountry));
 | 
					        return R.ok(bonusItemsService.queryBonusItems(pkCountry));
 | 
				
			||||||
| 
						 | 
					@ -103,12 +94,8 @@ public class BonusItemsServiceProvider implements IBonusItemsServiceApi {
 | 
				
			||||||
        bonusConfigDTO.setBonusDirectLoopDtoMap(getBonusLoopConfig());
 | 
					        bonusConfigDTO.setBonusDirectLoopDtoMap(getBonusLoopConfig());
 | 
				
			||||||
        // 查询直推奖励配置
 | 
					        // 查询直推奖励配置
 | 
				
			||||||
        bonusConfigDTO.setBonusDirectDtoMap(getBonusDirectConfig());
 | 
					        bonusConfigDTO.setBonusDirectDtoMap(getBonusDirectConfig());
 | 
				
			||||||
        // 嗨粉直推奖励配置
 | 
					 | 
				
			||||||
        bonusConfigDTO.setBonusHiPinkDtoMap(getBonusHiPinkMap());
 | 
					 | 
				
			||||||
        // 一次性补差
 | 
					        // 一次性补差
 | 
				
			||||||
        bonusConfigDTO.setBonusDifferenceDtoMap(getBonusDifferenceConfig());
 | 
					        bonusConfigDTO.setBonusDifferenceDtoMap(getBonusDifferenceConfig());
 | 
				
			||||||
        // 奖金4-N配置
 | 
					 | 
				
			||||||
        bonusConfigDTO.setBonusExpandMap(getBonusExpandConfig());
 | 
					 | 
				
			||||||
        // 复购直推配置
 | 
					        // 复购直推配置
 | 
				
			||||||
        bonusConfigDTO.setBonusRepurchasePushMap(getRepurchasePushMap());
 | 
					        bonusConfigDTO.setBonusRepurchasePushMap(getRepurchasePushMap());
 | 
				
			||||||
        // 拓展奖跟辅导奖需要查询所有国家的配置
 | 
					        // 拓展奖跟辅导奖需要查询所有国家的配置
 | 
				
			||||||
| 
						 | 
					@ -124,8 +111,6 @@ public class BonusItemsServiceProvider implements IBonusItemsServiceApi {
 | 
				
			||||||
        bonusConfigDTO.setBonusDeductsMap(getBonusDeductConfig());
 | 
					        bonusConfigDTO.setBonusDeductsMap(getBonusDeductConfig());
 | 
				
			||||||
        // 报单服务费
 | 
					        // 报单服务费
 | 
				
			||||||
        bonusConfigDTO.setBonusServiceMap(getBonusServiceConfig());
 | 
					        bonusConfigDTO.setBonusServiceMap(getBonusServiceConfig());
 | 
				
			||||||
        // 云代奖金
 | 
					 | 
				
			||||||
        bonusConfigDTO.setBonusCloudMap(getBonusCloudConfig());
 | 
					 | 
				
			||||||
        return R.ok(bonusConfigDTO);
 | 
					        return R.ok(bonusConfigDTO);
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
| 
						 | 
					@ -149,25 +134,6 @@ public class BonusItemsServiceProvider implements IBonusItemsServiceApi {
 | 
				
			||||||
        return bonusItemsMap;
 | 
					        return bonusItemsMap;
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    /**
 | 
					 | 
				
			||||||
     * 嗨粉直推奖励
 | 
					 | 
				
			||||||
     */
 | 
					 | 
				
			||||||
    private Map<Integer, List<BonusHiPinkDTO>> getBonusHiPinkMap() {
 | 
					 | 
				
			||||||
        List<BdBonusHiPink> bdBonusHiPinks = bdBonusHiPinkService.queryBonusHiPink();
 | 
					 | 
				
			||||||
        Map<Integer, List<BonusHiPinkDTO>> bonusHiPinkMap = new LinkedHashMap<>(ComputeUtil.mapInitCapacity(bdBonusHiPinks.size()));
 | 
					 | 
				
			||||||
        bdBonusHiPinks.forEach(bdBonusHiPink -> {
 | 
					 | 
				
			||||||
            BonusHiPinkDTO bonusHiPinkDTO = BeanUtil.copyProperties(bdBonusHiPink, BonusHiPinkDTO.class);
 | 
					 | 
				
			||||||
            if (bonusHiPinkMap.containsKey(bonusHiPinkDTO.getPkCountry())) {
 | 
					 | 
				
			||||||
                bonusHiPinkMap.get(bonusHiPinkDTO.getPkCountry()).add(bonusHiPinkDTO);
 | 
					 | 
				
			||||||
            } else {
 | 
					 | 
				
			||||||
                List<BonusHiPinkDTO> bonusHiPinkDTOList = new ArrayList<>();
 | 
					 | 
				
			||||||
                bonusHiPinkDTOList.add(bonusHiPinkDTO);
 | 
					 | 
				
			||||||
                bonusHiPinkMap.put(bonusHiPinkDTO.getPkCountry(), bonusHiPinkDTOList);
 | 
					 | 
				
			||||||
            }
 | 
					 | 
				
			||||||
        });
 | 
					 | 
				
			||||||
        return bonusHiPinkMap;
 | 
					 | 
				
			||||||
    }
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
    /**
 | 
					    /**
 | 
				
			||||||
     * 复购直推奖励
 | 
					     * 复购直推奖励
 | 
				
			||||||
     */
 | 
					     */
 | 
				
			||||||
| 
						 | 
					@ -227,20 +193,6 @@ public class BonusItemsServiceProvider implements IBonusItemsServiceApi {
 | 
				
			||||||
        return bonusDifferenceDtoMap;
 | 
					        return bonusDifferenceDtoMap;
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					 | 
				
			||||||
    /**
 | 
					 | 
				
			||||||
     * 拓展奖拓展的次数  国家作为键
 | 
					 | 
				
			||||||
     */
 | 
					 | 
				
			||||||
    private Map<Integer, BonusExpandDTO> getBonusExpandConfig() {
 | 
					 | 
				
			||||||
        List<BdBonusExpand> bdBonusExpandList = bdBonusExpandService.queryBdBonusExpand();
 | 
					 | 
				
			||||||
        Map<Integer, BonusExpandDTO> bdBonusExpandMap = new HashMap<>(ComputeUtil.mapInitCapacity(bdBonusExpandList.size()));
 | 
					 | 
				
			||||||
        bdBonusExpandList.forEach(bdBonusExpand -> {
 | 
					 | 
				
			||||||
            BonusExpandDTO bonusExpandDTO = BeanUtil.copyProperties(bdBonusExpand, BonusExpandDTO.class);
 | 
					 | 
				
			||||||
            bdBonusExpandMap.put(bonusExpandDTO.getPkCountry(), bonusExpandDTO);
 | 
					 | 
				
			||||||
        });
 | 
					 | 
				
			||||||
        return bdBonusExpandMap;
 | 
					 | 
				
			||||||
    }
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
    /**
 | 
					    /**
 | 
				
			||||||
     * 获取等级对应的拓展奖对应参数
 | 
					     * 获取等级对应的拓展奖对应参数
 | 
				
			||||||
     */
 | 
					     */
 | 
				
			||||||
| 
						 | 
					@ -294,15 +246,4 @@ public class BonusItemsServiceProvider implements IBonusItemsServiceApi {
 | 
				
			||||||
        return bdBonusDeductMap;
 | 
					        return bdBonusDeductMap;
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    /**
 | 
					 | 
				
			||||||
     * 获取每个国家奖金项对应的扣项
 | 
					 | 
				
			||||||
     */
 | 
					 | 
				
			||||||
    private Map<String, BdBonusCloud> getBonusCloudConfig() {
 | 
					 | 
				
			||||||
        List<BdBonusCloud> bonusCloudList = bdBonusCloudService.queryBdBonusCloud();
 | 
					 | 
				
			||||||
        Map<String, BdBonusCloud> bdBonusCloudHashMap = new HashMap<>(ComputeUtil.mapInitCapacity(bonusCloudList.size()));
 | 
					 | 
				
			||||||
        bonusCloudList.forEach(bdBonusCloud ->
 | 
					 | 
				
			||||||
                bdBonusCloudHashMap.put(bdBonusCloud.getPkCountry().toString() + bdBonusCloud.getCloudType(), bdBonusCloud));
 | 
					 | 
				
			||||||
        return bdBonusCloudHashMap;
 | 
					 | 
				
			||||||
    }
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -1,45 +1,22 @@
 | 
				
			||||||
package com.hzs.system.config.service;
 | 
					package com.hzs.system.config.service;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					 | 
				
			||||||
import com.baomidou.mybatisplus.extension.service.IService;
 | 
					import com.baomidou.mybatisplus.extension.service.IService;
 | 
				
			||||||
import com.hzs.common.domain.system.config.BdBonusCloud;
 | 
					import com.hzs.common.domain.system.config.BdBonusCloud;
 | 
				
			||||||
import com.hzs.common.domain.system.config.ext.BdBonusCloudExt;
 | 
					import com.hzs.common.domain.system.config.ext.BdBonusCloudExt;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
import java.util.List;
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
/**
 | 
					/**
 | 
				
			||||||
 * <p>
 | 
					 * 云代配置
 | 
				
			||||||
 *  云代配置
 | 
					 * 服务类
 | 
				
			||||||
 服务类
 | 
					 | 
				
			||||||
 * </p>
 | 
					 | 
				
			||||||
 *
 | 
					 | 
				
			||||||
 * @author zhangjing
 | 
					 | 
				
			||||||
 * @since 2022-11-01
 | 
					 | 
				
			||||||
 */
 | 
					 */
 | 
				
			||||||
public interface IBdBonusCloudService extends IService<BdBonusCloud> {
 | 
					public interface IBdBonusCloudService extends IService<BdBonusCloud> {
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    /*
 | 
					 | 
				
			||||||
     * @description: 查询云代奖金配置
 | 
					 | 
				
			||||||
     * @author: sui q
 | 
					 | 
				
			||||||
     * @date: 2023/7/5 15:17
 | 
					 | 
				
			||||||
     * @param: null null
 | 
					 | 
				
			||||||
     **/
 | 
					 | 
				
			||||||
    List<BdBonusCloud> queryBdBonusCloud();
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
    /**
 | 
					    /**
 | 
				
			||||||
     * @description: 新增云代配置
 | 
					     * 新增云代配置
 | 
				
			||||||
     * @author: zhang jing
 | 
					 | 
				
			||||||
     * @date: 2022/11/1 17:13
 | 
					 | 
				
			||||||
     * @param: [bonusCloudExt]
 | 
					 | 
				
			||||||
     * @return: boolean
 | 
					 | 
				
			||||||
     **/
 | 
					     **/
 | 
				
			||||||
    boolean saveBonusCloud(BdBonusCloudExt bonusCloudExt);
 | 
					    boolean saveBonusCloud(BdBonusCloudExt bonusCloudExt);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    /**
 | 
					    /**
 | 
				
			||||||
     * @description: 修改云代配置
 | 
					     * 修改云代配置
 | 
				
			||||||
     * @author: zhang jing
 | 
					 | 
				
			||||||
     * @date: 2022/11/1 17:13
 | 
					 | 
				
			||||||
     * @param: [bonusCloudExt]
 | 
					 | 
				
			||||||
     * @return: boolean
 | 
					 | 
				
			||||||
     **/
 | 
					     **/
 | 
				
			||||||
    boolean updateBonusCloud(BdBonusCloudExt bonusCloudExt);
 | 
					    boolean updateBonusCloud(BdBonusCloudExt bonusCloudExt);
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -1,17 +0,0 @@
 | 
				
			||||||
package com.hzs.system.config.service;
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
import com.baomidou.mybatisplus.extension.service.IService;
 | 
					 | 
				
			||||||
import com.hzs.common.domain.system.config.BdBonusExpand;
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
import java.util.List;
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
/**
 | 
					 | 
				
			||||||
 * 奖金4—N配置
 | 
					 | 
				
			||||||
 */
 | 
					 | 
				
			||||||
public interface IBdBonusExpandService extends IService<BdBonusExpand> {
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
    /**
 | 
					 | 
				
			||||||
     * 查询奖金的4-n配置
 | 
					 | 
				
			||||||
     */
 | 
					 | 
				
			||||||
    List<BdBonusExpand> queryBdBonusExpand();
 | 
					 | 
				
			||||||
}
 | 
					 | 
				
			||||||
| 
						 | 
					@ -1,44 +1,11 @@
 | 
				
			||||||
package com.hzs.system.config.service;
 | 
					package com.hzs.system.config.service;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					 | 
				
			||||||
import com.baomidou.mybatisplus.extension.service.IService;
 | 
					import com.baomidou.mybatisplus.extension.service.IService;
 | 
				
			||||||
import com.hzs.common.domain.system.config.BdBonusHiPink;
 | 
					import com.hzs.common.domain.system.config.BdBonusHiPink;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
import java.util.List;
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
/**
 | 
					/**
 | 
				
			||||||
 * <p>
 | 
					 | 
				
			||||||
 * 嗨粉直推奖励配置 服务类
 | 
					 * 嗨粉直推奖励配置 服务类
 | 
				
			||||||
 * </p>
 | 
					 | 
				
			||||||
 *
 | 
					 | 
				
			||||||
 * @author zhangjing
 | 
					 | 
				
			||||||
 * @since 2022-11-03
 | 
					 | 
				
			||||||
 */
 | 
					 */
 | 
				
			||||||
public interface IBdBonusHiPinkService extends IService<BdBonusHiPink> {
 | 
					public interface IBdBonusHiPinkService extends IService<BdBonusHiPink> {
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    /**
 | 
					 | 
				
			||||||
     * @description: 新增嗨粉直推奖励配置
 | 
					 | 
				
			||||||
     * @author: zhang jing
 | 
					 | 
				
			||||||
     * @date: 2022/11/4 9:25
 | 
					 | 
				
			||||||
     * @param: [bonusHiPinkList]
 | 
					 | 
				
			||||||
     * @return: boolean
 | 
					 | 
				
			||||||
     **/
 | 
					 | 
				
			||||||
    boolean saveBonusHiPink(List<BdBonusHiPink> bonusHiPinkList);
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
    /**
 | 
					 | 
				
			||||||
     * @description: 修改嗨粉直推奖励配置
 | 
					 | 
				
			||||||
     * @author: zhang jing
 | 
					 | 
				
			||||||
     * @date: 2022/11/4 9:25
 | 
					 | 
				
			||||||
     * @param: [bonusHiPinkList]
 | 
					 | 
				
			||||||
     * @return: boolean
 | 
					 | 
				
			||||||
     **/
 | 
					 | 
				
			||||||
    boolean updateBonusHiPink(List<BdBonusHiPink> bonusHiPinkList);
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
    /**
 | 
					 | 
				
			||||||
    * 查询会员嗨粉推荐奖金
 | 
					 | 
				
			||||||
    * @return: List<BdBonusHiPink>
 | 
					 | 
				
			||||||
    * @Author: sui q
 | 
					 | 
				
			||||||
    * @Date: 2023/1/4 15:23
 | 
					 | 
				
			||||||
    */
 | 
					 | 
				
			||||||
    List<BdBonusHiPink> queryBonusHiPink();
 | 
					 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -1,6 +1,5 @@
 | 
				
			||||||
package com.hzs.system.config.service.impl;
 | 
					package com.hzs.system.config.service.impl;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
 | 
					 | 
				
			||||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
 | 
					import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
 | 
				
			||||||
import com.hzs.common.core.utils.StringUtils;
 | 
					import com.hzs.common.core.utils.StringUtils;
 | 
				
			||||||
import com.hzs.common.domain.system.config.BdBonusCloud;
 | 
					import com.hzs.common.domain.system.config.BdBonusCloud;
 | 
				
			||||||
| 
						 | 
					@ -11,43 +10,23 @@ import com.hzs.system.config.service.IBdBonusCloudService;
 | 
				
			||||||
import org.springframework.stereotype.Service;
 | 
					import org.springframework.stereotype.Service;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
import java.util.Date;
 | 
					import java.util.Date;
 | 
				
			||||||
import java.util.List;
 | 
					 | 
				
			||||||
 | 
					
 | 
				
			||||||
/**
 | 
					/**
 | 
				
			||||||
 * <p>
 | 
					 * 云代配置
 | 
				
			||||||
 *  云代配置
 | 
					 * 服务实现类
 | 
				
			||||||
 服务实现类
 | 
					 | 
				
			||||||
 * </p>
 | 
					 | 
				
			||||||
 *
 | 
					 | 
				
			||||||
 * @author zhangjing
 | 
					 | 
				
			||||||
 * @since 2022-11-01
 | 
					 | 
				
			||||||
 */
 | 
					 */
 | 
				
			||||||
@Service
 | 
					@Service
 | 
				
			||||||
public class BdBonusCloudServiceImpl extends ServiceImpl<BdBonusCloudMapper, BdBonusCloud> implements IBdBonusCloudService {
 | 
					public class BdBonusCloudServiceImpl extends ServiceImpl<BdBonusCloudMapper, BdBonusCloud> implements IBdBonusCloudService {
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    @Override
 | 
					    @Override
 | 
				
			||||||
    public List<BdBonusCloud> queryBdBonusCloud() {
 | 
					 | 
				
			||||||
        QueryWrapper<BdBonusCloud> queryWrapper = new QueryWrapper<>();
 | 
					 | 
				
			||||||
        queryWrapper.select("CLOUD_TYPE,CLOUD_RATIO,PK_COUNTRY");
 | 
					 | 
				
			||||||
        return baseMapper.selectList(queryWrapper);
 | 
					 | 
				
			||||||
    }
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
    /**
 | 
					 | 
				
			||||||
     * @description: 新增云代配置
 | 
					 | 
				
			||||||
     * @author: zhang jing
 | 
					 | 
				
			||||||
     * @date: 2022/11/1 17:11
 | 
					 | 
				
			||||||
     * @param: [bonusCloudExt]
 | 
					 | 
				
			||||||
     * @return: boolean
 | 
					 | 
				
			||||||
     **/
 | 
					 | 
				
			||||||
    @Override
 | 
					 | 
				
			||||||
    public boolean saveBonusCloud(BdBonusCloudExt bonusCloudExt) {
 | 
					    public boolean saveBonusCloud(BdBonusCloudExt bonusCloudExt) {
 | 
				
			||||||
        for(BdBonusCloud bonusCloud:bonusCloudExt.getBonusCloudList()){
 | 
					        for (BdBonusCloud bonusCloud : bonusCloudExt.getBonusCloudList()) {
 | 
				
			||||||
            bonusCloud.setPkCountry(SecurityUtils.getPkCountry());
 | 
					            bonusCloud.setPkCountry(SecurityUtils.getPkCountry());
 | 
				
			||||||
            if(StringUtils.isNotNull(bonusCloud.getPkId())){
 | 
					            if (StringUtils.isNotNull(bonusCloud.getPkId())) {
 | 
				
			||||||
                bonusCloud.setPkModified(SecurityUtils.getUserId());
 | 
					                bonusCloud.setPkModified(SecurityUtils.getUserId());
 | 
				
			||||||
                bonusCloud.setModifiedTime(new Date());
 | 
					                bonusCloud.setModifiedTime(new Date());
 | 
				
			||||||
                baseMapper.updateById(bonusCloud);
 | 
					                baseMapper.updateById(bonusCloud);
 | 
				
			||||||
            }else{
 | 
					            } else {
 | 
				
			||||||
                bonusCloud.setPkCreator(SecurityUtils.getUserId());
 | 
					                bonusCloud.setPkCreator(SecurityUtils.getUserId());
 | 
				
			||||||
                bonusCloud.setCreationTime(new Date());
 | 
					                bonusCloud.setCreationTime(new Date());
 | 
				
			||||||
                baseMapper.insert(bonusCloud);
 | 
					                baseMapper.insert(bonusCloud);
 | 
				
			||||||
| 
						 | 
					@ -58,7 +37,7 @@ public class BdBonusCloudServiceImpl extends ServiceImpl<BdBonusCloudMapper, BdB
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    @Override
 | 
					    @Override
 | 
				
			||||||
    public boolean updateBonusCloud(BdBonusCloudExt bonusCloudExt) {
 | 
					    public boolean updateBonusCloud(BdBonusCloudExt bonusCloudExt) {
 | 
				
			||||||
        for(BdBonusCloud bonusCloud:bonusCloudExt.getBonusCloudList()){
 | 
					        for (BdBonusCloud bonusCloud : bonusCloudExt.getBonusCloudList()) {
 | 
				
			||||||
            bonusCloud.setPkCountry(SecurityUtils.getPkCountry());
 | 
					            bonusCloud.setPkCountry(SecurityUtils.getPkCountry());
 | 
				
			||||||
            bonusCloud.setPkModified(SecurityUtils.getUserId());
 | 
					            bonusCloud.setPkModified(SecurityUtils.getUserId());
 | 
				
			||||||
            bonusCloud.setModifiedTime(new Date());
 | 
					            bonusCloud.setModifiedTime(new Date());
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -1,22 +0,0 @@
 | 
				
			||||||
package com.hzs.system.config.service.impl;
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
 | 
					 | 
				
			||||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
 | 
					 | 
				
			||||||
import com.hzs.common.domain.system.config.BdBonusExpand;
 | 
					 | 
				
			||||||
import com.hzs.system.config.mapper.BdBonusExpandMapper;
 | 
					 | 
				
			||||||
import com.hzs.system.config.service.IBdBonusExpandService;
 | 
					 | 
				
			||||||
import org.springframework.stereotype.Service;
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
import java.util.List;
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
/**
 | 
					 | 
				
			||||||
 * 奖金4—N配置
 | 
					 | 
				
			||||||
 */
 | 
					 | 
				
			||||||
@Service
 | 
					 | 
				
			||||||
public class BdBonusExpandServiceImpl extends ServiceImpl<BdBonusExpandMapper, BdBonusExpand> implements IBdBonusExpandService {
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
    @Override
 | 
					 | 
				
			||||||
    public List<BdBonusExpand> queryBdBonusExpand() {
 | 
					 | 
				
			||||||
        return baseMapper.selectList(new QueryWrapper<>());
 | 
					 | 
				
			||||||
    }
 | 
					 | 
				
			||||||
}
 | 
					 | 
				
			||||||
| 
						 | 
					@ -1,60 +1,14 @@
 | 
				
			||||||
package com.hzs.system.config.service.impl;
 | 
					package com.hzs.system.config.service.impl;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
 | 
					 | 
				
			||||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
 | 
					import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
 | 
				
			||||||
import com.hzs.common.domain.system.config.BdBonusHiPink;
 | 
					import com.hzs.common.domain.system.config.BdBonusHiPink;
 | 
				
			||||||
import com.hzs.system.config.mapper.BdBonusHiPinkMapper;
 | 
					import com.hzs.system.config.mapper.BdBonusHiPinkMapper;
 | 
				
			||||||
import com.hzs.system.config.service.IBdBonusHiPinkService;
 | 
					import com.hzs.system.config.service.IBdBonusHiPinkService;
 | 
				
			||||||
import org.springframework.stereotype.Service;
 | 
					import org.springframework.stereotype.Service;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
import java.util.List;
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
/**
 | 
					/**
 | 
				
			||||||
 * <p>
 | 
					 | 
				
			||||||
 * 嗨粉直推奖励配置 服务实现类
 | 
					 * 嗨粉直推奖励配置 服务实现类
 | 
				
			||||||
 * </p>
 | 
					 | 
				
			||||||
 *
 | 
					 | 
				
			||||||
 * @author zhangjing
 | 
					 | 
				
			||||||
 * @since 2022-11-03
 | 
					 | 
				
			||||||
 */
 | 
					 */
 | 
				
			||||||
@Service
 | 
					@Service
 | 
				
			||||||
public class BdBonusHiPinkServiceImpl extends ServiceImpl<BdBonusHiPinkMapper, BdBonusHiPink> implements IBdBonusHiPinkService {
 | 
					public class BdBonusHiPinkServiceImpl extends ServiceImpl<BdBonusHiPinkMapper, BdBonusHiPink> implements IBdBonusHiPinkService {
 | 
				
			||||||
 | 
					 | 
				
			||||||
    /**
 | 
					 | 
				
			||||||
     * @description: 新增嗨粉直推奖励配置
 | 
					 | 
				
			||||||
     * @author: zhang jing
 | 
					 | 
				
			||||||
     * @date: 2022/11/3 19:54
 | 
					 | 
				
			||||||
     * @param: [bonusHiPinkList]
 | 
					 | 
				
			||||||
     * @return: boolean
 | 
					 | 
				
			||||||
     **/
 | 
					 | 
				
			||||||
    @Override
 | 
					 | 
				
			||||||
    public boolean saveBonusHiPink(List<BdBonusHiPink> bonusHiPinkList) {
 | 
					 | 
				
			||||||
        for(BdBonusHiPink bbhp : bonusHiPinkList){
 | 
					 | 
				
			||||||
            baseMapper.insert(bbhp);
 | 
					 | 
				
			||||||
        }
 | 
					 | 
				
			||||||
        return true;
 | 
					 | 
				
			||||||
    }
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
    /**
 | 
					 | 
				
			||||||
     * @description: 修改嗨粉直推奖励配置
 | 
					 | 
				
			||||||
     * @author: zhang jing
 | 
					 | 
				
			||||||
     * @date: 2022/11/4 9:25
 | 
					 | 
				
			||||||
     * @param: [bonusHiPinkList]
 | 
					 | 
				
			||||||
     * @return: boolean
 | 
					 | 
				
			||||||
     **/
 | 
					 | 
				
			||||||
    @Override
 | 
					 | 
				
			||||||
    public boolean updateBonusHiPink(List<BdBonusHiPink> bonusHiPinkList) {
 | 
					 | 
				
			||||||
        for(BdBonusHiPink bbhp : bonusHiPinkList){
 | 
					 | 
				
			||||||
            baseMapper.insert(bbhp);
 | 
					 | 
				
			||||||
        }
 | 
					 | 
				
			||||||
        return true;
 | 
					 | 
				
			||||||
    }
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
    @Override
 | 
					 | 
				
			||||||
    public List<BdBonusHiPink> queryBonusHiPink() {
 | 
					 | 
				
			||||||
        QueryWrapper<BdBonusHiPink> queryWrapper = new QueryWrapper<>();
 | 
					 | 
				
			||||||
        queryWrapper.select(" pk_country,range_type,pk_level,cal_type,bonus_value ")
 | 
					 | 
				
			||||||
                .orderByAsc("pk_country,bonus_value,range_type,pk_level");
 | 
					 | 
				
			||||||
        return baseMapper.selectList(queryWrapper);
 | 
					 | 
				
			||||||
    }
 | 
					 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -9,15 +9,12 @@ import com.hzs.common.core.constant.CacheConstants;
 | 
				
			||||||
import com.hzs.common.core.domain.R;
 | 
					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.domain.system.config.BdGrade;
 | 
					import com.hzs.common.domain.system.config.BdGrade;
 | 
				
			||||||
import com.hzs.common.domain.system.config.BdGradeScope;
 | 
					import com.hzs.common.domain.system.config.BdGradeScope;
 | 
				
			||||||
import com.hzs.common.domain.system.config.ext.BdBonusExpandExt;
 | 
					 | 
				
			||||||
import com.hzs.common.domain.system.config.ext.BdGradeExt;
 | 
					import com.hzs.common.domain.system.config.ext.BdGradeExt;
 | 
				
			||||||
import com.hzs.common.security.utils.SecurityUtils;
 | 
					import com.hzs.common.security.utils.SecurityUtils;
 | 
				
			||||||
import com.hzs.system.base.ITransactionServiceApi;
 | 
					import com.hzs.system.base.ITransactionServiceApi;
 | 
				
			||||||
import com.hzs.system.config.mapper.BdGradeMapper;
 | 
					import com.hzs.system.config.mapper.BdGradeMapper;
 | 
				
			||||||
import com.hzs.system.config.service.IBdBonusExpandService;
 | 
					 | 
				
			||||||
import com.hzs.system.config.service.IBdGradeScopeService;
 | 
					import com.hzs.system.config.service.IBdGradeScopeService;
 | 
				
			||||||
import com.hzs.system.config.service.IBdGradeService;
 | 
					import com.hzs.system.config.service.IBdGradeService;
 | 
				
			||||||
import org.apache.dubbo.config.annotation.DubboReference;
 | 
					import org.apache.dubbo.config.annotation.DubboReference;
 | 
				
			||||||
| 
						 | 
					@ -38,8 +35,6 @@ public class BdGradeServiceImpl extends ServiceImpl<BdGradeMapper, BdGrade> impl
 | 
				
			||||||
    @Autowired
 | 
					    @Autowired
 | 
				
			||||||
    private IBdGradeScopeService iBdGradeScopeService;
 | 
					    private IBdGradeScopeService iBdGradeScopeService;
 | 
				
			||||||
    @Autowired
 | 
					    @Autowired
 | 
				
			||||||
    private IBdBonusExpandService iBdBonusExpandService;
 | 
					 | 
				
			||||||
    @Autowired
 | 
					 | 
				
			||||||
    private RedisService redisService;
 | 
					    private RedisService redisService;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    @DubboReference
 | 
					    @DubboReference
 | 
				
			||||||
| 
						 | 
					@ -177,19 +172,6 @@ public class BdGradeServiceImpl extends ServiceImpl<BdGradeMapper, BdGrade> impl
 | 
				
			||||||
    @Override
 | 
					    @Override
 | 
				
			||||||
    @Transactional(rollbackFor = Exception.class)
 | 
					    @Transactional(rollbackFor = Exception.class)
 | 
				
			||||||
    public boolean updateExpand(BdGradeExt gradeExt) {
 | 
					    public boolean updateExpand(BdGradeExt gradeExt) {
 | 
				
			||||||
        //添加或修改4-N配置
 | 
					 | 
				
			||||||
        for (BdBonusExpandExt bee : gradeExt.getBonusExpands()) {
 | 
					 | 
				
			||||||
            bee.setPkCountry(SecurityUtils.getPkCountry());
 | 
					 | 
				
			||||||
            if (StringUtils.isNull(bee.getPkId())) {
 | 
					 | 
				
			||||||
                bee.setPkCreator(SecurityUtils.getUserId());
 | 
					 | 
				
			||||||
                bee.setCreationTime(new Date());
 | 
					 | 
				
			||||||
                iBdBonusExpandService.save(bee);
 | 
					 | 
				
			||||||
            } else {
 | 
					 | 
				
			||||||
                bee.setPkModified(SecurityUtils.getUserId());
 | 
					 | 
				
			||||||
                bee.setModifiedTime(new Date());
 | 
					 | 
				
			||||||
                iBdBonusExpandService.updateById(bee);
 | 
					 | 
				
			||||||
            }
 | 
					 | 
				
			||||||
        }
 | 
					 | 
				
			||||||
        //修改拓展信息
 | 
					        //修改拓展信息
 | 
				
			||||||
        for (BdGrade bg : gradeExt.getExpandList()) {
 | 
					        for (BdGrade bg : gradeExt.getExpandList()) {
 | 
				
			||||||
            bg.setPkCountry(SecurityUtils.getPkCountry());
 | 
					            bg.setPkCountry(SecurityUtils.getPkCountry());
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -44,4 +44,12 @@ public class VertexVo extends BaseEntity {
 | 
				
			||||||
     */
 | 
					     */
 | 
				
			||||||
    private Integer pkParent;
 | 
					    private Integer pkParent;
 | 
				
			||||||
    private Integer sort;
 | 
					    private Integer sort;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    /**
 | 
				
			||||||
 | 
					     * 区域体系配置分组名称
 | 
				
			||||||
 | 
					     */
 | 
				
			||||||
 | 
					    private String regionVertexName;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    @TableField("REGION_VERTEX_PK_ID")
 | 
				
			||||||
 | 
					    private Long regionVertexPkId;
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -0,0 +1,23 @@
 | 
				
			||||||
 | 
					<?xml version="1.0" encoding="UTF-8"?>
 | 
				
			||||||
 | 
					<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
 | 
				
			||||||
 | 
					<mapper namespace="com.hzs.system.base.mapper.BdRegionVertexMapper">
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    <!-- 通用查询映射结果 -->
 | 
				
			||||||
 | 
					    <resultMap id="BaseResultMap" type="com.hzs.common.domain.system.base.BdRegionVertex">
 | 
				
			||||||
 | 
					    <result column="CREATION_TIME" property="creationTime" />
 | 
				
			||||||
 | 
					    <result column="MODIFIED_TIME" property="modifiedTime" />
 | 
				
			||||||
 | 
					        <result column="PK_ID" property="pkId" />
 | 
				
			||||||
 | 
					        <result column="NAME" property="name" />
 | 
				
			||||||
 | 
					    </resultMap>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    <!-- 通用查询结果列 -->
 | 
				
			||||||
 | 
					    <sql id="Base_Column_List">
 | 
				
			||||||
 | 
					        CREATION_TIME,
 | 
				
			||||||
 | 
					        MODIFIED_TIME,
 | 
				
			||||||
 | 
					        PK_ID, NAME
 | 
				
			||||||
 | 
					    </sql>
 | 
				
			||||||
 | 
					    <select id="validateMappingCount" resultType="java.lang.Integer" parameterType="java.lang.Long">
 | 
				
			||||||
 | 
					        select count(1) from BD_VERTEX where REGION_VERTEX_PK_ID = #{pkId}
 | 
				
			||||||
 | 
					    </select>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					</mapper>
 | 
				
			||||||
| 
						 | 
					@ -2,28 +2,4 @@
 | 
				
			||||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
 | 
					<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
 | 
				
			||||||
<mapper namespace="com.hzs.system.config.mapper.BdBonusCloudMapper">
 | 
					<mapper namespace="com.hzs.system.config.mapper.BdBonusCloudMapper">
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    <!-- 通用查询映射结果 -->
 | 
					 | 
				
			||||||
    <resultMap id="BaseResultMap" type="com.hzs.common.domain.system.config.BdBonusCloud">
 | 
					 | 
				
			||||||
        <id column="PK_ID" property="pkId" />
 | 
					 | 
				
			||||||
    <result column="DEL_FLAG" property="delFlag" />
 | 
					 | 
				
			||||||
    <result column="PK_COUNTRY" property="pkCountry" />
 | 
					 | 
				
			||||||
    <result column="CREATION_TIME" property="creationTime" />
 | 
					 | 
				
			||||||
    <result column="MODIFIED_TIME" property="modifiedTime" />
 | 
					 | 
				
			||||||
    <result column="PK_CREATOR" property="pkCreator" />
 | 
					 | 
				
			||||||
    <result column="PK_MODIFIED" property="pkModified" />
 | 
					 | 
				
			||||||
        <result column="CLOUD_TYPE" property="cloudType" />
 | 
					 | 
				
			||||||
        <result column="CLOUD_RATIO" property="cloudRatio" />
 | 
					 | 
				
			||||||
    </resultMap>
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
    <!-- 通用查询结果列 -->
 | 
					 | 
				
			||||||
    <sql id="Base_Column_List">
 | 
					 | 
				
			||||||
        DEL_FLAG,
 | 
					 | 
				
			||||||
        PK_COUNTRY,
 | 
					 | 
				
			||||||
        CREATION_TIME,
 | 
					 | 
				
			||||||
        MODIFIED_TIME,
 | 
					 | 
				
			||||||
        PK_CREATOR,
 | 
					 | 
				
			||||||
        PK_MODIFIED,
 | 
					 | 
				
			||||||
        PK_ID, CLOUD_TYPE, CLOUD_RATIO
 | 
					 | 
				
			||||||
    </sql>
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
</mapper>
 | 
					</mapper>
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -1,29 +0,0 @@
 | 
				
			||||||
<?xml version="1.0" encoding="UTF-8"?>
 | 
					 | 
				
			||||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
 | 
					 | 
				
			||||||
<mapper namespace="com.hzs.system.config.mapper.BdBonusExpandMapper">
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
    <!-- 通用查询映射结果 -->
 | 
					 | 
				
			||||||
    <resultMap id="BaseResultMap" type="com.hzs.common.domain.system.config.BdBonusExpand">
 | 
					 | 
				
			||||||
        <id column="PK_ID" property="pkId" />
 | 
					 | 
				
			||||||
    <result column="DEL_FLAG" property="delFlag" />
 | 
					 | 
				
			||||||
    <result column="PK_COUNTRY" property="pkCountry" />
 | 
					 | 
				
			||||||
    <result column="CREATION_TIME" property="creationTime" />
 | 
					 | 
				
			||||||
    <result column="MODIFIED_TIME" property="modifiedTime" />
 | 
					 | 
				
			||||||
    <result column="PK_CREATOR" property="pkCreator" />
 | 
					 | 
				
			||||||
    <result column="PK_MODIFIED" property="pkModified" />
 | 
					 | 
				
			||||||
        <result column="EXPAND_NUMBER" property="expandNumber" />
 | 
					 | 
				
			||||||
        <result column="EXPAND_RATIO" property="expandRatio" />
 | 
					 | 
				
			||||||
    </resultMap>
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
    <!-- 通用查询结果列 -->
 | 
					 | 
				
			||||||
    <sql id="Base_Column_List">
 | 
					 | 
				
			||||||
        DEL_FLAG,
 | 
					 | 
				
			||||||
        PK_COUNTRY,
 | 
					 | 
				
			||||||
        CREATION_TIME,
 | 
					 | 
				
			||||||
        MODIFIED_TIME,
 | 
					 | 
				
			||||||
        PK_CREATOR,
 | 
					 | 
				
			||||||
        PK_MODIFIED,
 | 
					 | 
				
			||||||
        PK_ID, EXPAND_NUMBER, EXPAND_RATIO
 | 
					 | 
				
			||||||
    </sql>
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
</mapper>
 | 
					 | 
				
			||||||
| 
						 | 
					@ -65,9 +65,10 @@
 | 
				
			||||||
    </update>
 | 
					    </update>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    <select id="selectByList" resultType="com.hzs.system.config.vo.VertexVo">
 | 
					    <select id="selectByList" resultType="com.hzs.system.config.vo.VertexVo">
 | 
				
			||||||
        select bv.*,cm.MEMBER_CODE memberCode
 | 
					        select bv.*,cm.MEMBER_CODE memberCode, brv.name as regionVertexName
 | 
				
			||||||
        from BD_VERTEX bv
 | 
					        from BD_VERTEX bv
 | 
				
			||||||
        left join CU_MEMBER cm on cm.PK_ID = bv.PK_MEMBER
 | 
					        left join CU_MEMBER cm on cm.PK_ID = bv.PK_MEMBER
 | 
				
			||||||
 | 
					        left join BD_REGION_VERTEX brv on brv.pk_id = bv.REGION_VERTEX_PK_ID
 | 
				
			||||||
        where bv.DEL_FLAG = 0
 | 
					        where bv.DEL_FLAG = 0
 | 
				
			||||||
        <if test="createStartDate != null">
 | 
					        <if test="createStartDate != null">
 | 
				
			||||||
            and bv.CREATION_TIME >= #{createStartDate}
 | 
					            and bv.CREATION_TIME >= #{createStartDate}
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -2,8 +2,6 @@ package com.hzs.common.core.constant;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
/**
 | 
					/**
 | 
				
			||||||
 * 缓存的统一key 常量
 | 
					 * 缓存的统一key 常量
 | 
				
			||||||
 *
 | 
					 | 
				
			||||||
 * @author hzs
 | 
					 | 
				
			||||||
 */
 | 
					 */
 | 
				
			||||||
public class CacheConstants {
 | 
					public class CacheConstants {
 | 
				
			||||||
 | 
					
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -33,6 +33,11 @@ public class SysConstants {
 | 
				
			||||||
     */
 | 
					     */
 | 
				
			||||||
    public static final BigDecimal TOTAL_AREA_PV = new BigDecimal("300000");
 | 
					    public static final BigDecimal TOTAL_AREA_PV = new BigDecimal("300000");
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    /**
 | 
				
			||||||
 | 
					     * 小区业绩累计10万
 | 
				
			||||||
 | 
					     */
 | 
				
			||||||
 | 
					    public static final BigDecimal SMALL_AREA_PV = new BigDecimal("100000");
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    /**
 | 
					    /**
 | 
				
			||||||
     * 开放使用会员编号(用于支付登录查看数据)
 | 
					     * 开放使用会员编号(用于支付登录查看数据)
 | 
				
			||||||
     */
 | 
					     */
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
										
											
												File diff suppressed because it is too large
												Load Diff
											
										
									
								
							| 
						 | 
					@ -83,4 +83,6 @@ public class CuMemberRetailRegion extends BaseEntity {
 | 
				
			||||||
    @TableField("SYSTEM_TYPE")
 | 
					    @TableField("SYSTEM_TYPE")
 | 
				
			||||||
    private Integer systemType;
 | 
					    private Integer systemType;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    @TableField("REGION_VERTEX_PK_ID")
 | 
				
			||||||
 | 
					    private Long regionVertexPkId;
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -102,4 +102,9 @@ public class CuMemberRetailRegionExt extends CuMemberRetailRegion {
 | 
				
			||||||
     * 2025年6月11日 是否激活 (0-是, 1-否)
 | 
					     * 2025年6月11日 是否激活 (0-是, 1-否)
 | 
				
			||||||
     */
 | 
					     */
 | 
				
			||||||
    private Integer isActivate;
 | 
					    private Integer isActivate;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    /**
 | 
				
			||||||
 | 
					     * 2025年6月30日 区域体系分组名称
 | 
				
			||||||
 | 
					     */
 | 
				
			||||||
 | 
					    private String regionVertexName;
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -1,42 +1,39 @@
 | 
				
			||||||
package com.hzs.common.domain.system.config;
 | 
					package com.hzs.common.domain.system.base;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
import com.baomidou.mybatisplus.annotation.KeySequence;
 | 
					import com.baomidou.mybatisplus.annotation.KeySequence;
 | 
				
			||||||
import com.baomidou.mybatisplus.annotation.TableField;
 | 
					 | 
				
			||||||
import com.baomidou.mybatisplus.annotation.TableId;
 | 
					import com.baomidou.mybatisplus.annotation.TableId;
 | 
				
			||||||
import com.baomidou.mybatisplus.annotation.TableName;
 | 
					import com.baomidou.mybatisplus.annotation.TableName;
 | 
				
			||||||
 | 
					import com.baomidou.mybatisplus.annotation.TableField;
 | 
				
			||||||
import com.hzs.common.core.web.domain.BaseEntity;
 | 
					import com.hzs.common.core.web.domain.BaseEntity;
 | 
				
			||||||
import lombok.Data;
 | 
					import lombok.Data;
 | 
				
			||||||
import lombok.EqualsAndHashCode;
 | 
					import lombok.EqualsAndHashCode;
 | 
				
			||||||
import lombok.experimental.Accessors;
 | 
					import lombok.experimental.Accessors;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
import java.math.BigDecimal;
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
/**
 | 
					/**
 | 
				
			||||||
 * 奖金4—N配置
 | 
					 * <p>
 | 
				
			||||||
 | 
					 * 区域体系分组配置表
 | 
				
			||||||
 | 
					 * </p>
 | 
				
			||||||
 | 
					 *
 | 
				
			||||||
 | 
					 * @author sangelxiu1
 | 
				
			||||||
 | 
					 * @since 2025-06-25
 | 
				
			||||||
 */
 | 
					 */
 | 
				
			||||||
@Data
 | 
					@Data
 | 
				
			||||||
@EqualsAndHashCode(callSuper = true)
 | 
					@EqualsAndHashCode(callSuper = true)
 | 
				
			||||||
@Accessors(chain = true)
 | 
					@Accessors(chain = true)
 | 
				
			||||||
@TableName("BD_BONUS_EXPAND")
 | 
					@TableName("BD_REGION_VERTEX")
 | 
				
			||||||
@KeySequence("BD_BONUS_EXPAND_SEQ")
 | 
					@KeySequence("BD_REGION_VERTEX_SEQ")
 | 
				
			||||||
public class BdBonusExpand extends BaseEntity {
 | 
					public class BdRegionVertex extends BaseEntity {
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    private static final long serialVersionUID = 1L;
 | 
					    private static final long serialVersionUID = 1L;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    @TableId("PK_ID")
 | 
					    @TableId("PK_ID")
 | 
				
			||||||
    private BigDecimal pkId;
 | 
					    private Long pkId;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    /**
 | 
					    /**
 | 
				
			||||||
     * 拓展次数
 | 
					     * 区域体系分组名称
 | 
				
			||||||
     */
 | 
					     */
 | 
				
			||||||
    @TableField("EXPAND_NUMBER")
 | 
					    @TableField("NAME")
 | 
				
			||||||
    private Integer expandNumber;
 | 
					    private String name;
 | 
				
			||||||
 | 
					 | 
				
			||||||
    /**
 | 
					 | 
				
			||||||
     * 拓展比例
 | 
					 | 
				
			||||||
     */
 | 
					 | 
				
			||||||
    @TableField("EXPAND_RATIO")
 | 
					 | 
				
			||||||
    private BigDecimal expandRatio;
 | 
					 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
| 
						 | 
					@ -1,8 +1,6 @@
 | 
				
			||||||
package com.hzs.common.domain.system.config;
 | 
					package com.hzs.common.domain.system.config;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
import com.baomidou.mybatisplus.annotation.*;
 | 
					import com.baomidou.mybatisplus.annotation.*;
 | 
				
			||||||
import com.hzs.common.core.annotation.BigDecimalFormat;
 | 
					 | 
				
			||||||
import com.hzs.common.core.annotation.Excel;
 | 
					 | 
				
			||||||
import com.hzs.common.core.annotation.Transaction;
 | 
					import com.hzs.common.core.annotation.Transaction;
 | 
				
			||||||
import com.hzs.common.core.constant.EnumsPrefixConstants;
 | 
					import com.hzs.common.core.constant.EnumsPrefixConstants;
 | 
				
			||||||
import com.hzs.common.core.web.domain.BaseEntity;
 | 
					import com.hzs.common.core.web.domain.BaseEntity;
 | 
				
			||||||
| 
						 | 
					@ -31,7 +29,6 @@ public class BdAwards extends BaseEntity {
 | 
				
			||||||
    /**
 | 
					    /**
 | 
				
			||||||
     * 奖衔名称
 | 
					     * 奖衔名称
 | 
				
			||||||
     */
 | 
					     */
 | 
				
			||||||
    @Excel(name = "奖衔名称", sort = 1)
 | 
					 | 
				
			||||||
    @TableField("AWARDS_NAME")
 | 
					    @TableField("AWARDS_NAME")
 | 
				
			||||||
    private String awardsName;
 | 
					    private String awardsName;
 | 
				
			||||||
    /**
 | 
					    /**
 | 
				
			||||||
| 
						 | 
					@ -55,7 +52,6 @@ public class BdAwards extends BaseEntity {
 | 
				
			||||||
    /**
 | 
					    /**
 | 
				
			||||||
     * 小区考核PV
 | 
					     * 小区考核PV
 | 
				
			||||||
     */
 | 
					     */
 | 
				
			||||||
    @Excel(name = "小区业绩PV", sort = 2)
 | 
					 | 
				
			||||||
    @TableField("COMMUNITY_CHECK")
 | 
					    @TableField("COMMUNITY_CHECK")
 | 
				
			||||||
    private BigDecimal communityCheck;
 | 
					    private BigDecimal communityCheck;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
| 
						 | 
					@ -68,21 +64,18 @@ public class BdAwards extends BaseEntity {
 | 
				
			||||||
    /**
 | 
					    /**
 | 
				
			||||||
     * 复购考核
 | 
					     * 复购考核
 | 
				
			||||||
     */
 | 
					     */
 | 
				
			||||||
    @Excel(name = "复购考核PV", sort = 3)
 | 
					 | 
				
			||||||
    @TableField("PURCHASE_CHECK")
 | 
					    @TableField("PURCHASE_CHECK")
 | 
				
			||||||
    private BigDecimal purchaseCheck;
 | 
					    private BigDecimal purchaseCheck;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    /**
 | 
					    /**
 | 
				
			||||||
     * 小区考核结束PV
 | 
					     * 小区考核结束PV
 | 
				
			||||||
     */
 | 
					     */
 | 
				
			||||||
    @Excel(name = "小区业绩结束PV", sort = 2)
 | 
					 | 
				
			||||||
    @TableField("COMMUNITY_CHECK_END")
 | 
					    @TableField("COMMUNITY_CHECK_END")
 | 
				
			||||||
    private BigDecimal communityCheckEnd;
 | 
					    private BigDecimal communityCheckEnd;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    /**
 | 
					    /**
 | 
				
			||||||
     * 分红考核
 | 
					     * 分红考核
 | 
				
			||||||
     */
 | 
					     */
 | 
				
			||||||
    @Excel(name = "分红考核BV", sort = 4)
 | 
					 | 
				
			||||||
    @TableField("SHARE_CHECK")
 | 
					    @TableField("SHARE_CHECK")
 | 
				
			||||||
    private BigDecimal shareCheck;
 | 
					    private BigDecimal shareCheck;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
| 
						 | 
					@ -102,7 +95,6 @@ public class BdAwards extends BaseEntity {
 | 
				
			||||||
     * 左区奖衔
 | 
					     * 左区奖衔
 | 
				
			||||||
     */
 | 
					     */
 | 
				
			||||||
    @Transaction(transactionKey = EnumsPrefixConstants.KEY_AWARD)
 | 
					    @Transaction(transactionKey = EnumsPrefixConstants.KEY_AWARD)
 | 
				
			||||||
    @Excel(name = "左区奖衔", sort = 5)
 | 
					 | 
				
			||||||
    @TableField(value = "PK_CHECK_AWARDS_LEFT", jdbcType = JdbcType.NUMERIC, updateStrategy = FieldStrategy.IGNORED)
 | 
					    @TableField(value = "PK_CHECK_AWARDS_LEFT", jdbcType = JdbcType.NUMERIC, updateStrategy = FieldStrategy.IGNORED)
 | 
				
			||||||
    private Integer pkCheckAwardsLeft;
 | 
					    private Integer pkCheckAwardsLeft;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
| 
						 | 
					@ -110,7 +102,6 @@ public class BdAwards extends BaseEntity {
 | 
				
			||||||
     * 右区奖衔
 | 
					     * 右区奖衔
 | 
				
			||||||
     */
 | 
					     */
 | 
				
			||||||
    @Transaction(transactionKey = EnumsPrefixConstants.KEY_AWARD)
 | 
					    @Transaction(transactionKey = EnumsPrefixConstants.KEY_AWARD)
 | 
				
			||||||
    @Excel(name = "右区奖衔", sort = 6)
 | 
					 | 
				
			||||||
    @TableField(value = "PK_CHECK_AWARDS_RIGHT", jdbcType = JdbcType.NUMERIC, updateStrategy = FieldStrategy.IGNORED)
 | 
					    @TableField(value = "PK_CHECK_AWARDS_RIGHT", jdbcType = JdbcType.NUMERIC, updateStrategy = FieldStrategy.IGNORED)
 | 
				
			||||||
    private Integer pkCheckAwardsRight;
 | 
					    private Integer pkCheckAwardsRight;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -14,13 +14,7 @@ import lombok.experimental.Accessors;
 | 
				
			||||||
import java.math.BigDecimal;
 | 
					import java.math.BigDecimal;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
/**
 | 
					/**
 | 
				
			||||||
 * <p>
 | 
					 * 云代配置
 | 
				
			||||||
 *  云代配置
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
 * </p>
 | 
					 | 
				
			||||||
 *
 | 
					 | 
				
			||||||
 * @author zhangjing
 | 
					 | 
				
			||||||
 * @since 2022-11-01
 | 
					 | 
				
			||||||
 */
 | 
					 */
 | 
				
			||||||
@Data
 | 
					@Data
 | 
				
			||||||
@EqualsAndHashCode(callSuper = true)
 | 
					@EqualsAndHashCode(callSuper = true)
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -12,12 +12,7 @@ import lombok.experimental.Accessors;
 | 
				
			||||||
import java.math.BigDecimal;
 | 
					import java.math.BigDecimal;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
/**
 | 
					/**
 | 
				
			||||||
 * <p>
 | 
					 | 
				
			||||||
 * 嗨粉直推奖励配置
 | 
					 * 嗨粉直推奖励配置
 | 
				
			||||||
 * </p>
 | 
					 | 
				
			||||||
 *
 | 
					 | 
				
			||||||
 * @author zhangjing
 | 
					 | 
				
			||||||
 * @since 2022-11-03
 | 
					 | 
				
			||||||
 */
 | 
					 */
 | 
				
			||||||
@Data
 | 
					@Data
 | 
				
			||||||
@EqualsAndHashCode(callSuper = true)
 | 
					@EqualsAndHashCode(callSuper = true)
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -1,15 +1,10 @@
 | 
				
			||||||
package com.hzs.common.domain.system.config.ext;
 | 
					package com.hzs.common.domain.system.config.ext;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
import com.baomidou.mybatisplus.annotation.TableId;
 | 
					 | 
				
			||||||
import com.hzs.common.core.annotation.Excel;
 | 
					import com.hzs.common.core.annotation.Excel;
 | 
				
			||||||
import com.hzs.common.core.annotation.Transaction;
 | 
					 | 
				
			||||||
import com.hzs.common.core.constant.EnumsPrefixConstants;
 | 
					 | 
				
			||||||
import com.hzs.common.domain.system.config.BdAwards;
 | 
					import com.hzs.common.domain.system.config.BdAwards;
 | 
				
			||||||
import com.hzs.common.domain.system.config.BdAwardsDetail;
 | 
					 | 
				
			||||||
import lombok.Data;
 | 
					import lombok.Data;
 | 
				
			||||||
import lombok.EqualsAndHashCode;
 | 
					import lombok.EqualsAndHashCode;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
import java.math.BigDecimal;
 | 
					 | 
				
			||||||
import java.util.List;
 | 
					import java.util.List;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
/**
 | 
					/**
 | 
				
			||||||
| 
						 | 
					@ -20,10 +15,10 @@ import java.util.List;
 | 
				
			||||||
public class BdAwardsExt extends BdAwards {
 | 
					public class BdAwardsExt extends BdAwards {
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    private static final long serialVersionUID = 1L;
 | 
					    private static final long serialVersionUID = 1L;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    /**
 | 
					    /**
 | 
				
			||||||
     * 关系类型名称
 | 
					     * 关系类型名称
 | 
				
			||||||
     */
 | 
					     */
 | 
				
			||||||
    @Excel(name = "考核", sort = 7)
 | 
					 | 
				
			||||||
    private String relationTypeVal;
 | 
					    private String relationTypeVal;
 | 
				
			||||||
    /**
 | 
					    /**
 | 
				
			||||||
     * 辅导分红集合
 | 
					     * 辅导分红集合
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -1,34 +0,0 @@
 | 
				
			||||||
package com.hzs.common.domain.system.config.ext;
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
import com.baomidou.mybatisplus.annotation.KeySequence;
 | 
					 | 
				
			||||||
import com.baomidou.mybatisplus.annotation.TableField;
 | 
					 | 
				
			||||||
import com.baomidou.mybatisplus.annotation.TableId;
 | 
					 | 
				
			||||||
import com.baomidou.mybatisplus.annotation.TableName;
 | 
					 | 
				
			||||||
import com.hzs.common.core.web.domain.BaseEntity;
 | 
					 | 
				
			||||||
import com.hzs.common.domain.system.config.BdBonusExpand;
 | 
					 | 
				
			||||||
import lombok.Data;
 | 
					 | 
				
			||||||
import lombok.EqualsAndHashCode;
 | 
					 | 
				
			||||||
import lombok.experimental.Accessors;
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
import java.math.BigDecimal;
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
/**
 | 
					 | 
				
			||||||
 * <p>
 | 
					 | 
				
			||||||
 * 奖金4—N配置
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
 * </p>
 | 
					 | 
				
			||||||
 *
 | 
					 | 
				
			||||||
 * @author hzs
 | 
					 | 
				
			||||||
 * @since 2022-10-31
 | 
					 | 
				
			||||||
 */
 | 
					 | 
				
			||||||
@Data
 | 
					 | 
				
			||||||
public class BdBonusExpandExt extends BdBonusExpand {
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
    private static final long serialVersionUID = 1L;
 | 
					 | 
				
			||||||
    /**
 | 
					 | 
				
			||||||
     * 拓展名称
 | 
					 | 
				
			||||||
     */
 | 
					 | 
				
			||||||
    private String expandName;
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
}
 | 
					 | 
				
			||||||
| 
						 | 
					@ -2,8 +2,6 @@ package com.hzs.common.domain.system.config.ext;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
import com.hzs.common.core.annotation.Excel;
 | 
					import com.hzs.common.core.annotation.Excel;
 | 
				
			||||||
import com.hzs.common.core.annotation.Transaction;
 | 
					import com.hzs.common.core.annotation.Transaction;
 | 
				
			||||||
import com.hzs.common.core.constant.EnumsPrefixConstants;
 | 
					 | 
				
			||||||
import com.hzs.common.domain.system.config.BdBonusExpand;
 | 
					 | 
				
			||||||
import com.hzs.common.domain.system.config.BdGrade;
 | 
					import com.hzs.common.domain.system.config.BdGrade;
 | 
				
			||||||
import com.hzs.common.domain.system.ext.BdGradeScopeExt;
 | 
					import com.hzs.common.domain.system.ext.BdGradeScopeExt;
 | 
				
			||||||
import lombok.Data;
 | 
					import lombok.Data;
 | 
				
			||||||
| 
						 | 
					@ -12,12 +10,7 @@ import lombok.EqualsAndHashCode;
 | 
				
			||||||
import java.util.List;
 | 
					import java.util.List;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
/**
 | 
					/**
 | 
				
			||||||
 * <p>
 | 
					 | 
				
			||||||
 * 等级配置表
 | 
					 * 等级配置表
 | 
				
			||||||
 * </p>
 | 
					 | 
				
			||||||
 *
 | 
					 | 
				
			||||||
 * @author zhangjing
 | 
					 | 
				
			||||||
 * @since 2022-09-08
 | 
					 | 
				
			||||||
 */
 | 
					 */
 | 
				
			||||||
@EqualsAndHashCode(callSuper = true)
 | 
					@EqualsAndHashCode(callSuper = true)
 | 
				
			||||||
@Data
 | 
					@Data
 | 
				
			||||||
| 
						 | 
					@ -38,29 +31,29 @@ public class BdGradeExt extends BdGrade {
 | 
				
			||||||
    /**
 | 
					    /**
 | 
				
			||||||
     * 统计值名称 EStatisticalValue
 | 
					     * 统计值名称 EStatisticalValue
 | 
				
			||||||
     */
 | 
					     */
 | 
				
			||||||
    @Excel(name = "统计类型",sort = 2)
 | 
					    @Excel(name = "统计类型", sort = 2)
 | 
				
			||||||
    private String censusValueVal;
 | 
					    private String censusValueVal;
 | 
				
			||||||
    /**
 | 
					    /**
 | 
				
			||||||
     * 注册权限 ERegistrationAuthority
 | 
					     * 注册权限 ERegistrationAuthority
 | 
				
			||||||
     */
 | 
					     */
 | 
				
			||||||
    @Excel(name = "注册权限",sort = 4)
 | 
					    @Excel(name = "注册权限", sort = 4)
 | 
				
			||||||
    private String registerAuthorityVal;
 | 
					    private String registerAuthorityVal;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    /**
 | 
					    /**
 | 
				
			||||||
     * 奖衔权限
 | 
					     * 奖衔权限
 | 
				
			||||||
     */
 | 
					     */
 | 
				
			||||||
    @Excel(name = "真实奖衔",sort = 5)
 | 
					    @Excel(name = "真实奖衔", sort = 5)
 | 
				
			||||||
    private String pkAwardsVal;
 | 
					    private String pkAwardsVal;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    /**
 | 
					    /**
 | 
				
			||||||
     * 等级范围(直推范围)
 | 
					     * 等级范围(直推范围)
 | 
				
			||||||
     */
 | 
					     */
 | 
				
			||||||
    private Integer gradeRang [];
 | 
					    private Integer gradeRang[];
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    /**
 | 
					    /**
 | 
				
			||||||
     * 等级范围(直推范围)
 | 
					     * 等级范围(直推范围)
 | 
				
			||||||
     */
 | 
					     */
 | 
				
			||||||
    @Excel(name = "直推范围",sort = 6)
 | 
					    @Excel(name = "直推范围", sort = 6)
 | 
				
			||||||
    private String gradeRangVal;
 | 
					    private String gradeRangVal;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    /**
 | 
					    /**
 | 
				
			||||||
| 
						 | 
					@ -74,11 +67,6 @@ public class BdGradeExt extends BdGrade {
 | 
				
			||||||
     */
 | 
					     */
 | 
				
			||||||
    private List<BdGrade> expandList;
 | 
					    private List<BdGrade> expandList;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    /**
 | 
					 | 
				
			||||||
     * 奖金4—N配置拓展集合
 | 
					 | 
				
			||||||
     */
 | 
					 | 
				
			||||||
    private List<BdBonusExpandExt> bonusExpands;
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
    /**
 | 
					    /**
 | 
				
			||||||
     * 首购计算  EDealerYesNo
 | 
					     * 首购计算  EDealerYesNo
 | 
				
			||||||
     */
 | 
					     */
 | 
				
			||||||
| 
						 | 
					@ -98,9 +86,4 @@ public class BdGradeExt extends BdGrade {
 | 
				
			||||||
     */
 | 
					     */
 | 
				
			||||||
    private String repurchaseAssessVal;
 | 
					    private String repurchaseAssessVal;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -60,4 +60,6 @@ public class BdVertex extends BaseEntity {
 | 
				
			||||||
    @TableField("SYSTEM_TYPE")
 | 
					    @TableField("SYSTEM_TYPE")
 | 
				
			||||||
    private Integer systemType;
 | 
					    private Integer systemType;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    @TableField("REGION_VERTEX_PK_ID")
 | 
				
			||||||
 | 
					    private Long regionVertexPkId;
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -34,4 +34,9 @@ public class CuMemberJob {
 | 
				
			||||||
        iMemberJobServiceApi.automaticWithdrawal();
 | 
					        iMemberJobServiceApi.automaticWithdrawal();
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    @XxlJob("autoDeleteGarbageData")
 | 
				
			||||||
 | 
					    public void autoDeleteGarbageData(){
 | 
				
			||||||
 | 
					        iMemberJobServiceApi.autoDeleteGarbageData();
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -6,6 +6,7 @@ import cn.hutool.json.JSONObject;
 | 
				
			||||||
import cn.hutool.json.JSONUtil;
 | 
					import cn.hutool.json.JSONUtil;
 | 
				
			||||||
import com.hzs.common.core.domain.R;
 | 
					import com.hzs.common.core.domain.R;
 | 
				
			||||||
import com.hzs.common.core.web.domain.AjaxResult;
 | 
					import com.hzs.common.core.web.domain.AjaxResult;
 | 
				
			||||||
 | 
					import com.hzs.member.account.IMemberJobServiceApi;
 | 
				
			||||||
import com.hzs.system.base.IAreaServiceApi;
 | 
					import com.hzs.system.base.IAreaServiceApi;
 | 
				
			||||||
import com.hzs.system.base.dto.AreaDTO;
 | 
					import com.hzs.system.base.dto.AreaDTO;
 | 
				
			||||||
import com.hzs.third.job.OrderJob;
 | 
					import com.hzs.third.job.OrderJob;
 | 
				
			||||||
| 
						 | 
					@ -29,6 +30,9 @@ public class JobTestController {
 | 
				
			||||||
    @DubboReference
 | 
					    @DubboReference
 | 
				
			||||||
    IAreaServiceApi iAreaServiceApi;
 | 
					    IAreaServiceApi iAreaServiceApi;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    @DubboReference
 | 
				
			||||||
 | 
					    IMemberJobServiceApi iMemberJobServiceApi;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    /**
 | 
					    /**
 | 
				
			||||||
     * 测试行政区划更新
 | 
					     * 测试行政区划更新
 | 
				
			||||||
     *
 | 
					     *
 | 
				
			||||||
| 
						 | 
					@ -124,4 +128,10 @@ public class JobTestController {
 | 
				
			||||||
        return AjaxResult.error("处理失败:" + resultR.getMsg());
 | 
					        return AjaxResult.error("处理失败:" + resultR.getMsg());
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    @GetMapping("/autoDeleteGarbageData")
 | 
				
			||||||
 | 
					    public AjaxResult autoDeleteGarbageData() {
 | 
				
			||||||
 | 
					        iMemberJobServiceApi.autoDeleteGarbageData();
 | 
				
			||||||
 | 
					        return AjaxResult.success();
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -0,0 +1,35 @@
 | 
				
			||||||
 | 
					CREATE TABLE "RETAIL"."BD_REGION_VERTEX" (
 | 
				
			||||||
 | 
					                                     "PK_ID" NUMBER(6,0),
 | 
				
			||||||
 | 
					                                     "CREATION_TIME" DATE NOT NULL,
 | 
				
			||||||
 | 
					                                     "MODIFIED_TIME" DATE,
 | 
				
			||||||
 | 
					                                     "NAME" VARCHAR2(200) NOT NULL,
 | 
				
			||||||
 | 
					                                     "DEL_FLAG" NUMBER(1,0) DEFAULT 0 NOT NULL ENABLE,
 | 
				
			||||||
 | 
					                                     "PK_COUNTRY" NUMBER(4,0) DEFAULT 1 NOT NULL ENABLE,
 | 
				
			||||||
 | 
					                                     "CREATION_TIME" DATE DEFAULT sysdate NOT NULL ENABLE,
 | 
				
			||||||
 | 
					                                     "MODIFIED_TIME" DATE,
 | 
				
			||||||
 | 
					                                     "PK_CREATOR" NUMBER(20,0) NOT NULL ENABLE,
 | 
				
			||||||
 | 
					                                     "PK_MODIFIED" NUMBER(20,0)
 | 
				
			||||||
 | 
					)
 | 
				
			||||||
 | 
					;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					COMMENT ON COLUMN "RETAIL"."BD_REGION_VERTEX"."CREATION_TIME" IS '创建时间';
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					COMMENT ON COLUMN "RETAIL"."BD_REGION_VERTEX"."MODIFIED_TIME" IS '更新时间';
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					COMMENT ON COLUMN "RETAIL"."BD_REGION_VERTEX"."NAME" IS '区域体系分组名称';
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					COMMENT ON TABLE "RETAIL"."BD_REGION_VERTEX" IS '区域体系分组配置表';
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					CREATE SEQUENCE BD_REGION_VERTEX_SEQ
 | 
				
			||||||
 | 
					    START WITH 1
 | 
				
			||||||
 | 
					    INCREMENT BY 1;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					ALTER TABLE "RETAIL"."BD_VERTEX"
 | 
				
			||||||
 | 
					    ADD ("REGION_VERTEX_PK_ID" NUMBER(6,0));
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					COMMENT ON COLUMN "RETAIL"."BD_VERTEX"."REGION_VERTEX_PK_ID" IS '区域体系分组配置表ID';
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					ALTER TABLE "RETAIL"."CU_MEMBER_RETAIL_REGION"
 | 
				
			||||||
 | 
					    ADD ("REGION_VERTEX_PK_ID" NUMBER(6,0));
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					COMMENT ON COLUMN "RETAIL"."CU_MEMBER_RETAIL_REGION"."REGION_VERTEX_PK_ID" IS '区域体系分组配置表ID'
 | 
				
			||||||
		Loading…
	
		Reference in New Issue