Commit 2354d02699350cad07dea4b225692eff14007043

Authored by 2c2c2c
1 parent 82c74730

装修垃圾登录优化

trash-garbage/src/main/java/com/trash/garbage/service/impl/GarUserServiceImpl.java
@@ -175,9 +175,6 @@ public class GarUserServiceImpl extends ServiceImpl<GarUserMapper, GarUser> @@ -175,9 +175,6 @@ public class GarUserServiceImpl extends ServiceImpl<GarUserMapper, GarUser>
175 175
176 GarUserReq userReq = reqGarUser(loginDto.getTel()); 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 LoginVo.RuleVo ruleVo = new LoginVo.RuleVo(); 178 LoginVo.RuleVo ruleVo = new LoginVo.RuleVo();
182 ruleVo.setUserType(GlobalStatus.GarUserStatusEnum.NORMAL_USER.getDescription()); 179 ruleVo.setUserType(GlobalStatus.GarUserStatusEnum.NORMAL_USER.getDescription());
183 vo.setRuleVos(new ArrayList<>(Arrays.asList(ruleVo))); 180 vo.setRuleVos(new ArrayList<>(Arrays.asList(ruleVo)));
@@ -193,24 +190,15 @@ public class GarUserServiceImpl extends ServiceImpl&lt;GarUserMapper, GarUser&gt; @@ -193,24 +190,15 @@ public class GarUserServiceImpl extends ServiceImpl&lt;GarUserMapper, GarUser&gt;
193 } 190 }
194 191
195 // 企业负责人 TODO 192 // 企业负责人 TODO
196 -// TransportationEnterprise transportationEnterprise = new TransportationEnterprise();  
197 -// transportationEnterprise.setServicePhone(loginDto.getTel());  
198 -// List<TransportationEnterprise> enterpriseList = enterpriseService.selectTransportationEnterpriseList(transportationEnterprise);  
199 if (Objects.nonNull(userReq) && CollectionUtil.isNotEmpty(userReq.getCompanies())) { 193 if (Objects.nonNull(userReq) && CollectionUtil.isNotEmpty(userReq.getCompanies())) {
200 GarUserReqDetail detail = userReq.getCompanies().get(0); 194 GarUserReqDetail detail = userReq.getCompanies().get(0);
201 ruleVo = new LoginVo.RuleVo(); 195 ruleVo = new LoginVo.RuleVo();
202 ruleVo.setTransportCompanyName(detail.getCompanyName()); 196 ruleVo.setTransportCompanyName(detail.getCompanyName());
203 ruleVo.setUserType(GlobalStatus.GarUserStatusEnum.RESPONSIBLE_USER.getDescription()); 197 ruleVo.setUserType(GlobalStatus.GarUserStatusEnum.RESPONSIBLE_USER.getDescription());
204 vo.getRuleVos().add(ruleVo); 198 vo.getRuleVos().add(ruleVo);
205 -  
206 - // vo.setName(enterprise.getName());  
207 } 199 }
208 200
209 // 处理场所 TODO 201 // 处理场所 TODO
210 - // 查询条件  
211 -// DisposalSite site = new DisposalSite();  
212 -// site.setConstructionUnitPersonPhone(loginDto.getTel());  
213 -// List<DisposalSite> disposalSites = disposalSiteService.selectDisposalSiteList(site);  
214 if (Objects.nonNull(userReq) && CollectionUtil.isNotEmpty(userReq.getEarthsites())) { 202 if (Objects.nonNull(userReq) && CollectionUtil.isNotEmpty(userReq.getEarthsites())) {
215 GarUserReqDetail detail = userReq.getEarthsites().get(0); 203 GarUserReqDetail detail = userReq.getEarthsites().get(0);
216 ruleVo = new LoginVo.RuleVo(); 204 ruleVo = new LoginVo.RuleVo();
@@ -218,7 +206,6 @@ public class GarUserServiceImpl extends ServiceImpl&lt;GarUserMapper, GarUser&gt; @@ -218,7 +206,6 @@ public class GarUserServiceImpl extends ServiceImpl&lt;GarUserMapper, GarUser&gt;
218 ruleVo.setUserType(GlobalStatus.GarUserStatusEnum.DISPOSAL_SITE_USER.getDescription()); 206 ruleVo.setUserType(GlobalStatus.GarUserStatusEnum.DISPOSAL_SITE_USER.getDescription());
219 vo.getRuleVos().add(ruleVo); 207 vo.getRuleVos().add(ruleVo);
220 208
221 - // vo.setName(disposalSite.getConstructionUnitPerson());  
222 } 209 }
223 for (LoginVo.RuleVo r : vo.getRuleVos()){ 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,8 +57,14 @@ public class HttpUtil {
57 url = url + "?" + paramStr; 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 .timeout(15000); 68 .timeout(15000);
63 69
64 json = request.execute().body(); 70 json = request.execute().body();