xujunwei преди 3 години
родител
ревизия
3d43508e06

+ 1 - 1
framework-common/src/main/java/com/mrxu/framework/common/weixin/api/ComponentTemplateApi.java

@@ -38,7 +38,7 @@ public class ComponentTemplateApi {
     }
     }
 
 
     // 第三步 获取代码模板列表
     // 第三步 获取代码模板列表
-    // https://developers.weixin.qq.com/doc/oplatform/Third-party_Platforms/2.0/api/ThirdParty/code_template/gettemplatedraftlist.html
+    // https://developers.weixin.qq.com/doc/oplatform/Third-party_Platforms/2.0/api/ThirdParty/code_template/gettemplatelist.html
     public static TemplateList getTemplateList(String componentAccessToken) {
     public static TemplateList getTemplateList(String componentAccessToken) {
         TemplateList rs = WxHttp.get(TemplateList.class,gettemplatelist+componentAccessToken,null);
         TemplateList rs = WxHttp.get(TemplateList.class,gettemplatelist+componentAccessToken,null);
         return rs;
         return rs;

+ 28 - 0
framework-common/src/main/java/com/mrxu/framework/common/weixin/bean/Template.java

@@ -1,8 +1,10 @@
 package com.mrxu.framework.common.weixin.bean;
 package com.mrxu.framework.common.weixin.bean;
 
 
+import com.mrxu.framework.common.util.DateFunc;
 import lombok.Data;
 import lombok.Data;
 
 
 import java.util.ArrayList;
 import java.util.ArrayList;
+import java.util.Date;
 
 
 // 开发平台代码模板
 // 开发平台代码模板
 @Data
 @Data
@@ -31,4 +33,30 @@ public class Template {
     // 标准模板的审核驳回的原因,;普通模板不返回该值
     // 标准模板的审核驳回的原因,;普通模板不返回该值
     private String reason;
     private String reason;
 
 
+    public String getCreateTime() {
+        return DateFunc.getTimeStr(new Date(create_time*1000l));
+    }
+
+    public String getAuditStatusDes() {
+        if(audit_status == 0) {
+            return "未提审核";
+        }
+        if(audit_status == 1) {
+            return "审核中";
+        }
+        if(audit_status == 2) {
+            return "审核驳回";
+        }
+        if(audit_status == 3) {
+            return "审核通";
+        }
+        if(audit_status == 4) {
+            return "提审中";
+        }
+        if(audit_status == 5) {
+            return "提审失败";
+        }
+        return "未知错误";
+    }
+
 }
 }