From 2a498d9f65f873cedb74ab5bcb48ad4b845d0622 Mon Sep 17 00:00:00 2001 From: puzhibing <393733352@qq.com> Date: 星期三, 30 八月 2023 10:01:04 +0800 Subject: [PATCH] Merge remote-tracking branch 'origin/master' --- management/guns-admin/src/main/webapp/WEB-INF/view/system/tBranchOffice/tBranchOffice_edit.html | 4 ++-- user/guns-admin/src/main/java/com/supersavedriving/user/modular/api/AppUserController.java | 31 ++++++++++++++++++++++++++----- user/guns-admin/src/main/resources/application.yml | 2 +- 3 files changed, 29 insertions(+), 8 deletions(-) diff --git a/management/guns-admin/src/main/webapp/WEB-INF/view/system/tBranchOffice/tBranchOffice_edit.html b/management/guns-admin/src/main/webapp/WEB-INF/view/system/tBranchOffice/tBranchOffice_edit.html index 98bc0c8..31729e4 100644 --- a/management/guns-admin/src/main/webapp/WEB-INF/view/system/tBranchOffice/tBranchOffice_edit.html +++ b/management/guns-admin/src/main/webapp/WEB-INF/view/system/tBranchOffice/tBranchOffice_edit.html @@ -149,10 +149,10 @@ <span class="control-label" >元</span> @if(ChargeStandard.key == 0){ - <span class="fa fa-plus" onclick="TSystemConfig.addBox()"></span> + <span class="fa fa-plus" onclick="TBranchOfficeInfoDlg.addBox()"></span> @} @if(ChargeStandard.key == 1){ - <span class="fa fa-remove" onclick="TSystemConfig.delBox(this)"></span> + <span class="fa fa-remove" onclick="TBranchOfficeInfoDlg.delBox(this)"></span> @} </div> <div class="initialLevel col-sm-12 control-label form-group" > diff --git a/user/guns-admin/src/main/java/com/supersavedriving/user/modular/api/AppUserController.java b/user/guns-admin/src/main/java/com/supersavedriving/user/modular/api/AppUserController.java index f22e50a..77fea37 100644 --- a/user/guns-admin/src/main/java/com/supersavedriving/user/modular/api/AppUserController.java +++ b/user/guns-admin/src/main/java/com/supersavedriving/user/modular/api/AppUserController.java @@ -6,8 +6,11 @@ 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; @@ -66,6 +69,11 @@ @Autowired private WeChatUtil weChatUtil; + + @Autowired + private IBranchOfficeService branchOfficeService; + + @@ -193,9 +201,11 @@ // @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){ @@ -204,10 +214,21 @@ AppUser appUser = appUserService.selectById(uid); UserInfoWarpper userInfoWarpper = new UserInfoWarpper(); BeanUtils.copyProperties(appUser, userInfoWarpper); - SystemConfig systemConfig = systemConfigService.selectOne(new EntityWrapper<SystemConfig>().eq("type", 7)); - if(null != systemConfig){ - JSONObject jsonObject = JSON.parseObject(systemConfig.getContent()); - userInfoWarpper.setServiceCell(jsonObject.getString("num1")); + + 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){ diff --git a/user/guns-admin/src/main/resources/application.yml b/user/guns-admin/src/main/resources/application.yml index 91aa056..349b2fd 100644 --- a/user/guns-admin/src/main/resources/application.yml +++ b/user/guns-admin/src/main/resources/application.yml @@ -44,7 +44,7 @@ eureka: client: service-url: #注册中心地址 - defaultZone: http://sinata:sinata@127.0.0.1:8000/eureka #启用身份验证的方式连接 + defaultZone: http://sinata:sinata@192.168.110.22:8000/eureka #启用身份验证的方式连接 register-with-eureka: true #在注册中心进行注册 fetch-registry: true #从Eureka中获取注册信息。 -- Gitblit v1.7.1