浏览代码

帮助中心页面

yanym 5 年之前
父节点
当前提交
ff197b89ca

+ 18 - 8
suishenbang-wxportal/suishenbang-wxportal-api/src/main/java/com/dgtly/wxportal/controller/WxPortalController.java

@@ -1,17 +1,17 @@
 package com.dgtly.wxportal.controller;
 
+import java.util.List;
 
-import com.dgtly.common.annotation.ApiNoCheckSign;
 import com.dgtly.common.annotation.ApiPassToken;
 import com.dgtly.common.core.controller.ApiBaseController;
 import com.dgtly.common.core.domain.AjaxResult;
 import com.dgtly.common.core.domain.ParameterObject;
-import com.dgtly.system.domain.CustomersExt;
 import com.dgtly.system.domain.SysUser;
 import com.dgtly.system.domain.SysUserExt;
 import com.dgtly.system.service.ICustomersExtService;
 import com.dgtly.system.service.ISysUserExtService;
 import com.dgtly.system.service.ISysUserService;
+import com.dgtly.wxportal.domain.HelpCenter;
 import com.dgtly.wxportal.domain.WxBanner;
 import com.dgtly.wxportal.domain.WxMagnet;
 import com.dgtly.wxportal.service.*;
@@ -20,13 +20,8 @@ import io.swagger.annotations.ApiImplicitParam;
 import io.swagger.annotations.ApiImplicitParams;
 import io.swagger.annotations.ApiOperation;
 import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.web.bind.annotation.PostMapping;
-import org.springframework.web.bind.annotation.RequestMapping;
-import org.springframework.web.bind.annotation.ResponseBody;
-import org.springframework.web.bind.annotation.RestController;
+import org.springframework.web.bind.annotation.*;
 
-import javax.annotation.Resource;
-import java.util.List;
 
 @Api(tags = "微信门户相关接口")
 @RestController
