技威登录字段新增
This commit is contained in:
parent
4c6fe78903
commit
29cbed2be0
|
|
@ -13,6 +13,9 @@ public class GwellParamDto {
|
|||
private String P2PVerifyCode1;
|
||||
//code2
|
||||
private String P2PVerifyCode2;
|
||||
|
||||
private String sessionID;
|
||||
private String sessionID2;
|
||||
//技威userID
|
||||
private String UserID;
|
||||
|
||||
|
|
@ -30,6 +33,15 @@ public class GwellParamDto {
|
|||
this.UserID = userID;
|
||||
}
|
||||
|
||||
public GwellParamDto(String isRegisterGwell, String p2pVerifyCode1,String p2pVerifyCode2, String userID,String sessionID,String sessionID2) {
|
||||
this.isRegisterGwell = isRegisterGwell;
|
||||
this.P2PVerifyCode1 = p2pVerifyCode1;
|
||||
this.P2PVerifyCode2 = p2pVerifyCode2;
|
||||
this.UserID = userID;
|
||||
this.sessionID = sessionID;
|
||||
this.sessionID2 = sessionID2;
|
||||
}
|
||||
|
||||
|
||||
public String getIsRegisterGwell() {
|
||||
return isRegisterGwell;
|
||||
|
|
@ -63,4 +75,19 @@ public class GwellParamDto {
|
|||
UserID = userID;
|
||||
}
|
||||
|
||||
public String getSessionID() {
|
||||
return sessionID;
|
||||
}
|
||||
|
||||
public void setSessionID(String sessionID) {
|
||||
this.sessionID = sessionID;
|
||||
}
|
||||
|
||||
public String getSessionID2() {
|
||||
return sessionID2;
|
||||
}
|
||||
|
||||
public void setSessionID2(String sessionID2) {
|
||||
this.sessionID2 = sessionID2;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -232,7 +232,7 @@ public class UserServiceImpl implements UserService {
|
|||
*/
|
||||
JSONObject jsonObject = new JSONObject();
|
||||
//用户信息
|
||||
jsonObject.put("user", getUserInfo(user));
|
||||
jsonObject.put("user", getUserInfo(user,gwellParam));
|
||||
//版本号
|
||||
if(ApiVersion.version1_0.equals(loginParam.getVersion())){
|
||||
//用户资产
|
||||
|
|
@ -861,8 +861,6 @@ public class UserServiceImpl implements UserService {
|
|||
* @return
|
||||
*/
|
||||
public GwellParamDto getGwellInfo(String isRegisterGwell,String phoneNumber){
|
||||
//未注册技威
|
||||
if(!BooleanEnum.YES.getKey().equals(isRegisterGwell)){
|
||||
//注册技威
|
||||
Map<String,String> registerMap = GwellApi.Register(phoneNumber);
|
||||
String registerResult = registerMap.get("result");
|
||||
|
|
@ -878,14 +876,13 @@ public class UserServiceImpl implements UserService {
|
|||
String loginResult = loginMap.get("result");
|
||||
//登陆成功
|
||||
if(GwellEnum.success.getKey().equals(loginResult)){
|
||||
return new GwellParamDto(BooleanEnum.YES.getKey(),loginMap.get("P2PVerifyCode1"),loginMap.get("P2PVerifyCode2"),loginMap.get("UserID"));
|
||||
return new GwellParamDto(BooleanEnum.YES.getKey(),loginMap.get("P2PVerifyCode1"),loginMap.get("P2PVerifyCode2"),loginMap.get("UserID"),loginMap.get("SessionID"),loginMap.get("SessionID2"));
|
||||
}
|
||||
else{
|
||||
return new GwellParamDto(BooleanEnum.YES.getKey());
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
|
|
@ -961,6 +958,30 @@ public class UserServiceImpl implements UserService {
|
|||
json.put("shopsUserId", user.getShopsUserId());
|
||||
return json;
|
||||
}
|
||||
|
||||
/**
|
||||
* 封装用户信息
|
||||
* @param user
|
||||
* @return
|
||||
*/
|
||||
public JSONObject getUserInfo(User user,GwellParamDto gwellParam){
|
||||
JSONObject json = new JSONObject();
|
||||
json.put("userId", user.getUserId());
|
||||
json.put("phoneNumber", user.getPhoneNumber());
|
||||
json.put("nickName", user.getNickName());
|
||||
json.put("userSex", user.getUserSex());
|
||||
json.put("signature", user.getSignature());
|
||||
json.put("userImg", user.getUserImg());
|
||||
json.put("P2PVerifyCode1", user.getP2PVerifyCode1());
|
||||
json.put("P2PVerifyCode2", user.getP2PVerifyCode2());
|
||||
json.put("sessionID", gwellParam != null ? gwellParam.getSessionID() : "");
|
||||
json.put("sessionID2", gwellParam != null ? gwellParam.getSessionID2() : "");
|
||||
json.put("gwellUserID", user.getGwellUserID());
|
||||
json.put("neteaseToken", user.getNeteaseToken());
|
||||
json.put("userType", user.getUserType());
|
||||
json.put("shopsUserId", user.getShopsUserId());
|
||||
return json;
|
||||
}
|
||||
/**
|
||||
* 封装用户信息
|
||||
* @param user
|
||||
|
|
@ -1061,7 +1082,6 @@ public class UserServiceImpl implements UserService {
|
|||
|
||||
/**
|
||||
* 封装商家认证信息
|
||||
* @param shopsInfo
|
||||
* @param userImg
|
||||
* @return
|
||||
*/
|
||||
|
|
|
|||
Loading…
Reference in New Issue