Skip to content

Commit

Permalink
[bugfix]massbyopenid uri error
Browse files Browse the repository at this point in the history
[feature]changeopenid api implementation
  • Loading branch information
foxinmy committed Dec 3, 2023
1 parent 581a83c commit 8dbf2a9
Showing 1 changed file with 67 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,67 @@
package com.foxinmy.weixin4j.mp.model;

import com.alibaba.fastjson.annotation.JSONField;
import com.foxinmy.weixin4j.http.weixin.ApiResult;

/**
* openid转结果
*
* @className ChangeOpenidResult
* @author jinyu(foxinmy@gmail.com)
* @date 2023年12月3日
* @since JDK 1.8
* @see <a href=
* "https://kf.qq.com/faq/1901177NrqMr190117nqYJze.html">openid转换</a>
*/
public class ChangeOpenidResult extends ApiResult {

private static final long serialVersionUID = 9051214458161068387L;
/**
* 旧openid
*/
@JSONField(name = "ori_openid")
private String oldOpenid;
/**
* 新openid,可能为空
*/
@JSONField(name = "new_openid")
private String newOpenid;
/**
* 返回消息
*/
@JSONField(name = "err_msg")
private String message;

public String getOldOpenid() {
return oldOpenid;
}

public void setOldOpenid(String oldOpenid) {
this.oldOpenid = oldOpenid;
}

public String getNewOpenid() {
return newOpenid;
}

public void setNewOpenid(String newOpenid) {
this.newOpenid = newOpenid;
}

public String getMessage() {
return message;
}

public void setMessage(String message) {
this.message = message;
}

public boolean isChanged(){
return "ok".equalsIgnoreCase(message);
}

@Override
public String toString() {
return "ChangeOpenidResult [oldOpenid=" + oldOpenid + ", newOpenid=" + newOpenid + ", message=" + message + ", " + super.toString() + "]";
}
}

0 comments on commit 8dbf2a9

Please sign in to comment.