Quellcode durchsuchen

新增易联众对接

chenweida vor 7 Jahren
Ursprung
Commit
ad910842ca

+ 1 - 1
patient-co/patient-co-wlyy/pom.xml

@ -491,7 +491,7 @@
        <dependency>
            <groupId>com.ylz</groupId>
            <artifactId>ehc-empi-java-sdk</artifactId>
            <version>20180522</version>
            <version>20180524_2</version>
        </dependency>
    </dependencies>
    <build>

+ 39 - 99
patient-co/patient-co-wlyy/src/main/java/com/yihu/wlyy/service/third/ylz/YLZUserService.java

@ -1,29 +1,18 @@
package com.yihu.wlyy.service.third.ylz;
import com.alibaba.fastjson.JSON;
import com.alibaba.fastjson.JSONArray;
import com.alibaba.fastjson.JSONObject;
import com.yihu.wlyy.service.third.ylz.model.YLZAccessToken;
import com.yihu.wlyy.service.third.ylz.model.YLZUser;
import com.yihu.wlyy.service.third.ylz.model.YLZUserCard;
import com.yihu.wlyy.util.HttpClientUtil;
import com.ylzinfo.ehc.empi.sdk.EhcEmpiClient;
import com.ylzinfo.ehc.empi.sdk.dto.request.AuthorizationTokenRequest;
import com.ylzinfo.onepay.sdk.OnepayDefaultClient;
import com.ylzinfo.onepay.sdk.domain.RequestParams;
import com.ylzinfo.onepay.sdk.domain.ResponseParams;
import com.ylzinfo.onepay.sdk.exception.PayException;
import com.ylzinfo.onepay.sdk.utils.DateUtil;
import com.ylzinfo.onepay.sdk.utils.SecurityUtil;
import com.ylzinfo.onepay.sdk.utils.Signature;
import com.ylzinfo.onepay.sdk.utils.StringUtil;
import com.ylzinfo.ehc.empi.sdk.domain.ResponseParams;
import com.ylzinfo.ehc.empi.sdk.dto.request.UserInfoRequest;
import com.ylzinfo.ehc.empi.sdk.dto.response.AuthorizationTokenResponse;
import com.ylzinfo.ehc.empi.sdk.dto.response.UserInfoResponse;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Service;
import java.util.Date;
import java.util.HashMap;
import java.util.Map;
/**
 * Created by chenweida on 2018/5/16 0016.
@ -53,23 +42,32 @@ public class YLZUserService {
    private String signType = "MD5";
    private String encryptType = "AES";
    private String responseType = "token";
    @Autowired
    private HttpClientUtil httpClientUtil;
    private final String responseType = "token";
    private final String version = "1.0";
    public String getAccessToken() {
    public AuthorizationTokenResponse getAccessToken(String openId) {
        try {
            EhcEmpiClient empiClient = new EhcEmpiClient(gatewayURL, appId, appSecret, termId, "1.0", signType, encryptType);
            EhcEmpiClient empiClient = new EhcEmpiClient(gatewayURL, appId, appSecret, termId, version, signType, encryptType);
            try {
                AuthorizationTokenRequest params = new AuthorizationTokenRequest();
                params.setRedirectUrl(redirectUrl);
                params.setUserName("48");
                String url = empiClient.createUrl("gatewayPage", empiUimcAuthorization, params);
                String responseStr = httpClientUtil.get(url, "UTF-8");
                net.sf.json.JSONObject responseJSON = net.sf.json.JSONObject.fromObject(responseStr);
                Map params = new HashMap();
                params.put("response_type", responseType);
                params.put("redirect_url", redirectUrl);
                params.put("auth_type", "IXM");
                params.put("domain_cust_id", "openId");
                //params 为自行解析回调参数。 key值参考文档
                ResponseParams<AuthorizationTokenResponse> response = empiClient.checkResponseParams(params, AuthorizationTokenResponse.class);
                if (empiClient.isSuccessful(response)) {
                    AuthorizationTokenResponse authorizationTokenResponse = response.getBizContent();
                    logger.info("易联众返回结果:" + authorizationTokenResponse);
                    return authorizationTokenResponse;
                } else {
                    logger.error("调用易联众接口失败:" + net.sf.json.JSONObject.fromObject(response));
                }
            } catch (Exception e) {
                e.printStackTrace();
            }
@ -80,61 +78,24 @@ public class YLZUserService {
        return null;
    }
    private String initParams(RequestParams requestParams) throws PayException {
        String sign = Signature.createSign(requestParams, this.appSecret);
        requestParams.setSign(sign);
        String requestMessage;
        try {
            logger.info("加密前报文:" + JSONObject.toJSONString(requestParams));
            requestMessage = SecurityUtil.encrypt(JSONObject.toJSONString(requestParams.getParam()), this.encryptType, this.appSecret, this.appId);
            logger.info("加密后报文:" + requestMessage);
            requestParams.setEncryptData(requestMessage);
        } catch (Exception var11) {
            throw new PayException("请求报文加密失败");
        }
        requestParams.setParam((Object) null);
        requestMessage = JSON.toJSONString(requestParams);
        System.out.println("请求参数报文:" + requestMessage);
        return requestMessage;
    }
    /**
     * 此方式仅应用到注册回调
     */
    public YLZUser getUserByToken(String token) {
    public UserInfoResponse getUserByToken(String token) {
        EhcEmpiClient empiClient = new EhcEmpiClient(gatewayURL, appId, appSecret, termId, version, signType, encryptType);
        try {
            String result = null;
            OnepayDefaultClient onepayClient = new OnepayDefaultClient(
                    empiUimcQuery,
                    appId,
                    appSecret, signType, encryptType);
            RequestParams requestParams = new RequestParams();
            requestParams.setAppId(appId);
            requestParams.setTimestamp(DateUtil.getCurrentDateTime());
            requestParams.setSignType(signType);
            requestParams.setEncryptType(encryptType);
            //业务参数
            JSONObject params = new JSONObject();
            params.put("token", token);  //注册回调的token
            requestParams.setParam(params);
            logger.info("requestParams:" + requestParams.toString());
            ResponseParams<JSONObject> res = onepayClient.execute(requestParams);
            if (OnepayDefaultClient.isSuccessful(res)) {
                result = JSON.toJSONString(res.getParam());
                logger.info("易联众返回结果:" + result);
//             新增保存数据
                JSONObject userJson = JSON.parseObject(result).getJSONObject("biz_content");
                YLZUser user = getYLZUser(userJson);
                YLZUserCard userCard = getYLZUserCard(userJson.getJSONArray("card_info"));
                user.setYlzUserCard(userCard);
                return user;
            UserInfoRequest params = new UserInfoRequest();
            params.setAccessToken(token);
            ResponseParams<UserInfoResponse> response = empiClient.queryUserInfo(params);
            if (empiClient.isSuccessful(response)) {
                UserInfoResponse userInfoResponse = response.getBizContent();
                logger.info("易联众返回结果:" + userInfoResponse);
                return userInfoResponse;
            } else {
                logger.error("调用易联众接口失败:" + res.toString());
                logger.error("调用易联众接口失败:" + net.sf.json.JSONObject.fromObject(response));
            }
            return null;
        } catch (Exception e) {
@ -143,26 +104,5 @@ public class YLZUserService {
        }
    }
    private YLZUserCard getYLZUserCard(JSONArray card_infos) {
        YLZUserCard ylzUserCard = null;
        for (int i = 0; i < card_infos.size(); i++) {
            JSONObject jo = card_infos.getJSONObject(i);
            if ("normal ".equals(jo.getString("state"))) {
                ylzUserCard = JSON.parseObject(jo.toJSONString(), YLZUserCard.class);
                break;
            }
        }
        return ylzUserCard;
    }
    private YLZUser getYLZUser(JSONObject userJson) {
        YLZUser ylzUserCard = JSON.parseObject(userJson.toJSONString(), YLZUser.class);
        return ylzUserCard;
    }
    public static void main(String[] args) {
        String str = "{\"card_no\":\"111111\"}";
        YLZUserCard ylzUserCard = JSON.parseObject(str, YLZUserCard.class);
        System.out.println(ylzUserCard);
    }
}

+ 0 - 64
patient-co/patient-co-wlyy/src/main/java/com/yihu/wlyy/service/third/ylz/model/YLZAccessToken.java

@ -1,64 +0,0 @@
package com.yihu.wlyy.service.third.ylz.model;
import java.util.Date;
/**
 * Created by chenweida on 2018/5/16 0016.
 */
public class YLZAccessToken {
    private String accessToken; //授权token	String(32)
    private String tokenType;
    private Integer expiresIn;// token过期时间  3600 秒
    private Date createTime;// token过期时间  3600 秒
    private String state;
    public String getAccessToken() {
        return accessToken;
    }
    public void setAccessToken(String accessToken) {
        this.accessToken = accessToken;
    }
    public String getTokenType() {
        return tokenType;
    }
    public void setTokenType(String tokenType) {
        this.tokenType = tokenType;
    }
    public Integer getExpiresIn() {
        return expiresIn;
    }
    public void setExpiresIn(Integer expiresIn) {
        this.expiresIn = expiresIn;
    }
    public String getState() {
        return state;
    }
    public void setState(String state) {
        this.state = state;
    }
    public Date getCreateTime() {
        return createTime;
    }
    public void setCreateTime(Date createTime) {
        this.createTime = createTime;
    }
    public boolean isNotOutTime() {
        long interval = (new Date().getTime() - this.getCreateTime().getTime()) / 1000;
        if (interval > (expiresIn - 120)) {
            return false;
        } else {
            return true;
        }
    }
}

+ 0 - 126
patient-co/patient-co-wlyy/src/main/java/com/yihu/wlyy/service/third/ylz/model/YLZRequestParams.java

@ -1,126 +0,0 @@
//package com.yihu.wlyy.service.third.ylz.model;
//
//import com.alibaba.fastjson.annotation.JSONField;
//import net.sf.json.JSONObject;
//
///**
// * Created by chenweida on 2018/5/22 0022.
// */
//public class YLZRequestParams {
//    @JSONField(name = "timestamp")
//    private String timestamp;
//    @JSONField(name = "sign")
//    private String sign;
//    @JSONField(name = "biz_content")
//    private String bizContent;
//    @JSONField(name = "enc_type")
//    private String signType = "MD5";
//    @JSONField(name = "term_id")
//    private String termId;
//    @JSONField(name = "method")
//    private String method;
//    @JSONField(name = "app_id")
//    private String appId;
//    @JSONField(name = "version")
//    private String version = "1.0";
//    @JSONField(name = "sign_type")
//    private String encType = "AES";
//
//
//    public String getTimestamp() {
//        return timestamp;
//    }
//
//    public void setTimestamp(String timestamp) {
//        this.timestamp = timestamp;
//    }
//
//    public String getSign() {
//        return sign;
//    }
//
//    public void setSign(String sign) {
//        this.sign = sign;
//    }
//
//    public String getBizContent() {
//        return bizContent;
//    }
//
//    public void setBizContent(String bizContent) {
//        this.bizContent = bizContent;
//    }
//
//    public String getSignType() {
//        return signType;
//    }
//
//    public void setSignType(String signType) {
//        this.signType = signType;
//    }
//
//    public String getTermId() {
//        return termId;
//    }
//
//    public void setTermId(String termId) {
//        this.termId = termId;
//    }
//
//    public String getMethod() {
//        return method;
//    }
//
//    public void setMethod(String method) {
//        this.method = method;
//    }
//
//    public String getAppId() {
//        return appId;
//    }
//
//    public void setAppId(String appId) {
//        this.appId = appId;
//    }
//
//    public String getVersion() {
//        return version;
//    }
//
//    public void setVersion(String version) {
//        this.version = version;
//    }
//
//    public String getEncType() {
//        return encType;
//    }
//
//    public void setEncType(String encType) {
//        this.encType = encType;
//    }
//
//    /**
//     * 1. 筛选
//     获取所有请求参数,不包括字节类型参数,如文件、字节流,剔除sign字段。
//     (app_id.、term_id、method、version、timestamp、sign_type、enc_type、)
//     2. 排序
//     将筛选的参数按照第一个字符的键值ASCII码递增排序(字母升序排序),如果遇到相同字符则按照第二个字符的键值ASCII码递增排序,以此类推。
//
//     3. 拼接
//     将排序后的参数与其对应值,组合成“参数=参数值”的格式,并且把这些参数用&字符连接起来,最后拼接上应用密钥在“…参数=参数值key=你的密钥”,此时生成的字符串为待签名字符串,将待签名字符串MD5运算,即是签名(sign)的值。
//     * @return
//     */
//    public String initSign(){
//        JSONObject jo=new JSONObject();
//        jo.put("app_id",this.appId);
//        jo.put("enc_type",this.encType);
//        jo.put("method",this.method);
//        jo.put("sign_type",this.signType);
//        jo.put("term_id",this.termId);
//        jo.put("timestamp",this.timestamp);
//        jo.put("version",this.version);
//
//        StringBuffer sb=new StringBuffer();
//        sb.append("app_id="+this.appId);
//    }
//}

+ 0 - 360
patient-co/patient-co-wlyy/src/main/java/com/yihu/wlyy/service/third/ylz/model/YLZUser.java

@ -1,360 +0,0 @@
package com.yihu.wlyy.service.third.ylz.model;
import com.alibaba.fastjson.annotation.JSONField;
/**
 * Created by chenweida on 2018/5/16 0016.
 */
public class YLZUser {
    @JSONField(name = "empi_user_id")
    private String empiUserId;//用户主索引
    @JSONField(name = "name")
    private String name;//姓名
    @JSONField(name = "sex")
    private String sex;//性别  0未知性别 1男 2女 9未说明性别
    @JSONField(name = "birth_day")
    private String birthDay;//出生日期  yyyyMMddHH
    @JSONField(name = "birth_addr")
    private String birthAddr;//出生地
    @JSONField(name = "id_type")
    private String idType;//证件类型   01	居民身份证 02	居民户口簿 03	护照  04	军官证   05	驾驶证   06	港澳居民来往内地通行证   07	台湾居民来往内地通行证   99	其他法定有效证件
    @JSONField(name = "id_no")
    private String idNo;//证件号码
    @JSONField(name = "native")
    private String native_;//国籍
    @JSONField(name = "address")
    private String address;//所在地, 通讯地址
    @JSONField(name = "origin")
    private String origin;//籍贯
    @JSONField(name = "company")
    private String company;//作单位
    @JSONField(name = "company_phone")
    private String companyPhone;//单位电话
    @JSONField(name = "contacts_relationship")
    private String contactsRelationship;//与联系人关系 参考国家互联互通标准GB/T 4761-2008
    @JSONField(name = "contacts_phone")
    private String contactsPhone;//联系人电话
    @JSONField(name = "contacts_addr")
    private String contactsAddr;//联系人地址
    @JSONField(name = "is_certified")
    private String isCertified;//安全认证  0否,1 是
    @JSONField(name = "certificate_authority")
    private String certificateAuthority;//认证机构  1经信局 2公安 等
    @JSONField(name = "telephone")
    private String telephone;//联系方式
    @JSONField(name = "email")
    private String email;//邮箱地址
    @JSONField(name = "post")
    private String post;//邮编
    @JSONField(name = "work")
    private String work;//职业
    @JSONField(name = "home_phone")
    private String homePhone;//家庭电话
    @JSONField(name = "avatar_photo_id")
    private String avatarPhotoId;//照片
    @JSONField(name = "marital_status")
    private String maritalStatus;//婚姻状态  10未婚 20已婚  21初婚 22再婚 23复婚  30丧偶 40离婚 90未说明的婚姻状况
    @JSONField(name = "state")
    private String state;//状态  normal 正常 freeze 冻结  logout 注销   lossed 挂失
    @JSONField(name = "domain_id")
    private String domainId;//标识域编码
    @JSONField(name = "domain_name")
    private String domainName;//标识域名称
    @JSONField(name = "term_id")
    private String termId;//终端号
    @JSONField(name = "oper_id")
    private String operId;//操作员编号
    @JSONField(name = "oper_name")
    private String operName;//操作员姓名
    @JSONField(name = "crt_date")
    private String crtDate;//创建日期
    @JSONField(name = "crt_time")
    private String crtTime;//创建时间
    @JSONField(name = "nation")
    private String nation;//民族
    @JSONField(name = "contacts_name")
    private String contactsName;//联系人姓名
    private YLZUserCard ylzUserCard;
    public String getEmpiUserId() {
        return empiUserId;
    }
    public void setEmpiUserId(String empiUserId) {
        this.empiUserId = empiUserId;
    }
    public String getName() {
        return name;
    }
    public void setName(String name) {
        this.name = name;
    }
    public String getSex() {
        return sex;
    }
    public void setSex(String sex) {
        this.sex = sex;
    }
    public String getBirthDay() {
        return birthDay;
    }
    public void setBirthDay(String birthDay) {
        this.birthDay = birthDay;
    }
    public String getBirthAddr() {
        return birthAddr;
    }
    public void setBirthAddr(String birthAddr) {
        this.birthAddr = birthAddr;
    }
    public String getIdType() {
        return idType;
    }
    public void setIdType(String idType) {
        this.idType = idType;
    }
    public String getIdNo() {
        return idNo;
    }
    public void setIdNo(String idNo) {
        this.idNo = idNo;
    }
    public String getNative_() {
        return native_;
    }
    public void setNative_(String native_) {
        this.native_ = native_;
    }
    public String getAddress() {
        return address;
    }
    public void setAddress(String address) {
        this.address = address;
    }
    public String getOrigin() {
        return origin;
    }
    public void setOrigin(String origin) {
        this.origin = origin;
    }
    public String getCompany() {
        return company;
    }
    public void setCompany(String company) {
        this.company = company;
    }
    public String getCompanyPhone() {
        return companyPhone;
    }
    public void setCompanyPhone(String companyPhone) {
        this.companyPhone = companyPhone;
    }
    public String getContactsRelationship() {
        return contactsRelationship;
    }
    public void setContactsRelationship(String contactsRelationship) {
        this.contactsRelationship = contactsRelationship;
    }
    public String getContactsPhone() {
        return contactsPhone;
    }
    public void setContactsPhone(String contactsPhone) {
        this.contactsPhone = contactsPhone;
    }
    public String getContactsAddr() {
        return contactsAddr;
    }
    public void setContactsAddr(String contactsAddr) {
        this.contactsAddr = contactsAddr;
    }
    public String getIsCertified() {
        return isCertified;
    }
    public void setIsCertified(String isCertified) {
        this.isCertified = isCertified;
    }
    public String getCertificateAuthority() {
        return certificateAuthority;
    }
    public void setCertificateAuthority(String certificateAuthority) {
        this.certificateAuthority = certificateAuthority;
    }
    public String getTelephone() {
        return telephone;
    }
    public void setTelephone(String telephone) {
        this.telephone = telephone;
    }
    public String getEmail() {
        return email;
    }
    public void setEmail(String email) {
        this.email = email;
    }
    public String getPost() {
        return post;
    }
    public void setPost(String post) {
        this.post = post;
    }
    public String getWork() {
        return work;
    }
    public void setWork(String work) {
        this.work = work;
    }
    public String getHomePhone() {
        return homePhone;
    }
    public void setHomePhone(String homePhone) {
        this.homePhone = homePhone;
    }
    public String getAvatarPhotoId() {
        return avatarPhotoId;
    }
    public void setAvatarPhotoId(String avatarPhotoId) {
        this.avatarPhotoId = avatarPhotoId;
    }
    public String getMaritalStatus() {
        return maritalStatus;
    }
    public void setMaritalStatus(String maritalStatus) {
        this.maritalStatus = maritalStatus;
    }
    public String getState() {
        return state;
    }
    public void setState(String state) {
        this.state = state;
    }
    public String getDomainId() {
        return domainId;
    }
    public void setDomainId(String domainId) {
        this.domainId = domainId;
    }
    public String getDomainName() {
        return domainName;
    }
    public void setDomainName(String domainName) {
        this.domainName = domainName;
    }
    public String getTermId() {
        return termId;
    }
    public void setTermId(String termId) {
        this.termId = termId;
    }
    public String getOperId() {
        return operId;
    }
    public void setOperId(String operId) {
        this.operId = operId;
    }
    public String getOperName() {
        return operName;
    }
    public void setOperName(String operName) {
        this.operName = operName;
    }
    public String getCrtDate() {
        return crtDate;
    }
    public void setCrtDate(String crtDate) {
        this.crtDate = crtDate;
    }
    public String getCrtTime() {
        return crtTime;
    }
    public void setCrtTime(String crtTime) {
        this.crtTime = crtTime;
    }
    public String getNation() {
        return nation;
    }
    public void setNation(String nation) {
        this.nation = nation;
    }
    public String getContactsName() {
        return contactsName;
    }
    public void setContactsName(String contactsName) {
        this.contactsName = contactsName;
    }
    public YLZUserCard getYlzUserCard() {
        return ylzUserCard;
    }
    public void setYlzUserCard(YLZUserCard ylzUserCard) {
        this.ylzUserCard = ylzUserCard;
    }
}

+ 0 - 137
patient-co/patient-co-wlyy/src/main/java/com/yihu/wlyy/service/third/ylz/model/YLZUserCard.java

@ -1,137 +0,0 @@
package com.yihu.wlyy.service.third.ylz.model;
import com.alibaba.fastjson.annotation.JSONField;
/**
 * Created by chenweida on 2018/5/16 0016.
 */
public class YLZUserCard {
    @JSONField(name = "card_no")
    private String cardNo;//卡号
    @JSONField(name = "card_type")
    private String cardType;//卡类型 01社保卡  02就诊卡
    @JSONField(name = "card_org")
    private String cardOrg;//办卡机构
    @JSONField(name = "card_zone")
    private String cardZone;//办卡地区
    @JSONField(name = "card_fn")
    private String cardFn;//卡内码
    @JSONField(name = "term_id")
    private String termId;//	终端号
    @JSONField(name = "oper_id")
    private String operId;//	操作员编号
    @JSONField(name = "oper_name")
    private String operName;//操作员姓名
    @JSONField(name = "crt_date")
    private String crtDate;//创建日期
    @JSONField(name = "crt_time")
    private String crtTime;//创建时间
    @JSONField(name = "state")
    private String state; //状态  normal 正常 freeze 冻结  logout 注销  lossed 挂失 
    public String getCardNo() {
        return cardNo;
    }
    public void setCardNo(String cardNo) {
        this.cardNo = cardNo;
    }
    public String getCardType() {
        return cardType;
    }
    public void setCardType(String cardType) {
        this.cardType = cardType;
    }
    public String getCardOrg() {
        return cardOrg;
    }
    public void setCardOrg(String cardOrg) {
        this.cardOrg = cardOrg;
    }
    public String getCardZone() {
        return cardZone;
    }
    public void setCardZone(String cardZone) {
        this.cardZone = cardZone;
    }
    public String getCardFn() {
        return cardFn;
    }
    public void setCardFn(String cardFn) {
        this.cardFn = cardFn;
    }
    public String getTermId() {
        return termId;
    }
    public void setTermId(String termId) {
        this.termId = termId;
    }
    public String getOperId() {
        return operId;
    }
    public void setOperId(String operId) {
        this.operId = operId;
    }
    public String getOperName() {
        return operName;
    }
    public void setOperName(String operName) {
        this.operName = operName;
    }
    public String getCrtDate() {
        return crtDate;
    }
    public void setCrtDate(String crtDate) {
        this.crtDate = crtDate;
    }
    public String getCrtTime() {
        return crtTime;
    }
    public void setCrtTime(String crtTime) {
        this.crtTime = crtTime;
    }
    public String getState() {
        return state;
    }
    public void setState(String state) {
        this.state = state;
    }
    @Override
    public String toString() {
        return "YLZUserCard{" +
                "cardNo='" + cardNo + '\'' +
                ", cardType='" + cardType + '\'' +
                ", cardOrg='" + cardOrg + '\'' +
                ", cardZone='" + cardZone + '\'' +
                ", cardFn='" + cardFn + '\'' +
                ", termId='" + termId + '\'' +
                ", operId='" + operId + '\'' +
                ", operName='" + operName + '\'' +
                ", crtDate='" + crtDate + '\'' +
                ", crtTime='" + crtTime + '\'' +
                ", state='" + state + '\'' +
                '}';
    }
}

+ 2 - 2
patient-co/patient-co-wlyy/src/main/java/com/yihu/wlyy/web/third/ylzpay/ThirdCheckUserController.java

@ -37,9 +37,9 @@ public class ThirdCheckUserController extends BaseController {
     * @throws PayException
     */
    @RequestMapping(value = "/checkUser", method = RequestMethod.POST)
    public String checkUser(String mediaIds) {
    public String checkUser(String openId) {
        try {
            checkService.getAccessToken();
            checkService.getAccessToken(openId);
            return write(200, "获取成功!", "data", "");
        } catch (Exception e) {