老店
This commit is contained in:
@@ -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 {
|
||||
|
||||
Reference in New Issue
Block a user