@@ -51,6 +46,8 @@ public class WxPortalController extends ApiBaseController {
     private IEsignPersonRealnVerifyService personRealnVerifyService;
     @Autowired
     private IEsignOrganRealVerifyService organRealVerifyService;
+    @Autowired
+    private IHelpCenterService helpCenterService;
 
     @ApiOperation(value = "微信门户首页",notes = "参数:{userId:1}")
     @ApiImplicitParams({
@@ -109,4 +106,17 @@ public class WxPortalController extends ApiBaseController {
             return AjaxResult.error();
         }
     }
+
+    @ApiOperation(value = "帮助中心",notes = "参数:{userId:1}")
+    @ApiImplicitParams({
+            @ApiImplicitParam(name = "params" , paramType = "body")
+    })
+    @PostMapping("helpCenter")
+    public Object getHelpCenter() {
+        ParameterObject obj =  getParameterObject();
+        obj.checkParameterNotNull("userId");
+        HelpCenter helpCenter = new HelpCenter();
+        List<HelpCenter> list = helpCenterService.selectHelpCenterList(helpCenter);
+        return AjaxResult.success().putKV("helpList",list);
+    }
 }

+ 121 - 0
suishenbang-wxportal/suishenbang-wxportal-common/src/main/java/com/dgtly/wxportal/domain/HelpCenter.java

@@ -0,0 +1,121 @@
+package com.dgtly.wxportal.domain;
+
+import org.apache.commons.lang3.builder.ToStringBuilder;
+import org.apache.commons.lang3.builder.ToStringStyle;
+import com.dgtly.common.annotation.Excel;
+import com.dgtly.common.core.domain.BaseEntity;
+
+/**
+ * 帮助中心对象 help_center
+ * 
+ * @author dgtly
+ * @date 2020-12-09
+ */
+public class HelpCenter extends BaseEntity
+{
+    private static final long serialVersionUID = 1L;
+
+    /** 主键id */
+    private Long id;
+
+    /** 标题 */
+    @Excel(name = "标题")
+    private String title;
+
+    /** 描述 */
+    @Excel(name = "描述")
+    private String describe;
+
+    /** 文件地址 */
+    @Excel(name = "文件地址")
+    private String fileUrl;
+
+    /** 文件类型 */
+    @Excel(name = "文件类型")
+    private String fileType;
+
+    /** 分类标题 */
+    @Excel(name = "分类标题")
+    private String classifyTitle;
+
+    /** 是否删除 */
+    @Excel(name = "是否删除")
+    private Long delFlag;
+
+    public void setId(Long id) 
+    {
+        this.id = id;
+    }
+
+    public Long getId() 
+    {
+        return id;
+    }
+    public void setTitle(String title) 
+    {
+        this.title = title;
+    }
+
+    public String getTitle() 
+    {
+        return title;
+    }
+    public void setDescribe(String describe) 
+    {
+        this.describe = describe;
+    }
+
+    public String getDescribe() 
+    {
+        return describe;
+    }
+    public void setFileUrl(String fileUrl) 
+    {
+        this.fileUrl = fileUrl;
+    }
+
+    public String getFileUrl() 
+    {
+        return fileUrl;
+    }
+    public void setFileType(String fileType) 
+    {
+        this.fileType = fileType;
+    }
+
+    public String getFileType() 
+    {
+        return fileType;
+    }
+    public void setClassifyTitle(String classifyTitle) 
+    {
+        this.classifyTitle = classifyTitle;
+    }
+
+    public String getClassifyTitle() 
+    {
+        return classifyTitle;
+    }
+    public void setDelFlag(Long delFlag) 
+    {
+        this.delFlag = delFlag;
+    }
+
+    public Long getDelFlag() 
+    {
+        return delFlag;
+    }
+
+    @Override
+    public String toString() {
+        return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
+            .append("id", getId())
+            .append("title", getTitle())
+            .append("describe", getDescribe())
+            .append("fileUrl", getFileUrl())
+            .append("fileType", getFileType())
+            .append("classifyTitle", getClassifyTitle())
+            .append("delFlag", getDelFlag())
+            .toString();
+    }
+}

+ 61 - 0
suishenbang-wxportal/suishenbang-wxportal-common/src/main/java/com/dgtly/wxportal/mapper/HelpCenterMapper.java

@@ -0,0 +1,61 @@
+package com.dgtly.wxportal.mapper;
+
+import com.dgtly.wxportal.domain.HelpCenter;
+import java.util.List;
+
+/**
+ * 帮助中心Mapper接口
+ * 
+ * @author dgtly
+ * @date 2020-12-09
+ */
+public interface HelpCenterMapper 
+{
+    /**
+     * 查询帮助中心
+     * 
+     * @param id 帮助中心ID
+     * @return 帮助中心
+     */
+    public HelpCenter selectHelpCenterById(Long id);
+
+    /**
+     * 查询帮助中心列表
+     * 
+     * @param helpCenter 帮助中心
+     * @return 帮助中心集合
+     */
+    public List<HelpCenter> selectHelpCenterList(HelpCenter helpCenter);
+
+    /**
+     * 新增帮助中心
+     * 
+     * @param helpCenter 帮助中心
+     * @return 结果
+     */
+    public int insertHelpCenter(HelpCenter helpCenter);
+
+    /**
+     * 修改帮助中心
+     * 
+     * @param helpCenter 帮助中心
+     * @return 结果
+     */
+    public int updateHelpCenter(HelpCenter helpCenter);
+
+    /**
+     * 删除帮助中心
+     * 
+     * @param id 帮助中心ID
+     * @return 结果
+     */
+    public int deleteHelpCenterById(Long id);
+
+    /**
+     * 批量删除帮助中心
+     * 
+     * @param ids 需要删除的数据ID
+     * @return 结果
+     */
+    public int deleteHelpCenterByIds(String[] ids);
+}

+ 61 - 0
suishenbang-wxportal/suishenbang-wxportal-common/src/main/java/com/dgtly/wxportal/service/IHelpCenterService.java

@@ -0,0 +1,61 @@
+package com.dgtly.wxportal.service;
+
+import com.dgtly.wxportal.domain.HelpCenter;
+import java.util.List;
+
+/**
+ * 帮助中心Service接口
+ * 
+ * @author dgtly
+ * @date 2020-12-09
+ */
+public interface IHelpCenterService 
+{
+    /**
+     * 查询帮助中心
+     * 
+     * @param id 帮助中心ID
+     * @return 帮助中心
+     */
+    public HelpCenter selectHelpCenterById(Long id);
+
+    /**
+     * 查询帮助中心列表
+     * 
+     * @param helpCenter 帮助中心
+     * @return 帮助中心集合
+     */
+    public List<HelpCenter> selectHelpCenterList(HelpCenter helpCenter);
+
+    /**
+     * 新增帮助中心
+     * 
+     * @param helpCenter 帮助中心
+     * @return 结果
+     */
+    public int insertHelpCenter(HelpCenter helpCenter);
+
+    /**
+     * 修改帮助中心
+     * 
+     * @param helpCenter 帮助中心
+     * @return 结果
+     */
+    public int updateHelpCenter(HelpCenter helpCenter);
+
+    /**
+     * 批量删除帮助中心
+     * 
+     * @param ids 需要删除的数据ID
+     * @return 结果
+     */
+    public int deleteHelpCenterByIds(String ids);
+
+    /**
+     * 删除帮助中心信息
+     * 
+     * @param id 帮助中心ID
+     * @return 结果
+     */
+    public int deleteHelpCenterById(Long id);
+}

+ 95 - 0
suishenbang-wxportal/suishenbang-wxportal-common/src/main/java/com/dgtly/wxportal/service/impl/HelpCenterServiceImpl.java

@@ -0,0 +1,95 @@
+package com.dgtly.wxportal.service.impl;
+
+import java.util.List;
+import org.springframework.stereotype.Service;
+import com.dgtly.wxportal.mapper.HelpCenterMapper;
+import com.dgtly.wxportal.domain.HelpCenter;
+import com.dgtly.wxportal.service.IHelpCenterService;
+import com.dgtly.common.core.text.Convert;
+
+import javax.annotation.Resource;
+
+/**
+ * 帮助中心Service业务层处理
+ * 
+ * @author dgtly
+ * @date 2020-12-09
+ */
+@Service
+public class HelpCenterServiceImpl implements IHelpCenterService 
+{
+    @Resource
+    private HelpCenterMapper helpCenterMapper;
+
+    /**
+     * 查询帮助中心
+     * 
+     * @param id 帮助中心ID
+     * @return 帮助中心
+     */
+    @Override
+    public HelpCenter selectHelpCenterById(Long id)
+    {
+        return helpCenterMapper.selectHelpCenterById(id);
+    }
+
+    /**
+     * 查询帮助中心列表
+     * 
+     * @param helpCenter 帮助中心
+     * @return 帮助中心
+     */
+    @Override
+    public List<HelpCenter> selectHelpCenterList(HelpCenter helpCenter)
+    {
+        return helpCenterMapper.selectHelpCenterList(helpCenter);
+    }
+
+    /**
+     * 新增帮助中心
+     * 
+     * @param helpCenter 帮助中心
+     * @return 结果
+     */
+    @Override
+    public int insertHelpCenter(HelpCenter helpCenter)
+    {
+        return helpCenterMapper.insertHelpCenter(helpCenter);
+    }
+
+    /**
+     * 修改帮助中心
+     * 
+     * @param helpCenter 帮助中心
+     * @return 结果
+     */
+    @Override
+    public int updateHelpCenter(HelpCenter helpCenter)
+    {
+        return helpCenterMapper.updateHelpCenter(helpCenter);
+    }
+
+    /**
+     * 删除帮助中心对象
+     * 
+     * @param ids 需要删除的数据ID
+     * @return 结果
+     */
+    @Override
+    public int deleteHelpCenterByIds(String ids)
+    {
+        return helpCenterMapper.deleteHelpCenterByIds(Convert.toStrArray(ids));
+    }
+
+    /**
+     * 删除帮助中心信息
+     * 
+     * @param id 帮助中心ID
+     * @return 结果
+     */
+    @Override
+    public int deleteHelpCenterById(Long id)
+    {
+        return helpCenterMapper.deleteHelpCenterById(id);
+    }
+}

+ 82 - 0
suishenbang-wxportal/suishenbang-wxportal-common/src/main/resources/mapper/wxportal/HelpCenterMapper.xml

@@ -0,0 +1,82 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<!DOCTYPE mapper
+PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
+"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
+<mapper namespace="com.dgtly.wxportal.mapper.HelpCenterMapper">
+    
+    <resultMap type="com.dgtly.wxportal.domain.HelpCenter" id="HelpCenterResult">
+        <result property="id"    column="id"    />
+        <result property="title"    column="title"    />
+        <result property="describe"    column="describ"    />
+        <result property="fileUrl"    column="file_url"    />
+        <result property="fileType"    column="file_type"    />
+        <result property="classifyTitle"    column="classify_title"    />
+        <result property="delFlag"    column="del_flag"    />
+    </resultMap>
+
+    <sql id="selectHelpCenterVo">
+        select id, title, describ, file_url, file_type, classify_title, del_flag from help_center
+    </sql>
+
+    <select id="selectHelpCenterList" parameterType="com.dgtly.wxportal.domain.HelpCenter" resultMap="HelpCenterResult">
+        <include refid="selectHelpCenterVo"/>
+        <where>  
+            <if test="title != null  and title != ''"> and title = #{title}</if>
+            <if test="describe != null  and describe != ''"> and describ = #{describe}</if>
+            <if test="fileUrl != null  and fileUrl != ''"> and file_url = #{fileUrl}</if>
+            <if test="fileType != null  and fileType != ''"> and file_type = #{fileType}</if>
+            <if test="classifyTitle != null  and classifyTitle != ''"> and classify_title = #{classifyTitle}</if>
+            <if test="delFlag != null "> and del_flag = #{delFlag}</if>
+        </where>
+    </select>
+    
+    <select id="selectHelpCenterById" parameterType="Long" resultMap="HelpCenterResult">
+        <include refid="selectHelpCenterVo"/>
+        where id = #{id}
+    </select>
+        
+    <insert id="insertHelpCenter" parameterType="com.dgtly.wxportal.domain.HelpCenter" useGeneratedKeys="true" keyProperty="id">
+        insert into help_center
+        <trim prefix="(" suffix=")" suffixOverrides=",">
+            <if test="title != null  and title != ''">title,</if>
+            <if test="describe != null  and describe != ''">describ,</if>
+            <if test="fileUrl != null  and fileUrl != ''">file_url,</if>
+            <if test="fileType != null  and fileType != ''">file_type,</if>
+            <if test="classifyTitle != null  and classifyTitle != ''">classify_title,</if>
+            <if test="delFlag != null ">del_flag,</if>
+         </trim>
+        <trim prefix="values (" suffix=")" suffixOverrides=",">
+            <if test="title != null  and title != ''">#{title},</if>
+            <if test="describe != null  and describe != ''">#{describe},</if>
+            <if test="fileUrl != null  and fileUrl != ''">#{fileUrl},</if>
+            <if test="fileType != null  and fileType != ''">#{fileType},</if>
+            <if test="classifyTitle != null  and classifyTitle != ''">#{classifyTitle},</if>
+            <if test="delFlag != null ">#{delFlag},</if>
+         </trim>
+    </insert>
+
+    <update id="updateHelpCenter" parameterType="com.dgtly.wxportal.domain.HelpCenter">
+        update help_center
+        <trim prefix="SET" suffixOverrides=",">
+            <if test="title != null  and title != ''">title = #{title},</if>
+            <if test="describe != null  and describe != ''">describ = #{describe},</if>
+            <if test="fileUrl != null  and fileUrl != ''">file_url = #{fileUrl},</if>
+            <if test="fileType != null  and fileType != ''">file_type = #{fileType},</if>
+            <if test="classifyTitle != null  and classifyTitle != ''">classify_title = #{classifyTitle},</if>
+            <if test="delFlag != null ">del_flag = #{delFlag},</if>
+        </trim>
+        where id = #{id}
+    </update>
+
+    <delete id="deleteHelpCenterById" parameterType="Long">
+        delete from help_center where id = #{id}
+    </delete>
+
+    <delete id="deleteHelpCenterByIds" parameterType="String">
+        delete from help_center where id in 
+        <foreach item="id" collection="array" open="(" separator="," close=")">
+            #{id}
+        </foreach>
+    </delete>
+    
+</mapper>

+ 126 - 0
suishenbang-wxportal/suishenbang-wxportal-manager/src/main/java/com/dgtly/wxportal/controller/HelpCenterController.java

@@ -0,0 +1,126 @@
+package com.dgtly.wxportal.controller;
+
+import java.util.List;
+
+import com.dgtly.wxportal.service.IHelpCenterService;
+import org.apache.shiro.authz.annotation.RequiresPermissions;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Controller;
+import org.springframework.ui.ModelMap;
+import org.springframework.web.bind.annotation.GetMapping;
+import org.springframework.web.bind.annotation.PathVariable;
+import org.springframework.web.bind.annotation.PostMapping;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.ResponseBody;
+import com.dgtly.common.annotation.Log;
+import com.dgtly.common.enums.BusinessType;
+import com.dgtly.wxportal.domain.HelpCenter;
+import com.dgtly.common.core.controller.BaseController;
+import com.dgtly.common.core.domain.AjaxResult;
+import com.dgtly.common.utils.poi.ExcelUtil;
+import com.dgtly.common.core.page.TableDataInfo;
+
+/**
+ * 帮助中心Controller
+ * 
+ * @author dgtly
+ * @date 2020-12-09
+ */
+@Controller
+@RequestMapping("/helpCenter/center")
+public class HelpCenterController extends BaseController
+{
+    private String prefix = "wxportal/helpCenter";
+
+    @Autowired
+    private IHelpCenterService helpCenterService;
+
+    @RequiresPermissions("helpCenter:center:view")
+    @GetMapping()
+    public String center()
+    {
+        return prefix + "/center";
+    }
+
+    /**
+     * 查询帮助中心列表
+     */
+    @RequiresPermissions("helpCenter:center:list")
+    @PostMapping("/list")
+    @ResponseBody
+    public TableDataInfo list(HelpCenter helpCenter)
+    {
+        startPage();
+        List<HelpCenter> list = helpCenterService.selectHelpCenterList(helpCenter);
+        return getDataTable(list);
+    }
+
+    /**
+     * 导出帮助中心列表
+     */
+    @RequiresPermissions("helpCenter:center:export")
+    @PostMapping("/export")
+    @ResponseBody
+    public AjaxResult export(HelpCenter helpCenter)
+    {
+        List<HelpCenter> list = helpCenterService.selectHelpCenterList(helpCenter);
+        ExcelUtil<HelpCenter> util = new ExcelUtil<HelpCenter>(HelpCenter.class);
+        return util.exportExcel(list, "center");
+    }
+
+    /**
+     * 新增帮助中心
+     */
+    @GetMapping("/add")
+    public String add()
+    {
+        return prefix + "/add";
+    }
+
+    /**
+     * 新增保存帮助中心
+     */
+    @RequiresPermissions("helpCenter:center:add")
+    @Log(title = "帮助中心", businessType = BusinessType.INSERT)
+    @PostMapping("/add")
+    @ResponseBody
+    public AjaxResult addSave(HelpCenter helpCenter)
+    {
+        return toAjax(helpCenterService.insertHelpCenter(helpCenter));
+    }
+
+    /**
+     * 修改帮助中心
+     */
+    @GetMapping("/edit/{id}")
+    public String edit(@PathVariable("id") Long id, ModelMap mmap)
+    {
+        HelpCenter helpCenter = helpCenterService.selectHelpCenterById(id);
+        mmap.put("helpCenter", helpCenter);
+        return prefix + "/edit";
+    }
+
+    /**
+     * 修改保存帮助中心
+     */
+    @RequiresPermissions("helpCenter:center:edit")
+    @Log(title = "帮助中心", businessType = BusinessType.UPDATE)
+    @PostMapping("/edit")
+    @ResponseBody
+    public AjaxResult editSave(HelpCenter helpCenter)
+    {
+        return toAjax(helpCenterService.updateHelpCenter(helpCenter));
+    }
+
+    /**
+     * 删除帮助中心
+     */
+    @RequiresPermissions("helpCenter:center:remove")
+    @Log(title = "帮助中心", businessType = BusinessType.DELETE)
+    @PostMapping( "/remove")
+    @ResponseBody
+    public AjaxResult remove(String ids)
+    {
+        return toAjax(helpCenterService.deleteHelpCenterByIds(ids));
+    }
+}

+ 63 - 0
suishenbang-wxportal/suishenbang-wxportal-manager/src/main/resources/templates/wxportal/helpCenter/add.html

@@ -0,0 +1,63 @@
+<!DOCTYPE html>
+<html lang="zh" xmlns:th="http://www.thymeleaf.org" >
+<head>
+    <th:block th:include="include :: header('新增帮助中心')" />
+    <th:block th:include="include :: bootstrap-fileinput-css" />
+</head>
+<body class="white-bg">
+    <div class="wrapper wrapper-content animated fadeInRight ibox-content">
+        <form class="form-horizontal m" id="form-center-add">
+            <div class="form-group">    
+                <label class="col-sm-3 control-label">标题:</label>
+                <div class="col-sm-8">
+                    <input name="title" class="form-control" type="text">
+                </div>
+            </div>
+            <div class="form-group">    
+                <label class="col-sm-3 control-label">描述:</label>
+                <div class="col-sm-8">
+                    <input name="describe" class="form-control" type="text">
+                </div>
+            </div>
+            <div class="form-group">
+                <label class="col-sm-3 control-label">文件地址:</label>
+                <div class="col-sm-8">
+                    <div class="file-loading">
+                        <input class="file" type="file" multiple data-min-file-count="1" data-theme="fas">
+                    </div>
+                </div>
+            </div>
+            <div class="form-group">    
+                <label class="col-sm-3 control-label">文件类型:</label>
+                <div class="col-sm-8">
+                    <select name="fileType" id="sel_fileType" class="form-control m-b"
+                            th:with="type=${@dict.getType('help_center_file_type')}" onchange="javascript:typeChange()">
+                        <option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}"></option>
+                    </select>
+                    <span class="help-block m-b-none"><i class="fa fa-info-circle"></i> 代码生成请选择字典属性</span>
+                </div>
+            </div>
+            <div class="form-group">    
+                <label class="col-sm-3 control-label">分类标题:</label>
+                <div class="col-sm-8">
+                    <input name="classifyTitle" class="form-control" type="text">
+                </div>
+            </div>
+        </form>
+    </div>
+    <th:block th:include="include :: footer" />
+    <th:block th:include="include :: bootstrap-fileinput-js" />
+    <script type="text/javascript">
+        var prefix = ctx + "helpCenter/center"
+        $("#form-center-add").validate({
+            focusCleanup: true
+        });
+
+        function submitHandler() {
+            if ($.validate.form()) {
+                $.operate.save(prefix + "/add", $('#form-center-add').serialize());
+            }
+        }
+    </script>
+</body>
+</html>

