3
0
Fork 0

## 等级、复购级差添加到7级;

This commit is contained in:
cabbage 2025-07-08 14:26:46 +08:00
parent 96744abc37
commit 3bec39e68a
16 changed files with 408 additions and 672 deletions

View File

@ -9,12 +9,7 @@ import org.apache.ibatis.annotations.Param;
import java.util.List; import java.util.List;
/** /**
* <p>
* 公告表 Mapper 接口 * 公告表 Mapper 接口
* </p>
*
* @author hzs
* @since 2022-08-09
*/ */
public interface BdNoticeMapper extends BaseMapper<BdNotice> { public interface BdNoticeMapper extends BaseMapper<BdNotice> {
@ -26,7 +21,6 @@ public interface BdNoticeMapper extends BaseMapper<BdNotice> {
*/ */
List<BdNotice> getMemberNotice(BdNoticeVO noticeVO); List<BdNotice> getMemberNotice(BdNoticeVO noticeVO);
/** /**
* 查询后台公告列表信息 * 查询后台公告列表信息
* *
@ -35,7 +29,6 @@ public interface BdNoticeMapper extends BaseMapper<BdNotice> {
*/ */
List<BdNotice> getAdminNotice(BdNoticeVO noticeVO); List<BdNotice> getAdminNotice(BdNoticeVO noticeVO);
/** /**
* 后台首页显示 * 后台首页显示
* *
@ -44,15 +37,6 @@ public interface BdNoticeMapper extends BaseMapper<BdNotice> {
*/ */
List<BdNotice> getAdminIndexNotice(BdNoticeVO noticeVO); List<BdNotice> getAdminIndexNotice(BdNoticeVO noticeVO);
/**
* 根据 ID删除公告信息
*
* @param notice 参数
* @return Boolean
*/
Integer deleteNoticeById(BdNotice notice);
/** /**
* 会员首页显示公告 * 会员首页显示公告
* *
@ -69,7 +53,6 @@ public interface BdNoticeMapper extends BaseMapper<BdNotice> {
*/ */
List<BdNoticeExt> showIndexMailNotice(BdNoticeVO noticeVO); List<BdNoticeExt> showIndexMailNotice(BdNoticeVO noticeVO);
/** /**
* 会员端弹窗显示 * 会员端弹窗显示
* *
@ -78,7 +61,6 @@ public interface BdNoticeMapper extends BaseMapper<BdNotice> {
*/ */
List<BdNotice> showIndexPopScreen(BdNoticeVO noticeVO); List<BdNotice> showIndexPopScreen(BdNoticeVO noticeVO);
/** /**
* 会员首页公告站内信总条数 * 会员首页公告站内信总条数
* *
@ -87,7 +69,6 @@ public interface BdNoticeMapper extends BaseMapper<BdNotice> {
*/ */
Integer showIndexNoticeCount(BdNoticeVO noticeVO); Integer showIndexNoticeCount(BdNoticeVO noticeVO);
/** /**
* 会员首页站内信的未读条数 * 会员首页站内信的未读条数
* *
@ -112,7 +93,6 @@ public interface BdNoticeMapper extends BaseMapper<BdNotice> {
*/ */
List<BdNoticeExt> selectAdminNotice(@Param("pkCountry") Integer pkCountry); List<BdNoticeExt> selectAdminNotice(@Param("pkCountry") Integer pkCountry);
/** /**
* 后台根据角色弹窗显示 * 后台根据角色弹窗显示
* *

View File

@ -13,9 +13,6 @@ import java.util.Map;
/** /**
* 公告表 服务类 * 公告表 服务类
*
* @author hzs
* @since 2022-08-09
*/ */
public interface IBdNoticeService extends IService<BdNotice> { public interface IBdNoticeService extends IService<BdNotice> {
@ -104,20 +101,12 @@ public interface IBdNoticeService extends IService<BdNotice> {
/** /**
* @description: 获取等级的翻译KEY值 * 获取等级的翻译KEY值
* @author: zhang jing
* @date: 2023/3/2 12:00
* @param: [pkId, gradeMap]
* @return: java.lang.Integer
**/ **/
Integer getGradeTranslateValue(Integer pkId, Map<Integer, BdGrade> gradeMap); Integer getGradeTranslateValue(Integer pkId, Map<Integer, BdGrade> gradeMap);
/** /**
* @description: 获取奖衔的翻译KEY值 * 获取奖衔的翻译KEY值
* @author: zhang jing
* @date: 2023/3/2 12:00
* @param: [pkId, awardsMap]
* @return: java.lang.Integer
**/ **/
Integer getAwardsTranslateValue(Integer pkId, Map<Integer, BdAwards> awardsMap); Integer getAwardsTranslateValue(Integer pkId, Map<Integer, BdAwards> awardsMap);
@ -154,7 +143,6 @@ public interface IBdNoticeService extends IService<BdNotice> {
*/ */
Object[] selectAdminNotice(Integer pkCountry); Object[] selectAdminNotice(Integer pkCountry);
/** /**
* 会员首页公告站内信总条数 * 会员首页公告站内信总条数
* *

View File

@ -22,7 +22,6 @@ import com.hzs.common.domain.system.ext.BdNoticeExt;
import com.hzs.common.domain.system.sys.SysRole; import com.hzs.common.domain.system.sys.SysRole;
import com.hzs.common.service.ITransactionCommonService; import com.hzs.common.service.ITransactionCommonService;
import com.hzs.system.base.mapper.BdNoticeMapper; import com.hzs.system.base.mapper.BdNoticeMapper;
import com.hzs.system.base.service.IBdMemberNoticeService;
import com.hzs.system.base.service.IBdNoticeDetailService; import com.hzs.system.base.service.IBdNoticeDetailService;
import com.hzs.system.base.service.IBdNoticeService; import com.hzs.system.base.service.IBdNoticeService;
import com.hzs.system.base.vo.*; import com.hzs.system.base.vo.*;
@ -43,19 +42,16 @@ import java.util.stream.Collectors;
/** /**
* 公告表 服务实现类 * 公告表 服务实现类
*
* @author hzs
* @since 2022-08-09
*/ */
@Service @Service
public class BdNoticeServiceImpl extends ServiceImpl<BdNoticeMapper, BdNotice> implements IBdNoticeService { public class BdNoticeServiceImpl extends ServiceImpl<BdNoticeMapper, BdNotice> implements IBdNoticeService {
@Autowired @Autowired
private ISysRoleService sysRoleService; private ISysRoleService iSysRoleService;
@Autowired @Autowired
private IBdGradeService gradeService; private IBdGradeService iBdGradeService;
@Autowired @Autowired
private IBdAwardsService awardsService; private IBdAwardsService iBdAwardsService;
@Autowired @Autowired
private IBdNoticeDetailService iBdNoticeDetailService; private IBdNoticeDetailService iBdNoticeDetailService;
@Autowired @Autowired
@ -64,7 +60,7 @@ public class BdNoticeServiceImpl extends ServiceImpl<BdNoticeMapper, BdNotice> i
private RabbitTemplate rabbitTemplate; private RabbitTemplate rabbitTemplate;
@DubboReference @DubboReference
IApprovalServiceApi approvalServiceApi; IApprovalServiceApi iApprovalServiceApi;
@Override @Override
@Transactional(rollbackFor = Exception.class) @Transactional(rollbackFor = Exception.class)
@ -93,7 +89,6 @@ public class BdNoticeServiceImpl extends ServiceImpl<BdNoticeMapper, BdNotice> i
return result; return result;
} }
@Override @Override
@Transactional(rollbackFor = Exception.class) @Transactional(rollbackFor = Exception.class)
public Boolean adminSaveNotice(NoticePetitionVO noticePetitionVO) { public Boolean adminSaveNotice(NoticePetitionVO noticePetitionVO) {
@ -127,7 +122,6 @@ public class BdNoticeServiceImpl extends ServiceImpl<BdNoticeMapper, BdNotice> i
return submitApproval(noticePetitionVO, batchCode); return submitApproval(noticePetitionVO, batchCode);
} }
/** /**
* 公告站内信 操作日志 * 公告站内信 操作日志
* *
@ -166,7 +160,7 @@ public class BdNoticeServiceImpl extends ServiceImpl<BdNoticeMapper, BdNotice> i
.signType(ESignType.getEnumByValue(noticePetitionVO.getSignType())).userIdList(noticePetitionVO.getUserIdList()) .signType(ESignType.getEnumByValue(noticePetitionVO.getSignType())).userIdList(noticePetitionVO.getUserIdList())
.sendIdList(noticePetitionVO.getSendIdList()) .sendIdList(noticePetitionVO.getSendIdList())
.remark(noticePetitionVO.getRemark()).build(); .remark(noticePetitionVO.getRemark()).build();
R<String> submit = approvalServiceApi.submit(approvalSubmitDTO, noticeVO.getLoginUser()); R<String> submit = iApprovalServiceApi.submit(approvalSubmitDTO, noticeVO.getLoginUser());
if (!submit.isSuccess()) { if (!submit.isSuccess()) {
throw new RuntimeException(submit.getMsg()); throw new RuntimeException(submit.getMsg());
} else { } else {
@ -200,9 +194,9 @@ public class BdNoticeServiceImpl extends ServiceImpl<BdNoticeMapper, BdNotice> i
if (CollUtil.isNotEmpty(noticeList)) { if (CollUtil.isNotEmpty(noticeList)) {
// 查询等级奖衔列表 // 查询等级奖衔列表
List<BdGrade> gradeList = gradeService.selectGradeAll(noticeVO.getPkCountry()); List<BdGrade> gradeList = iBdGradeService.selectGradeAll(noticeVO.getPkCountry());
Map<Integer, BdGrade> gradeMap = gradeList.stream().collect(Collectors.toMap(BdGrade::getPkId, val -> val)); Map<Integer, BdGrade> gradeMap = gradeList.stream().collect(Collectors.toMap(BdGrade::getPkId, val -> val));
List<BdAwards> awardsList = awardsService.getBdAwards(noticeVO.getPkCountry(), null); List<BdAwards> awardsList = iBdAwardsService.getBdAwards(noticeVO.getPkCountry(), null);
Map<Integer, BdAwards> awardsMap = awardsList.stream().collect(Collectors.toMap(BdAwards::getPkId, val -> val)); Map<Integer, BdAwards> awardsMap = awardsList.stream().collect(Collectors.toMap(BdAwards::getPkId, val -> val));
for (BdNotice notice : noticeList) { for (BdNotice notice : noticeList) {
@ -258,7 +252,6 @@ public class BdNoticeServiceImpl extends ServiceImpl<BdNoticeMapper, BdNotice> i
return new Object[]{noticeList, bdNoticeVOList}; return new Object[]{noticeList, bdNoticeVOList};
} }
@Override @Override
public Object[] showIndexNotice(BdNoticeVO noticeVO) { public Object[] showIndexNotice(BdNoticeVO noticeVO) {
List<BdNoticeExt> noticeList; List<BdNoticeExt> noticeList;
@ -271,7 +264,6 @@ public class BdNoticeServiceImpl extends ServiceImpl<BdNoticeMapper, BdNotice> i
} }
List<BdNoticeVO> bdNoticeVOList = BeanUtil.copyToList(noticeList, BdNoticeVO.class); List<BdNoticeVO> bdNoticeVOList = BeanUtil.copyToList(noticeList, BdNoticeVO.class);
return new Object[]{noticeList, bdNoticeVOList}; return new Object[]{noticeList, bdNoticeVOList};
} }
@Override @Override
@ -280,7 +272,6 @@ public class BdNoticeServiceImpl extends ServiceImpl<BdNoticeMapper, BdNotice> i
return BeanUtil.copyToList(noticeList, BdNoticeVO.class); return BeanUtil.copyToList(noticeList, BdNoticeVO.class);
} }
@Override @Override
public BdNoticeVO showIndexNoticeDetail(Long pkId, Integer pkCountry, Long pkMember) { public BdNoticeVO showIndexNoticeDetail(Long pkId, Integer pkCountry, Long pkMember) {
BdNoticeDetail noticeDetail = iBdNoticeDetailService.selectNoticeDetailByPkNoticeId(pkId, pkMember); BdNoticeDetail noticeDetail = iBdNoticeDetailService.selectNoticeDetailByPkNoticeId(pkId, pkMember);
@ -298,20 +289,12 @@ public class BdNoticeServiceImpl extends ServiceImpl<BdNoticeMapper, BdNotice> i
return changeTranslate(notice, null, null); return changeTranslate(notice, null, null);
} }
@Override @Override
public BdNoticeVO showNoticeDetail(Long pkId) { public BdNoticeVO showNoticeDetail(Long pkId) {
BdNotice notice = baseMapper.selectById(pkId); BdNotice notice = baseMapper.selectById(pkId);
return changeTranslate(notice, null, null); return changeTranslate(notice, null, null);
} }
/**
* 获取等级的翻译KEY值
*
* @param pkId ID
* @param gradeMap 等级map
* @return Integer
*/
@Override @Override
public Integer getGradeTranslateValue(Integer pkId, Map<Integer, BdGrade> gradeMap) { public Integer getGradeTranslateValue(Integer pkId, Map<Integer, BdGrade> gradeMap) {
BdGrade bdGrade; BdGrade bdGrade;
@ -321,20 +304,13 @@ public class BdNoticeServiceImpl extends ServiceImpl<BdNoticeMapper, BdNotice> i
return bdGrade.getPkTransaction(); return bdGrade.getPkTransaction();
} }
} }
bdGrade = gradeService.getBdGrade(pkId); bdGrade = iBdGradeService.getBdGrade(pkId);
if (null != bdGrade) { if (null != bdGrade) {
return bdGrade.getPkTransaction(); return bdGrade.getPkTransaction();
} }
return 0; return 0;
} }
/**
* 获取奖衔的翻译KEY值
*
* @param pkId ID
* @param awardsMap 奖衔map
* @return Integer
*/
@Override @Override
public Integer getAwardsTranslateValue(Integer pkId, Map<Integer, BdAwards> awardsMap) { public Integer getAwardsTranslateValue(Integer pkId, Map<Integer, BdAwards> awardsMap) {
BdAwards bdAwards; BdAwards bdAwards;
@ -344,7 +320,7 @@ public class BdNoticeServiceImpl extends ServiceImpl<BdNoticeMapper, BdNotice> i
return bdAwards.getPkTransaction(); return bdAwards.getPkTransaction();
} }
} }
bdAwards = awardsService.getBdAwardsOne(pkId); bdAwards = iBdAwardsService.getBdAwardsOne(pkId);
if (bdAwards != null) { if (bdAwards != null) {
return bdAwards.getPkTransaction(); return bdAwards.getPkTransaction();
} }
@ -410,7 +386,6 @@ public class BdNoticeServiceImpl extends ServiceImpl<BdNoticeMapper, BdNotice> i
return noticeAwardList; return noticeAwardList;
} }
/** /**
* 发布位置翻译 * 发布位置翻译
* *
@ -443,7 +418,7 @@ public class BdNoticeServiceImpl extends ServiceImpl<BdNoticeMapper, BdNotice> i
String[] roles = role.split(","); String[] roles = role.split(",");
List<String> roleNames = new ArrayList<>(); List<String> roleNames = new ArrayList<>();
for (String roleStr : roles) { for (String roleStr : roles) {
SysRole sysRole = sysRoleService.selectRoleById(Long.parseLong(roleStr)); SysRole sysRole = iSysRoleService.selectRoleById(Long.parseLong(roleStr));
if (null != sysRole) { if (null != sysRole) {
roleNames.add(sysRole.getRoleName()); roleNames.add(sysRole.getRoleName());
} }
@ -481,7 +456,6 @@ public class BdNoticeServiceImpl extends ServiceImpl<BdNoticeMapper, BdNotice> i
showVO.setNoticeList(bdNoticeVOList); showVO.setNoticeList(bdNoticeVOList);
showVO.setMonthTime(entry.getKey()); showVO.setMonthTime(entry.getKey());
bdNoticeAdminShowVOList.add(showVO); bdNoticeAdminShowVOList.add(showVO);
} }
} }
return new Object[]{bdNoticeExtList, bdNoticeAdminShowVOList}; return new Object[]{bdNoticeExtList, bdNoticeAdminShowVOList};
@ -497,7 +471,6 @@ public class BdNoticeServiceImpl extends ServiceImpl<BdNoticeMapper, BdNotice> i
return baseMapper.showIndexMailCount(noticeVO); return baseMapper.showIndexMailCount(noticeVO);
} }
@Override @Override
public List<BdNotice> selectAdminNoticeByRole(BdNoticeVO noticeVO) { public List<BdNotice> selectAdminNoticeByRole(BdNoticeVO noticeVO) {
return baseMapper.selectAdminNoticeByRole(noticeVO); return baseMapper.selectAdminNoticeByRole(noticeVO);

View File

@ -15,11 +15,7 @@ import java.util.Date;
import java.util.List; import java.util.List;
/** /**
* @Description: 公告VO * 公告VO
* @Author: ljc
* @Time: 2023/2/3 11:24
* @Classname: BdNoticeVO
* @Package_name: com.hzs.system.base.vo
*/ */
@Data @Data
@Builder @Builder

