Commit 5d5053d4 by zhiwj

bug

parent 1e485879
......@@ -12,7 +12,6 @@ import com.gic.store.service.*;
import com.gic.store.utils.baidumap.BaiduMapUtils;
import com.gic.store.utils.baidumap.Location;
import com.github.pagehelper.Page;
import com.google.common.base.Joiner;
import com.task.allocation.api.AbstractTaskAllocationOperation;
import com.task.allocation.exception.TaskAllocationException;
import com.task.allocation.qo.InitTaskQO;
......@@ -24,7 +23,10 @@ import org.apache.logging.log4j.Logger;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import java.util.*;
import java.util.ArrayList;
import java.util.Date;
import java.util.List;
import java.util.Optional;
/**
* @author zhiwj
......@@ -126,16 +128,18 @@ public class StoreTaskServiceImpl extends AbstractTaskAllocationOperation implem
if (StringUtils.isNotBlank(brands)) {
String[] brandArr = brands.trim().split("、");
List<TabStoreBrand> storeBrandList = storeBrandService.listAllStoreBrand(t.getEnterpriseId(), null);
TabStoreBrand storeBrand = storeBrandService.getByStoreBrandName(t.getEnterpriseId(), brands);
List<Integer> list = new ArrayList<>();
for (String brandName : brandArr) {
for (TabStoreBrand storeBrand : storeBrandList) {
if (storeBrand.getStoreBrandName().equals(brandName)) {
list.add(storeBrand.getStoreBrandId());
break;
}
}
}
storeDTO.setBrandIds(Joiner.on(GlobalInfo.FLAG_COMMA).join(list));
// for (String brandName : brandArr) {
// for (TabStoreBrand storeBrand : storeBrandList) {
// if (storeBrand.getStoreBrandName().equals(brandName)) {
// list.add(storeBrand.getStoreBrandId());
// break;
// }
// }
// }
// storeDTO.setBrandIds(Joiner.on(GlobalInfo.FLAG_COMMA).join(list));
storeDTO.setBrandIds(storeBrand.getStoreBrandId().toString());
}
// 判断省市区
ServiceResponse<List<CityDTO>> cityResponse = provincesApiService.selectAllCity();
......
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