Commit 4e01a958 by guojuxing

Merge remote-tracking branch 'origin/developer' into developer

parents b979ffc7 fafe1ee9
......@@ -2,6 +2,7 @@ package com.gic.store.service;
import com.gic.store.dto.StoreDTO;
import com.gic.store.dto.StoreSearchDBDTO;
import com.gic.store.entity.TabStore;
import com.github.pagehelper.Page;
import java.util.List;
......@@ -125,4 +126,6 @@ public interface StoreService {
List<String> listAllCityId(Integer enterpriseId, Integer storeBrandId);
void updateStore(StoreDTO storeDTO);
TabStore getByStoreCodeAndRegionId(Integer enterpriseId, Integer regionId, String storeCode);
}
......@@ -485,4 +485,25 @@ public class StoreServiceImpl implements StoreService {
this.tabStoreMapper.updateByPrimaryKeySelective(tabStore);
}
@Override
public TabStore getByStoreCodeAndRegionId(Integer enterpriseId, Integer regionId, String storeCode) {
StoreDTO storeDTO = new StoreDTO();
storeDTO.setEnterpriseId(enterpriseId);
storeDTO.setRegionId(regionId);
storeDTO.setStoreCode(storeCode);
TabStoreInfo store = this.tabStoreInfoMapper.getByStore(storeDTO);
if (store == null) {
return null;
}
List<TabStore> storeNoStatus = this.tabStoreMapper.getStoreNoStatus(enterpriseId, store.getStoreInfoId());
if (CollectionUtils.isNotEmpty(storeNoStatus)) {
TabStore tabStore = storeNoStatus.get(0);
if (com.gic.enterprise.constants.Constants.NORMAL_STATUS.equals(tabStore.getStatus())) {
return tabStore;
}
}
return null;
}
}
......@@ -648,6 +648,12 @@ public class StoreApiServiceImpl implements StoreApiService {
}
storeDTO.setStoreCode(processBatchStoreDTO.getStoreCode());
TabStore oldStore = this.storeService.getByStoreCodeAndRegionId(processBatchStoreDTO.getEnterpriseId(), processBatchStoreDTO.getRegionId(), processBatchStoreDTO.getStoreCode());
if (oldStore != null) {
storeDTO.setStoreId(oldStore.getStoreId());
}
// 店招品牌
if (processBatchStoreDTO.getBrandId() != null) {
TabStoreBrand storeBrand = storeBrandService.getById(processBatchStoreDTO.getBrandId());
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment