From 9ace146084daa58701a12acb984cd125da02d401 Mon Sep 17 00:00:00 2001 From: qi_liang Date: Sun, 28 Apr 2019 06:43:27 +0800 Subject: [PATCH] =?UTF-8?q?1.=E5=BE=AE=E4=BF=A1=E5=85=AC=E4=BC=97=E5=8F=B7?= =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E8=AE=A4=E8=AF=81=E7=8A=B6=E6=80=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../emun/WechatInfoCertificationTypeEnum.java | 23 +++++++++++++++++++ src/main/java/com/lq/entity/WechatInfo.java | 12 ++++++++-- .../java/com/lq/wechat/util/CheckUtil.java | 12 ++++++++-- 3 files changed, 43 insertions(+), 4 deletions(-) create mode 100644 src/main/java/com/lq/cms/emun/WechatInfoCertificationTypeEnum.java diff --git a/src/main/java/com/lq/cms/emun/WechatInfoCertificationTypeEnum.java b/src/main/java/com/lq/cms/emun/WechatInfoCertificationTypeEnum.java new file mode 100644 index 0000000..00b0feb --- /dev/null +++ b/src/main/java/com/lq/cms/emun/WechatInfoCertificationTypeEnum.java @@ -0,0 +1,23 @@ +package com.lq.cms.emun; + +/** + * @Author: qi + * @Description: + * @Date: Create in 6:09 AM 2019/4/28 + */ +public enum WechatInfoCertificationTypeEnum { + CERTIFICATION_YES(1,"认证"), + CERTIFICATION_NO(0,"未认证") + ; + + WechatInfoCertificationTypeEnum(Integer value, String desc) { + this.value = value; + this.desc = desc; + } + + private Integer value; + + private String desc; + + +} diff --git a/src/main/java/com/lq/entity/WechatInfo.java b/src/main/java/com/lq/entity/WechatInfo.java index e6c8a87..ebb00ad 100755 --- a/src/main/java/com/lq/entity/WechatInfo.java +++ b/src/main/java/com/lq/entity/WechatInfo.java @@ -35,7 +35,8 @@ public class WechatInfo extends IdEntity { */ private String token; /** - * 消息加密类型 @Link WechatInfoEncodingTypeEnum + * 消息加密类型 + * @Link WechatInfoEncodingTypeEnum */ private String encodingType; /** @@ -59,9 +60,16 @@ public class WechatInfo extends IdEntity { */ private Long updateUserId; /** - * 微信公众号类型:@Link WechatInfoTypeEnum + * 微信公众号类型 + * @Link WechatInfoTypeEnum */ private Integer wechatInfoType; + /** + * 认证状态 + * 微信公众号在未认证状态下,有需求功能接口受限。 + * @Link WechatInfoCertificationTypeEnum + */ + private Integer certification; public String getWechatOpenId() { return wechatOpenId; diff --git a/src/main/java/com/lq/wechat/util/CheckUtil.java b/src/main/java/com/lq/wechat/util/CheckUtil.java index f757e0e..81baebc 100755 --- a/src/main/java/com/lq/wechat/util/CheckUtil.java +++ b/src/main/java/com/lq/wechat/util/CheckUtil.java @@ -8,14 +8,22 @@ import java.util.Arrays; public class CheckUtil { private static final String TOKEN="qiLiang"; - + + /** + *  已废弃 + * @param signature + * @param timestamp + * @param nonce + * @return + */ + @Deprecated public static boolean checkSingatue(String signature,String timestamp,String nonce){ return checkSingatue(signature,timestamp,nonce,TOKEN); } - public static boolean checkSingatue(String signature,String timestamp,String nonce,String token){ + public static boolean checkSingatue(String signature,String timestamp,String nonce,String token){ String []arr=new String[]{token,timestamp,nonce};