diff --git a/pom.xml b/pom.xml index c1bf61acf..010181126 100644 --- a/pom.xml +++ b/pom.xml @@ -3,7 +3,7 @@ 4.0.0 cn.wizzer nutzwk - 3.3.6 + 3.3.8 war NutzWk http://www.wizzer.cn diff --git a/src/main/java/cn/wizzer/common/base/Service.java b/src/main/java/cn/wizzer/common/base/Service.java index 7754d780b..7de46427d 100644 --- a/src/main/java/cn/wizzer/common/base/Service.java +++ b/src/main/java/cn/wizzer/common/base/Service.java @@ -457,7 +457,7 @@ public Pagination listPage(Integer pageNumber, int pageSize, Sql sql) { pageNumber = getPageNumber(pageNumber); pageSize = getPageSize(pageSize); Pager pager = this.dao().createPager(pageNumber, pageSize); - pager.setRecordCount((int) Daos.queryCount(this.dao(), sql.toString()));// 记录数需手动设置 + pager.setRecordCount((int) Daos.queryCount(this.dao(), sql));// 记录数需手动设置 sql.setPager(pager); sql.setCallback(Sqls.callback.records()); dao().execute(sql); @@ -565,7 +565,7 @@ public NutMap data(int length, int start, int draw, List orders, public NutMap data(int length, int start, int draw, Sql countSql, Sql orderSql) { NutMap re = new NutMap(); Pager pager = new OffsetPager(start, length); - pager.setRecordCount((int) Daos.queryCount(this.dao(), countSql.toString()));// 记录数需手动设置 + pager.setRecordCount((int) Daos.queryCount(this.dao(), countSql));// 记录数需手动设置 orderSql.setPager(pager); orderSql.setCallback(Sqls.callback.records()); this.dao().execute(orderSql); diff --git a/src/main/java/cn/wizzer/modules/controllers/open/ueditor/WxController.java b/src/main/java/cn/wizzer/modules/controllers/open/ueditor/WxController.java index 7b7d34e09..3a2a12c55 100644 --- a/src/main/java/cn/wizzer/modules/controllers/open/ueditor/WxController.java +++ b/src/main/java/cn/wizzer/modules/controllers/open/ueditor/WxController.java @@ -44,6 +44,7 @@ public Object index(@Param("action") String action, HttpServletRequest req) { @At @Ok("json") @RequiresAuthentication + @SuppressWarnings("deprecation") public Object uploadimage(@Param("Filedata") TempFile tf, HttpServletRequest req, AdaptorErrorContext err) { String wxid = Strings.sBlank(req.getSession().getAttribute("wxid")); NutMap nutMap = new NutMap(); diff --git a/src/main/java/cn/wizzer/modules/controllers/platform/wx/WxMassController.java b/src/main/java/cn/wizzer/modules/controllers/platform/wx/WxMassController.java index c6c3b816f..4d8773500 100644 --- a/src/main/java/cn/wizzer/modules/controllers/platform/wx/WxMassController.java +++ b/src/main/java/cn/wizzer/modules/controllers/platform/wx/WxMassController.java @@ -142,6 +142,7 @@ public Object newsDetail(String id, HttpServletRequest req) { @At("/uploadThumb/?") @Ok("json") @RequiresAuthentication + @SuppressWarnings("deprecation") //AdaptorErrorContext必须是最后一个参数 public Object uploadThumb(String wxid, @Param("Filedata") TempFile tf, HttpServletRequest req, AdaptorErrorContext err) { try { diff --git a/src/main/java/cn/wizzer/modules/controllers/platform/wx/WxMenuController.java b/src/main/java/cn/wizzer/modules/controllers/platform/wx/WxMenuController.java index b4e2ab908..b9d9e4d48 100644 --- a/src/main/java/cn/wizzer/modules/controllers/platform/wx/WxMenuController.java +++ b/src/main/java/cn/wizzer/modules/controllers/platform/wx/WxMenuController.java @@ -215,6 +215,12 @@ public Object pushMenu(String wxid, HttpServletRequest req) { xm2.setType(secondMenu.getMenuType()); xm2.setKey(secondMenu.getMenuKey()); xm2.setName(secondMenu.getMenuName()); + } else if ("miniprogram".equals(secondMenu.getMenuType())) { + xm2.setType(secondMenu.getMenuType()); + xm2.setName(secondMenu.getMenuName()); + xm2.setUrl(secondMenu.getUrl()); + xm2.setAppid(secondMenu.getAppid()); + xm2.setPagepath(secondMenu.getPagepath()); } else { xm2.setName(secondMenu.getMenuName()); xm2.setType("click"); @@ -235,6 +241,12 @@ public Object pushMenu(String wxid, HttpServletRequest req) { xm2.setType(firstMenu.getMenuType()); xm2.setKey(firstMenu.getMenuKey()); xm2.setName(firstMenu.getMenuName()); + } else if ("miniprogram".equals(firstMenu.getMenuType())) { + xm2.setType(firstMenu.getMenuType()); + xm2.setName(firstMenu.getMenuName()); + xm2.setUrl(firstMenu.getUrl()); + xm2.setAppid(firstMenu.getAppid()); + xm2.setPagepath(firstMenu.getPagepath()); } else { xm2.setName(firstMenu.getMenuName()); xm2.setType("click"); diff --git a/src/main/java/cn/wizzer/modules/models/wx/Wx_menu.java b/src/main/java/cn/wizzer/modules/models/wx/Wx_menu.java index de90d16b4..493f2fb31 100644 --- a/src/main/java/cn/wizzer/modules/models/wx/Wx_menu.java +++ b/src/main/java/cn/wizzer/modules/models/wx/Wx_menu.java @@ -49,6 +49,16 @@ public class Wx_menu extends Model implements Serializable { @ColDefine(type = ColType.VARCHAR, width = 255) private String url; + @Column + @Comment("小程序appid") + @ColDefine(type = ColType.VARCHAR, width = 255) + private String appid; + + @Column + @Comment("小程序入口页") + @ColDefine(type = ColType.VARCHAR, width = 255) + private String pagepath; + @Column @Comment("排序字段") @Prev({ @@ -156,4 +166,20 @@ public Wx_config getWxConfig() { public void setWxConfig(Wx_config wxConfig) { this.wxConfig = wxConfig; } + + public String getAppid() { + return appid; + } + + public void setAppid(String appid) { + this.appid = appid; + } + + public String getPagepath() { + return pagepath; + } + + public void setPagepath(String pagepath) { + this.pagepath = pagepath; + } } diff --git a/src/main/webapp/WEB-INF/views/platform/wx/menu/add.html b/src/main/webapp/WEB-INF/views/platform/wx/menu/add.html index 4aaacbe4f..59c235209 100644 --- a/src/main/webapp/WEB-INF/views/platform/wx/menu/add.html +++ b/src/main/webapp/WEB-INF/views/platform/wx/menu/add.html @@ -14,7 +14,7 @@ action="${base}/platform/wx/conf/menu/addDo" method="post"> -
+
@@ -51,6 +51,7 @@
+