diff --git a/src/main/java/com/lq/cms/web/AdminBaseController.java b/src/main/java/com/lq/cms/web/AdminBaseController.java index d6ad32b..cb50c13 100755 --- a/src/main/java/com/lq/cms/web/AdminBaseController.java +++ b/src/main/java/com/lq/cms/web/AdminBaseController.java @@ -17,6 +17,7 @@ import java.util.Map; /** * 管理后台 父类 + * 强封装,缺少扩展,不建议采用 */ public abstract class AdminBaseController { diff --git a/src/main/java/com/lq/cms/web/wechat/WechatInfoController.java b/src/main/java/com/lq/cms/web/wechat/WechatInfoController.java index b41cd8a..40f0495 100755 --- a/src/main/java/com/lq/cms/web/wechat/WechatInfoController.java +++ b/src/main/java/com/lq/cms/web/wechat/WechatInfoController.java @@ -33,8 +33,6 @@ public class WechatInfoController { @Autowired private WechatInfoService wechatInfoService; - - @RequestMapping("/index") public String index(){ diff --git a/src/main/java/com/lq/code/util/sql/SqlConstant.java b/src/main/java/com/lq/code/util/sql/SqlConstant.java new file mode 100644 index 0000000..3641346 --- /dev/null +++ b/src/main/java/com/lq/code/util/sql/SqlConstant.java @@ -0,0 +1,11 @@ +package com.lq.code.util.sql; + +/** + * @Author: qi + * @Description: + * @Date: Create in 6:28 AM 2019/5/6 + */ +public class SqlConstant { + + public static final String SQL_SYMBOL = "_"; +} diff --git a/src/main/java/com/lq/code/util/sql/SqlUtil.java b/src/main/java/com/lq/code/util/sql/SqlUtil.java index 4bcf337..71ec3e6 100755 --- a/src/main/java/com/lq/code/util/sql/SqlUtil.java +++ b/src/main/java/com/lq/code/util/sql/SqlUtil.java @@ -27,7 +27,7 @@ public class SqlUtil { continue; } if (Character.isUpperCase(charArray[i])){ - strBuffer.append("_"+charArray[i]); + strBuffer.append(SqlConstant.SQL_SYMBOL+charArray[i]); }else { strBuffer.append(charArray[i]); } diff --git a/src/main/java/com/lq/entity/WechatInfo.java b/src/main/java/com/lq/entity/WechatInfo.java index ebb00ad..31bc6a5 100755 --- a/src/main/java/com/lq/entity/WechatInfo.java +++ b/src/main/java/com/lq/entity/WechatInfo.java @@ -66,7 +66,7 @@ public class WechatInfo extends IdEntity { private Integer wechatInfoType; /** * 认证状态 - * 微信公众号在未认证状态下,有需求功能接口受限。 + * 微信公众号在未认证状态下,有部分功能接口受限。 * @Link WechatInfoCertificationTypeEnum */ private Integer certification; @@ -174,4 +174,12 @@ public class WechatInfo extends IdEntity { public void setWechatInfoType(Integer wechatInfoType) { this.wechatInfoType = wechatInfoType; } + + public Integer getCertification() { + return certification; + } + + public void setCertification(Integer certification) { + this.certification = certification; + } } diff --git a/src/main/java/com/lq/wechat/mode/template/WechatTemplate.java b/src/main/java/com/lq/wechat/mode/template/WechatTemplate.java index 25265c0..35ff2a2 100755 --- a/src/main/java/com/lq/wechat/mode/template/WechatTemplate.java +++ b/src/main/java/com/lq/wechat/mode/template/WechatTemplate.java @@ -17,15 +17,27 @@ import java.util.Map; color 否 模板内容字体颜色,不填默认为黑色 */ public class WechatTemplate { - + /** + * 发送用户openId + */ private String touser; - + /** + * 模版ID + */ private String template_id; - + /** + * 模版跳转链接 + */ private String url; - + /** + * 跳转小程序所需数据对象,无需跳转小程序则不用传该数据 + */ private WechatTemplateMiniprogram miniprogram; - + /** + * 模版数据 + * key: + * value: + */ private Map data; diff --git a/src/main/java/com/lq/wechat/mode/template/WechatTemplateBuilder.java b/src/main/java/com/lq/wechat/mode/template/WechatTemplateBuilder.java index 7c18f09..82146ce 100755 --- a/src/main/java/com/lq/wechat/mode/template/WechatTemplateBuilder.java +++ b/src/main/java/com/lq/wechat/mode/template/WechatTemplateBuilder.java @@ -3,6 +3,7 @@ package com.lq.wechat.mode.template; import java.util.Map; /** + * 微信公众号模版消息构造器 * Created by qi_liang on 2018/6/27. */ public interface WechatTemplateBuilder { diff --git a/src/main/java/com/lq/wechat/mode/template/WechatTemplateConcreteBuilder.java b/src/main/java/com/lq/wechat/mode/template/WechatTemplateConcreteBuilder.java index f8ffbf1..780ad32 100755 --- a/src/main/java/com/lq/wechat/mode/template/WechatTemplateConcreteBuilder.java +++ b/src/main/java/com/lq/wechat/mode/template/WechatTemplateConcreteBuilder.java @@ -4,6 +4,7 @@ import java.util.HashMap; import java.util.Map; /** + * 构造器默认实现类 * Created by qi_liang on 2018/6/27. */ public class WechatTemplateConcreteBuilder implements WechatTemplateBuilder { @@ -82,7 +83,7 @@ public class WechatTemplateConcreteBuilder implements WechatTemplateBuilder { @Override public WechatTemplateBuilder appendKeyWord(String value) { appendKeyWord(value,DEFAULT_COLORD); - return null; + return this; } @Override diff --git a/src/main/java/com/lq/wechat/mode/template/WechatTemplateData.java b/src/main/java/com/lq/wechat/mode/template/WechatTemplateData.java index 48cd0c6..ce2724e 100755 --- a/src/main/java/com/lq/wechat/mode/template/WechatTemplateData.java +++ b/src/main/java/com/lq/wechat/mode/template/WechatTemplateData.java @@ -1,7 +1,7 @@ package com.lq.wechat.mode.template; /** - * + * 消息模版内容 * Created by qi_liang on 2018/6/27. */ public class WechatTemplateData { diff --git a/src/main/webapp/WEB-INF/views/jsp/cms/wechat/info/index.jsp b/src/main/webapp/WEB-INF/views/jsp/cms/wechat/info/index.jsp index 9ff0333..36b34f5 100755 --- a/src/main/webapp/WEB-INF/views/jsp/cms/wechat/info/index.jsp +++ b/src/main/webapp/WEB-INF/views/jsp/cms/wechat/info/index.jsp @@ -35,13 +35,13 @@ {field:'id',title:'编号',width:35}, {field:'wechatName',title:'微信名称',width:100}, {field:'wechatOpenId',title:'微信openId',width:100}, - {field:'appId',title:'appId',width:100}, - {field:'appSecpet',title:'开发者密码',width:100}, + {field:'appId',title:'appId',width:120}, + {field:'appSecpet',title:'开发者密码',width:200}, {field:'token',title:'令牌',width:100}, {field:'wechatInfoTypeStr',title:'类型',width:80}, {field:'encodingTypeStr',title:'消息模式',width:100}, {field:'encodingAesKey',title:'消息加密key',width:100}, - {field:'createTimeStr',title:'创建时间',width:150}, + {field:'createTimeStr',title:'创建时间',width:130}, {field:'url',title:'对接url',width:300}, ]], toolbar: [{ diff --git a/src/main/webapp/WEB-INF/views/jsp/cms/wechat/message/index.jsp b/src/main/webapp/WEB-INF/views/jsp/cms/wechat/message/index.jsp index 16c5669..fd17e6e 100755 --- a/src/main/webapp/WEB-INF/views/jsp/cms/wechat/message/index.jsp +++ b/src/main/webapp/WEB-INF/views/jsp/cms/wechat/message/index.jsp @@ -28,8 +28,8 @@ {field:'content',title:'消息内容',width:100}, {field:'imageUrl',title:'图片路径',width:100}, {field:'mediaId',title:'素材ID',width:100}, - {field:'toUrl',title:'跳转路径',width:100}, - {field:'createTimeStr',title:'创建时间',width:150}, + {field:'toUrl',title:'跳转路径',width:150}, + {field:'createTimeStr',title:'创建时间',width:120}, {field:'editId',title:'编辑',width:200,formatter:function (value,row,index) { var html="编辑  "; html+="删除  ";