dataPage;
+ if (columns.isEmpty()) {
+ dataPage = DAO.paginate(page, pagesize, select, sqlBuilder.toString());
+ } else {
+ dataPage = DAO.paginate(page, pagesize, select, sqlBuilder.toString(), columns.getValueArray());
+ }
+ return dataPage;
+ }
+
+}
\ No newline at end of file
diff --git a/module-contact/module-contact-web/pom.xml b/module-contact/module-contact-web/pom.xml
new file mode 100755
index 0000000000000000000000000000000000000000..f87a32b909fe27d6096ddba4ecf63d865e68dd64
--- /dev/null
+++ b/module-contact/module-contact-web/pom.xml
@@ -0,0 +1,51 @@
+
+
+
+ io.jpress
+ module-contact
+ 2.0
+
+ 4.0.0
+
+ io.jpress
+ module-contact-web
+
+
+
+ io.jpress
+ jpress-core
+
+
+
+ io.jpress
+ module-contact-model
+ 2.0
+
+
+
+ io.jpress
+ module-contact-service-api
+ 2.0
+
+
+
+ io.jpress
+ module-contact-service-provider
+ 2.0
+
+
+ com.jfinal
+ jfinal
+ 3.6
+ compile
+
+
+ io.jboot
+ jboot
+
+
+
+
+
\ No newline at end of file
diff --git a/module-contact/module-contact-web/src/main/java/io/jpress/module/contact/ContactModuleListener.java b/module-contact/module-contact-web/src/main/java/io/jpress/module/contact/ContactModuleListener.java
new file mode 100755
index 0000000000000000000000000000000000000000..13a2de68a3c87a61b2d3c1e145a6f15f1659575b
--- /dev/null
+++ b/module-contact/module-contact-web/src/main/java/io/jpress/module/contact/ContactModuleListener.java
@@ -0,0 +1,56 @@
+/**
+ * Copyright (c) 2016-2019, Michael Yang 杨福海 (fuhai999@gmail.com).
+ *
+ * Licensed under the GNU Lesser General Public License (LGPL) ,Version 3.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.gnu.org/licenses/lgpl-3.0.txt
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package io.jpress.module.contact;
+
+import com.jfinal.core.Controller;
+import io.jboot.Jboot;
+import io.jboot.core.listener.JbootAppListenerBase;
+import io.jboot.db.model.Columns;
+import io.jpress.core.menu.MenuGroup;
+import io.jpress.core.module.ModuleListener;
+import java.util.List;
+
+public class ContactModuleListener extends JbootAppListenerBase implements ModuleListener {
+
+
+ @Override
+ public String onRenderDashboardBox(Controller controller) {
+ return null;
+ }
+
+ @Override
+ public String onRenderToolsBox(Controller controller) {
+ return null;
+ }
+
+ @Override
+ public void onConfigAdminMenu(List adminMenus) {
+ MenuGroup menuGroup = new MenuGroup();
+ menuGroup.setId("contact");
+ menuGroup.setText("通讯录");
+ menuGroup.setIcon("");
+ menuGroup.setOrder(4);
+ adminMenus.add(menuGroup);
+ }
+
+ @Override
+ public void onConfigUcenterMenu(List ucenterMenus) {
+
+
+ }
+
+
+}
\ No newline at end of file
diff --git a/module-contact/module-contact-web/src/main/java/io/jpress/module/contact/controller/_ContactController.java b/module-contact/module-contact-web/src/main/java/io/jpress/module/contact/controller/_ContactController.java
new file mode 100755
index 0000000000000000000000000000000000000000..b70fd902be128a6b6b3941807a941ffa2deb1089
--- /dev/null
+++ b/module-contact/module-contact-web/src/main/java/io/jpress/module/contact/controller/_ContactController.java
@@ -0,0 +1,75 @@
+/**
+ * Copyright (c) 2016-2019, Michael Yang 杨福海 (fuhai999@gmail.com).
+ *
+ * Licensed under the GNU Lesser General Public License (LGPL) ,Version 3.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.gnu.org/licenses/lgpl-3.0.txt
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package io.jpress.module.contact.controller;
+
+import com.jfinal.aop.Inject;
+import com.jfinal.kit.Ret;
+import com.jfinal.plugin.activerecord.Page;
+import io.jboot.web.controller.annotation.RequestMapping;
+import io.jpress.JPressConsts;
+import io.jpress.core.menu.annotation.AdminMenu;
+import io.jpress.module.contact.model.XbpUser;
+import io.jpress.module.contact.service.XbpDeptService;
+import io.jpress.module.contact.service.XbpUserService;
+import io.jpress.web.base.AdminControllerBase;
+
+
+@RequestMapping(value="/admin/contact", viewPath = JPressConsts.DEFAULT_ADMIN_VIEW)
+public class _ContactController extends AdminControllerBase {
+
+ @Inject
+ private XbpDeptService xbpDeptService;
+
+ @Inject
+ private XbpUserService xbpUserService;
+
+ @AdminMenu(text = "联系人管理", groupId = "contact", order = 0)
+ public void index() {
+
+ Page page = xbpUserService._paginate(getPagePara(), 10,
+ getPara("username"),
+ getPara("userPhone"),
+ getPara("jobName"),
+ getPara("jobDescription"),
+ getPara("deptName"),
+ getPara("status"));
+ setAttr("page", page);
+ render("contact/list.html");
+ }
+
+ public void detail() {
+ Long uid = getParaToLong();
+ XbpUser user = xbpUserService.findById(uid);
+ setAttr("user", user);
+ render(getRenderHtml());
+ }
+
+ public void doSaveUser() {
+ XbpUser user = getBean(XbpUser.class);
+ user.keepUpdateSafe();
+ xbpUserService.saveOrUpdate(user);
+ renderJson(Ret.ok());
+ }
+
+
+ private String getRenderHtml() {
+ String action = getPara("action", "base");
+ if ("base".equals(action)) return "contact/detail.html";
+
+ return "contact/detail_" + action + ".html";
+ }
+
+}
diff --git a/module-contact/module-contact-web/src/main/java/io/jpress/module/contact/controller/api/ApiContactController.java b/module-contact/module-contact-web/src/main/java/io/jpress/module/contact/controller/api/ApiContactController.java
new file mode 100755
index 0000000000000000000000000000000000000000..40076f37eec2c4199a0da8a8ade93c184b5613b2
--- /dev/null
+++ b/module-contact/module-contact-web/src/main/java/io/jpress/module/contact/controller/api/ApiContactController.java
@@ -0,0 +1,49 @@
+/**
+ * Copyright (c) 2016-2019, Michael Yang 杨福海 (fuhai999@gmail.com).
+ *
+ * Licensed under the GNU Lesser General Public License (LGPL) ,Version 3.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.gnu.org/licenses/lgpl-3.0.txt
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package io.jpress.module.contact.controller.api;
+
+import com.jfinal.aop.Before;
+import com.jfinal.aop.Inject;
+import com.jfinal.kit.Ret;
+import com.jfinal.plugin.activerecord.Page;
+import io.jboot.web.controller.annotation.RequestMapping;
+import io.jpress.module.contact.model.XbpDept;
+import io.jpress.module.contact.model.XbpUser;
+import io.jpress.module.contact.service.XbpDeptService;
+import io.jpress.module.contact.service.XbpUserService;
+import io.jpress.web.base.ApiControllerBase;
+import io.jpress.web.interceptor.PermissionInterceptor;
+
+
+@RequestMapping("/api/contact")
+public class ApiContactController extends ApiControllerBase {
+
+ @Inject
+ private XbpUserService xbpUserService;
+
+ public void index() {
+
+ Page xbpUser = xbpUserService._paginate(getParaToInt("page", 1), 10,
+ getPara("username"),
+ getPara("userPhone"),
+ getPara("jobName"),
+ getPara("jobDescription"),
+ getPara("deptName"),
+ getPara("status"));
+ renderJson(Ret.ok("contact", xbpUser));
+ }
+
+}
diff --git a/module-contact/module-contact-web/src/main/webapp/WEB-INF/views/admin/contact/_user_detail_layout.html b/module-contact/module-contact-web/src/main/webapp/WEB-INF/views/admin/contact/_user_detail_layout.html
new file mode 100755
index 0000000000000000000000000000000000000000..6c01434a708fd0faa98d93acf0223b7bd1cc18d5
--- /dev/null
+++ b/module-contact/module-contact-web/src/main/webapp/WEB-INF/views/admin/contact/_user_detail_layout.html
@@ -0,0 +1,88 @@
+#define user_detail_layout()
+#@layout()
+#define css()
+#@layout_css?()
+
+
+#end
+
+#define script()
+#@layout_script?()
+
+
+
+#end
+
+#define content()
+
+#end
+#end
diff --git a/module-contact/module-contact-web/src/main/webapp/WEB-INF/views/admin/contact/detail.html b/module-contact/module-contact-web/src/main/webapp/WEB-INF/views/admin/contact/detail.html
new file mode 100755
index 0000000000000000000000000000000000000000..b265cb466febd7ac3697ead826222681569c0194
--- /dev/null
+++ b/module-contact/module-contact-web/src/main/webapp/WEB-INF/views/admin/contact/detail.html
@@ -0,0 +1,49 @@
+#include("_user_detail_layout.html")
+#@user_detail_layout()
+#define detail()
+
+
+
+
+#end
+
diff --git a/module-contact/module-contact-web/src/main/webapp/WEB-INF/views/admin/contact/detail_avatar.html b/module-contact/module-contact-web/src/main/webapp/WEB-INF/views/admin/contact/detail_avatar.html
new file mode 100755
index 0000000000000000000000000000000000000000..db520474a825cacb83386ce254eac9a14e984d6a
--- /dev/null
+++ b/module-contact/module-contact-web/src/main/webapp/WEB-INF/views/admin/contact/detail_avatar.html
@@ -0,0 +1,95 @@
+#include("_user_detail_layout.html")
+#@user_detail_layout()
+
+#define layout_script()
+
+
+
+
+
+#end
+
+#define layout_css()
+
+
+#end
+
+#define detail()
+
+#end
+
diff --git a/module-contact/module-contact-web/src/main/webapp/WEB-INF/views/admin/contact/detail_communication.html b/module-contact/module-contact-web/src/main/webapp/WEB-INF/views/admin/contact/detail_communication.html
new file mode 100755
index 0000000000000000000000000000000000000000..a9ce3d4d7d094cc1b053677f2980b5beedebf779
--- /dev/null
+++ b/module-contact/module-contact-web/src/main/webapp/WEB-INF/views/admin/contact/detail_communication.html
@@ -0,0 +1,82 @@
+#include("_user_detail_layout.html")
+#@user_detail_layout()
+#define detail()
+
+
+
+
+#end
+
diff --git a/module-contact/module-contact-web/src/main/webapp/WEB-INF/views/admin/contact/detail_other.html b/module-contact/module-contact-web/src/main/webapp/WEB-INF/views/admin/contact/detail_other.html
new file mode 100755
index 0000000000000000000000000000000000000000..47692543396b94897600b5a9444d03567f00ca34
--- /dev/null
+++ b/module-contact/module-contact-web/src/main/webapp/WEB-INF/views/admin/contact/detail_other.html
@@ -0,0 +1,81 @@
+#include("_user_detail_layout.html")
+#@user_detail_layout()
+#define detail()
+
+
+
+
+#end
+
diff --git a/module-contact/module-contact-web/src/main/webapp/WEB-INF/views/admin/contact/detail_pwd.html b/module-contact/module-contact-web/src/main/webapp/WEB-INF/views/admin/contact/detail_pwd.html
new file mode 100755
index 0000000000000000000000000000000000000000..1c2a6f2121b97dfad0f5033d363abbf57c8146cc
--- /dev/null
+++ b/module-contact/module-contact-web/src/main/webapp/WEB-INF/views/admin/contact/detail_pwd.html
@@ -0,0 +1,44 @@
+#include("_user_detail_layout.html")
+#@user_detail_layout()
+#define detail()
+
+
+#end
+
diff --git a/module-contact/module-contact-web/src/main/webapp/WEB-INF/views/admin/contact/detail_role.html b/module-contact/module-contact-web/src/main/webapp/WEB-INF/views/admin/contact/detail_role.html
new file mode 100755
index 0000000000000000000000000000000000000000..7813c267dc45fa790d034daf7bdae0001a249507
--- /dev/null
+++ b/module-contact/module-contact-web/src/main/webapp/WEB-INF/views/admin/contact/detail_role.html
@@ -0,0 +1,56 @@
+#include("_user_detail_layout.html")
+#@user_detail_layout()
+#define detail()
+
+
+
+
+
+
+
+#end
+
diff --git a/module-contact/module-contact-web/src/main/webapp/WEB-INF/views/admin/contact/detail_signature.html b/module-contact/module-contact-web/src/main/webapp/WEB-INF/views/admin/contact/detail_signature.html
new file mode 100755
index 0000000000000000000000000000000000000000..b10dac6dda9f6f4ce6385db45f23724d2a9e49be
--- /dev/null
+++ b/module-contact/module-contact-web/src/main/webapp/WEB-INF/views/admin/contact/detail_signature.html
@@ -0,0 +1,34 @@
+#include("_user_detail_layout.html")
+#@user_detail_layout()
+#define detail()
+
+
+
+
+#end
+
diff --git a/module-contact/module-contact-web/src/main/webapp/WEB-INF/views/admin/contact/detail_utm.html b/module-contact/module-contact-web/src/main/webapp/WEB-INF/views/admin/contact/detail_utm.html
new file mode 100755
index 0000000000000000000000000000000000000000..5839c3755a49490ecb9d419942ddb96464f1579d
--- /dev/null
+++ b/module-contact/module-contact-web/src/main/webapp/WEB-INF/views/admin/contact/detail_utm.html
@@ -0,0 +1,46 @@
+#include("_user_detail_layout.html")
+#@user_detail_layout()
+#define detail()
+
+
+
+
+ | 路径 |
+ 查询 |
+ 渠道 |
+ 媒介 |
+ 时间 |
+
+
+ #for(utm : page.list)
+
+ |
+ #if(utm.action_query)
+
+ #(utm.action_key ??)
+
+ #else
+ #(utm.action_key ??)
+ #end
+ |
+ #(utm.action_query ??) |
+ #(utm.source ??) |
+ #(utm.medium ??) |
+ #(utm.created ??) |
+
+ #end
+
+
+
+
+
+
+
+#end
+
diff --git a/module-contact/module-contact-web/src/main/webapp/WEB-INF/views/admin/contact/edit.html b/module-contact/module-contact-web/src/main/webapp/WEB-INF/views/admin/contact/edit.html
new file mode 100755
index 0000000000000000000000000000000000000000..163c5fd2717b973ea77fb94d5aa20a1a404989f5
--- /dev/null
+++ b/module-contact/module-contact-web/src/main/webapp/WEB-INF/views/admin/contact/edit.html
@@ -0,0 +1,148 @@
+#@layout()
+
+#define script()
+
+#end
+
+#define content()
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+#end
diff --git a/module-contact/module-contact-web/src/main/webapp/WEB-INF/views/admin/contact/list.html b/module-contact/module-contact-web/src/main/webapp/WEB-INF/views/admin/contact/list.html
new file mode 100755
index 0000000000000000000000000000000000000000..f2b4aa9e9ff5a537fe6294a5e6600905798e9465
--- /dev/null
+++ b/module-contact/module-contact-web/src/main/webapp/WEB-INF/views/admin/contact/list.html
@@ -0,0 +1,180 @@
+#@layout()
+
+#define script()
+
+#end
+
+#define content()
+
+#end
diff --git a/module-contact/module-contact-web/src/main/webapp/WEB-INF/views/admin/contact/me.html b/module-contact/module-contact-web/src/main/webapp/WEB-INF/views/admin/contact/me.html
new file mode 100755
index 0000000000000000000000000000000000000000..811423a3336eb2ff8d594e12c6efc2f00c2e0e35
--- /dev/null
+++ b/module-contact/module-contact-web/src/main/webapp/WEB-INF/views/admin/contact/me.html
@@ -0,0 +1,73 @@
+#@layout()
+#define content()
+
+#end
diff --git a/module-contact/module-contact-web/src/main/webapp/WEB-INF/views/admin/contact/permission.html b/module-contact/module-contact-web/src/main/webapp/WEB-INF/views/admin/contact/permission.html
new file mode 100755
index 0000000000000000000000000000000000000000..4ff57d3fdd7f64ef869d68f836fee7bca7f0ad4e
--- /dev/null
+++ b/module-contact/module-contact-web/src/main/webapp/WEB-INF/views/admin/contact/permission.html
@@ -0,0 +1,119 @@
+#@layout()
+
+#define script()
+
+#end
+
+#define css()
+
+#end
+
+#define content()
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ #for(x : permissionGroup)
+
+
+
+
+
+
+
+
+ | ActionKey |
+ 描述 |
+ 类型 |
+
+ #for(permission : x.value)
+
+ | #(permission.action_key ??) |
+ #(permission.text ??) |
+ #(permission.typeText ??) |
+
+ #end
+
+
+
+
+
+ #end
+
+
+
+
+
+
+
+
+
+
+
+#end
diff --git a/module-contact/module-contact-web/src/main/webapp/WEB-INF/views/admin/contact/role.html b/module-contact/module-contact-web/src/main/webapp/WEB-INF/views/admin/contact/role.html
new file mode 100755
index 0000000000000000000000000000000000000000..067076c487f82a7df98f076ef2c28c726f4e6147
--- /dev/null
+++ b/module-contact/module-contact-web/src/main/webapp/WEB-INF/views/admin/contact/role.html
@@ -0,0 +1,102 @@
+#@layout()
+
+#define script()
+
+#end
+
+#define content()
+
+#end
diff --git a/module-contact/module-contact-web/src/main/webapp/WEB-INF/views/admin/contact/role_edit.html b/module-contact/module-contact-web/src/main/webapp/WEB-INF/views/admin/contact/role_edit.html
new file mode 100755
index 0000000000000000000000000000000000000000..499bc2cad5ec4bd128e5006186db209c764d8cca
--- /dev/null
+++ b/module-contact/module-contact-web/src/main/webapp/WEB-INF/views/admin/contact/role_edit.html
@@ -0,0 +1,73 @@
+#@layout()
+#define content()
+
+#end
diff --git a/module-contact/module-contact-web/src/main/webapp/WEB-INF/views/admin/contact/role_permissions.html b/module-contact/module-contact-web/src/main/webapp/WEB-INF/views/admin/contact/role_permissions.html
new file mode 100755
index 0000000000000000000000000000000000000000..4d83b19dd407229e442f765c21d791eaf25c81c9
--- /dev/null
+++ b/module-contact/module-contact-web/src/main/webapp/WEB-INF/views/admin/contact/role_permissions.html
@@ -0,0 +1,172 @@
+#@layout()
+#define script()
+
+#end
+
+#define css()
+
+#end
+
+
+#define content()
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ #for(x : permissionGroup)
+
+ #end
+
+
+
+
+
+
+
+
+
+
+
+#end
diff --git a/module-contact/module-contact-web/src/main/webapp/WEB-INF/views/admin/contact/user_permissions.html b/module-contact/module-contact-web/src/main/webapp/WEB-INF/views/admin/contact/user_permissions.html
new file mode 100755
index 0000000000000000000000000000000000000000..03df2a2f625ddaee7c2d319c0404e817d7c1971d
--- /dev/null
+++ b/module-contact/module-contact-web/src/main/webapp/WEB-INF/views/admin/contact/user_permissions.html
@@ -0,0 +1,92 @@
+#@layout()
+
+#define script()
+
+#end
+
+#define css()
+
+#end
+
+#define content()
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ #for(x : permissionGroup)
+
+ #end
+
+
+
+
+
+
+
+
+
+
+
+#end
diff --git a/module-contact/pom.xml b/module-contact/pom.xml
new file mode 100755
index 0000000000000000000000000000000000000000..3e0f7bde47b03fbc18e7728452f3899214a66bb8
--- /dev/null
+++ b/module-contact/pom.xml
@@ -0,0 +1,43 @@
+
+
+
+ io.jpress
+ parent
+ 2.0
+
+ 4.0.0
+
+ pom
+ 2.0
+
+ io.jpress
+ module-contact
+
+
+ 1.8
+ 1.8
+
+
+
+ module-contact-model
+ module-contact-web
+ module-contact-service-api
+ module-contact-service-provider
+
+
+
+
+
+ org.codehaus.mojo
+ versions-maven-plugin
+ 2.7
+
+ false
+
+
+
+
+
+
\ No newline at end of file
diff --git a/pom.xml b/pom.xml
index b778075f7739963d3437c7a0200dfcb0031ab276..847f04f30f168ec4b8a6c5d2aa73460b0c21780b 100644
--- a/pom.xml
+++ b/pom.xml
@@ -23,6 +23,7 @@
module-article
module-page
+ module-contact
starter
starter-tomcat
diff --git a/starter/pom.xml b/starter/pom.xml
index ca04b59a25f7d56c4fa36461801dbe2b3f8bcc28..e757f4ace44b262ea490b79391e7aacc38beeab8 100644
--- a/starter/pom.xml
+++ b/starter/pom.xml
@@ -106,6 +106,17 @@
2.0
+
+ io.jpress
+ module-contact-web
+ 2.0
+
+
+
+ io.jpress
+ module-contact-service-provider
+ 2.0
+
io.jpress
@@ -178,6 +189,9 @@
${basedir}/../module-article/module-article-web/src/main/webapp
+
+ ${basedir}/../module-contact/module-contact-web/src/main/webapp
+