Commit 222ec7a5 authored by yanzg's avatar yanzg

升级新版本

parent 82971303
package com.yanzuoguang.wxxcx.auth.login.code2session;
import com.yanzuoguang.util.helper.HttpHelper;
public class Code2SessionReq {
public class WxAuthCode2SessionReq {
}
......@@ -10,13 +10,13 @@ import com.yanzuoguang.wxxcx.base.*;
*
* @author 颜佐光
*/
public class Code2SessionWxXwxWxXcxRequest implements WxXwxRequestUrl, WxXcxRequestUrlPara {
public class WxXcxAuthCode2SessionRequest implements WxXwxRequestUrl, WxXcxRequestUrlPara {
private final WxXcxConfig wxXcxConfig;
private final WxXcxRequest wxXcxRequest;
private final Code2SessionReq req;
private final WxAuthCode2SessionReq req;
public Code2SessionWxXwxWxXcxRequest(WxXcxConfig wxXcxConfig, WxXcxRequest wxXcxRequest, Code2SessionReq req) {
public WxXcxAuthCode2SessionRequest(WxXcxConfig wxXcxConfig, WxXcxRequest wxXcxRequest, WxAuthCode2SessionReq req) {
this.wxXcxConfig = wxXcxConfig;
this.wxXcxRequest = wxXcxRequest;
this.req = req;
......@@ -32,11 +32,11 @@ public class Code2SessionWxXwxWxXcxRequest implements WxXwxRequestUrl, WxXcxRequ
return HttpHelper.getUrlParameter(req);
}
public Code2SessionRes getResponse() {
public WxXcxCode2SessionRes getResponse() {
// todo: 检测参数是否合法
// Assert.assertEquals();
return this.wxXcxRequest.request(this, response -> {
Code2SessionRes ret = JsonHelper.deserialize(response, new TypeReference<Code2SessionRes>() {
WxXcxCode2SessionRes ret = JsonHelper.deserialize(response, new TypeReference<WxXcxCode2SessionRes>() {
});
WxXcxAssert.assertBaseError(ret);
return ret;
......
......@@ -2,5 +2,5 @@ package com.yanzuoguang.wxxcx.auth.login.code2session;
import com.yanzuoguang.wxxcx.base.WxXcxBaseError;
public class Code2SessionRes extends WxXcxBaseError {
public class WxXcxCode2SessionRes extends WxXcxBaseError {
}
package com.yanzuoguang.wxxcx.start;
import com.yanzuoguang.wxxcx.auth.login.code2session.Code2SessionReq;
import com.yanzuoguang.wxxcx.auth.login.code2session.Code2SessionRes;
import com.yanzuoguang.wxxcx.auth.login.code2session.WxAuthCode2SessionReq;
import com.yanzuoguang.wxxcx.auth.login.code2session.WxXcxCode2SessionRes;
/**
* 微信登录实现类
......@@ -13,8 +13,8 @@ public interface WxXcxAuthLogin {
/**
* 请求登录
*
* @param code2SessionReq 请求登录
* @param wxAuthCode2SessionReq 请求登录
* @return 请求实体
*/
Code2SessionRes code2Session(Code2SessionReq code2SessionReq);
WxXcxCode2SessionRes code2Session(WxAuthCode2SessionReq wxAuthCode2SessionReq);
}
package com.yanzuoguang.wxxcx.start.impl;
import com.yanzuoguang.wxxcx.auth.login.code2session.Code2SessionReq;
import com.yanzuoguang.wxxcx.auth.login.code2session.Code2SessionWxXwxWxXcxRequest;
import com.yanzuoguang.wxxcx.auth.login.code2session.Code2SessionRes;
import com.yanzuoguang.wxxcx.auth.login.code2session.WxAuthCode2SessionReq;
import com.yanzuoguang.wxxcx.auth.login.code2session.WxXcxAuthCode2SessionRequest;
import com.yanzuoguang.wxxcx.auth.login.code2session.WxXcxCode2SessionRes;
import com.yanzuoguang.wxxcx.base.WxXcxConfig;
import com.yanzuoguang.wxxcx.base.WxXcxRequest;
import com.yanzuoguang.wxxcx.start.WxXcxAuthLogin;
......@@ -25,8 +25,8 @@ public class WxXcxAuthLoginImpl implements WxXcxAuthLogin {
}
@Override
public Code2SessionRes code2Session(Code2SessionReq code2SessionReq) {
Code2SessionWxXwxWxXcxRequest code2SessionRequest = new Code2SessionWxXwxWxXcxRequest(wxXcxConfig, wxXcxRequest, code2SessionReq);
public WxXcxCode2SessionRes code2Session(WxAuthCode2SessionReq wxAuthCode2SessionReq) {
WxXcxAuthCode2SessionRequest code2SessionRequest = new WxXcxAuthCode2SessionRequest(wxXcxConfig, wxXcxRequest, wxAuthCode2SessionReq);
return code2SessionRequest.getResponse();
}
}
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