This commit is contained in:
shuo.wang
2025-04-12 18:52:03 +08:00
parent 49ec1df2c7
commit 8f15b46ab4
5 changed files with 124 additions and 1 deletions

View File

@@ -55,6 +55,9 @@ import static com.cool.store.enums.ErrorCodeEnum.UPDATE_INVESTMENT_MANAGER_FAIL;
@Service
@Slf4j
public class ShopServiceImpl implements ShopService {
@Resource
private OldShopDAO oldShopDAO;
@Value("${mybatis.configuration.variables.enterpriseId}")
private String eid;
@Resource
@@ -578,6 +581,7 @@ public class ShopServiceImpl implements ShopService {
@Override
public ShopResponse getShopNameAndCode(Long shopId, Long lineId) {
boolean flag = false;
LineInfoDO lineInfoDO = lineInfoDAO.getLineInfo(lineId);
MiniShopsResponse shopInfo = shopInfoDAO.currentShopWhetherOpen(shopId,eid);
ShopResponse response = new ShopResponse();
if (Objects.nonNull(shopInfo)&&StringUtils.isNotBlank(shopInfo.getShopCode())) {
@@ -596,9 +600,19 @@ public class ShopServiceImpl implements ShopService {
dto.setShopCode(shopInfoDO.getShopCode());
list.add(dto);
}
response.setShopList(list);
flag = true;
}
List<OldShopDO> oldMobile = oldShopDAO.getByMobile(lineInfoDO.getMobile());
if (CollectionUtils.isNotEmpty(oldMobile)){
for (OldShopDO oldShopDO : oldMobile){
ShopNameAndCodeDTO dto = new ShopNameAndCodeDTO();
dto.setShopName(oldShopDO.getShopName());
dto.setShopCode(oldShopDO.getShopCode());
list.add(dto);
}
flag = true;
}
response.setShopList(list);
if (flag) {
return response;
} else {