Commit ce8a3931 by 吴迪

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

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