Commit 2354d02699350cad07dea4b225692eff14007043
1 parent
82c74730
装修垃圾登录优化
Showing
2 changed files
with
7 additions
and
14 deletions
trash-garbage/src/main/java/com/trash/garbage/service/impl/GarUserServiceImpl.java
| ... | ... | @@ -175,9 +175,6 @@ public class GarUserServiceImpl extends ServiceImpl<GarUserMapper, GarUser> |
| 175 | 175 | |
| 176 | 176 | GarUserReq userReq = reqGarUser(loginDto.getTel()); |
| 177 | 177 | |
| 178 | -// DriverVo driver = new DriverVo(); | |
| 179 | -// driver.setPhoneNo(loginDto.getTel()); | |
| 180 | -// List<DriverVo> driverList = driverService.selectDriverList(driver); | |
| 181 | 178 | LoginVo.RuleVo ruleVo = new LoginVo.RuleVo(); |
| 182 | 179 | ruleVo.setUserType(GlobalStatus.GarUserStatusEnum.NORMAL_USER.getDescription()); |
| 183 | 180 | vo.setRuleVos(new ArrayList<>(Arrays.asList(ruleVo))); |
| ... | ... | @@ -193,24 +190,15 @@ public class GarUserServiceImpl extends ServiceImpl<GarUserMapper, GarUser> |
| 193 | 190 | } |
| 194 | 191 | |
| 195 | 192 | // 企业负责人 TODO |
| 196 | -// TransportationEnterprise transportationEnterprise = new TransportationEnterprise(); | |
| 197 | -// transportationEnterprise.setServicePhone(loginDto.getTel()); | |
| 198 | -// List<TransportationEnterprise> enterpriseList = enterpriseService.selectTransportationEnterpriseList(transportationEnterprise); | |
| 199 | 193 | if (Objects.nonNull(userReq) && CollectionUtil.isNotEmpty(userReq.getCompanies())) { |
| 200 | 194 | GarUserReqDetail detail = userReq.getCompanies().get(0); |
| 201 | 195 | ruleVo = new LoginVo.RuleVo(); |
| 202 | 196 | ruleVo.setTransportCompanyName(detail.getCompanyName()); |
| 203 | 197 | ruleVo.setUserType(GlobalStatus.GarUserStatusEnum.RESPONSIBLE_USER.getDescription()); |
| 204 | 198 | vo.getRuleVos().add(ruleVo); |
| 205 | - | |
| 206 | - // vo.setName(enterprise.getName()); | |
| 207 | 199 | } |
| 208 | 200 | |
| 209 | 201 | // 处理场所 TODO |
| 210 | - // 查询条件 | |
| 211 | -// DisposalSite site = new DisposalSite(); | |
| 212 | -// site.setConstructionUnitPersonPhone(loginDto.getTel()); | |
| 213 | -// List<DisposalSite> disposalSites = disposalSiteService.selectDisposalSiteList(site); | |
| 214 | 202 | if (Objects.nonNull(userReq) && CollectionUtil.isNotEmpty(userReq.getEarthsites())) { |
| 215 | 203 | GarUserReqDetail detail = userReq.getEarthsites().get(0); |
| 216 | 204 | ruleVo = new LoginVo.RuleVo(); |
| ... | ... | @@ -218,7 +206,6 @@ public class GarUserServiceImpl extends ServiceImpl<GarUserMapper, GarUser> |
| 218 | 206 | ruleVo.setUserType(GlobalStatus.GarUserStatusEnum.DISPOSAL_SITE_USER.getDescription()); |
| 219 | 207 | vo.getRuleVos().add(ruleVo); |
| 220 | 208 | |
| 221 | - // vo.setName(disposalSite.getConstructionUnitPerson()); | |
| 222 | 209 | } |
| 223 | 210 | for (LoginVo.RuleVo r : vo.getRuleVos()){ |
| 224 | 211 | //排除驾驶员、企业负责人、处理场所 | ... | ... |
trash-garbage/src/main/java/com/trash/garbage/utils/HttpUtil.java
| ... | ... | @@ -57,8 +57,14 @@ public class HttpUtil { |
| 57 | 57 | url = url + "?" + paramStr; |
| 58 | 58 | } |
| 59 | 59 | } |
| 60 | + String token = trashConfig.authorization; | |
| 61 | + if(!token.contains("Bearer")){ | |
| 62 | + token = "Bearer " + token; | |
| 63 | + } | |
| 64 | + | |
| 65 | + | |
| 60 | 66 | |
| 61 | - HttpRequest request = HttpRequest.get(trashConfig.remotePath + url).header("Authorization", trashConfig.authorization).header("Content-Type", trashConfig.contentType) | |
| 67 | + HttpRequest request = HttpRequest.get(trashConfig.remotePath + url).header("Authorization", token).header("Content-Type", trashConfig.contentType) | |
| 62 | 68 | .timeout(15000); |
| 63 | 69 | |
| 64 | 70 | json = request.execute().body(); | ... | ... |