View File

@ -6,25 +6,25 @@ import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper; import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper;
import com.hzs.common.core.annotation.Log; import com.hzs.common.core.annotation.Log;
import com.hzs.common.core.constant.msg.ConfigMsgConstants; import com.hzs.common.core.constant.msg.ConfigMsgConstants;
import com.hzs.common.core.domain.R;
import com.hzs.common.core.enums.*; import com.hzs.common.core.enums.*;
import com.hzs.common.core.utils.StringUtils; import com.hzs.common.core.utils.StringUtils;
import com.hzs.common.core.utils.poi.ExcelUtil; 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;
import com.hzs.common.domain.system.config.BdAwards;
import com.hzs.common.domain.system.config.BdGrade;
import com.hzs.common.domain.system.config.BdRange; import com.hzs.common.domain.system.config.BdRange;
import com.hzs.common.domain.system.config.ext.BdRangeDetailsExt; import com.hzs.common.domain.system.config.ext.BdRangeDetailsExt;
import com.hzs.common.domain.system.config.ext.BdRangeExt; import com.hzs.common.domain.system.config.ext.BdRangeExt;
import com.hzs.common.security.utils.SecurityUtils; import com.hzs.common.security.utils.SecurityUtils;
import com.hzs.common.util.TransactionUtils; import com.hzs.common.util.TransactionUtils;
import com.hzs.system.base.ITransactionServiceApi; import com.hzs.system.config.service.IBdAwardsService;
import com.hzs.system.base.service.IBdNoticeService; import com.hzs.system.config.service.IBdGradeService;
import com.hzs.system.config.service.IBdRangeDetailsService; import com.hzs.system.config.service.IBdRangeDetailsService;
import com.hzs.system.config.service.IBdRangeService; import com.hzs.system.config.service.IBdRangeService;
import com.hzs.system.config.vo.RangeVo; import com.hzs.system.config.vo.RangeVo;
import lombok.extern.slf4j.Slf4j; import lombok.extern.slf4j.Slf4j;
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.*;
@ -35,9 +35,6 @@ import java.util.List;
/** /**
* 新零售极差配置 前端控制器 * 新零售极差配置 前端控制器
*
* @author zhangjing
* @since 2022-09-09
*/ */
@Slf4j @Slf4j
@RestController @RestController
@ -45,21 +42,16 @@ import java.util.List;
public class BdRetailRangeController extends BaseController { public class BdRetailRangeController extends BaseController {
@Autowired @Autowired
private IBdRangeService rangeService; private IBdRangeService iBdRangeService;
@Autowired @Autowired
private IBdRangeDetailsService rangeDetailsService; private IBdRangeDetailsService iBdRangeDetailsService;
@Autowired @Autowired
private IBdNoticeService noticeService; private IBdGradeService iBdGradeService;
@Autowired
@DubboReference private IBdAwardsService iBdAwardsService;
ITransactionServiceApi iTransactionServiceApi;
/** /**
* @description: 查询极差配置列表 * 查询极差配置列表
* @author: zhang jing
* @date: 2022/8/30 10:20
* @param: [range]
* @return: com.hzs.common.core.web.page.TableDataInfo
**/ **/
@Log(module = EOperationModule.LEVEL_CONFIG, business = EOperationBusiness.REPURCHASE_RANGE, method = EOperationMethod.SELECT) @Log(module = EOperationModule.LEVEL_CONFIG, business = EOperationBusiness.REPURCHASE_RANGE, method = EOperationMethod.SELECT)
@GetMapping("/list") @GetMapping("/list")
@ -71,48 +63,47 @@ public class BdRetailRangeController extends BaseController {
queryWrapper.eq(BdRange::getRangeName, range.getRangeName()); queryWrapper.eq(BdRange::getRangeName, range.getRangeName());
} }
queryWrapper.orderByDesc(BdRange::getRangeValue, BdRange::getCreationTime); queryWrapper.orderByDesc(BdRange::getRangeValue, BdRange::getCreationTime);
List<BdRange> list = rangeService.list(queryWrapper);
startPage(); startPage();
List<BdRange> list = iBdRangeService.list(queryWrapper);
List<BdRangeExt> listExt = new ArrayList<>(); List<BdRangeExt> listExt = new ArrayList<>();
if (CollectionUtil.isNotEmpty(list)) { if (CollectionUtil.isNotEmpty(list)) {
for (BdRange bdRange : list) { for (BdRange bdRange : list) {
BdRangeExt rangeExt = BeanUtil.copyProperties(bdRange, BdRangeExt.class); BdRangeExt rangeExt = BeanUtil.copyProperties(bdRange, BdRangeExt.class);
BdRangeDetailsExt rangeDetailsExt = new BdRangeDetailsExt();
rangeDetailsExt.setPkRange(bdRange.getPkId());
List<BdRangeDetailsExt> rangeDetailsGradeList = new ArrayList<>(); List<BdRangeDetailsExt> rangeDetailsGradeList = new ArrayList<>();
List<BdRangeDetailsExt> rangeDetailsAwardList = new ArrayList<>(); List<BdRangeDetailsExt> rangeDetailsAwardList = new ArrayList<>();
List<BdRangeDetailsExt> bdRangeDetailsList = rangeDetailsService.getBdRangeDetailsList(rangeDetailsExt);
BdRangeDetailsExt rangeDetailsExt = new BdRangeDetailsExt();
rangeDetailsExt.setPkRange(bdRange.getPkId());
List<BdRangeDetailsExt> bdRangeDetailsList = iBdRangeDetailsService.getBdRangeDetailsList(rangeDetailsExt);
if (CollectionUtil.isNotEmpty(bdRangeDetailsList)) { if (CollectionUtil.isNotEmpty(bdRangeDetailsList)) {
for (BdRangeDetailsExt brde : bdRangeDetailsList) { for (BdRangeDetailsExt brde : bdRangeDetailsList) {
if (StringUtils.isNotNull(brde.getRangeType()) && brde.getRangeType() == ERangeType.GRADE.getValue()) { if (StringUtils.isNotNull(brde.getRangeType()) && brde.getRangeType() == ERangeType.GRADE.getValue()) {
//等级key // 等级
Integer pkRegisterGrade = noticeService.getGradeTranslateValue(brde.getPkLevel(), null); BdGrade bdGrade = iBdGradeService.getBdGrade(brde.getPkLevel());
brde.setPkGrade(pkRegisterGrade); brde.setPkGrade(bdGrade.getPkId());
brde.setPkGradeVal(bdGrade.getGradeName());
rangeDetailsGradeList.add(brde); rangeDetailsGradeList.add(brde);
} }
if (StringUtils.isNotNull(brde.getRangeType()) && brde.getRangeType() == ERangeType.AWARDS.getValue()) { if (StringUtils.isNotNull(brde.getRangeType()) && brde.getRangeType() == ERangeType.AWARDS.getValue()) {
//奖衔key // 奖衔
Integer pkAward = noticeService.getAwardsTranslateValue(brde.getPkLevel(), null); BdAwards bdAwards = iBdAwardsService.getBdAwardsOne(brde.getPkLevel());
brde.setPkAward(pkAward); brde.setPkAward(bdAwards.getPkId());
brde.setPkAwardVal(bdAwards.getAwardsName());
rangeDetailsAwardList.add(brde); rangeDetailsAwardList.add(brde);
} }
} }
} }
rangeExt.setRangeDetailsAward(rangeDetailsAwardList);
rangeExt.setRangeDetailsGrade(rangeDetailsGradeList); rangeExt.setRangeDetailsGrade(rangeDetailsGradeList);
rangeExt.setRangeDetailsAward(rangeDetailsAwardList);
listExt.add(rangeExt); listExt.add(rangeExt);
} }
} }
return getDataTable(listExt); return getDataTable(listExt);
} }
/** /**
* @description: 导出复购极差 * 导出复购极差
* @author: zhang jing
* @date: 2023/3/9 15:47
* @param: [response, range]
* @return: void
**/ **/
@Log(module = EOperationModule.LEVEL_CONFIG, business = EOperationBusiness.REPURCHASE_RANGE, method = EOperationMethod.EXPORT) @Log(module = EOperationModule.LEVEL_CONFIG, business = EOperationBusiness.REPURCHASE_RANGE, method = EOperationMethod.EXPORT)
@PostMapping("/export") @PostMapping("/export")
@ -124,7 +115,7 @@ public class BdRetailRangeController extends BaseController {
queryWrapper.eq(BdRange::getRangeName, range.getRangeName()); queryWrapper.eq(BdRange::getRangeName, range.getRangeName());
} }
queryWrapper.orderByDesc(BdRange::getCreationTime); queryWrapper.orderByDesc(BdRange::getCreationTime);
List<BdRange> list = rangeService.list(queryWrapper); List<BdRange> list = iBdRangeService.list(queryWrapper);
startPage(); startPage();
List<BdRangeExt> listExt = new ArrayList<>(); List<BdRangeExt> listExt = new ArrayList<>();
for (BdRange bdRange : list) { for (BdRange bdRange : list) {
@ -133,38 +124,35 @@ public class BdRetailRangeController extends BaseController {
rangeDetailsExt.setPkRange(bdRange.getPkId()); rangeDetailsExt.setPkRange(bdRange.getPkId());
List<BdRangeDetailsExt> rangeDetailsGradeList = new ArrayList<>(); List<BdRangeDetailsExt> rangeDetailsGradeList = new ArrayList<>();
List<BdRangeDetailsExt> rangeDetailsAwardList = new ArrayList<>(); List<BdRangeDetailsExt> rangeDetailsAwardList = new ArrayList<>();
List<BdRangeDetailsExt> bdRangeDetailsList = rangeDetailsService.getBdRangeDetailsList(rangeDetailsExt); List<BdRangeDetailsExt> bdRangeDetailsList = iBdRangeDetailsService.getBdRangeDetailsList(rangeDetailsExt);
if (CollectionUtil.isNotEmpty(bdRangeDetailsList)) { if (CollectionUtil.isNotEmpty(bdRangeDetailsList)) {
for (BdRangeDetailsExt brde : bdRangeDetailsList) { for (BdRangeDetailsExt brde : bdRangeDetailsList) {
if (StringUtils.isNotNull(brde.getRangeType()) && brde.getRangeType() == ERangeType.GRADE.getValue()) { if (StringUtils.isNotNull(brde.getRangeType()) && brde.getRangeType() == ERangeType.GRADE.getValue()) {
//等级key // 等级
Integer pkRegisterGrade = noticeService.getGradeTranslateValue(brde.getPkLevel(), null); BdGrade bdGrade = iBdGradeService.getBdGrade(brde.getPkLevel());
brde.setPkGrade(pkRegisterGrade); brde.setPkGrade(bdGrade.getPkId());
brde.setPkGradeVal(bdGrade.getGradeName());
rangeDetailsGradeList.add(brde); rangeDetailsGradeList.add(brde);
} }
if (StringUtils.isNotNull(brde.getRangeType()) && brde.getRangeType() == ERangeType.AWARDS.getValue()) { if (StringUtils.isNotNull(brde.getRangeType()) && brde.getRangeType() == ERangeType.AWARDS.getValue()) {
//奖衔key // 奖衔
Integer pkAward = noticeService.getAwardsTranslateValue(brde.getPkLevel(), null); BdAwards bdAwards = iBdAwardsService.getBdAwardsOne(brde.getPkLevel());
brde.setPkAward(pkAward); brde.setPkAward(bdAwards.getPkId());
brde.setPkAwardVal(bdAwards.getAwardsName());
rangeDetailsAwardList.add(brde); rangeDetailsAwardList.add(brde);
} }
} }
} }
rangeExt.setRangeDetailsAward(rangeDetailsAwardList);
rangeExt.setRangeDetailsGrade(rangeDetailsGradeList); rangeExt.setRangeDetailsGrade(rangeDetailsGradeList);
rangeExt.setRangeDetailsAward(rangeDetailsAwardList);
listExt.add(rangeExt); listExt.add(rangeExt);
} }
ExcelUtil<BdRangeExt> util = new ExcelUtil<>(BdRangeExt.class); ExcelUtil<BdRangeExt> util = new ExcelUtil<>(BdRangeExt.class);
util.exportExcel(response, listExt, "复购"); util.exportExcel(response, listExt, "复购");
} }
/** /**
* @description: 新增极差配置 * 新增极差配置
* @author: zhang jing
* @date: 2022/8/30 10:21
* @param: [range]
* @return: com.hzs.common.core.web.domain.AjaxResult
**/ **/
@Log(module = EOperationModule.LEVEL_CONFIG, business = EOperationBusiness.REPURCHASE_RANGE, method = EOperationMethod.INSERT) @Log(module = EOperationModule.LEVEL_CONFIG, business = EOperationBusiness.REPURCHASE_RANGE, method = EOperationMethod.INSERT)
@PostMapping("/generate") @PostMapping("/generate")
@ -190,7 +178,7 @@ public class BdRetailRangeController extends BaseController {
queryWrapper.eq(BdRange::getPkCountry, SecurityUtils.getPkCountry()); queryWrapper.eq(BdRange::getPkCountry, SecurityUtils.getPkCountry());
queryWrapper.eq(BdRange::getRangeValue, rangeExt.getRangeValue()); queryWrapper.eq(BdRange::getRangeValue, rangeExt.getRangeValue());
queryWrapper.eq(BdRange::getSystemType, ESystemType.DEFAULT.getValue()); queryWrapper.eq(BdRange::getSystemType, ESystemType.DEFAULT.getValue());
List<BdRange> list = rangeService.list(queryWrapper); List<BdRange> list = iBdRangeService.list(queryWrapper);
if (CollectionUtil.isNotEmpty(list)) { if (CollectionUtil.isNotEmpty(list)) {
return AjaxResult.error(TransactionUtils.getContent(ConfigMsgConstants.RANGE_VALUE_REPEAT)); return AjaxResult.error(TransactionUtils.getContent(ConfigMsgConstants.RANGE_VALUE_REPEAT));
} }
@ -200,17 +188,13 @@ public class BdRetailRangeController extends BaseController {
rangeExt.setPkCreator(SecurityUtils.getUserId()); rangeExt.setPkCreator(SecurityUtils.getUserId());
rangeExt.setCreationTime(new Date()); rangeExt.setCreationTime(new Date());
rangeExt.setSystemType(ESystemType.DEFAULT.getValue()); rangeExt.setSystemType(ESystemType.DEFAULT.getValue());
rangeService.saveRange(rangeExt); iBdRangeService.saveRange(rangeExt);
} }
return AjaxResult.success(); return AjaxResult.success();
} }
/** /**
* @description: 修改极差配置 * 修改极差配置
* @author: zhang jing
* @date: 2022/8/30 10:21
* @param: [range]
* @return: com.hzs.common.core.web.domain.AjaxResult
**/ **/
@Log(module = EOperationModule.LEVEL_CONFIG, business = EOperationBusiness.REPURCHASE_RANGE, method = EOperationMethod.UPDATE) @Log(module = EOperationModule.LEVEL_CONFIG, business = EOperationBusiness.REPURCHASE_RANGE, method = EOperationMethod.UPDATE)
@PostMapping("/update") @PostMapping("/update")
@ -231,40 +215,25 @@ public class BdRetailRangeController extends BaseController {
return AjaxResult.error(TransactionUtils.getContent(ConfigMsgConstants.PK_GRADE_AWARDS_NOT_NULL)); return AjaxResult.error(TransactionUtils.getContent(ConfigMsgConstants.PK_GRADE_AWARDS_NOT_NULL));
} }
//字段翻译保存到数据库
if (null != rangeExt.getPkTransaction()) {
R<Boolean> b = iTransactionServiceApi.updateTransaction(pkCountry,
rangeExt.getRangeName(), rangeExt.getPkTransaction(), true);
} else {
//字段翻译保存到数据库
R<Integer> pkTransaction = iTransactionServiceApi.createTransaction(pkCountry, ETransactionKey.RANGE,
rangeExt.getRangeName(), EYesNo.YES, EYesNo.NO);
rangeExt.setPkTransaction(pkTransaction.getData());
}
rangeExt.setPkModified(SecurityUtils.getUserId()); rangeExt.setPkModified(SecurityUtils.getUserId());
rangeExt.setPkCountry(pkCountry); rangeExt.setPkCountry(pkCountry);
rangeExt.setModifiedTime(new Date()); rangeExt.setModifiedTime(new Date());
return toAjax(rangeService.updateRange(rangeExt)); return toAjax(iBdRangeService.updateRange(rangeExt));
} }
/** /**
* @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.REPURCHASE_RANGE, method = EOperationMethod.SELECT) @Log(module = EOperationModule.LEVEL_CONFIG, business = EOperationBusiness.REPURCHASE_RANGE, method = EOperationMethod.SELECT)
@GetMapping("/getOne/{pkId}") @GetMapping("/getOne/{pkId}")
public AjaxResult getOne(@PathVariable Long pkId) { public AjaxResult getOne(@PathVariable Long pkId) {
BdRange range = rangeService.getById(pkId); BdRange range = iBdRangeService.getById(pkId);
BdRangeExt rangeExt = BeanUtil.copyProperties(range, BdRangeExt.class); BdRangeExt rangeExt = BeanUtil.copyProperties(range, BdRangeExt.class);
BdRangeDetailsExt rangeDetailsExt = new BdRangeDetailsExt(); BdRangeDetailsExt rangeDetailsExt = new BdRangeDetailsExt();
List<Integer> gradeList = new ArrayList<>(); List<Integer> gradeList = new ArrayList<>();
List<Integer> awardsList = new ArrayList<>(); List<Integer> awardsList = new ArrayList<>();
rangeDetailsExt.setPkRange(pkId.intValue()); rangeDetailsExt.setPkRange(pkId.intValue());
List<BdRangeDetailsExt> bdRangeDetailsList = rangeDetailsService.getBdRangeDetailsList(rangeDetailsExt); List<BdRangeDetailsExt> bdRangeDetailsList = iBdRangeDetailsService.getBdRangeDetailsList(rangeDetailsExt);
if (CollectionUtil.isNotEmpty(bdRangeDetailsList)) { if (CollectionUtil.isNotEmpty(bdRangeDetailsList)) {
for (BdRangeDetailsExt bdRangeDetailsExt : bdRangeDetailsList) { for (BdRangeDetailsExt bdRangeDetailsExt : bdRangeDetailsList) {
if (StringUtils.isNotNull(bdRangeDetailsExt.getRangeType()) && ERangeType.GRADE.getValue() == bdRangeDetailsExt.getRangeType()) { if (StringUtils.isNotNull(bdRangeDetailsExt.getRangeType()) && ERangeType.GRADE.getValue() == bdRangeDetailsExt.getRangeType()) {
@ -281,13 +250,8 @@ public class BdRetailRangeController extends BaseController {
return AjaxResult.success(rangeExt); return AjaxResult.success(rangeExt);
} }
/** /**
* @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.REPURCHASE_RANGE, method = EOperationMethod.DELETE) @Log(module = EOperationModule.LEVEL_CONFIG, business = EOperationBusiness.REPURCHASE_RANGE, method = EOperationMethod.DELETE)
@DeleteMapping("/{pkId}") @DeleteMapping("/{pkId}")
@ -297,12 +261,8 @@ public class BdRetailRangeController extends BaseController {
updateWrapper.set(BdRange::getDelFlag, EDelFlag.DELETE.getValue()); updateWrapper.set(BdRange::getDelFlag, EDelFlag.DELETE.getValue());
updateWrapper.set(BdRange::getPkModified, SecurityUtils.getUserId()); updateWrapper.set(BdRange::getPkModified, SecurityUtils.getUserId());
updateWrapper.set(BdRange::getModifiedTime, new Date()); updateWrapper.set(BdRange::getModifiedTime, new Date());
BdRange bdRange = rangeService.getById(pkId); BdRange bdRange = iBdRangeService.getById(pkId);
//删除翻译 return toAjax(iBdRangeService.update(updateWrapper));
List<Long> pkIdList = new ArrayList<>();
pkIdList.add(bdRange.getPkTransaction().longValue());
R<Boolean> b = iTransactionServiceApi.removeTransactionByPkId(pkIdList);
return toAjax(rangeService.update(updateWrapper));
} }
/** /**
@ -317,11 +277,12 @@ public class BdRetailRangeController extends BaseController {
LambdaQueryWrapper<BdRange> queryWrapper = new LambdaQueryWrapper<>(); LambdaQueryWrapper<BdRange> queryWrapper = new LambdaQueryWrapper<>();
queryWrapper.eq(BdRange::getPkCountry, SecurityUtils.getPkCountry()); queryWrapper.eq(BdRange::getPkCountry, SecurityUtils.getPkCountry());
queryWrapper.eq(BdRange::getSystemType, ESystemType.DEFAULT.getValue()); queryWrapper.eq(BdRange::getSystemType, ESystemType.DEFAULT.getValue());
for (BdRange range : rangeService.list(queryWrapper)) { for (BdRange range : iBdRangeService.list(queryWrapper)) {
RangeVo rangeVo = BeanUtil.copyProperties(range, RangeVo.class); RangeVo rangeVo = BeanUtil.copyProperties(range, RangeVo.class);
rangeVo.setPkRange(range.getPkId()); rangeVo.setPkRange(range.getPkId());
resultList.add(rangeVo); resultList.add(rangeVo);
} }
return AjaxResult.success(resultList); return AjaxResult.success(resultList);
} }
} }

View File

@ -1,6 +1,5 @@
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.BdRangeDetails; import com.hzs.common.domain.system.config.BdRangeDetails;
import com.hzs.common.domain.system.config.ext.BdRangeDetailsExt; import com.hzs.common.domain.system.config.ext.BdRangeDetailsExt;
@ -8,21 +7,12 @@ import com.hzs.common.domain.system.config.ext.BdRangeDetailsExt;
import java.util.List; import java.util.List;
/** /**
* <p>
* 极差详细表 Mapper 接口 * 极差详细表 Mapper 接口
* </p>
*
* @author hzs
* @since 2022-10-28
*/ */
public interface BdRangeDetailsMapper extends BaseMapper<BdRangeDetails> { public interface BdRangeDetailsMapper extends BaseMapper<BdRangeDetails> {
/** /**
* @description: 查询极差详情 * 查询极差详情
* @author: zhang jing
* @date: 2022/10/28 11:34
* @param: [rangeDetailsExt]
* @return: java.util.List<com.hzs.common.domain.system.config.ext.BdRangeDetailsExt>
**/ **/
List<BdRangeDetailsExt> getBdRangeDetailsList(BdRangeDetailsExt rangeDetailsExt); List<BdRangeDetailsExt> getBdRangeDetailsList(BdRangeDetailsExt rangeDetailsExt);
} }

