fix:获取云流水免登token接口处理不存在老店数据的门店

This commit is contained in:
wangff
2025-11-03 14:57:13 +08:00
parent 22e7aa07e8
commit c0d76eda61
3 changed files with 23 additions and 1 deletions

View File

@@ -59,6 +59,8 @@ public class ShopAccountServiceImpl implements ShopAccountService {
ThirdXinGuanJiaService thirdXinGuanJiaService;
@Resource
private LineInfoDAO lineInfoDAO;
@Resource
private StoreDao storeDao;
@Override
public List<ShopAccountDTO> getShopAccountByShopId(Long shopId) {
@@ -311,7 +313,17 @@ public class ShopAccountServiceImpl implements ShopAccountService {
//查询老店关联表数据
OldShopDO oldShopDO = oldShopDAO.getByCode(shopCode);
if (Objects.isNull(oldShopDO)) {
throw new ServiceException(ErrorCodeEnum.GET_YLS_CODE_FAIL);
StoreDO storeDO = storeDao.getByStoreNum(shopCode);
if (Objects.isNull(storeDO)) {
throw new ServiceException(ErrorCodeEnum.GET_YLS_CODE_FAIL);
}
oldShopDO = OldShopDO.builder()
.shopCode(shopCode)
.shopName(storeDO.getStoreName())
.mobile(storeDO.getTelephone())
.ylsShopCode("ZXA8_" + shopCode)
.build();
oldShopDAO.insertSelective(oldShopDO);
}
return oldShopDO.getYlsShopCode();
}