| | |
| | | |
| | | import com.baomidou.mybatisplus.service.impl.ServiceImpl; |
| | | import com.stylefeng.guns.modular.system.dao.PhoneMapper; |
| | | import com.stylefeng.guns.modular.system.model.Company; |
| | | import com.stylefeng.guns.modular.system.model.Phone; |
| | | import com.stylefeng.guns.modular.system.service.ICompanyCityService; |
| | | import com.stylefeng.guns.modular.system.service.IPhoneService; |
| | | import com.stylefeng.guns.modular.system.util.GoogleMap.AddressComponentsVo; |
| | | import com.stylefeng.guns.modular.system.util.GoogleMap.GoogleMapUtil; |
| | |
| | | import java.util.HashMap; |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | import java.util.stream.Collectors; |
| | | |
| | | |
| | | @Service |
| | |
| | | |
| | | @Resource |
| | | private RedisUtil redisUtil; |
| | | |
| | | @Resource |
| | | private ICompanyCityService companyCityService; |
| | | |
| | | |
| | | |
| | |
| | | for (int i = 0; i < addressComponentsVos.length; i++) { |
| | | city[i] = addressComponentsVos[i].getLongName(); |
| | | } |
| | | List<Phone> list = phoneMapper.queryPhones(city); |
| | | List<Company> companies = companyCityService.query2(city); |
| | | List<Integer> collect = companies.stream().map(Company::getId).collect(Collectors.toList()); |
| | | List<Phone> list = phoneMapper.queryPhones(collect); |
| | | return list; |
| | | } |
| | | |
| | |
| | | } |
| | | Map<String, Object> map = new HashMap<>(); |
| | | //平台电话 |
| | | Phone query = phoneMapper.query(2, 1, city); |
| | | Phone query = phoneMapper.query(2, 1, null); |
| | | map.put("platform", null != query ? query.getPhone() : ""); |
| | | |
| | | |
| | | Company company = companyCityService.query1(city); |
| | | //公司 |
| | | query = phoneMapper.query(2, 2, city); |
| | | query = phoneMapper.query(2, 2, company.getId()); |
| | | map.put("company", null != query ? query.getPhone() : ""); |
| | | return map; |
| | | } |