View File

@ -1,6 +1,5 @@
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.BdRangeDetails; import com.hzs.common.domain.system.config.BdRangeDetails;
import com.hzs.common.domain.system.config.ext.BdRangeDetailsExt; import com.hzs.common.domain.system.config.ext.BdRangeDetailsExt;
@ -8,20 +7,13 @@ import com.hzs.common.domain.system.config.ext.BdRangeDetailsExt;
import java.util.List; import java.util.List;
/** /**
* <p>
* 极差详细表 服务类 * 极差详细表 服务类
* </p>
*
* @author hzs
* @since 2022-10-28
*/ */
public interface IBdRangeDetailsService extends IService<BdRangeDetails> { public interface IBdRangeDetailsService extends IService<BdRangeDetails> {
/** /**
* @description: 查询极差详情 * 查询极差详情
* @author: zhang jing
* @date: 2022/10/28 11:36
* @param: [rangeDetailsExt]
* @return: java.util.List<com.hzs.common.domain.system.config.ext.BdRangeDetailsExt>
**/ **/
List<BdRangeDetailsExt> getBdRangeDetailsList(BdRangeDetailsExt rangeDetailsExt); List<BdRangeDetailsExt> getBdRangeDetailsList(BdRangeDetailsExt rangeDetailsExt);
} }

