Commit 5a39a483 authored by fhj's avatar fhj

模板服务 - 修复代码

parent b1afd38e
......@@ -21,7 +21,7 @@ public interface AreaControllerFeign {
@ApiOperation(value = "根据省编码获取所有市编码")
@GetMapping("/manage/area/findCityCodeByProvinceCode")
public Wrapper<List<String>> findCityCodeByProvinceCode(@RequestParam("provinceCodes") List<String> provinceCodes);
Wrapper<List<String>> findCityCodeByProvinceCode(@RequestParam("provinceCodes") List<String> provinceCodes);
@ApiOperation(value = "查询省市区列表")
@GetMapping("/manage/area/all")
......
......@@ -121,12 +121,12 @@ public class MemberShopWebServiceImpl implements MemberShopWebService {
List<String> provinceCodes = Stream.of("0").collect(toList());
List<String> cityCodes = Stream.of("0").collect(toList());
if(dto.getMemberShopAreas().stream().noneMatch(a -> a.getProvinceCode().equals("0"))) {
provinceCodes = dto.getMemberShopAreas().stream().map(AreaBO::getProvince).collect(Collectors.toList());
provinceCodes = dto.getMemberShopAreas().stream().map(AreaBO::getProvinceCode).collect(Collectors.toList());
cityCodes = dto.getMemberShopAreas().stream().filter(a -> !a.getCityCode().equals("0")).map(AreaBO::getCityCode).collect(Collectors.toList());
List<String> feignCityCodes = dto.getMemberShopAreas().stream().filter(a -> a.getCityCode().equals("0")).map(AreaBO::getProvince).collect(Collectors.toList());
if(CollectionUtil.isNotEmpty(feignCityCodes)) {
Wrapper<List<String>> cityCodesWrapper = areaControllerFeign.findCityCodeByProvinceCode(feignCityCodes);
List<String> feignCodes = dto.getMemberShopAreas().stream().filter(a -> a.getCityCode().equals("0")).map(AreaBO::getProvinceCode).collect(Collectors.toList());
if(CollectionUtil.isNotEmpty(feignCodes)) {
Wrapper<List<String>> cityCodesWrapper = areaControllerFeign.findCityCodeByProvinceCode(feignCodes);
if(cityCodesWrapper.getCode() == ResponseCode.SUCCESS.getCode() && CollectionUtil.isNotEmpty(cityCodesWrapper.getData())) {
cityCodes.addAll(cityCodesWrapper.getData());
}
......@@ -172,7 +172,7 @@ public class MemberShopWebServiceImpl implements MemberShopWebService {
memberShop.setLat(dto.getLat());
memberShop.setAreas(dto.getMemberShopAreas().stream().map(a -> {return a.getProvince() + "/" + a.getCity();}).collect(Collectors.joining(",")));
memberShop.setProvincesCodeList(String.join(",", provinceCodes));
memberShop.setCityCodeList(String.join(",", provinceCodes));
memberShop.setCityCodeList(String.join(",", cityCodes));
memberShop.setMemberName(user.getCompany());
memberShop.setLevelTag(platformMemberLrcWrapper.getData().getLevelTag());
memberShop.setRegisterYears(platformMemberLrcWrapper.getData().getRegisterYears());
......
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