## 奖衔配置调整;去掉4-N配置等;
This commit is contained in:
parent
49e4d71418
commit
eabe4f2efc
|
@ -37,21 +37,11 @@ public class BonusConfigDTO implements Serializable {
|
|||
*/
|
||||
private Map<String, BonusDirectDTO> bonusDirectDtoMap;
|
||||
|
||||
/**
|
||||
* 嗨粉直推奖励配置 key 第一个键国家主键 ,第二个键 range_type+pk_level
|
||||
*/
|
||||
private Map<Integer, List<BonusHiPinkDTO>> bonusHiPinkDtoMap;
|
||||
|
||||
/**
|
||||
* 一次性补差 key 国家作为主键,只有一条
|
||||
*/
|
||||
private Map<Integer, BonusDifferenceDTO> bonusDifferenceDtoMap;
|
||||
|
||||
/**
|
||||
* 奖金4-N配置 国家
|
||||
*/
|
||||
private Map<Integer, BonusExpandDTO> bonusExpandMap;
|
||||
|
||||
/**
|
||||
* 复购推荐奖励配置 key第一个键国家主键,第二个键 代数
|
||||
*/
|
||||
|
@ -84,7 +74,6 @@ public class BonusConfigDTO implements Serializable {
|
|||
|
||||
private List<BdAwards> awardsList;
|
||||
|
||||
|
||||
/**
|
||||
* 奖金扣项 需要主键 奖金主键
|
||||
*/
|
||||
|
@ -95,9 +84,4 @@ public class BonusConfigDTO implements Serializable {
|
|||
*/
|
||||
private Map<String, BdBonusService> bonusServiceMap;
|
||||
|
||||
/**
|
||||
* 云代奖金 需要主键 国家+收益类型
|
||||
*/
|
||||
private Map<String, BdBonusCloud> bonusCloudMap;
|
||||
|
||||
}
|
||||
|
|
|
@ -34,9 +34,6 @@ import java.util.List;
|
|||
|
||||
/**
|
||||
* 奖衔配置前端控制器
|
||||
*
|
||||
* @author zhangjing
|
||||
* @since 2022-09-08
|
||||
*/
|
||||
@Slf4j
|
||||
@RestController
|
||||
|
@ -44,27 +41,18 @@ import java.util.List;
|
|||
public class BdAwardsController extends BaseController {
|
||||
|
||||
@Autowired
|
||||
private IBdAwardsService awardsService;
|
||||
private IBdAwardsService iBdAwardsService;
|
||||
@Autowired
|
||||
private IBdNoticeService noticeService;
|
||||
private IBdNoticeService iBdNoticeService;
|
||||
@Autowired
|
||||
private RedisService redisService;
|
||||
|
||||
@DubboReference
|
||||
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)
|
||||
@GetMapping("/list")
|
||||
|
@ -78,15 +66,15 @@ public class BdAwardsController extends BaseController {
|
|||
}
|
||||
queryWrapper.orderByAsc(BdAwards::getAwardsValue);
|
||||
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)));
|
||||
if (CollectionUtil.isNotEmpty(listExt)) {
|
||||
for (BdAwardsExt ae : listExt) {
|
||||
if (StringUtils.isNotNull(ae.getPkCheckAwardsLeft())) {
|
||||
ae.setPkCheckAwardsLeft(noticeService.getAwardsTranslateValue(ae.getPkCheckAwardsLeft(), null));
|
||||
ae.setPkCheckAwardsLeft(iBdNoticeService.getAwardsTranslateValue(ae.getPkCheckAwardsLeft(), null));
|
||||
}
|
||||
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)
|
||||
@PostMapping("/export")
|
||||
|
@ -112,12 +96,12 @@ public class BdAwardsController extends BaseController {
|
|||
}
|
||||
queryWrapper.orderByAsc(BdAwards::getAwardsValue);
|
||||
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)));
|
||||
if (CollectionUtil.isNotEmpty(listExt)) {
|
||||
for (BdAwardsExt ae : listExt) {
|
||||
ae.setPkCheckAwardsLeft(noticeService.getAwardsTranslateValue(ae.getPkCheckAwardsLeft(), null));
|
||||
ae.setPkCheckAwardsRight(noticeService.getAwardsTranslateValue(ae.getPkCheckAwardsRight(), null));
|
||||
ae.setPkCheckAwardsLeft(iBdNoticeService.getAwardsTranslateValue(ae.getPkCheckAwardsLeft(), null));
|
||||
ae.setPkCheckAwardsRight(iBdNoticeService.getAwardsTranslateValue(ae.getPkCheckAwardsRight(), null));
|
||||
}
|
||||
}
|
||||
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)
|
||||
@GetMapping("/awardsList")
|
||||
|
@ -137,7 +117,7 @@ public class BdAwardsController extends BaseController {
|
|||
LambdaQueryWrapper<BdAwards> queryWrapper = new LambdaQueryWrapper<>();
|
||||
queryWrapper.eq(BdAwards::getPkCountry, SecurityUtils.getPkCountry());
|
||||
queryWrapper.orderByAsc(BdAwards::getAwardsValue);
|
||||
List<BdAwards> list = awardsService.list(queryWrapper);
|
||||
List<BdAwards> list = iBdAwardsService.list(queryWrapper);
|
||||
List<BdAwardsExt> listExt = new ArrayList<>();
|
||||
for (BdAwards ba : list) {
|
||||
BdAwardsExt baExt = new BdAwardsExt();
|
||||
|
@ -159,7 +139,7 @@ public class BdAwardsController extends BaseController {
|
|||
LambdaQueryWrapper<BdAwards> queryWrapper = new LambdaQueryWrapper<>();
|
||||
queryWrapper.eq(BdAwards::getPkCountry, SecurityUtils.getPkCountry());
|
||||
queryWrapper.orderByAsc(BdAwards::getAwardsValue);
|
||||
List<BdAwards> list = awardsService.list(queryWrapper);
|
||||
List<BdAwards> list = iBdAwardsService.list(queryWrapper);
|
||||
List<BdAwardsExt> listExt = new ArrayList<>();
|
||||
for (BdAwards ba : list) {
|
||||
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)
|
||||
@GetMapping("/coachBonusList")
|
||||
|
@ -185,7 +161,7 @@ public class BdAwardsController extends BaseController {
|
|||
queryWrapper.eq(BdAwards::getPkCountry, SecurityUtils.getPkCountry());
|
||||
queryWrapper.eq(BdAwards::getSystemType, ESystemType.DEFAULT.getValue());
|
||||
queryWrapper.orderByAsc(BdAwards::getAwardsValue);
|
||||
List<BdAwards> list = awardsService.list(queryWrapper);
|
||||
List<BdAwards> list = iBdAwardsService.list(queryWrapper);
|
||||
List<BdAwardsExt> listExt = new ArrayList<>();
|
||||
for (BdAwards ba : list) {
|
||||
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)
|
||||
@GetMapping("/integralList")
|
||||
|
@ -213,7 +185,7 @@ public class BdAwardsController extends BaseController {
|
|||
queryWrapper.eq(BdAwards::getPkCountry, SecurityUtils.getPkCountry());
|
||||
queryWrapper.eq(BdAwards::getSystemType, ESystemType.DEFAULT.getValue());
|
||||
queryWrapper.orderByAsc(BdAwards::getAwardsValue);
|
||||
List<BdAwards> list = awardsService.list(queryWrapper);
|
||||
List<BdAwards> list = iBdAwardsService.list(queryWrapper);
|
||||
List<BdAwardsExt> listExt = new ArrayList<>();
|
||||
if (CollectionUtil.isNotEmpty(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)
|
||||
@PostMapping("/generate")
|
||||
|
@ -246,25 +214,10 @@ public class BdAwardsController extends BaseController {
|
|||
if (StringUtils.isEmpty(awards.getAwardsName())) {
|
||||
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())) {
|
||||
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.setPkCreator(SecurityUtils.getUserId());
|
||||
awards.setCreationTime(new Date());
|
||||
|
@ -273,7 +226,7 @@ public class BdAwardsController extends BaseController {
|
|||
queryWrapper.eq(BdAwards::getPkCountry, SecurityUtils.getPkCountry());
|
||||
queryWrapper.eq(BdAwards::getAwardsValue, awards.getAwardsValue());
|
||||
queryWrapper.eq(BdAwards::getSystemType, ESystemType.DEFAULT.getValue());
|
||||
List<BdAwards> list1 = awardsService.list(queryWrapper);
|
||||
List<BdAwards> list1 = iBdAwardsService.list(queryWrapper);
|
||||
if (CollectionUtil.isNotEmpty(list1)) {
|
||||
return AjaxResult.error((ConfigMsgConstants.DATA_REPEAT));
|
||||
}
|
||||
|
@ -283,17 +236,13 @@ public class BdAwardsController extends BaseController {
|
|||
awards.setPkTransaction(pkTransaction.getData());
|
||||
redisService.deleteObjectByKey(CacheConstants.BD_AWARDS + pkCountry);
|
||||
awards.setSystemType(ESystemType.DEFAULT.getValue());
|
||||
awardsService.save(awards);
|
||||
iBdAwardsService.save(awards);
|
||||
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)
|
||||
@PostMapping("/update")
|
||||
|
@ -305,38 +254,23 @@ public class BdAwardsController extends BaseController {
|
|||
if (StringUtils.isEmpty(awards.getAwardsName())) {
|
||||
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())) {
|
||||
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<>();
|
||||
queryWrapper.eq(BdAwards::getPkCountry, SecurityUtils.getPkCountry());
|
||||
queryWrapper.eq(BdAwards::getAwardsValue, awards.getAwardsValue());
|
||||
queryWrapper.eq(BdAwards::getSystemType, ESystemType.DEFAULT.getValue());
|
||||
queryWrapper.ne(BdAwards::getPkId, awards.getPkId());
|
||||
List<BdAwards> list1 = awardsService.list(queryWrapper);
|
||||
List<BdAwards> list1 = iBdAwardsService.list(queryWrapper);
|
||||
if (CollectionUtil.isNotEmpty(list1)) {
|
||||
return AjaxResult.error(TransactionUtils.getContent(ConfigMsgConstants.DATA_REPEAT));
|
||||
}
|
||||
|
||||
//字段翻译保存到数据库
|
||||
if (null != awards.getPkTransaction()) {
|
||||
R<Boolean> b = iTransactionServiceApi.updateTransaction(pkCountry,
|
||||
iTransactionServiceApi.updateTransaction(pkCountry,
|
||||
awards.getAwardsName(), awards.getPkTransaction(), true);
|
||||
} else {
|
||||
R<Integer> pkTransaction = iTransactionServiceApi.createTransaction(pkCountry, ETransactionKey.AWARDS,
|
||||
|
@ -346,15 +280,11 @@ public class BdAwardsController extends BaseController {
|
|||
awards.setPkModified(SecurityUtils.getUserId());
|
||||
awards.setModifiedTime(new Date());
|
||||
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)
|
||||
@PostMapping("/updateState")
|
||||
|
@ -370,17 +300,13 @@ public class BdAwardsController extends BaseController {
|
|||
updateWrapper.eq(BdAwards::getPkId, awards.getPkId());
|
||||
updateWrapper.set(BdAwards::getPkModified, SecurityUtils.getUserId());
|
||||
updateWrapper.set(BdAwards::getModifiedTime, new Date());
|
||||
awardsService.update(updateWrapper);
|
||||
iBdAwardsService.update(updateWrapper);
|
||||
redisService.deleteObjectByKey(CacheConstants.BD_AWARDS + SecurityUtils.getPkCountry());
|
||||
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)
|
||||
@PostMapping("/updateCoachBonus")
|
||||
|
@ -388,7 +314,7 @@ public class BdAwardsController extends BaseController {
|
|||
List<BdAwards> awardsList = new ArrayList<>();
|
||||
if (CollectionUtil.isNotEmpty(awardsExt.getAwardsList())) {
|
||||
for (BdAwards awards : awardsExt.getAwardsList()) {
|
||||
BdAwards awardsOld = awardsService.getById(awards.getPkId());
|
||||
BdAwards awardsOld = iBdAwardsService.getById(awards.getPkId());
|
||||
if (StringUtils.isNull(awards.getPkId())) {
|
||||
return AjaxResult.error(TransactionUtils.getContent(ConfigMsgConstants.PK_GRADE_AWARDS_NOT_NULL));
|
||||
}
|
||||
|
@ -411,18 +337,14 @@ public class BdAwardsController extends BaseController {
|
|||
}
|
||||
awardsExt.setAwardsList(awardsList);
|
||||
redisService.deleteObjectByKey(CacheConstants.BD_AWARDS_COACH + SecurityUtils.getPkCountry());
|
||||
return AjaxResult.success(awardsService.updateAwards(awardsExt));
|
||||
return AjaxResult.success(iBdAwardsService.updateAwards(awardsExt));
|
||||
} else {
|
||||
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)
|
||||
@PostMapping("/updategLobalIntegral")
|
||||
|
@ -440,18 +362,14 @@ public class BdAwardsController extends BaseController {
|
|||
awards.setPkModified(SecurityUtils.getUserId());
|
||||
awards.setModifiedTime(new Date());
|
||||
}
|
||||
return AjaxResult.success(awardsService.updateLobalIntegral(awardsExt));
|
||||
return AjaxResult.success(iBdAwardsService.updateLobalIntegral(awardsExt));
|
||||
} else {
|
||||
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)
|
||||
@PostMapping("/updategCarAwardPoints")
|
||||
|
@ -469,7 +387,7 @@ public class BdAwardsController extends BaseController {
|
|||
awards.setPkModified(SecurityUtils.getUserId());
|
||||
awards.setModifiedTime(new Date());
|
||||
}
|
||||
return AjaxResult.success(awardsService.updateGlobalIntegral(awardsExt));
|
||||
return AjaxResult.success(iBdAwardsService.updateGlobalIntegral(awardsExt));
|
||||
} else {
|
||||
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)
|
||||
@GetMapping("/getOne/{pkId}")
|
||||
public AjaxResult getOne(@PathVariable Long pkId) {
|
||||
BdAwards awards = awardsService.getById(pkId);
|
||||
return AjaxResult.success(awards);
|
||||
return AjaxResult.success(iBdAwardsService.getById(pkId));
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @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)
|
||||
@DeleteMapping("/{pkId}")
|
||||
|
@ -508,11 +417,11 @@ public class BdAwardsController extends BaseController {
|
|||
updateWrapper.set(BdAwards::getModifiedTime, new Date());
|
||||
redisService.deleteObjectByKey(CacheConstants.BD_AWARDS + 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) {
|
||||
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.config.BdGrade;
|
||||
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.ext.BdGradeScopeExt;
|
||||
import com.hzs.common.security.utils.SecurityUtils;
|
||||
|
@ -38,9 +37,6 @@ import java.util.List;
|
|||
|
||||
/**
|
||||
* 等级配置表 前端控制器
|
||||
*
|
||||
* @author zhangjing
|
||||
* @since 2022-09-08
|
||||
*/
|
||||
@Slf4j
|
||||
@RestController
|
||||
|
@ -57,13 +53,8 @@ public class BdGradeController extends BaseController {
|
|||
private IBdAwardsService awardsService;
|
||||
@Autowired
|
||||
private IBdNoticeService noticeService;
|
||||
|
||||
private RedisService redisService;
|
||||
|
||||
@Autowired
|
||||
public void setRedisService(RedisService redisService) {
|
||||
this.redisService = redisService;
|
||||
}
|
||||
private RedisService redisService;
|
||||
|
||||
/**
|
||||
* @description: 查询等级配置列表
|
||||
|
@ -362,18 +353,6 @@ public class BdGradeController extends BaseController {
|
|||
@Log(module = EOperationModule.LEVEL_CONFIG, business = EOperationBusiness.GRADE, method = EOperationMethod.UPDATE)
|
||||
@PostMapping("/updateExpand")
|
||||
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())) {
|
||||
for (BdGrade bg : gradeExt.getExpandList()) {
|
||||
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.service.RedisService;
|
||||
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.domain.AjaxResult;
|
||||
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.web.bind.annotation.*;
|
||||
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 新零售奖衔配置前端控制器
|
||||
*
|
||||
* @author zhangjing
|
||||
* @since 2022-09-08
|
||||
*/
|
||||
@Slf4j
|
||||
@RestController
|
||||
|
@ -44,27 +39,18 @@ import java.util.List;
|
|||
public class BdRetailAwardsController extends BaseController {
|
||||
|
||||
@Autowired
|
||||
private IBdAwardsService awardsService;
|
||||
private IBdAwardsService iBdAwardsService;
|
||||
@Autowired
|
||||
private IBdNoticeService noticeService;
|
||||
private IBdNoticeService iBdNoticeService;
|
||||
@Autowired
|
||||
private RedisService redisService;
|
||||
|
||||
@DubboReference
|
||||
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)
|
||||
@GetMapping("/list")
|
||||
|
@ -77,15 +63,15 @@ public class BdRetailAwardsController extends BaseController {
|
|||
}
|
||||
queryWrapper.orderByAsc(BdAwards::getAwardsValue);
|
||||
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)));
|
||||
if (CollectionUtil.isNotEmpty(listExt)) {
|
||||
for (BdAwardsExt ae : listExt) {
|
||||
if (StringUtils.isNotNull(ae.getPkCheckAwardsLeft())) {
|
||||
ae.setPkCheckAwardsLeft(noticeService.getAwardsTranslateValue(ae.getPkCheckAwardsLeft(), null));
|
||||
ae.setPkCheckAwardsLeft(iBdNoticeService.getAwardsTranslateValue(ae.getPkCheckAwardsLeft(), null));
|
||||
}
|
||||
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)
|
||||
@GetMapping("/awardsList")
|
||||
|
@ -136,7 +88,7 @@ public class BdRetailAwardsController extends BaseController {
|
|||
queryWrapper.eq(BdAwards::getPkCountry, SecurityUtils.getPkCountry());
|
||||
// 原接口,默认为会员系统
|
||||
queryWrapper.orderByAsc(BdAwards::getAwardsValue);
|
||||
List<BdAwards> list = awardsService.list(queryWrapper);
|
||||
List<BdAwards> list = iBdAwardsService.list(queryWrapper);
|
||||
List<BdAwardsExt> listExt = new ArrayList<>();
|
||||
for (BdAwards ba : list) {
|
||||
BdAwardsExt baExt = new BdAwardsExt();
|
||||
|
@ -148,13 +100,8 @@ public class BdRetailAwardsController extends BaseController {
|
|||
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)
|
||||
@PostMapping("/generate")
|
||||
|
@ -166,25 +113,10 @@ public class BdRetailAwardsController extends BaseController {
|
|||
if (StringUtils.isEmpty(awards.getAwardsName())) {
|
||||
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())) {
|
||||
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.setPkCreator(SecurityUtils.getUserId());
|
||||
awards.setCreationTime(new Date());
|
||||
|
@ -192,7 +124,7 @@ public class BdRetailAwardsController extends BaseController {
|
|||
LambdaQueryWrapper<BdAwards> queryWrapper = new LambdaQueryWrapper<>();
|
||||
queryWrapper.eq(BdAwards::getPkCountry, SecurityUtils.getPkCountry());
|
||||
queryWrapper.eq(BdAwards::getAwardsValue, awards.getAwardsValue());
|
||||
List<BdAwards> list1 = awardsService.list(queryWrapper);
|
||||
List<BdAwards> list1 = iBdAwardsService.list(queryWrapper);
|
||||
if (CollectionUtil.isNotEmpty(list1)) {
|
||||
return AjaxResult.error((ConfigMsgConstants.DATA_REPEAT));
|
||||
}
|
||||
|
@ -201,17 +133,12 @@ public class BdRetailAwardsController extends BaseController {
|
|||
awards.getAwardsName(), EYesNo.YES, EYesNo.NO);
|
||||
awards.setPkTransaction(pkTransaction.getData());
|
||||
redisService.deleteObjectByKey(CacheConstants.BD_AWARDS + pkCountry);
|
||||
awardsService.save(awards);
|
||||
iBdAwardsService.save(awards);
|
||||
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)
|
||||
@PostMapping("/update")
|
||||
|
@ -223,37 +150,22 @@ public class BdRetailAwardsController extends BaseController {
|
|||
if (StringUtils.isEmpty(awards.getAwardsName())) {
|
||||
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())) {
|
||||
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<>();
|
||||
queryWrapper.eq(BdAwards::getPkCountry, SecurityUtils.getPkCountry());
|
||||
queryWrapper.eq(BdAwards::getAwardsValue, awards.getAwardsValue());
|
||||
queryWrapper.ne(BdAwards::getPkId, awards.getPkId());
|
||||
List<BdAwards> list1 = awardsService.list(queryWrapper);
|
||||
List<BdAwards> list1 = iBdAwardsService.list(queryWrapper);
|
||||
if (CollectionUtil.isNotEmpty(list1)) {
|
||||
return AjaxResult.error(TransactionUtils.getContent(ConfigMsgConstants.DATA_REPEAT));
|
||||
}
|
||||
|
||||
//字段翻译保存到数据库
|
||||
if (null != awards.getPkTransaction()) {
|
||||
R<Boolean> b = iTransactionServiceApi.updateTransaction(pkCountry,
|
||||
iTransactionServiceApi.updateTransaction(pkCountry,
|
||||
awards.getAwardsName(), awards.getPkTransaction(), true);
|
||||
} else {
|
||||
R<Integer> pkTransaction = iTransactionServiceApi.createTransaction(pkCountry, ETransactionKey.AWARDS,
|
||||
|
@ -263,15 +175,11 @@ public class BdRetailAwardsController extends BaseController {
|
|||
awards.setPkModified(SecurityUtils.getUserId());
|
||||
awards.setModifiedTime(new Date());
|
||||
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)
|
||||
@PostMapping("/updateState")
|
||||
|
@ -287,32 +195,23 @@ public class BdRetailAwardsController extends BaseController {
|
|||
updateWrapper.eq(BdAwards::getPkId, awards.getPkId());
|
||||
updateWrapper.set(BdAwards::getPkModified, SecurityUtils.getUserId());
|
||||
updateWrapper.set(BdAwards::getModifiedTime, new Date());
|
||||
awardsService.update(updateWrapper);
|
||||
iBdAwardsService.update(updateWrapper);
|
||||
redisService.deleteObjectByKey(CacheConstants.BD_AWARDS + SecurityUtils.getPkCountry());
|
||||
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)
|
||||
@GetMapping("/getOne/{pkId}")
|
||||
public AjaxResult getOne(@PathVariable Long pkId) {
|
||||
BdAwards awards = awardsService.getById(pkId);
|
||||
return AjaxResult.success(awards);
|
||||
return AjaxResult.success(iBdAwardsService.getById(pkId));
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @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)
|
||||
@DeleteMapping("/{pkId}")
|
||||
|
@ -324,11 +223,11 @@ public class BdRetailAwardsController extends BaseController {
|
|||
updateWrapper.set(BdAwards::getModifiedTime, new Date());
|
||||
redisService.deleteObjectByKey(CacheConstants.BD_AWARDS + 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) {
|
||||
return AjaxResult.error(TransactionUtils.getContent(ConfigMsgConstants.ENABLE_STATE_NOT_DELETE));
|
||||
}
|
||||
return AjaxResult.success(awardsService.update(updateWrapper));
|
||||
return AjaxResult.success(iBdAwardsService.update(updateWrapper));
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -1,17 +1,11 @@
|
|||
package com.hzs.system.config.mapper;
|
||||
|
||||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.hzs.common.domain.system.config.BdBonusCloud;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* 云代配置
|
||||
Mapper 接口
|
||||
* </p>
|
||||
*
|
||||
* @author zhangjing
|
||||
* @since 2022-11-01
|
||||
* 云代配置
|
||||
* Mapper 接口
|
||||
*/
|
||||
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;
|
||||
|
||||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.hzs.common.domain.system.config.BdBonusHiPink;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* 嗨粉直推奖励配置 Mapper 接口
|
||||
* </p>
|
||||
*
|
||||
* @author zhangjing
|
||||
* @since 2022-11-03
|
||||
*/
|
||||
public interface BdBonusHiPinkMapper extends BaseMapper<BdBonusHiPink> {
|
||||
|
||||
|
|
|
@ -36,18 +36,12 @@ public class BonusItemsServiceProvider implements IBonusItemsServiceApi {
|
|||
@Autowired
|
||||
private IBdBonusDirectLoopService bdBonusDirectLoopService;
|
||||
|
||||
@Autowired
|
||||
private IBdBonusHiPinkService bdBonusHiPinkService;
|
||||
|
||||
@Autowired
|
||||
private IBdBonusDirectService bdBonusDirectService;
|
||||
|
||||
@Autowired
|
||||
private IBdBonusDifferenceService bdBonusDifferenceService;
|
||||
|
||||
@Autowired
|
||||
private IBdBonusExpandService bdBonusExpandService;
|
||||
|
||||
@Autowired
|
||||
private IBdGradeService gradeService;
|
||||
|
||||
|
@ -69,9 +63,6 @@ public class BonusItemsServiceProvider implements IBonusItemsServiceApi {
|
|||
@Autowired
|
||||
private IBdRepoDirectPushService bdRepoDirectPushService;
|
||||
|
||||
@Autowired
|
||||
private IBdBonusCloudService bdBonusCloudService;
|
||||
|
||||
@Override
|
||||
public R<List<BdBonusItemsExt>> queryBonusItems(Integer pkCountry) {
|
||||
return R.ok(bonusItemsService.queryBonusItems(pkCountry));
|
||||
|
@ -103,12 +94,8 @@ public class BonusItemsServiceProvider implements IBonusItemsServiceApi {
|
|||
bonusConfigDTO.setBonusDirectLoopDtoMap(getBonusLoopConfig());
|
||||
// 查询直推奖励配置
|
||||
bonusConfigDTO.setBonusDirectDtoMap(getBonusDirectConfig());
|
||||
// 嗨粉直推奖励配置
|
||||
bonusConfigDTO.setBonusHiPinkDtoMap(getBonusHiPinkMap());
|
||||
// 一次性补差
|
||||
bonusConfigDTO.setBonusDifferenceDtoMap(getBonusDifferenceConfig());
|
||||
// 奖金4-N配置
|
||||
bonusConfigDTO.setBonusExpandMap(getBonusExpandConfig());
|
||||
// 复购直推配置
|
||||
bonusConfigDTO.setBonusRepurchasePushMap(getRepurchasePushMap());
|
||||
// 拓展奖跟辅导奖需要查询所有国家的配置
|
||||
|
@ -124,8 +111,6 @@ public class BonusItemsServiceProvider implements IBonusItemsServiceApi {
|
|||
bonusConfigDTO.setBonusDeductsMap(getBonusDeductConfig());
|
||||
// 报单服务费
|
||||
bonusConfigDTO.setBonusServiceMap(getBonusServiceConfig());
|
||||
// 云代奖金
|
||||
bonusConfigDTO.setBonusCloudMap(getBonusCloudConfig());
|
||||
return R.ok(bonusConfigDTO);
|
||||
}
|
||||
|
||||
|
@ -149,25 +134,6 @@ public class BonusItemsServiceProvider implements IBonusItemsServiceApi {
|
|||
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;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 拓展奖拓展的次数 国家作为键
|
||||
*/
|
||||
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;
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取每个国家奖金项对应的扣项
|
||||
*/
|
||||
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;
|
||||
|
||||
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
import com.hzs.common.domain.system.config.BdBonusCloud;
|
||||
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> {
|
||||
|
||||
/*
|
||||
* @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);
|
||||
|
||||
/**
|
||||
* @description: 修改云代配置
|
||||
* @author: zhang jing
|
||||
* @date: 2022/11/1 17:13
|
||||
* @param: [bonusCloudExt]
|
||||
* @return: boolean
|
||||
* 修改云代配置
|
||||
**/
|
||||
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;
|
||||
|
||||
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
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> {
|
||||
|
||||
/**
|
||||
* @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;
|
||||
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import com.hzs.common.core.utils.StringUtils;
|
||||
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 java.util.Date;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* 云代配置
|
||||
服务实现类
|
||||
* </p>
|
||||
*
|
||||
* @author zhangjing
|
||||
* @since 2022-11-01
|
||||
* 云代配置
|
||||
* 服务实现类
|
||||
*/
|
||||
@Service
|
||||
public class BdBonusCloudServiceImpl extends ServiceImpl<BdBonusCloudMapper, BdBonusCloud> implements IBdBonusCloudService {
|
||||
|
||||
@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) {
|
||||
for(BdBonusCloud bonusCloud:bonusCloudExt.getBonusCloudList()){
|
||||
for (BdBonusCloud bonusCloud : bonusCloudExt.getBonusCloudList()) {
|
||||
bonusCloud.setPkCountry(SecurityUtils.getPkCountry());
|
||||
if(StringUtils.isNotNull(bonusCloud.getPkId())){
|
||||
if (StringUtils.isNotNull(bonusCloud.getPkId())) {
|
||||
bonusCloud.setPkModified(SecurityUtils.getUserId());
|
||||
bonusCloud.setModifiedTime(new Date());
|
||||
baseMapper.updateById(bonusCloud);
|
||||
}else{
|
||||
} else {
|
||||
bonusCloud.setPkCreator(SecurityUtils.getUserId());
|
||||
bonusCloud.setCreationTime(new Date());
|
||||
baseMapper.insert(bonusCloud);
|
||||
|
@ -58,7 +37,7 @@ public class BdBonusCloudServiceImpl extends ServiceImpl<BdBonusCloudMapper, BdB
|
|||
|
||||
@Override
|
||||
public boolean updateBonusCloud(BdBonusCloudExt bonusCloudExt) {
|
||||
for(BdBonusCloud bonusCloud:bonusCloudExt.getBonusCloudList()){
|
||||
for (BdBonusCloud bonusCloud : bonusCloudExt.getBonusCloudList()) {
|
||||
bonusCloud.setPkCountry(SecurityUtils.getPkCountry());
|
||||
bonusCloud.setPkModified(SecurityUtils.getUserId());
|
||||
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;
|
||||
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import com.hzs.common.domain.system.config.BdBonusHiPink;
|
||||
import com.hzs.system.config.mapper.BdBonusHiPinkMapper;
|
||||
import com.hzs.system.config.service.IBdBonusHiPinkService;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* 嗨粉直推奖励配置 服务实现类
|
||||
* </p>
|
||||
*
|
||||
* @author zhangjing
|
||||
* @since 2022-11-03
|
||||
*/
|
||||
@Service
|
||||
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.enums.*;
|
||||
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.BdGradeScope;
|
||||
import com.hzs.common.domain.system.config.ext.BdBonusExpandExt;
|
||||
import com.hzs.common.domain.system.config.ext.BdGradeExt;
|
||||
import com.hzs.common.security.utils.SecurityUtils;
|
||||
import com.hzs.system.base.ITransactionServiceApi;
|
||||
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.IBdGradeService;
|
||||
import org.apache.dubbo.config.annotation.DubboReference;
|
||||
|
@ -38,8 +35,6 @@ public class BdGradeServiceImpl extends ServiceImpl<BdGradeMapper, BdGrade> impl
|
|||
@Autowired
|
||||
private IBdGradeScopeService iBdGradeScopeService;
|
||||
@Autowired
|
||||
private IBdBonusExpandService iBdBonusExpandService;
|
||||
@Autowired
|
||||
private RedisService redisService;
|
||||
|
||||
@DubboReference
|
||||
|
@ -177,19 +172,6 @@ public class BdGradeServiceImpl extends ServiceImpl<BdGradeMapper, BdGrade> impl
|
|||
@Override
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
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()) {
|
||||
bg.setPkCountry(SecurityUtils.getPkCountry());
|
||||
|
|
|
@ -2,28 +2,4 @@
|
|||
<!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">
|
||||
|
||||
<!-- 通用查询映射结果 -->
|
||||
<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>
|
||||
|
|
|
@ -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>
|
|
@ -2,8 +2,6 @@ package com.hzs.common.core.constant;
|
|||
|
||||
/**
|
||||
* 缓存的统一key 常量
|
||||
*
|
||||
* @author hzs
|
||||
*/
|
||||
public class CacheConstants {
|
||||
|
||||
|
|
File diff suppressed because it is too large
Load Diff
|
@ -1,8 +1,6 @@
|
|||
package com.hzs.common.domain.system.config;
|
||||
|
||||
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.constant.EnumsPrefixConstants;
|
||||
import com.hzs.common.core.web.domain.BaseEntity;
|
||||
|
@ -31,7 +29,6 @@ public class BdAwards extends BaseEntity {
|
|||
/**
|
||||
* 奖衔名称
|
||||
*/
|
||||
@Excel(name = "奖衔名称", sort = 1)
|
||||
@TableField("AWARDS_NAME")
|
||||
private String awardsName;
|
||||
/**
|
||||
|
@ -55,7 +52,6 @@ public class BdAwards extends BaseEntity {
|
|||
/**
|
||||
* 小区考核PV
|
||||
*/
|
||||
@Excel(name = "小区业绩PV", sort = 2)
|
||||
@TableField("COMMUNITY_CHECK")
|
||||
private BigDecimal communityCheck;
|
||||
|
||||
|
@ -68,21 +64,18 @@ public class BdAwards extends BaseEntity {
|
|||
/**
|
||||
* 复购考核
|
||||
*/
|
||||
@Excel(name = "复购考核PV", sort = 3)
|
||||
@TableField("PURCHASE_CHECK")
|
||||
private BigDecimal purchaseCheck;
|
||||
|
||||
/**
|
||||
* 小区考核结束PV
|
||||
*/
|
||||
@Excel(name = "小区业绩结束PV", sort = 2)
|
||||
@TableField("COMMUNITY_CHECK_END")
|
||||
private BigDecimal communityCheckEnd;
|
||||
|
||||
/**
|
||||
* 分红考核
|
||||
*/
|
||||
@Excel(name = "分红考核BV", sort = 4)
|
||||
@TableField("SHARE_CHECK")
|
||||
private BigDecimal shareCheck;
|
||||
|
||||
|
@ -102,7 +95,6 @@ public class BdAwards extends BaseEntity {
|
|||
* 左区奖衔
|
||||
*/
|
||||
@Transaction(transactionKey = EnumsPrefixConstants.KEY_AWARD)
|
||||
@Excel(name = "左区奖衔", sort = 5)
|
||||
@TableField(value = "PK_CHECK_AWARDS_LEFT", jdbcType = JdbcType.NUMERIC, updateStrategy = FieldStrategy.IGNORED)
|
||||
private Integer pkCheckAwardsLeft;
|
||||
|
||||
|
@ -110,7 +102,6 @@ public class BdAwards extends BaseEntity {
|
|||
* 右区奖衔
|
||||
*/
|
||||
@Transaction(transactionKey = EnumsPrefixConstants.KEY_AWARD)
|
||||
@Excel(name = "右区奖衔", sort = 6)
|
||||
@TableField(value = "PK_CHECK_AWARDS_RIGHT", jdbcType = JdbcType.NUMERIC, updateStrategy = FieldStrategy.IGNORED)
|
||||
private Integer pkCheckAwardsRight;
|
||||
|
||||
|
|
|
@ -14,13 +14,7 @@ import lombok.experimental.Accessors;
|
|||
import java.math.BigDecimal;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* 云代配置
|
||||
|
||||
* </p>
|
||||
*
|
||||
* @author zhangjing
|
||||
* @since 2022-11-01
|
||||
* 云代配置
|
||||
*/
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
|
|
|
@ -1,42 +0,0 @@
|
|||
package com.hzs.common.domain.system.config;
|
||||
|
||||
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 lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import lombok.experimental.Accessors;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
|
||||
/**
|
||||
* 奖金4—N配置
|
||||
*/
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@Accessors(chain = true)
|
||||
@TableName("BD_BONUS_EXPAND")
|
||||
@KeySequence("BD_BONUS_EXPAND_SEQ")
|
||||
public class BdBonusExpand extends BaseEntity {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@TableId("PK_ID")
|
||||
private BigDecimal pkId;
|
||||
|
||||
/**
|
||||
* 拓展次数
|
||||
*/
|
||||
@TableField("EXPAND_NUMBER")
|
||||
private Integer expandNumber;
|
||||
|
||||
/**
|
||||
* 拓展比例
|
||||
*/
|
||||
@TableField("EXPAND_RATIO")
|
||||
private BigDecimal expandRatio;
|
||||
|
||||
|
||||
}
|
|
@ -12,12 +12,7 @@ import lombok.experimental.Accessors;
|
|||
import java.math.BigDecimal;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* 嗨粉直推奖励配置
|
||||
* </p>
|
||||
*
|
||||
* @author zhangjing
|
||||
* @since 2022-11-03
|
||||
*/
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
|
|
|
@ -1,15 +1,10 @@
|
|||
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.Transaction;
|
||||
import com.hzs.common.core.constant.EnumsPrefixConstants;
|
||||
import com.hzs.common.domain.system.config.BdAwards;
|
||||
import com.hzs.common.domain.system.config.BdAwardsDetail;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
|
@ -20,10 +15,10 @@ import java.util.List;
|
|||
public class BdAwardsExt extends BdAwards {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**
|
||||
* 关系类型名称
|
||||
*/
|
||||
@Excel(name = "考核", sort = 7)
|
||||
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.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.ext.BdGradeScopeExt;
|
||||
import lombok.Data;
|
||||
|
@ -12,12 +10,7 @@ import lombok.EqualsAndHashCode;
|
|||
import java.util.List;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* 等级配置表
|
||||
* </p>
|
||||
*
|
||||
* @author zhangjing
|
||||
* @since 2022-09-08
|
||||
*/
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@Data
|
||||
|
@ -38,29 +31,29 @@ public class BdGradeExt extends BdGrade {
|
|||
/**
|
||||
* 统计值名称 EStatisticalValue
|
||||
*/
|
||||
@Excel(name = "统计类型",sort = 2)
|
||||
@Excel(name = "统计类型", sort = 2)
|
||||
private String censusValueVal;
|
||||
/**
|
||||
* 注册权限 ERegistrationAuthority
|
||||
*/
|
||||
@Excel(name = "注册权限",sort = 4)
|
||||
@Excel(name = "注册权限", sort = 4)
|
||||
private String registerAuthorityVal;
|
||||
|
||||
/**
|
||||
* 奖衔权限
|
||||
*/
|
||||
@Excel(name = "真实奖衔",sort = 5)
|
||||
@Excel(name = "真实奖衔", sort = 5)
|
||||
private String pkAwardsVal;
|
||||
|
||||
/**
|
||||
* 等级范围(直推范围)
|
||||
*/
|
||||
private Integer gradeRang [];
|
||||
private Integer gradeRang[];
|
||||
|
||||
/**
|
||||
* 等级范围(直推范围)
|
||||
*/
|
||||
@Excel(name = "直推范围",sort = 6)
|
||||
@Excel(name = "直推范围", sort = 6)
|
||||
private String gradeRangVal;
|
||||
|
||||
/**
|
||||
|
@ -74,11 +67,6 @@ public class BdGradeExt extends BdGrade {
|
|||
*/
|
||||
private List<BdGrade> expandList;
|
||||
|
||||
/**
|
||||
* 奖金4—N配置拓展集合
|
||||
*/
|
||||
private List<BdBonusExpandExt> bonusExpands;
|
||||
|
||||
/**
|
||||
* 首购计算 EDealerYesNo
|
||||
*/
|
||||
|
@ -98,9 +86,4 @@ public class BdGradeExt extends BdGrade {
|
|||
*/
|
||||
private String repurchaseAssessVal;
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue