| | |
| | | import com.supersavedriving.user.core.common.annotion.ServiceLog; |
| | | import com.supersavedriving.user.core.util.ToolUtil; |
| | | import com.supersavedriving.user.modular.system.model.AppUser; |
| | | import com.supersavedriving.user.modular.system.model.BranchOffice; |
| | | import com.supersavedriving.user.modular.system.model.SystemConfig; |
| | | import com.supersavedriving.user.modular.system.service.*; |
| | | import com.supersavedriving.user.modular.system.util.GaoDe.MapUtil; |
| | | import com.supersavedriving.user.modular.system.util.GaoDe.model.District; |
| | | import com.supersavedriving.user.modular.system.util.MallBook.model.InterfaceResponse; |
| | | import com.supersavedriving.user.modular.system.util.MallBook.util.RSASignature; |
| | | import com.supersavedriving.user.modular.system.util.PayMoneyUtil; |
| | |
| | | |
| | | @Autowired |
| | | private WeChatUtil weChatUtil; |
| | | |
| | | @Autowired |
| | | private IBranchOfficeService branchOfficeService; |
| | | |
| | | |
| | | |
| | | |
| | | |
| | |
| | | // @ServiceLog(name = "获取个人信息", url = "/api/appUser/queryUserInfo") |
| | | @ApiOperation(value = "获取个人信息", tags = {"用户端-个人中心"}, notes = "") |
| | | @ApiImplicitParams({ |
| | | @ApiImplicitParam(value = "经度", name = "lon", required = true, dataType = "string"), |
| | | @ApiImplicitParam(value = "纬度", name = "lat", required = true, dataType = "string"), |
| | | @ApiImplicitParam(name = "Authorization", value = "用户token(Bearer +token)", required = true, dataType = "String", paramType = "header", defaultValue = "Bearer eyJhbGciOiJIUzUxMiJ9.....") |
| | | }) |
| | | public ResponseWarpper<UserInfoWarpper> queryUserInfo(){ |
| | | public ResponseWarpper<UserInfoWarpper> queryUserInfo(String lon, String lat){ |
| | | try { |
| | | Integer uid = appUserService.getUserByRequest(); |
| | | if(null == uid){ |
| | |
| | | AppUser appUser = appUserService.selectById(uid); |
| | | UserInfoWarpper userInfoWarpper = new UserInfoWarpper(); |
| | | BeanUtils.copyProperties(appUser, userInfoWarpper); |
| | | |
| | | District geocode = MapUtil.geocode(lon, lat); |
| | | BranchOffice branchOffice = branchOfficeService.selectOne(new EntityWrapper<BranchOffice>().eq("districtCode", geocode.getDistrictCode()).eq("status", 1)); |
| | | if(null == branchOffice){ |
| | | SystemConfig systemConfig = systemConfigService.selectOne(new EntityWrapper<SystemConfig>().eq("type", 7)); |
| | | if(null != systemConfig){ |
| | | JSONObject jsonObject = JSON.parseObject(systemConfig.getContent()); |
| | | userInfoWarpper.setServiceCell(jsonObject.getString("num1")); |
| | | } |
| | | }else{ |
| | | SystemConfig systemConfig = systemConfigService.selectOne(new EntityWrapper<SystemConfig>().eq("type", 8).eq("companyId", branchOffice.getId())); |
| | | if(null != systemConfig){ |
| | | JSONObject jsonObject = JSON.parseObject(systemConfig.getContent()); |
| | | userInfoWarpper.setServiceCell(jsonObject.getString("num2")); |
| | | } |
| | | } |
| | | return ResponseWarpper.success(userInfoWarpper); |
| | | }catch (Exception e){ |
| | | e.printStackTrace(); |