fix:获取云流水免登token接口处理不存在老店数据的门店
This commit is contained in:
@@ -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();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user