Commit 808093ca authored by 技术部-任文超's avatar 技术部-任文超

网关登录成功返回结果增加token

parent b8b4b898
...@@ -1185,7 +1185,10 @@ public class InnerController implements IBaseController { ...@@ -1185,7 +1185,10 @@ public class InnerController implements IBaseController {
//增加登陆统计发送 //增加登陆统计发送
UserStatistics statistics=new UserStatistics(user,dimension,3,channelId); UserStatistics statistics=new UserStatistics(user,dimension,3,channelId);
MqUtils.sendLoanVest(statistics); MqUtils.sendLoanVest(statistics);
return JsonResult.buildSuccessResult("校验成功", new UserRet(user)); //创建session并返回Token
AuthBean session = sessionService.createSession(channelId, createdFrom, appChannel, user, merchant);
String token = session.getToken();
return JsonResult.buildSuccessResult("校验成功", new UserRetWithToken(user, token));
} }
@LogHttpCaller @LogHttpCaller
......
...@@ -46,6 +46,5 @@ public class UserRet implements Serializable { ...@@ -46,6 +46,5 @@ public class UserRet implements Serializable {
this.setUuid(user.getUuid()); this.setUuid(user.getUuid());
this.setCreatedAt(createTimeStamp); this.setCreatedAt(createTimeStamp);
this.setUpdatedAt(updateTimeStamp); this.setUpdatedAt(updateTimeStamp);
} }
} }
package cn.quantgroup.xyqb.model;
import cn.quantgroup.xyqb.entity.User;
import lombok.Data;
import java.io.Serializable;
/**
* 用户登录简项信息,含Token
* 供Auth2.0技术网关手机号+短信验证码登录成功使用
*/
@Data
public class UserRetWithToken extends UserRet implements Serializable {
/**
* created by user-center,to sync with api-gateway
*/
private String token;
public UserRetWithToken(User user, String token) {
super(user);
this.setToken(token);
}
}
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