Commit 775b3661 by ddx

清除cache修改

parent d6ce64e1
......@@ -35,6 +35,7 @@ public class CleanCookieUtil {
json.put("site", cookieReq.getSite());
}
} else {
if(StringUtil.isNotEmpty(cookieReq.getUserInfo())) {
JSONArray jsonArray = new JSONArray();
if (type.equals("3")) {
jsonArray.add(cookieReq.getZoneCode() + ":" + cookieReq.getUserInfo());
......@@ -42,13 +43,15 @@ public class CleanCookieUtil {
jsonArray.add(cookieReq.getZoneCode() + ":" + taxno + ":" + cookieReq.getUserInfo());
}
json.put("keyList", jsonArray);
}
} else {
if(null!=cookieReq.getUserInfoJson()) {
JSONObject loginInfoJson = JSON.parseObject(JSON.toJSONString(cookieReq.getUserInfoJson()));
loginInfoJson.put("taxno", cookieReq.getTaxno());
loginInfoJson.put("dqdm", cookieReq.getZoneCode());
json.put("loginInfoJson", loginInfoJson);
}
}
}
String url = TokenConstants.CLEAN_COOKIE_URL;
logger.info(uuIdFlag + " cleanCookie taxno is " + taxno + " url is " + url + ",param is " + json.toString());
cleanCookieVo.setRequestContext(json.toString());
......
......@@ -914,35 +914,6 @@ public class TkTokenServiceImpl implements TkTokenService {
} else {
try {
String newUserInfo = "";
if(null != cookieReq.getUserInfoJson()) {
JSONObject loginInfoJson = JSON.parseObject(JSON.toJSONString(cookieReq.getUserInfoJson()));
TaxUserInfo bean;
String loginType = "";
if (loginInfoJson.containsKey("loginType")) {
loginType = loginInfoJson.getString("loginType");
}
if ("b".equals(loginType)) {
bean = new TaxUserInfo();
if (loginInfoJson.containsKey("password")) {
bean.setPassword(loginInfoJson.getString("password"));
}
if (loginInfoJson.containsKey("username")) {
bean.setUsername(loginInfoJson.getString("username"));
}
if (loginInfoJson.containsKey("phone")) {
bean.setPhone(loginInfoJson.getString("phone"));
}
if (loginInfoJson.containsKey("userType")) {
bean.setUserType(loginInfoJson.getString("userType"));
}
bean.setLoginType("b");
newUserInfo= bean.toString();
} else {
newUserInfo = JSON.parseObject(JSON.toJSONString(cookieReq.getUserInfoJson()), TaxUserInfo.class).toString();
}
logger.info(uuId + " cleanCookie taxno is " + taxno + ", userInfoJson newUserInfo is " + newUserInfo);
}
//CookieInfo优先级高于UserInfo
if(null != cookieReq.getCookieInfoJson()) {
JSONObject cookieInfoJson = JSON.parseObject(JSON.toJSONString(cookieReq.getCookieInfoJson()));
if (cookieInfoJson.containsKey("cookie")) {
......@@ -960,10 +931,12 @@ public class TkTokenServiceImpl implements TkTokenService {
}
logger.info(uuId + " cleanCookie taxno is " + taxno + ", cookieInfoJson newUserInfo is " + newUserInfo);
}
if(StringUtil.isEmpty(newUserInfo)) {
if(null == cookieReq.getUserInfoJson() && StringUtil.isEmpty(newUserInfo)) {
result.errorResponse(ResultEnum.param_error);
} else {
if(StringUtil.isNotEmpty(newUserInfo)) {
cookieReq.setUserInfo(MD5Util.MD5Encode(newUserInfo));
}
if(!tkUser.getDefaultCleanType().equals("9")) {
resMap = CleanCookieUtil.cleanCookie(uuId, cookieReq, tkUser.getDefaultCleanType());
if (!(resMap!=null && "0".equals(resMap.getCode()))) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment