-
Notifications
You must be signed in to change notification settings - Fork 446
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[feature]changeopenid api implementation
- Loading branch information
Showing
1 changed file
with
67 additions
and
0 deletions.
There are no files selected for viewing
67 changes: 67 additions & 0 deletions
67
weixin4j-mp/src/main/java/com/foxinmy/weixin4j/mp/model/ChangeOpenidResult.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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() + "]"; | ||
} | ||
} |