线上评估服务器错误及公众号,渤海帐号问题

This commit is contained in:
2021-12-03 16:40:11 +08:00
parent 6bfd7d7aae
commit db700e5f48
6 changed files with 24 additions and 17 deletions
@@ -80,7 +80,7 @@ public class DistrictController {
// response.sendRedirect("/coming");
// return null;
// }
if("b".equals(login_user_type)){
if("b".equals(login_user_type) || "gb".equals(login_user_type)){
CacheUtils.putValue(CachePolicyEnum.LONG, UsersInfoService.class, weiXinId + "_city_"+ login_user_type , model.getCityName());
}
Long userId = Long.parseLong(CookieUtils.getCookieValue(request,"login_user_id"));
@@ -129,7 +129,7 @@ public class UserController {
}
System.out.println("reqCityChoicePage 微信OPEN_ID:" + weiXinId);
//企业用户入口查询企业账户开通的城市
if(type.equals("b") || type.equals("bh")){
if(type.equals("b") || type.equals("gb")){
//Boolean isLogin = usersInfoService.checkEnterpriseWeiXinUserIsLogin(weiXinId);
String cacheWeiXinId = CookieUtils.getCookieValue(request,"login_enterpriseuser_weixinid");
String loginUserIdstr = CookieUtils.getCookieValue(request,"login_user_id");
@@ -139,13 +139,13 @@ public class UserController {
try {
FjtUsers users = fjtUsersService.findById(userId);
// if(users.getRole()==17 && type.equals("b")){
// CookieUtils.removeCookie(request, response, "login_enterpriseuser_weixinid");
// response.sendRedirect("reqLoginPage");
// }else if(users.getRole()==12 && type.equals("bh")){
// CookieUtils.removeCookie(request, response, "login_enterpriseuser_weixinid");
// response.sendRedirect("bhydLoginPage?code="+model.getCode());
// }else{
if(users.getRole()==17 && type.equals("gb")){
CookieUtils.removeCookie(request, response, "login_enterpriseuser_weixinid");
response.sendRedirect("reqLoginPage");
}else if(users.getRole()==12 && type.equals("b")){
CookieUtils.removeCookie(request, response, "login_enterpriseuser_weixinid");
response.sendRedirect("bhydLoginPage?code="+model.getCode());
}else{
List<String> citys = userCityService.findSupportCityByUserId(userId);
if(citys == null || citys.isEmpty()){
citys = Arrays.asList("上海");
@@ -156,7 +156,7 @@ public class UserController {
// citys = userCityService.findSupportCityByUserId(userId);
// }
model.setCitys(citys);
// }
}
} catch (Exception e) {
model.setCitys(new ArrayList<String>());
}
@@ -209,6 +209,7 @@ public class UserController {
CookieUtils.removeCookie(request, response,"login_enterpriseuser_weixinid");
response.sendRedirect("bhydLoginPage?code=bhydcode");
} catch (Exception e) {
e.printStackTrace();
}
return model;
}
@@ -326,7 +327,7 @@ public class UserController {
return resultModel;
}
CookieUtils.setCookie("login_user_id", user.getId() + "", "/", 60 * 60 * 24 *7, response);
CookieUtils.setCookie("login_user_type", "b", "/", 60 * 60 * 24 *7, response);
CookieUtils.setCookie("login_user_type", "gb", "/", 60 * 60 * 24 *7, response);
CookieUtils.setCookie("login_enterpriseuser_weixinid", weiXinId, "/", 60 * 60 * 24 *7, response);
//CacheUtils.putValue(CachePolicyEnum.LONG, UsersInfoService.class, weiXinId + "_" + Message.SMS_CODE_TYPE_ENTER_LOGIN , user.getId());
resultModel.setResult(Message.RESULT_SUCCESS);
@@ -26,7 +26,7 @@
<div class="page page-current">
<div class="content">
<div class="top">
<input id ="t" type="hidden" value="${type!'b'}">
<input id ="t" type="hidden" value="${type!}">
<#if !(cityName??) || cityName == "">
<input id="cityName" value="上海" type="hidden">
<#else>
@@ -48,7 +48,7 @@
<div class="list-block list-block01 media-list" id="searchSpan" style="margin-bottom:50px;">
<ul></ul>
</div>
<#if type?? && type == 'b'>
<#if type?? && (type == 'b' || type == 'gb')>
<nav class="bar bar-tab">
<#if role?? && role == 17>
<a class="tab-item external" href="../weiXinEvaluation/bhhistory">估价记录</a>
@@ -42,7 +42,7 @@
</div>
<div class="container">
<div class="city">
<#if type?? && (type == 'b' || type == 'bh') && (citys??&&citys?size>0)>
<#if type?? && (type == 'b' || type == 'gb') && (citys??&&citys?size>0)>
<div class="city-list">
<#list citys as bo>
<p onclick="req2(this)">${bo}</p>
@@ -54,7 +54,7 @@
</#list>
</div>
</#if>
<#if type?? && type == 'c' || type == 'b' && (citys??&&citys?size=0)>
<#if type?? && type == 'c' || (type == 'b' || type == 'gb') && (citys??&&citys?size=0)>
<div class="city-list curCity">
<span class="city-letter" id="Cur">当前定位城市</span>
</div>
@@ -84,7 +84,7 @@
if(re.result == "fail"){
$.toast(re.msg);
} else {
window.location.href = "reqCityChoicePage?type=b";
window.location.href = "reqCityChoicePage?type=gb";
}
},error:function (data, status) {
$.toast("发送失败,请重试");
@@ -2014,7 +2014,13 @@ public class DistrictServiceImpl implements DistrictService {
params.add(new QueryParam("city", ClientUtils.escapeQueryChars(city)));
}
if (StringUtils.isNotBlank(region)) {
params.add(new QueryParam("region", ClientUtils.escapeQueryChars(RegionData.formatRegion(city, region))));
city = ClientUtils.escapeQueryChars(city);
String newRegion = RegionData.formatRegion(city, region);
if(StringUtils.isNotBlank(newRegion)){
params.add(new QueryParam("region", ClientUtils.escapeQueryChars(newRegion)));
}else{
params.add(new QueryParam("region", region));
}
}
if (StringUtils.isNotBlank(target)) {
params.add(new QueryParam("category", target));