View File

@ -10,25 +10,14 @@ import org.springframework.stereotype.Service;
import java.util.List; import java.util.List;
/** /**
* <p>
* 极差详细表 服务实现类 * 极差详细表 服务实现类
* </p>
*
* @author hzs
* @since 2022-10-28
*/ */
@Service @Service
public class BdRangeDetailsServiceImpl extends ServiceImpl<BdRangeDetailsMapper, BdRangeDetails> implements IBdRangeDetailsService { public class BdRangeDetailsServiceImpl extends ServiceImpl<BdRangeDetailsMapper, BdRangeDetails> implements IBdRangeDetailsService {
/**
* @description: 查询极差详情
* @author: zhang jing
* @date: 2022/10/28 11:35
* @param: [rangeDetailsExt]
* @return: java.util.List<com.hzs.common.domain.system.config.ext.BdRangeDetailsExt>
**/
@Override @Override
public List<BdRangeDetailsExt> getBdRangeDetailsList(BdRangeDetailsExt rangeDetailsExt) { public List<BdRangeDetailsExt> getBdRangeDetailsList(BdRangeDetailsExt rangeDetailsExt) {
return baseMapper.getBdRangeDetailsList(rangeDetailsExt); return baseMapper.getBdRangeDetailsList(rangeDetailsExt);
} }
} }

