Commit 0510ef73 authored by lee_mingzhu's avatar lee_mingzhu Committed by minminyan

rpc

parent e5e0feb4
package cn.quantgroup.xyqb.controller.external.motan;
import cn.quantgroup.bean.*;
import cn.quantgroup.service.*;
import cn.quantgroup.xyqb.controller.IBaseController;
import cn.quantgroup.xyqb.entity.User;
import cn.quantgroup.xyqb.entity.UserDetail;
import cn.quantgroup.xyqb.model.IdType;
import cn.quantgroup.xyqb.model.UserRet;
import cn.quantgroup.xyqb.model.session.*;
import cn.quantgroup.xyqb.service.auth.IIdCardService;
import cn.quantgroup.xyqb.service.user.IUserDetailService;
import cn.quantgroup.xyqb.service.user.IUserService;
......@@ -24,7 +28,7 @@ import java.text.ParseException;
* Created by 11 on 2017/2/27.
*/
@MotanService(export = "demoMotan:8002", registry="registryConfig")
public class MotanUserServiceImpl implements UserMotanService{
public class MotanUserServiceImpl implements UserMotanService, IBaseController{
private static final Logger LOGGER = LoggerFactory.getLogger(MotanUserServiceImpl.class);
......@@ -138,6 +142,21 @@ public class MotanUserServiceImpl implements UserMotanService{
return result;
}
@Override
public UserSysResult<XLoginInfo> getLoginInfo(String s) {
SessionStruct sessionStruct = getSessionStruct();
LoginInfo loginInfo = new LoginInfo();
loginInfo.setUser(UserRet.getUserRet(sessionStruct.getValues().getUser()));
loginInfo.setToken(sessionStruct.getSid());
LoginInfo.LoginContext context = new LoginInfo.LoginContext();
context.setChannelId(sessionStruct.getValues().getLoginProperties().getChannelId());
context.setCreatedFrom(sessionStruct.getValues().getLoginProperties().getCreatedFrom());
context.setAppChannel(sessionStruct.getValues().getLoginProperties().getAppChannel());
loginInfo.setLoginContext(context);
XLoginInfo xLoginInfo = LoginInfo.getXLoginInfo(loginInfo);
return returnValue(xLoginInfo, "");
}
private <T> T convertObject(String json, TypeReference typeReference) {
try {
if(StringUtils.isEmpty(json)) {
......
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