提交 b7d4332a 编写于 作者: xinxu.wang's avatar xinxu.wang

openid

上级 c8e5828c
流水线 #48460 已失败 于阶段
...@@ -16,6 +16,17 @@ public class LoginAppletReq { ...@@ -16,6 +16,17 @@ public class LoginAppletReq {
@ApiModelProperty("微信unionid") @ApiModelProperty("微信unionid")
private String unionid; private String unionid;
@ApiModelProperty("微信openid")
private String openid;
public String getOpenid() {
return openid;
}
public void setOpenid(String openid) {
this.openid = openid;
}
public String getMobilePhone() { public String getMobilePhone() {
return mobilePhone; return mobilePhone;
} }
......
...@@ -564,6 +564,7 @@ public class LoginController extends AccountBaseController { ...@@ -564,6 +564,7 @@ public class LoginController extends AccountBaseController {
int expiredSeconds = 24 * 60 * 60 * 30; int expiredSeconds = 24 * 60 * 60 * 30;
cacheClient.set("token-doctor-unionid-"+req.getUnionid(),newToken,expiredSeconds); cacheClient.set("token-doctor-unionid-"+req.getUnionid(),newToken,expiredSeconds);
cacheClient.set("token-unionid-"+newToken,req.getUnionid(),expiredSeconds); cacheClient.set("token-unionid-"+newToken,req.getUnionid(),expiredSeconds);
cacheClient.set("token-openid-"+newToken,req.getOpenid(),expiredSeconds);
intactUtil.sendIntact(batchNo, "login/applet", com.pica.cloud.foundation.completeness.contract.constants.CommonConstants.INTACT_CONTENT_LOG_STATUS_3, "req:" + JSON.toJSONString(req)); intactUtil.sendIntact(batchNo, "login/applet", com.pica.cloud.foundation.completeness.contract.constants.CommonConstants.INTACT_CONTENT_LOG_STATUS_3, "req:" + JSON.toJSONString(req));
return PicaResponse.toResponse(newToken); return PicaResponse.toResponse(newToken);
...@@ -589,6 +590,7 @@ public class LoginController extends AccountBaseController { ...@@ -589,6 +590,7 @@ public class LoginController extends AccountBaseController {
int expiredSeconds = 24 * 60 * 60 * 30; int expiredSeconds = 24 * 60 * 60 * 30;
cacheClient.set("token-doctor-unionid-"+appletModel.getUnionId(),login.getToken(),expiredSeconds); cacheClient.set("token-doctor-unionid-"+appletModel.getUnionId(),login.getToken(),expiredSeconds);
cacheClient.set("token-unionid-"+login.getToken(),appletModel.getUnionId(),expiredSeconds); cacheClient.set("token-unionid-"+login.getToken(),appletModel.getUnionId(),expiredSeconds);
cacheClient.set("token-openid-"+login.getToken(),appletModel.getOpenId(),expiredSeconds);
} }
return PicaResponse.toResponse(login); return PicaResponse.toResponse(login);
} }
......
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册