View File

@ -78,11 +78,12 @@
<include refid="list_where"></include> <include refid="list_where"></include>
order by t.creation_time desc order by t.creation_time desc
</select> </select>
<sql id="list_where"> <sql id="list_where">
<where> <where>
t.del_flag = 0 t.del_flag = 0
and t.mail_type = 1 and t.mail_type = 1
and t.system_type in (#{systemType}, 9) and t.system_type in (#{systemType}, 9)
<if test="pkCountry != null"> <if test="pkCountry != null">
and t.pk_country = #{pkCountry} and t.pk_country = #{pkCountry}
</if> </if>
@ -130,6 +131,7 @@
</if> </if>
</where> </where>
</sql> </sql>
<select id="getAdminIndexNotice" resultMap="BaseResultMap"> <select id="getAdminIndexNotice" resultMap="BaseResultMap">
select t.title, t.pk_id,t.creation_time select t.title, t.pk_id,t.creation_time
from BD_NOTICE t from BD_NOTICE t
@ -149,15 +151,6 @@
order by t.creation_time desc order by t.creation_time desc
</select> </select>
<update id="deleteNoticeById">
update bd_notice n
set n.del_flag = 1,
PK_MODIFIED=#{pkModified},
MODIFIED_TIME = sysdate
where PK_ID = #{pkId}
</update>
<select id="showIndexNotice" resultType="com.hzs.common.domain.system.ext.BdNoticeExt"> <select id="showIndexNotice" resultType="com.hzs.common.domain.system.ext.BdNoticeExt">
select n.pk_id, n.title, n.content,n.top, select n.pk_id, n.title, n.content,n.top,
n.creation_time creationTime, n.creation_time creationTime,
@ -193,59 +186,59 @@
<select id="showIndexMailNotice" resultType="com.hzs.common.domain.system.ext.BdNoticeExt"> <select id="showIndexMailNotice" resultType="com.hzs.common.domain.system.ext.BdNoticeExt">
select * select *
from (select n.pk_id pkId, from (select n.pk_id pkId,
n.title, n.title,
n.content, n.content,
n.creation_time creationTime, n.creation_time creationTime,
nvl(d.read_state, 1) readState nvl(d.read_state, 1) readState
from bd_notice n from bd_notice n
left join bd_notice_detail d left join bd_notice_detail d
on n.pk_id = d.pk_notice on n.pk_id = d.pk_notice
and d.pk_member = #{pkMember} and d.pk_member = #{pkMember}
and d.del_flag = 0 and d.del_flag = 0
where n.del_flag = 0 where n.del_flag = 0
and n.mail_type = 1 and n.mail_type = 1
and n.approve_state = 2 and n.approve_state = 2
and n.pk_country = #{pkCountry} and n.pk_country = #{pkCountry}
and n.function_type = 2 and n.function_type = 2
and n.website_type = 1 and n.website_type = 1
and sysdate >= n.start_time and sysdate >= n.start_time
and sysdate &lt;= n.end_time and sysdate &lt;= n.end_time
<if test="systemTypeList != null and systemTypeList.size > 0"> <if test="systemTypeList != null and systemTypeList.size > 0">
and n.system_type in and n.system_type in
<foreach collection="systemTypeList" item="item" open="(" separator="," close=")"> <foreach collection="systemTypeList" item="item" open="(" separator="," close=")">
#{item} #{item}
</foreach> </foreach>
</if> </if>
union all union all
select n.pk_id pkId, select n.pk_id pkId,
n.title, n.title,
n.content, n.content,
n.creation_time creationTime, n.creation_time creationTime,
nvl(d.read_state, 1) readState nvl(d.read_state, 1) readState
from bd_notice n from bd_notice n
inner join bd_member_notice mn inner join bd_member_notice mn
on n.pk_id = mn.pk_notice on n.pk_id = mn.pk_notice
and mn.pk_member = #{pkMember} and mn.pk_member = #{pkMember}
left join bd_notice_detail d left join bd_notice_detail d
on n.pk_id = d.pk_notice on n.pk_id = d.pk_notice
and d.pk_member = #{pkMember} and d.pk_member = #{pkMember}
and d.del_flag = 0 and d.del_flag = 0
where n.del_flag = 0 where n.del_flag = 0
and n.mail_type = 2 and n.mail_type = 2
and n.approve_state = 2 and n.approve_state = 2
and n.pk_country = #{pkCountry} and n.pk_country = #{pkCountry}
and n.function_type = 2 and n.function_type = 2
and n.website_type = 1 and n.website_type = 1
and sysdate >= n.start_time and sysdate >= n.start_time
and sysdate &lt;= n.end_time and sysdate &lt;= n.end_time
<if test="systemTypeList != null and systemTypeList.size > 0"> <if test="systemTypeList != null and systemTypeList.size > 0">
and n.system_type in and n.system_type in
<foreach collection="systemTypeList" item="item" open="(" separator="," close=")"> <foreach collection="systemTypeList" item="item" open="(" separator="," close=")">
#{item} #{item}
</foreach> </foreach>
</if> </if>
) )
order by creationTime desc order by creationTime desc
</select> </select>

View File

@ -4,28 +4,17 @@
<!-- 通用查询映射结果 --> <!-- 通用查询映射结果 -->
<resultMap id="BaseResultMap" type="com.hzs.common.domain.system.config.BdRangeDetails"> <resultMap id="BaseResultMap" type="com.hzs.common.domain.system.config.BdRangeDetails">
<id column="PK_ID" property="pkId" /> <id column="PK_ID" property="pkId"/>
<result column="DEL_FLAG" property="delFlag" /> <result column="DEL_FLAG" property="delFlag"/>
<result column="PK_COUNTRY" property="pkCountry" /> <result column="PK_COUNTRY" property="pkCountry"/>
<result column="CREATION_TIME" property="creationTime" /> <result column="CREATION_TIME" property="creationTime"/>
<result column="MODIFIED_TIME" property="modifiedTime" /> <result column="MODIFIED_TIME" property="modifiedTime"/>
<result column="PK_CREATOR" property="pkCreator" /> <result column="PK_CREATOR" property="pkCreator"/>
<result column="PK_MODIFIED" property="pkModified" /> <result column="PK_MODIFIED" property="pkModified"/>
<result column="PK_RANGE" property="pkRange" /> <result column="PK_RANGE" property="pkRange"/>
<result column="PK_LEVEL" property="pkLevel" /> <result column="PK_LEVEL" property="pkLevel"/>
</resultMap> </resultMap>
<!-- 通用查询结果列 -->
<sql id="Base_Column_List">
DEL_FLAG,
PK_COUNTRY,
CREATION_TIME,
MODIFIED_TIME,
PK_CREATOR,
PK_MODIFIED,
PK_ID, PK_RANGE, PK_LEVEL
</sql>
<select id="getBdRangeDetailsList" <select id="getBdRangeDetailsList"
parameterType="com.hzs.common.domain.system.config.ext.BdRangeDetailsExt" parameterType="com.hzs.common.domain.system.config.ext.BdRangeDetailsExt"
resultType="com.hzs.common.domain.system.config.ext.BdRangeDetailsExt"> resultType="com.hzs.common.domain.system.config.ext.BdRangeDetailsExt">
@ -44,11 +33,11 @@
BD_RANGE_DETAILS a BD_RANGE_DETAILS a
INNER JOIN BD_RANGE b ON a.PK_RANGE = b.PK_ID INNER JOIN BD_RANGE b ON a.PK_RANGE = b.PK_ID
WHERE WHERE
a.DEL_FLAG = 0 and b.DEL_FLAG = 0 a.DEL_FLAG = 0
and b.DEL_FLAG = 0
<if test="pkRange != null"> <if test="pkRange != null">
AND a.PK_RANGE = #{pkRange} AND a.PK_RANGE = #{pkRange}
</if> </if>
</select> </select>
</mapper> </mapper>

View File

@ -5,11 +5,7 @@ import lombok.AllArgsConstructor;
import lombok.Getter; import lombok.Getter;
/** /**
* @author: sui q * 极差类型枚举
* @time: 2022/8/27 10:35
* @description: 极差类型枚举
* @classname: ERangeType
* @package_name: com.hzs.common.core.enums
*/ */
@AllArgsConstructor @AllArgsConstructor
@Getter @Getter

View File

@ -13,9 +13,6 @@ import java.util.Date;
/** /**
* 公告表 * 公告表
*
* @author hzs
* @since 2023-02-03
*/ */
@Data @Data
@Builder @Builder

View File

@ -12,12 +12,7 @@ import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors; import lombok.experimental.Accessors;
/** /**
* <p>
* 极差详细表 * 极差详细表
* </p>
*
* @author hzs
* @since 2022-10-28
*/ */
@Data @Data
@EqualsAndHashCode(callSuper = true) @EqualsAndHashCode(callSuper = true)
@ -51,5 +46,4 @@ public class BdRangeDetails extends BaseEntity {
private Integer rangeType; private Integer rangeType;
} }

