| | |
| | | import com.alibaba.fastjson.JSON; |
| | | import com.alibaba.fastjson.JSONObject; |
| | | import com.baomidou.mybatisplus.service.impl.ServiceImpl; |
| | | import com.stylefeng.guns.core.util.ToolUtil; |
| | | import com.stylefeng.guns.modular.system.dao.ServerCarModelMapper; |
| | | import com.stylefeng.guns.modular.system.dao.SystemPriceMapper; |
| | | import com.stylefeng.guns.modular.system.model.Company; |
| | | import com.stylefeng.guns.modular.system.model.ServerCarModel; |
| | | import com.stylefeng.guns.modular.system.model.UserInfo; |
| | | import com.stylefeng.guns.modular.system.service.ICompanyCityService; |
| | | import com.stylefeng.guns.modular.system.service.IServerCarModelService; |
| | | import com.stylefeng.guns.modular.system.service.IUserInfoService; |
| | |
| | | */ |
| | | @Override |
| | | public ResultUtil<List<ServerCarModelWarpper>> queryServerCarModel(Integer uid, String startLonLat, String endLonLat, Integer type, Integer language) throws Exception { |
| | | UserInfo userInfo = userInfoService.selectById(uid); |
| | | if(null != userInfo && ToolUtil.isEmpty(userInfo.getPhone())){ |
| | | return ResultUtil.error(language == 1 ? "请先绑定手机号码" : language == 2 ? "Please bind your mobile phone number first." : "Veuillez d’abord vous inscrire en liant votre numéro de téléphone portable."); |
| | | } |
| | | String[] split = startLonLat.split(","); |
| | | Company company = companyCityService.query1(uid, split[0], split[1]); |
| | | if(null != userInfo && null != company){ |
| | | userInfo.setCompanyId(company.getId()); |
| | | userInfoService.updateById(userInfo); |
| | | } |
| | | |
| | | String tripId = redisUtil.getValue("trip" + uid); |
| | | //查找与起点匹配的企业(经营范围) |
| | | ReverseGeocodeVo reverseGeocode = GoogleMapUtil.getReverseGeocode(Double.valueOf(startLonLat.split(",")[1]), Double.valueOf(startLonLat.split(",")[0]), tripId); |