fix
This commit is contained in:
@@ -582,29 +582,36 @@ public class ShopServiceImpl implements ShopService {
|
|||||||
public ShopResponse getShopNameAndCode(Long shopId, Long lineId) {
|
public ShopResponse getShopNameAndCode(Long shopId, Long lineId) {
|
||||||
boolean flag = false;
|
boolean flag = false;
|
||||||
LineInfoDO lineInfoDO = lineInfoDAO.getLineInfo(lineId);
|
LineInfoDO lineInfoDO = lineInfoDAO.getLineInfo(lineId);
|
||||||
MiniShopsResponse shopInfo = shopInfoDAO.currentShopWhetherOpen(shopId,eid);
|
if (lineInfoDO == null){
|
||||||
ShopResponse response = new ShopResponse();
|
throw new ServiceException(ErrorCodeEnum.LINE_ID_IS_NOT_EXIST);
|
||||||
if (Objects.nonNull(shopInfo)&&StringUtils.isNotBlank(shopInfo.getShopCode())) {
|
|
||||||
ShopNameAndCodeDTO currentShop = new ShopNameAndCodeDTO();
|
|
||||||
currentShop.setShopName(shopInfo.getShopName());
|
|
||||||
currentShop.setShopCode(shopInfo.getShopCode());
|
|
||||||
response.setCurrentShop(currentShop);
|
|
||||||
flag = true;
|
|
||||||
}
|
}
|
||||||
List<MiniShopsResponse> shopList = shopInfoDAO.getShopListSuccessOpen(eid,lineId);
|
ShopResponse response = new ShopResponse();
|
||||||
List<ShopNameAndCodeDTO> list = new ArrayList<>();
|
if (shopId != null) {
|
||||||
if (CollectionUtils.isNotEmpty(shopList)) {
|
MiniShopsResponse shopInfo = shopInfoDAO.currentShopWhetherOpen(shopId, eid);
|
||||||
for (MiniShopsResponse shopInfoDO : shopList) {
|
if (Objects.nonNull(shopInfo) && StringUtils.isNotBlank(shopInfo.getShopCode())) {
|
||||||
ShopNameAndCodeDTO dto = new ShopNameAndCodeDTO();
|
ShopNameAndCodeDTO currentShop = new ShopNameAndCodeDTO();
|
||||||
dto.setShopName(shopInfoDO.getShopName());
|
currentShop.setShopName(shopInfo.getShopName());
|
||||||
dto.setShopCode(shopInfoDO.getShopCode());
|
currentShop.setShopCode(shopInfo.getShopCode());
|
||||||
list.add(dto);
|
response.setCurrentShop(currentShop);
|
||||||
|
flag = true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
List<ShopNameAndCodeDTO> list = new ArrayList<>();
|
||||||
|
if (lineId != null) {
|
||||||
|
List<MiniShopsResponse> shopList = shopInfoDAO.getShopListSuccessOpen(eid, lineId);
|
||||||
|
if (CollectionUtils.isNotEmpty(shopList)) {
|
||||||
|
for (MiniShopsResponse shopInfoDO : shopList) {
|
||||||
|
ShopNameAndCodeDTO dto = new ShopNameAndCodeDTO();
|
||||||
|
dto.setShopName(shopInfoDO.getShopName());
|
||||||
|
dto.setShopCode(shopInfoDO.getShopCode());
|
||||||
|
list.add(dto);
|
||||||
|
}
|
||||||
|
flag = true;
|
||||||
}
|
}
|
||||||
flag = true;
|
|
||||||
}
|
}
|
||||||
List<OldShopDO> oldMobile = oldShopDAO.getByMobile(lineInfoDO.getMobile());
|
List<OldShopDO> oldMobile = oldShopDAO.getByMobile(lineInfoDO.getMobile());
|
||||||
if (CollectionUtils.isNotEmpty(oldMobile)){
|
if (CollectionUtils.isNotEmpty(oldMobile)) {
|
||||||
for (OldShopDO oldShopDO : oldMobile){
|
for (OldShopDO oldShopDO : oldMobile) {
|
||||||
ShopNameAndCodeDTO dto = new ShopNameAndCodeDTO();
|
ShopNameAndCodeDTO dto = new ShopNameAndCodeDTO();
|
||||||
dto.setShopName(oldShopDO.getShopName());
|
dto.setShopName(oldShopDO.getShopName());
|
||||||
dto.setShopCode(oldShopDO.getShopCode());
|
dto.setShopCode(oldShopDO.getShopCode());
|
||||||
|
|||||||
Reference in New Issue
Block a user