Commit 9af45a64 authored by 332784038@qq.com's avatar 332784038@qq.com

Merge branch 'master-fix' into release

parents cb3ec39f 14a5f2ba
...@@ -42,6 +42,8 @@ public class BoxAirNumberRecordServiceImpl extends AbstractService<BoxAirNumberR ...@@ -42,6 +42,8 @@ public class BoxAirNumberRecordServiceImpl extends AbstractService<BoxAirNumberR
@Resource @Resource
private ApplicationContext applicationContext; private ApplicationContext applicationContext;
static List<String> PUBLIC_CHANNEL_CODE_LIST = Arrays.asList("AF","AS","AN");
@Override @Override
public BoxAirNumberRecordDO getBoxAirNumberRecord(Long id) { public BoxAirNumberRecordDO getBoxAirNumberRecord(Long id) {
return boxAirNumberRecordMapper.selectById(id); return boxAirNumberRecordMapper.selectById(id);
...@@ -91,19 +93,19 @@ public class BoxAirNumberRecordServiceImpl extends AbstractService<BoxAirNumberR ...@@ -91,19 +93,19 @@ public class BoxAirNumberRecordServiceImpl extends AbstractService<BoxAirNumberR
BoxAirNumberRecordDO boxAirNumberRecordDO = boxAirNumberRecordMapper.selectOne(new LambdaQueryWrapper<BoxAirNumberRecordDO>() BoxAirNumberRecordDO boxAirNumberRecordDO = boxAirNumberRecordMapper.selectOne(new LambdaQueryWrapper<BoxAirNumberRecordDO>()
.eq(BoxAirNumberRecordDO::getTransportType, transportType) .eq(BoxAirNumberRecordDO::getTransportType, transportType)
.eq(BoxAirNumberRecordDO::getDestCountryCode, destCountryCode) .eq(BoxAirNumberRecordDO::getDestCountryCode, destCountryCode)
.eq(BoxAirNumberRecordDO::getChannelCode, channelCode) .eq(!PUBLIC_CHANNEL_CODE_LIST.contains(channelCode), BoxAirNumberRecordDO::getChannelCode, channelCode)
.eq(BoxAirNumberRecordDO::getUsed, 0) .eq(BoxAirNumberRecordDO::getUsed, 0)
.orderByAsc(BoxAirNumberRecordDO::getId).last("limit 1")); .orderByAsc(BoxAirNumberRecordDO::getId).last("limit 1"));
if (Objects.nonNull(boxAirNumberRecordDO)) { if (Objects.nonNull(boxAirNumberRecordDO)) {
// 修改自编号逻辑 // 修改自编号逻辑
// if (!StringUtils.equals(channelCode, boxAirNumberRecordDO.getChannelCode())) { if (!StringUtils.equals(channelCode, boxAirNumberRecordDO.getChannelCode())) {
// String newNumber = CodeUtils.chargeChannelAirSelfNumbers(destCountryCode, channelCode, boxAirNumberRecordDO.getChannelCode(), boxAirNumberRecordDO.getNumber()); String newNumber = CodeUtils.chargeChannelAirSelfNumbers(destCountryCode, channelCode, boxAirNumberRecordDO.getChannelCode(), boxAirNumberRecordDO.getNumber());
// boxAirNumberRecordDO.setDestId(destId); boxAirNumberRecordDO.setDestId(destId);
// boxAirNumberRecordDO.setDestCountryCode(destCountryCode); boxAirNumberRecordDO.setDestCountryCode(destCountryCode);
// boxAirNumberRecordDO.setNumber(newNumber); boxAirNumberRecordDO.setNumber(newNumber);
// boxAirNumberRecordDO.setChannelCode(channelCode); boxAirNumberRecordDO.setChannelCode(channelCode);
// boxAirNumberRecordDO.setChannelId(channelId); boxAirNumberRecordDO.setChannelId(channelId);
// } }
// 如果有未使用的编号记录,则直接更新为使用状态后返回 // 如果有未使用的编号记录,则直接更新为使用状态后返回
boxAirNumberRecordDO.setUsed(Boolean.TRUE); boxAirNumberRecordDO.setUsed(Boolean.TRUE);
boxAirNumberRecordDO.setUpdater(String.valueOf(userId)); boxAirNumberRecordDO.setUpdater(String.valueOf(userId));
...@@ -149,7 +151,7 @@ public class BoxAirNumberRecordServiceImpl extends AbstractService<BoxAirNumberR ...@@ -149,7 +151,7 @@ public class BoxAirNumberRecordServiceImpl extends AbstractService<BoxAirNumberR
.eq(BoxAirNumberRecordDO::getNumber, number) .eq(BoxAirNumberRecordDO::getNumber, number)
.eq(BoxAirNumberRecordDO::getTransportType, transportType) .eq(BoxAirNumberRecordDO::getTransportType, transportType)
.eq(BoxAirNumberRecordDO::getDestCountryCode, destCountryCode) .eq(BoxAirNumberRecordDO::getDestCountryCode, destCountryCode)
.eq(BoxAirNumberRecordDO::getChannelCode, channelCode) .eq(!PUBLIC_CHANNEL_CODE_LIST.contains(channelCode), BoxAirNumberRecordDO::getChannelCode, channelCode)
.orderByAsc(BoxAirNumberRecordDO::getId).last("limit 1")); .orderByAsc(BoxAirNumberRecordDO::getId).last("limit 1"));
if (Objects.nonNull(boxAirNumberRecordDO)) { if (Objects.nonNull(boxAirNumberRecordDO)) {
// 修改自编号逻辑 // 修改自编号逻辑
...@@ -178,7 +180,7 @@ public class BoxAirNumberRecordServiceImpl extends AbstractService<BoxAirNumberR ...@@ -178,7 +180,7 @@ public class BoxAirNumberRecordServiceImpl extends AbstractService<BoxAirNumberR
BoxAirNumberRecordDO maxBoxAirNumberRecordDO = boxAirNumberRecordMapper.selectOne(new LambdaQueryWrapper<BoxAirNumberRecordDO>() BoxAirNumberRecordDO maxBoxAirNumberRecordDO = boxAirNumberRecordMapper.selectOne(new LambdaQueryWrapper<BoxAirNumberRecordDO>()
.eq(BoxAirNumberRecordDO::getTransportType, transportType) .eq(BoxAirNumberRecordDO::getTransportType, transportType)
.eq(BoxAirNumberRecordDO::getDestCountryCode, destCountryCode) .eq(BoxAirNumberRecordDO::getDestCountryCode, destCountryCode)
.eq(BoxAirNumberRecordDO::getChannelCode, channelCode) .eq(!PUBLIC_CHANNEL_CODE_LIST.contains(channelCode), BoxAirNumberRecordDO::getChannelCode, channelCode)
.orderByDesc(BoxAirNumberRecordDO::getId).last("limit 1")); .orderByDesc(BoxAirNumberRecordDO::getId).last("limit 1"));
// 根据最大的自编号生成最新的自编号 // 根据最大的自编号生成最新的自编号
String preChannelCode = ""; String preChannelCode = "";
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment