Commit eb23ccaa by zhiwj

storeInfoId和storeId的修复

parent 92d56c02
......@@ -85,6 +85,8 @@ public interface TabStoreInfoMapper {
List<Integer> listAllstoreInfoId(@Param("enterpriseId") Integer enterpriseId);
List<Integer> listAllstoreId(@Param("enterpriseId") Integer enterpriseId);
TabStoreInfo getByStore(@Param("store") StoreDTO store);
StoreDTO getDTOByStore(@Param("store") StoreDTO store);
......
......@@ -86,6 +86,8 @@ public interface StoreService {
List<Integer> listAllStoreId(Integer enterpriseId);
List<Integer> listAllStoreInfoId(Integer enterpriseId);
boolean validateStoreCodeIsExist(Integer enterpriseId, Integer regionId, String storeCode, Integer storeId);
/**
......
......@@ -92,7 +92,8 @@ public class StoreLogServiceImpl implements StoreLogService {
storeLog.setOperatorId(operatorId);
storeLog.setOperatorName(operatorName);
storeLog.setContent(content);
for (Integer storeId : storeInfoIdList) {
List<Integer> storeIdList = storeService.listStoredByStoreInfoList(storeInfoIdList, enterpriseId);
for (Integer storeId : storeIdList) {
storeLog.setStoreId(storeId);
tabStoreLogMapper.insertSelective(storeLog);
}
......
......@@ -388,6 +388,11 @@ public class StoreServiceImpl implements StoreService {
@Override
public List<Integer> listAllStoreId(Integer enterpriseId) {
return this.tabStoreInfoMapper.listAllstoreId(enterpriseId);
}
@Override
public List<Integer> listAllStoreInfoId(Integer enterpriseId) {
return this.tabStoreInfoMapper.listAllstoreInfoId(enterpriseId);
}
......
......@@ -35,7 +35,7 @@ public class StoreBrandUpdateStrategyImpl implements BulkUpdateStoreStrtegy {
StoreSearchDBDTO storeSearchDBDTO = new StoreSearchDBDTO();
storeSearchDBDTO.setOverflowStatus(0);
storeList = storeService.listStore(storeSearchDBDTO, 1, Integer.MAX_VALUE);
storeInfoIdList = storeService.listAllStoreId(enterpriseId);
storeInfoIdList = storeService.listAllStoreInfoId(enterpriseId);
} else {
storeInfoIdList = new ArrayList<>();
String[] storeIdArr = storeInfoIds.split(",");
......
......@@ -28,7 +28,7 @@ public class StoreBusinessTimeStrategyImpl implements BulkUpdateStoreStrtegy {
if (i > 0) {
List<Integer> storeInfoIdList;
if ("all".equals(storeInfoIds)) {
storeInfoIdList = storeService.listAllStoreId(enterpriseId);
storeInfoIdList = storeService.listAllStoreInfoId(enterpriseId);
} else {
storeInfoIdList = new ArrayList<>();
String[] storeInfoIdArr = storeInfoIds.split(",");
......
......@@ -23,18 +23,18 @@ public class StoreGroupStrategyImpl implements BulkUpdateStoreStrtegy {
public int bulkUpdateStore(String storeInfoIds, Integer enterpriseId, String value, StoreService storeService, Integer operatorId, String operatorName) {
int i = storeService.bulkUpdateStoreGroup(storeInfoIds, enterpriseId, Integer.valueOf(value));
if (i > 0) {
List<Integer> storeIdList;
List<Integer> storeInfoIdList;
if ("all".equals(storeInfoIds)) {
storeIdList = storeService.listAllStoreId(enterpriseId);
storeInfoIdList = storeService.listAllStoreInfoId(enterpriseId);
} else {
storeIdList = new ArrayList<>();
storeInfoIdList = new ArrayList<>();
String[] storeIdArr = storeInfoIds.split(",");
for (String s : storeIdArr) {
storeIdList.add(Integer.valueOf(s));
storeInfoIdList.add(Integer.valueOf(s));
}
}
TabStoreGroup group = storeGroupService.getStoreGroupById(Integer.valueOf(value));
storeLogService.saveBulkStoreGroupLog(storeIdList, enterpriseId, operatorId, operatorName, "门店分组变更为【" + group.getStoreGroupName() + "】");
storeLogService.saveBulkStoreGroupLog(storeInfoIdList, enterpriseId, operatorId, operatorName, "门店分组变更为【" + group.getStoreGroupName() + "】");
}
return i;
}
......
......@@ -19,17 +19,17 @@ public class StorePhoneStategyImpl implements BulkUpdateStoreStrtegy {
public int bulkUpdateStore(String storeInfoIds, Integer enterpriseId, String value, StoreService storeService, Integer operatorId, String operatorName) {
int i = storeService.bulkUpdateStoreConactsPhone(storeInfoIds, enterpriseId, value);
if (i > 0) {
List<Integer> storeIdList;
List<Integer> storeInfoIdList;
if ("all".equals(storeInfoIds)) {
storeIdList = storeService.listAllStoreId(enterpriseId);
storeInfoIdList = storeService.listAllStoreInfoId(enterpriseId);
} else {
storeIdList = new ArrayList<>();
storeInfoIdList = new ArrayList<>();
String[] storeIdArr = storeInfoIds.split(",");
for (String s : storeIdArr) {
storeIdList.add(Integer.valueOf(s));
storeInfoIdList.add(Integer.valueOf(s));
}
}
storeLogService.saveBulkStoreInfoLog(storeIdList, enterpriseId, operatorId, operatorName, "门店联系电话变更为【" + value + "】");
storeLogService.saveBulkStoreInfoLog(storeInfoIdList, enterpriseId, operatorId, operatorName, "门店联系电话变更为【" + value + "】");
}
return i;
}
......
......@@ -21,7 +21,7 @@ public class StorePhotoAddStrategyImpl implements BulkUpdateStoreStrtegy {
if (i > 0) {
List<Integer> storeInfoIdList;
if ("all".equals(storeInfoIds)) {
storeInfoIdList = storeService.listAllStoreId(enterpriseId);
storeInfoIdList = storeService.listAllStoreInfoId(enterpriseId);
} else {
storeInfoIdList = new ArrayList<>();
String[] storeIdArr = storeInfoIds.split(",");
......
......@@ -18,17 +18,17 @@ public class StorePhotoUpdateStrategyImpl implements BulkUpdateStoreStrtegy {
public int bulkUpdateStore(String storeInfoIds, Integer enterpriseId, String value, StoreService storeService, Integer operatorId, String operatorName) {
int i = storeService.bulkUpdateStorePhoto(storeInfoIds, enterpriseId, value);
if (i > 0) {
List<Integer> storeIdList;
List<Integer> storeInfoIdList;
if ("all".equals(storeInfoIds)) {
storeIdList = storeService.listAllStoreId(enterpriseId);
storeInfoIdList = storeService.listAllStoreInfoId(enterpriseId);
} else {
storeIdList = new ArrayList<>();
storeInfoIdList = new ArrayList<>();
String[] storeIdArr = storeInfoIds.split(",");
for (String s : storeIdArr) {
storeIdList.add(Integer.valueOf(s));
storeInfoIdList.add(Integer.valueOf(s));
}
}
storeLogService.saveBulkStoreInfoLog(storeIdList, enterpriseId, operatorId, operatorName, "门店照片变更");
storeLogService.saveBulkStoreInfoLog(storeInfoIdList, enterpriseId, operatorId, operatorName, "门店照片变更");
}
return i;
}
......
......@@ -25,7 +25,7 @@ public class StoreStatusStrategyImpl implements BulkUpdateStoreStrtegy {
if (i > 0) {
List<Integer> storeInfoIdList;
if ("all".equals(storeInfoIds)) {
storeInfoIdList = storeService.listAllStoreId(enterpriseId);
storeInfoIdList = storeService.listAllStoreInfoId(enterpriseId);
} else {
storeInfoIdList = new ArrayList<>();
String[] storeIdArr = storeInfoIds.split(",");
......
......@@ -484,6 +484,10 @@
select t1.store_info_id from tab_store_info t1,tab_store t2 where t2.enterprise_id=#{enterpriseId}
and t1.store_info_id=t2.store_info_id and t1.overflow_status=0
</select>
<select id="listAllstoreId" resultType="Integer">
select t2.store_id from tab_store_info t1,tab_store t2 where t2.enterprise_id=#{enterpriseId}
and t1.store_info_id=t2.store_info_id and t1.overflow_status=0
</select>
<select id="getByStore" resultMap="BaseResultMap" parameterType="com.gic.store.dto.StoreDTO">
select
<include refid="Base_Column_List" >
......
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