## 辅导收益添加小区月度新増业绩配置;

This commit is contained in:
cabbage 2025-05-23 11:26:47 +08:00
parent f32a51af1a
commit 140df30246
1 changed files with 44 additions and 100 deletions

View File

@ -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")
@ -77,15 +65,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));
} }
} }
} }
@ -93,11 +81,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")
@ -110,12 +94,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);
@ -123,11 +107,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")
@ -135,7 +115,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();
@ -148,19 +128,15 @@ 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")
public TableDataInfo coachBonusList(BdAwards awards) { public TableDataInfo coachBonusList() {
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();
@ -169,17 +145,14 @@ public class BdAwardsController extends BaseController {
baExt.setCoachAlgebra(ba.getCoachAlgebra()); baExt.setCoachAlgebra(ba.getCoachAlgebra());
baExt.setCoachRatio(ba.getCoachRatio()); baExt.setCoachRatio(ba.getCoachRatio());
baExt.setAbonusRatio(ba.getAbonusRatio()); baExt.setAbonusRatio(ba.getAbonusRatio());
baExt.setSmallAssess(ba.getSmallAssess());
listExt.add(baExt); listExt.add(baExt);
} }
return getDataTable(listExt); return getDataTable(listExt);
} }
/** /**
* @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")
@ -187,7 +160,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<>();
if (CollectionUtil.isNotEmpty(list)) { if (CollectionUtil.isNotEmpty(list)) {
for (BdAwards ba : list) { for (BdAwards ba : list) {
@ -204,11 +177,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,7 +215,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.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));
} }
@ -255,17 +224,12 @@ public class BdAwardsController 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")
@ -300,7 +264,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.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));
} }
@ -317,15 +281,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")
@ -341,17 +301,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")
@ -359,7 +315,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));
} }
@ -372,9 +328,13 @@ public class BdAwardsController extends BaseController {
if (StringUtils.isNull(awards.getAbonusRatio())) { if (StringUtils.isNull(awards.getAbonusRatio())) {
return AjaxResult.error(TransactionUtils.getContent(ConfigMsgConstants.ABONUS_RATIO_NOT_NULL)); return AjaxResult.error(TransactionUtils.getContent(ConfigMsgConstants.ABONUS_RATIO_NOT_NULL));
} }
if (StringUtils.isNull(awards.getSmallAssess())) {
return AjaxResult.error("小区月度新増业绩");
}
awardsOld.setCoachAlgebra(awards.getCoachAlgebra()); awardsOld.setCoachAlgebra(awards.getCoachAlgebra());
awardsOld.setCoachRatio(awards.getCoachRatio()); awardsOld.setCoachRatio(awards.getCoachRatio());
awardsOld.setAbonusRatio(awards.getAbonusRatio()); awardsOld.setAbonusRatio(awards.getAbonusRatio());
awardsOld.setSmallAssess(awards.getSmallAssess());
awardsOld.setPkCountry(SecurityUtils.getPkCountry()); awardsOld.setPkCountry(SecurityUtils.getPkCountry());
awardsOld.setPkModified(SecurityUtils.getUserId()); awardsOld.setPkModified(SecurityUtils.getUserId());
awardsOld.setModifiedTime(new Date()); awardsOld.setModifiedTime(new Date());
@ -382,18 +342,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")
@ -411,18 +367,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")
@ -440,7 +392,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();
} }
@ -448,26 +400,18 @@ 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); BdAwards awards = iBdAwardsService.getById(pkId);
return AjaxResult.success(awards); 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}")
@ -479,11 +423,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));
} }
} }