+ 125 - 0
suishenbang-wxportal/suishenbang-wxportal-manager/src/main/resources/templates/wxportal/helpCenter/center.html

@@ -0,0 +1,125 @@
+<!DOCTYPE html>
+<html lang="zh" xmlns:th="http://www.thymeleaf.org" xmlns:shiro="http://www.pollix.at/thymeleaf/shiro">
+<head>
+    <th:block th:include="include :: header('帮助中心列表')" />
+</head>
+<body class="gray-bg">
+     <div class="container-div">
+        <div class="row">
+            <div class="col-sm-12 search-collapse">
+                <form id="formId">
+                    <div class="select-list">
+                        <ul>
+                            <li>
+                                <p>标题:</p>
+                                <input type="text" name="title"/>
+                            </li>
+                            <li>
+                                <p>描述:</p>
+                                <input type="text" name="describe"/>
+                            </li>
+                            <li>
+                                <p>文件类型:</p>
+                                <select name="fileType" th:with="type=${@dict.getType('')}">
+                                    <option value="">所有</option>
+                                    <option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}"></option>
+                                </select>
+                            </li>
+                            <li>
+                                <p>分类标题:</p>
+                                <input type="text" name="classifyTitle"/>
+                            </li>
+                            <li>
+                                <p>是否删除:</p>
+                                <input type="text" name="delFlag"/>
+                            </li>
+                            <li>
+                                <a class="btn btn-primary btn-rounded btn-sm" onclick="$.table.search()"><i class="fa fa-search"></i>&nbsp;搜索</a>
+                                <a class="btn btn-warning btn-rounded btn-sm" onclick="$.form.reset()"><i class="fa fa-refresh"></i>&nbsp;重置</a>
+                            </li>
+                        </ul>
+                    </div>
+                </form>
+            </div>
+
+            <div class="btn-group-sm" id="toolbar" role="group">
+                <a class="btn btn-success" onclick="$.operate.add()" shiro:hasPermission="helpCenter:center:add">
+                    <i class="fa fa-plus"></i> 添加
+                </a>
+                <a class="btn btn-primary single disabled" onclick="$.operate.edit()" shiro:hasPermission="helpCenter:center:edit">
+                    <i class="fa fa-edit"></i> 修改
+                </a>
+                <a class="btn btn-danger multiple disabled" onclick="$.operate.removeAll()" shiro:hasPermission="helpCenter:center:remove">
+                    <i class="fa fa-remove"></i> 删除
+                </a>
+                <a class="btn btn-warning" onclick="$.table.exportExcel()" shiro:hasPermission="helpCenter:center:export">
+                    <i class="fa fa-download"></i> 导出
+                 </a>
+            </div>
+            <div class="col-sm-12 select-table table-striped">
+                <table id="bootstrap-table"></table>
+            </div>
+        </div>
+    </div>
+    <th:block th:include="include :: footer" />
+    <script th:inline="javascript">
+        var editFlag = [[${@permission.hasPermi('helpCenter:center:edit')}]];
+        var removeFlag = [[${@permission.hasPermi('helpCenter:center:remove')}]];
+        var prefix = ctx + "helpCenter/center";
+
+        $(function() {
+            var options = {
+                url: prefix + "/list",
+                createUrl: prefix + "/add",
+                updateUrl: prefix + "/edit/{id}",
+                removeUrl: prefix + "/remove",
+                exportUrl: prefix + "/export",
+                modalName: "帮助中心",
+                columns: [{
+                    checkbox: true
+                },
+                {
+                    field : 'id', 
+                    title : '主键id',
+                    visible: false
+                },
+                {
+                    field : 'title', 
+                    title : '标题'
+                },
+                {
+                    field : 'describe', 
+                    title : '描述'
+                },
+                {
+                    field : 'fileUrl', 
+                    title : '文件地址'
+                },
+                {
+                    field : 'fileType', 
+                    title : '文件类型'
+                },
+                {
+                    field : 'classifyTitle', 
+                    title : '分类标题'
+                },
+                {
+                    field : 'delFlag', 
+                    title : '是否删除'
+                },
+                {
+                    title: '操作',
+                    align: 'center',
+                    formatter: function(value, row, index) {
+                        var actions = [];
+                        actions.push('<a class="btn btn-success btn-xs ' + editFlag + '" href="javascript:void(0)" onclick="$.operate.edit(\'' + row.id + '\')"><i class="fa fa-edit"></i>编辑</a> ');
+                        actions.push('<a class="btn btn-danger btn-xs ' + removeFlag + '" href="javascript:void(0)" onclick="$.operate.remove(\'' + row.id + '\')"><i class="fa fa-remove"></i>删除</a>');
+                        return actions.join('');
+                    }
+                }]
+            };
+            $.table.init(options);
+        });
+    </script>
+</body>
+</html>

