Commit ce8a3931 by 吴迪

【修改】修改业务大厅跳转代码

parent 52c10a6a
......@@ -33,5 +33,9 @@ public interface LogLoginService extends IService<LogLoginEntity> {
*/
JSONObject loginNew(Map<String, Object> params, HttpServletRequest request, HttpServletResponse response);
JSONObject loginNewTest(Map<String, Object> params, HttpServletRequest request, HttpServletResponse response);
}
......@@ -214,12 +214,13 @@ public class LogLoginServiceImpl extends ServiceImpl<LogLoginDao, LogLoginEntity
} else {
//手机用户
userType = 2;
id = phone;
id = userName;
}
} else {
//手机用户
userType = 2;
phone = userName;
id = userName;
}
}
}
......@@ -276,7 +277,19 @@ public class LogLoginServiceImpl extends ServiceImpl<LogLoginDao, LogLoginEntity
return jsonObject;
}
@Override
public JSONObject loginNewTest(Map<String, Object> params, HttpServletRequest request, HttpServletResponse response) {
JSONObject jsonObject = new JSONObject();
jsonObject.put("userType", 1);
jsonObject.put("id", "13852147293");
jsonObject.put("carno", "13852147293");
jsonObject.put("username", "13852147293");
jsonObject.put("phone", "13852147293");
R token = sysUserTokenService.createToken("qianduan_", Long.parseLong("13852147293"));//将token信息存入 数据库
Object token1 = token.get("token");
jsonObject.put("token", token1);
return jsonObject;
}
private static String doGet(String url) {
......
......@@ -684,6 +684,8 @@ public class TycpdmFirmServiceImpl extends ServiceImpl<TycpdmFirmDao, TycpdmFirm
String phone = "";
//用户类型 1.业务大厅(手机号用户) 2.业务大厅(条码卡成员) 3.官网用户
Integer userType = Integer.valueOf(String.valueOf(map.get("userType")));
String token = "";
String url = "";
if (userType == 2) {
phone = memberUser.getId() + "";//手机号
} else if (userType == 1) {
......@@ -695,9 +697,8 @@ public class TycpdmFirmServiceImpl extends ServiceImpl<TycpdmFirmDao, TycpdmFirm
String phone_M = DESUtils.byteToHexString(DESUtils.DES_CBC_Encrypt(phone.getBytes(), "loginkey".getBytes()));
String password = memberEntity.getPassword();//名文密码
String password_M = DESUtils.byteToHexString(DESUtils.DES_CBC_Encrypt(password.getBytes(), "loginkey".getBytes()));
String url = "http://wsdt.gs1cn.org/anccoh/login?method=gdsLoginSSO&gdsCode=" + phone_M + "&password=" + password_M;
url = "http://wsdt.gs1cn.org/anccoh/login?method=gdsLoginSSO&gdsCode=" + phone_M + "&password=" + password_M;
log.info(url);
return url;
} else {
MemberEntity memberEntity = memberDao.selectById(memberUser.getId());
if(StringUtils.isNoneBlank(memberEntity.getPhone())) {
......@@ -709,11 +710,13 @@ public class TycpdmFirmServiceImpl extends ServiceImpl<TycpdmFirmDao, TycpdmFirm
} else{
throw new RRException("你还没有绑定手机号!");
}
}
String phone_M = DESUtils.byteToHexString(DESUtils.DES_CBC_Encrypt(phone.getBytes(), "loginkey".getBytes()));
String url = "http://wsdt.gs1cn.org/anccoh/login?method=phoneSSO&phone=" + phone_M;
String token = HttpUtil.get(url);
url = "http://wsdt.gs1cn.org/anccoh/login?method=phoneSSO&phone=" + phone_M;
log.info(url);
}
token = HttpUtil.get(url);
JSONObject jsonObject = JSON.parseObject(token);
log.info(jsonObject.toString());
String status = jsonObject.getString("status");
String msg = jsonObject.getString("msg");
if (!"200".equals(status)) {
......
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