View File

@ -1,23 +1,11 @@
package com.hzs.common.domain.system.config.ext; package com.hzs.common.domain.system.config.ext;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.hzs.common.core.annotation.Transaction;
import com.hzs.common.core.constant.EnumsPrefixConstants;
import com.hzs.common.core.web.domain.BaseEntity;
import com.hzs.common.domain.system.config.BdRangeDetails; import com.hzs.common.domain.system.config.BdRangeDetails;
import lombok.Data; import lombok.Data;
import lombok.EqualsAndHashCode; import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;
/** /**
* <p>
* 极差详细表 * 极差详细表
* </p>
*
* @author hzs
* @since 2022-10-28
*/ */
@EqualsAndHashCode(callSuper = true) @EqualsAndHashCode(callSuper = true)
@Data @Data
@ -30,14 +18,13 @@ public class BdRangeDetailsExt extends BdRangeDetails {
*/ */
private String rangeTypeVal; private String rangeTypeVal;
@Transaction(transactionKey = EnumsPrefixConstants.KEY_GRADE)
private Integer pkGrade; private Integer pkGrade;
@Transaction(transactionKey = EnumsPrefixConstants.KEY_AWARD)
private Integer pkAward;
/** /**
* 等级翻译 * 等级翻译
*/ */
private String pkGradeVal; private String pkGradeVal;
private Integer pkAward;
/** /**
* 奖衔翻译 * 奖衔翻译
*/ */

View File

@ -1,27 +1,14 @@
package com.hzs.common.domain.system.config.ext; 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.annotation.Excel; import com.hzs.common.core.annotation.Excel;
import com.hzs.common.core.annotation.Transaction;
import com.hzs.common.core.web.domain.BaseEntity;
import com.hzs.common.domain.system.config.BdRange; import com.hzs.common.domain.system.config.BdRange;
import com.hzs.common.domain.system.config.BdRangeDetails;
import lombok.Data; import lombok.Data;
import lombok.EqualsAndHashCode; import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;
import java.util.List; import java.util.List;
/** /**
* <p>
* 极差配置 * 极差配置
* </p>
*
* @author zhangjing
* @since 2022-09-09
*/ */
@EqualsAndHashCode(callSuper = true) @EqualsAndHashCode(callSuper = true)
@Data @Data
@ -32,22 +19,21 @@ public class BdRangeExt extends BdRange {
/** /**
* 等级极差详情集合 * 等级极差详情集合
*/ */
@Transaction
private List<BdRangeDetailsExt> rangeDetailsGrade; private List<BdRangeDetailsExt> rangeDetailsGrade;
@Excel(name = "等级",sort=2)
private String rangeDetailsGradeVal;
/** /**
* 奖衔极差详情集合 * 奖衔极差详情集合
*/ */
@Transaction
private List<BdRangeDetailsExt> rangeDetailsAward; private List<BdRangeDetailsExt> rangeDetailsAward;
private List<BdRangeDetailsExt> rangeDetails;
@Excel(name = "奖衔",sort=3) @Excel(name = "等级", sort = 2)
private String rangeDetailsGradeVal;
@Excel(name = "奖衔", sort = 3)
private String rangeDetailsAwardVal; private String rangeDetailsAwardVal;
private List<BdRangeDetailsExt> rangeDetails;
/** /**
* 等级集合 * 等级集合
*/ */