+ 70 - 0
suishenbang-wxportal/suishenbang-wxportal-manager/src/main/resources/templates/wxportal/helpCenter/edit.html

@@ -0,0 +1,70 @@
+<!DOCTYPE html>
+<html lang="zh" xmlns:th="http://www.thymeleaf.org" >
+<head>
+    <th:block th:include="include :: header('修改帮助中心')" />
+    <th:block th:include="include :: bootstrap-fileinput-css" />
+</head>
+<body class="white-bg">
+    <div class="wrapper wrapper-content animated fadeInRight ibox-content">
+        <form class="form-horizontal m" id="form-center-edit" th:object="${helpCenter}">
+            <input name="id" th:field="*{id}" type="hidden">
+            <div class="form-group">    
+                <label class="col-sm-3 control-label">标题:</label>
+                <div class="col-sm-8">
+                    <input name="title" th:field="*{title}" class="form-control" type="text">
+                </div>
+            </div>
+            <div class="form-group">    
+                <label class="col-sm-3 control-label">描述:</label>
+                <div class="col-sm-8">
+                    <input name="describe" th:field="*{describe}" class="form-control" type="text">
+                </div>
+            </div>
+            <div class="form-group">
+                <label class="col-sm-3 control-label">文件地址:</label>
+                <div class="col-sm-8">
+                    <div class="file-loading">
+                        <input class="file" type="file" multiple data-min-file-count="1" data-theme="fas">
+                    </div>
+                </div>
+            </div>
+            <div class="form-group">    
+                <label class="col-sm-3 control-label">文件类型:</label>
+                <div class="col-sm-8">
+                    <select name="fileType" id="sel_fileType" class="form-control m-b"
+                            th:with="type=${@dict.getType('help_center_file_type')}" onchange="javascript:typeChange()">
+                        <option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}" th:field="*{fileType}"></option>
+                    </select>
+                    <span class="help-block m-b-none"><i class="fa fa-info-circle"></i> 代码生成请选择字典属性</span>
+                </div>
+            </div>
+            <div class="form-group">    
+                <label class="col-sm-3 control-label">分类标题:</label>
+                <div class="col-sm-8">
+                    <input name="classifyTitle" th:field="*{classifyTitle}" class="form-control" type="text">
+                </div>
+            </div>
+            <div class="form-group">    
+                <label class="col-sm-3 control-label">是否删除:</label>
+                <div class="col-sm-8">
+                    <input name="delFlag" th:field="*{delFlag}" class="form-control" type="text">
+                </div>
+            </div>
+        </form>
+    </div>
+    <th:block th:include="include :: footer" />
+    <th:block th:include="include :: bootstrap-fileinput-js" />
+    <script type="text/javascript">
+        var prefix = ctx + "helpCenter/center";
+        $("#form-center-edit").validate({
+            focusCleanup: true
+        });
+
+        function submitHandler() {
+            if ($.validate.form()) {
+                $.operate.save(prefix + "/edit", $('#form-center-edit').serialize());
+            }
+        }
+    </script>
+</body>
+</html>