Commit a7fea8d6 by zhiwj

bug

parent ed5d3ca1
......@@ -60,7 +60,7 @@ public interface TabStoreBusinessTimeMapper {
int updateAllBuinessTime(@Param("weekday") String weekday, @Param("openTime")Date openTime, @Param("closeTime") Date closeTime,
@Param("enterpriseId") Integer enterpriseId);
int updateBuinessTimeBystoreInfoIds(@Param("weekday") String weekday, @Param("openTime")Date openTime, @Param("closeTime") Date closeTime, @Param("storeIdList") List<Integer> storeIdList);
int updateBuinessTimeBystoreInfoIds(@Param("weekday") String weekday, @Param("openTime")Date openTime, @Param("closeTime") Date closeTime, @Param("storeInfoIdList") List<Integer> storeIdList);
int deleteAllByEnterpriseId(@Param("enterpriseId") Integer enterpriseId);
......
......@@ -228,25 +228,25 @@ public class StoreServiceImpl implements StoreService {
if ("all".equals(storeIds)) {
return this.tabStoreInfoMapper.updateAllStoreConactsPhone(enterpriseId, value);
}
String[] storeIdArr = storeIds.split(",");
String[] storeInfoIdArr = storeIds.split(",");
List<Integer> list = new ArrayList<>();
for (String s : storeIdArr) {
for (String s : storeInfoIdArr) {
list.add(Integer.valueOf(s));
}
return this.tabStoreInfoMapper.updateStoreConactsPhoneBystoreInfoIds(value, list);
}
@Override
public int bulkUpdateStoreBusinessTime(String storeIds, Integer enterpriseId, String value) {
public int bulkUpdateStoreBusinessTime(String storeInfoIds, Integer enterpriseId, String value) {
try {
JSONArray array = JSON.parseArray(value);
SimpleDateFormat simpleDateFormat = new SimpleDateFormat("HH:mm");
List<Integer> list = new ArrayList<>();
if ("all".equals(storeIds)) {
if ("all".equals(storeInfoIds)) {
this.tabStoreBusinessTimeMapper.deleteAllByEnterpriseId(enterpriseId);
} else {
String[] storeIdArr = storeIds.split(",");
for (String s : storeIdArr) {
String[] storeInfoIdArr = storeInfoIds.split(",");
for (String s : storeInfoIdArr) {
list.add(Integer.valueOf(s));
}
this.tabStoreBusinessTimeMapper.deleteBystoreInfoIds(enterpriseId, list);
......@@ -258,7 +258,7 @@ public class StoreServiceImpl implements StoreService {
String closeTimeStr = json.getString("closeTime");
Date openTime = simpleDateFormat.parse(openTimeStr);
Date closeTime = simpleDateFormat.parse(closeTimeStr);
if ("all".equals(storeIds)) {
if ("all".equals(storeInfoIds)) {
this.tabStoreBusinessTimeMapper.updateAllBuinessTime(weekday, openTime, closeTime, enterpriseId);
} else {
this.tabStoreBusinessTimeMapper.updateBuinessTimeBystoreInfoIds(weekday, openTime, closeTime, list);
......
......@@ -23,17 +23,17 @@ public class StoreBusinessTimeStrategyImpl implements BulkUpdateStoreStrtegy {
private StoreLogService storeLogService;
@Override
public int bulkUpdateStore(String storeIds, Integer enterpriseId, String value, StoreService storeService, Integer operatorId, String operatorName) {
int i = storeService.bulkUpdateStoreBusinessTime(storeIds, enterpriseId, value);
public int bulkUpdateStore(String storeInfoIds, Integer enterpriseId, String value, StoreService storeService, Integer operatorId, String operatorName) {
int i = storeService.bulkUpdateStoreBusinessTime(storeInfoIds, enterpriseId, value);
if (i > 0) {
List<Integer> storeIdList;
if ("all".equals(storeIds)) {
storeIdList = storeService.listAllStoreId(enterpriseId);
List<Integer> storeInfoIdList;
if ("all".equals(storeInfoIds)) {
storeInfoIdList = storeService.listAllStoreId(enterpriseId);
} else {
storeIdList = new ArrayList<>();
String[] storeIdArr = storeIds.split(",");
for (String s : storeIdArr) {
storeIdList.add(Integer.valueOf(s));
storeInfoIdList = new ArrayList<>();
String[] storeInfoIdArr = storeInfoIds.split(",");
for (String s : storeInfoIdArr) {
storeInfoIdList.add(Integer.valueOf(s));
}
}
// [{"weekday":"1,2","openTime":"09:42","closeTime":"09:42"}]
......@@ -59,7 +59,7 @@ public class StoreBusinessTimeStrategyImpl implements BulkUpdateStoreStrtegy {
}
btSb.deleteCharAt(btSb.length() - 1);
btSb.append("】");
storeLogService.saveBulkStoreInfoLog(storeIdList, enterpriseId, operatorId, operatorName, btSb.toString());
storeLogService.saveBulkStoreInfoLog(storeInfoIdList, enterpriseId, operatorId, operatorName, btSb.toString());
}
return i;
}
......
......@@ -16,15 +16,15 @@ public class StorePhoneStategyImpl implements BulkUpdateStoreStrtegy {
private StoreLogService storeLogService;
@Override
public int bulkUpdateStore(String storeIds, Integer enterpriseId, String value, StoreService storeService, Integer operatorId, String operatorName) {
int i = storeService.bulkUpdateStoreConactsPhone(storeIds, enterpriseId, value);
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;
if ("all".equals(storeIds)) {
if ("all".equals(storeInfoIds)) {
storeIdList = storeService.listAllStoreId(enterpriseId);
} else {
storeIdList = new ArrayList<>();
String[] storeIdArr = storeIds.split(",");
String[] storeIdArr = storeInfoIds.split(",");
for (String s : storeIdArr) {
storeIdList.add(Integer.valueOf(s));
}
......
......@@ -17,20 +17,20 @@ public class StoreStatusStrategyImpl implements BulkUpdateStoreStrtegy {
private StoreLogService storeLogService;
@Override
public int bulkUpdateStore(String storeIds, Integer enterpriseId, String value, StoreService storeService, Integer operatorId, String operatorName) {
int i = storeService.bulkUpdateStoreStatus(storeIds, enterpriseId, value);
public int bulkUpdateStore(String storeInfoIds, Integer enterpriseId, String value, StoreService storeService, Integer operatorId, String operatorName) {
int i = storeService.bulkUpdateStoreStatus(storeInfoIds, enterpriseId, value);
if (i > 0) {
List<Integer> storeIdList;
if ("all".equals(storeIds)) {
storeIdList = storeService.listAllStoreId(enterpriseId);
List<Integer> storeInfoIdList;
if ("all".equals(storeInfoIds)) {
storeInfoIdList = storeService.listAllStoreId(enterpriseId);
} else {
storeIdList = new ArrayList<>();
String[] storeIdArr = storeIds.split(",");
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, "门店状态变更为【" + StoreStatusEnum.parseCode(Integer.parseInt(value)) + "】");
storeLogService.saveBulkStoreInfoLog(storeInfoIdList, enterpriseId, operatorId, operatorName, "门店状态变更为【" + StoreStatusEnum.parseCode(Integer.parseInt(value)) + "】");
}
return i;
}
......
......@@ -227,6 +227,7 @@
<include refid="Base_Column_List" />
from tab_store_brand
where status = 1
and enterprise_id = #{enterpriseId}
and store_brand_id &lt;&gt; #{storeBrandId}
order by sort
limit #{start}, #{size}
......
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