feat:云流水

This commit is contained in:
苏竹红
2025-10-13 16:03:32 +08:00
parent d8b3f89539
commit b4e88f5424

View File

@@ -244,30 +244,16 @@ public class ShopAccountServiceImpl implements ShopAccountService {
} }
List<ShopAccountDO> accountDOS = shopAccountDAO.selectByShopId(shopId); List<ShopAccountDO> accountDOS = shopAccountDAO.selectByShopId(shopId);
if (CollectionUtils.isEmpty(accountDOS)) { if (CollectionUtils.isEmpty(accountDOS)) {
throw new ServiceException(ErrorCodeEnum.SYSTEM_DATA_ERROR); return "ZXA8_"+shopInfo.getShopCode();
} }
Map<String, ShopAccountDO> map = accountDOS.stream().collect(Collectors.toMap(ShopAccountDO::getSystemName, data -> data)); Map<String, ShopAccountDO> map = accountDOS.stream().collect(Collectors.toMap(ShopAccountDO::getSystemName, data -> data));
ShopAccountDO shopAccountDO = map.get(ShopAccountEnum.YLS.getSystemName()); ShopAccountDO shopAccountDO = map.get(ShopAccountEnum.YLS.getSystemName());
if (Objects.isNull(shopAccountDO)) { if (Objects.isNull(shopAccountDO)) {
throw new ServiceException(ErrorCodeEnum.SYSTEM_DATA_ERROR); return "ZXA8_"+shopInfo.getShopCode();
} }
return StringUtil.isEmpty(shopAccountDO.getAccount()) ? shopInfo.getShopCode() : shopAccountDO.getAccount(); return StringUtil.isEmpty(shopAccountDO.getAccount()) ? shopInfo.getShopCode() : shopAccountDO.getAccount();
} }
@Override
public String shopCodeToYlsCode(String shopCode) {
ShopInfoDO shopInfoDO = shopInfoDAO.selectByStoreCode(shopCode);
if (!Objects.isNull(shopInfoDO)) {
return this.shopIdToYlsCode(shopInfoDO.getId());
}
//查询老店关联表数据
OldShopDO oldShopDO = oldShopDAO.getByCode(shopCode);
if (Objects.isNull(oldShopDO)) {
throw new ServiceException(ErrorCodeEnum.GET_YLS_CODE_FAIL);
}
return oldShopDO.getYlsShopCode();
}
@Override @Override
@Transactional(rollbackFor = Exception.class) @Transactional(rollbackFor = Exception.class)
public Boolean handleOldData() { public Boolean handleOldData() {
@@ -316,6 +302,20 @@ public class ShopAccountServiceImpl implements ShopAccountService {
return true; return true;
} }
@Override
public String shopCodeToYlsCode(String shopCode) {
ShopInfoDO shopInfoDO = shopInfoDAO.selectByStoreCode(shopCode);
if (!Objects.isNull(shopInfoDO)) {
return this.shopIdToYlsCode(shopInfoDO.getId());
}
//查询老店关联表数据
OldShopDO oldShopDO = oldShopDAO.getByCode(shopCode);
if (Objects.isNull(oldShopDO)) {
throw new ServiceException(ErrorCodeEnum.GET_YLS_CODE_FAIL);
}
return oldShopDO.getYlsShopCode();
}
@Override @Override
@Transactional(rollbackFor = Exception.class) @Transactional(rollbackFor = Exception.class)
public Boolean handleAccountPassword() { public Boolean handleAccountPassword() {