suochencheng 6 년 전
부모
커밋
c241d589cc

+ 19 - 0
src/main/java/com/izouma/awesomeadmin/dao/StoreInfoMapper.xml

@@ -40,6 +40,7 @@
         <result column="album_price" property="albumPrice" jdbcType="INTEGER"/>
         <result column="rate_flag" property="rateFlag" jdbcType="CHAR"/>
         <result column="order_rate" property="orderRate" jdbcType="INTEGER"/>
+        <result column="mini_id" property="miniId" jdbcType="VARCHAR"/>
     </resultMap>
     <sql id="Base_Column_List">
         <trim suffixOverrides=",">
@@ -114,6 +115,7 @@
             album_price,
             rate_flag,
             order_rate,
+            mini_id,
 
         </trim>
     </sql>
@@ -245,6 +247,9 @@
             <if test="orderRate!= null">
                 order_rate,
             </if>
+            <if test="miniId!= null">
+                mini_id,
+            </if>
         </trim>
         <trim prefix="values (" suffix=")" suffixOverrides=",">
             <if test="id != null">
@@ -361,6 +366,9 @@
             <if test="orderRate != null">
                 #{orderRate},
             </if>
+            <if test="miniId != null">
+                #{miniId},
+            </if>
         </trim>
     </insert>
     <update id="updateByPrimaryKeySelective" parameterType="com.izouma.awesomeadmin.model.StoreInfo">
@@ -480,6 +488,9 @@
             <if test="orderRate != null">
                 order_rate = #{orderRate},
             </if>
+            <if test="miniId != null">
+                mini_id = #{miniId,jdbcType=VARCHAR},
+            </if>
         </set>
         where id = #{id,jdbcType=INTEGER}
     </update>
@@ -641,6 +652,9 @@
             <if test="record.subclass != null and !&quot;&quot;.equals(record.subclass)">
                 and subclass = #{record.subclass}
             </if>
+            <if test="record.miniId != null and !&quot;&quot;.equals(record.miniId)">
+                and mini_id = #{record.miniId}
+            </if>
             <if test="record.companyFlag != null and !&quot;&quot;.equals(record.companyFlag)">
                 and user_id in (
                 SELECT
@@ -831,6 +845,11 @@
             <if test="subclass != null and !&quot;&quot;.equals(subclass)">
                 and subclass = #{subclass}
             </if>
+
+            <if test="miniId != null and !&quot;&quot;.equals(miniId)">
+                and mini_id = #{miniId}
+            </if>
+
             <if test="searchKey != null and !&quot;&quot;.equals(searchKey)">
                 <trim prefix="and (" suffix=")" prefixOverrides="OR">
                     OR user_id LIKE concat('%',#{searchKey},'%')

+ 35 - 0
src/main/java/com/izouma/awesomeadmin/dao/WxMiniprogramMapper.java

@@ -0,0 +1,35 @@
+package com.izouma.awesomeadmin.dao;
+
+import java.util.*;
+import com.izouma.awesomeadmin.datasource.DataSource;
+import org.springframework.stereotype.Repository;
+import com.izouma.awesomeadmin.model.WxMiniprogram;
+
+
+/**
+*  Dao接口
+*/
+@Repository("com.zoumaframe.dao.WxMiniprogramMapper")
+public interface WxMiniprogramMapper{
+    /*generatedStart*/
+    int deleteByPrimaryKey(Integer id);
+
+    int insertSelective(WxMiniprogram record);
+
+    WxMiniprogram selectByPrimaryKey(Integer id);
+
+    int updateByPrimaryKeySelective(WxMiniprogram record);
+
+    List<WxMiniprogram> queryAllWxMiniprogram(WxMiniprogram record);
+
+    List<WxMiniprogram> queryWxMiniprogramByPage(Map<String, Object> parameter);
+
+    int delete(WxMiniprogram record);
+
+    WxMiniprogram queryWxMiniprogram(WxMiniprogram record);
+
+    List<WxMiniprogram> query(WxMiniprogram record);
+    /*generatedEnd*/
+
+}
+

+ 461 - 0
src/main/java/com/izouma/awesomeadmin/dao/WxMiniprogramMapper.xml

@@ -0,0 +1,461 @@
+<?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.izouma.awesomeadmin.dao.WxMiniprogramMapper">
+    <resultMap id="BaseResultMap" type="com.izouma.awesomeadmin.model.WxMiniprogram">
+        <!--generatedStart-->
+        <id column="id" property="id" jdbcType="INTEGER"/>
+        <result column="del_flag" property="delFlag" jdbcType="CHAR"/>
+        <result column="update_time" property="updateTime" jdbcType="TIMESTAMP"/>
+        <result column="update_user" property="updateUser" jdbcType="VARCHAR"/>
+        <result column="create_time" property="createTime" jdbcType="TIMESTAMP"/>
+        <result column="create_user" property="createUser" jdbcType="VARCHAR"/>
+        <result column="name" property="name" jdbcType="VARCHAR"/>
+        <result column="appid" property="appid" jdbcType="VARCHAR"/>
+        <result column="secret" property="secret" jdbcType="VARCHAR"/>
+        <result column="mch_id" property="mchId" jdbcType="VARCHAR"/>
+        <result column="mch_secret" property="mchSecret" jdbcType="VARCHAR"/>
+        <result column="remark" property="remark" jdbcType="VARCHAR"/>
+        <result column="use_flag" property="useFlag" jdbcType="VARCHAR"/>
+        <!--generatedEnd-->
+    </resultMap>
+
+    <sql id="Base_Column_List">
+        <!--generatedStart-->
+        id, del_flag, update_time, update_user, create_time, create_user, name, appid, secret, mch_id, mch_secret, remark, use_flag        <!--generatedEnd-->
+    </sql>
+
+    <select id="selectByPrimaryKey" resultMap="BaseResultMap" parameterType="java.lang.Integer">
+        SELECT
+        <include refid="Base_Column_List"/>
+        FROM wx_miniprogram
+        WHERE id = #{id,jdbcType=INTEGER}
+    </select>
+
+    <delete id="deleteByPrimaryKey" parameterType="java.lang.Integer">
+        DELETE
+        FROM wx_miniprogram
+        WHERE id = #{id,jdbcType=INTEGER}
+    </delete>
+
+    <insert id="insertSelective" parameterType="com.izouma.awesomeadmin.model.WxMiniprogram" useGeneratedKeys="true" keyProperty="id">
+        INSERT INTO wx_miniprogram
+        <trim prefix="(" suffix=")" suffixOverrides=",">
+            <!--generatedStart-->
+            <if test="id!= null">
+                id,
+            </if>
+            <if test="delFlag!= null">
+                del_flag,
+            </if>
+            <if test="updateTime!= null">
+                update_time,
+            </if>
+            <if test="updateUser!= null">
+                update_user,
+            </if>
+            <if test="createTime!= null">
+                create_time,
+            </if>
+            <if test="createUser!= null">
+                create_user,
+            </if>
+            <if test="name!= null">
+                name,
+            </if>
+            <if test="appid!= null">
+                appid,
+            </if>
+            <if test="secret!= null">
+                secret,
+            </if>
+            <if test="mchId!= null">
+                mch_id,
+            </if>
+            <if test="mchSecret!= null">
+                mch_secret,
+            </if>
+            <if test="remark!= null">
+                remark,
+            </if>
+            <if test="useFlag!= null">
+                use_flag,
+            </if>
+            <!--generatedEnd-->
+        </trim>
+        <trim prefix="values (" suffix=")" suffixOverrides=",">
+            <!--generatedStart-->
+            <if test="id != null">
+                #{id,jdbcType=INTEGER},
+            </if>
+            <if test="delFlag != null">
+                #{delFlag,jdbcType=CHAR},
+            </if>
+            <if test="updateTime != null">
+                #{updateTime,jdbcType=TIMESTAMP},
+            </if>
+            <if test="updateUser != null">
+                #{updateUser,jdbcType=VARCHAR},
+            </if>
+            <if test="createTime != null">
+                #{createTime,jdbcType=TIMESTAMP},
+            </if>
+            <if test="createUser != null">
+                #{createUser,jdbcType=VARCHAR},
+            </if>
+            <if test="name != null">
+                #{name,jdbcType=VARCHAR},
+            </if>
+            <if test="appid != null">
+                #{appid,jdbcType=VARCHAR},
+            </if>
+            <if test="secret != null">
+                #{secret,jdbcType=VARCHAR},
+            </if>
+            <if test="mchId != null">
+                #{mchId,jdbcType=VARCHAR},
+            </if>
+            <if test="mchSecret != null">
+                #{mchSecret,jdbcType=VARCHAR},
+            </if>
+            <if test="remark != null">
+                #{remark,jdbcType=VARCHAR},
+            </if>
+            <if test="useFlag != null">
+                #{useFlag,jdbcType=VARCHAR},
+            </if>
+            <!--generatedEnd-->
+        </trim>
+    </insert>
+
+    <update id="updateByPrimaryKeySelective" parameterType="com.izouma.awesomeadmin.model.WxMiniprogram">
+        UPDATE wx_miniprogram
+        <set>
+            <!--generatedStart-->
+            <if test="id != null">
+                id= #{id,jdbcType=INTEGER},
+            </if>
+            <if test="delFlag != null">
+                del_flag= #{delFlag,jdbcType=CHAR},
+            </if>
+            <if test="updateTime != null">
+                update_time= #{updateTime,jdbcType=TIMESTAMP},
+            </if>
+            <if test="updateUser != null">
+                update_user= #{updateUser,jdbcType=VARCHAR},
+            </if>
+            <if test="createTime != null">
+                create_time= #{createTime,jdbcType=TIMESTAMP},
+            </if>
+            <if test="createUser != null">
+                create_user= #{createUser,jdbcType=VARCHAR},
+            </if>
+            <if test="name != null">
+                name= #{name,jdbcType=VARCHAR},
+            </if>
+            <if test="appid != null">
+                appid= #{appid,jdbcType=VARCHAR},
+            </if>
+            <if test="secret != null">
+                secret= #{secret,jdbcType=VARCHAR},
+            </if>
+            <if test="mchId != null">
+                mch_id= #{mchId,jdbcType=VARCHAR},
+            </if>
+            <if test="mchSecret != null">
+                mch_secret= #{mchSecret,jdbcType=VARCHAR},
+            </if>
+            <if test="remark != null">
+                remark= #{remark,jdbcType=VARCHAR},
+            </if>
+            <if test="useFlag != null">
+                use_flag= #{useFlag,jdbcType=VARCHAR},
+            </if>
+            <!--generatedEnd-->
+        </set>
+        WHERE
+        <if test="id != null and !&quot;&quot;.equals(id)">
+            id = #{id,jdbcType=INTEGER}
+        </if>
+        <if test="idStr != null and !&quot;&quot;.equals(idStr)">
+            id IN (${idStr})
+        </if>
+    </update>
+
+    <select id="queryWxMiniprogramByPage" parameterType="java.util.Map" resultType="com.izouma.awesomeadmin.model.WxMiniprogram">
+        SELECT <include refid="Base_Column_List"/> FROM wx_miniprogram
+        <where>
+            AND del_flag = 'N'
+            <if test="record.idStr != null and !&quot;&quot;.equals(record.idStr)">
+                AND id IN (${record.idStr})
+            </if>
+            <!--generatedStart-->
+            <if test="record.id != null and !&quot;&quot;.equals(record.id)">
+                AND id = #{record.id}
+            </if>
+            <if test="record.delFlag != null and !&quot;&quot;.equals(record.delFlag)">
+                AND del_flag = #{record.delFlag}
+            </if>
+            <if test="record.updateTime != null and !&quot;&quot;.equals(record.updateTime)">
+                AND update_time = #{record.updateTime}
+            </if>
+            <if test="record.updateUser != null and !&quot;&quot;.equals(record.updateUser)">
+                AND update_user = #{record.updateUser}
+            </if>
+            <if test="record.createTime != null and !&quot;&quot;.equals(record.createTime)">
+                AND create_time = #{record.createTime}
+            </if>
+            <if test="record.createUser != null and !&quot;&quot;.equals(record.createUser)">
+                AND create_user = #{record.createUser}
+            </if>
+            <if test="record.name != null and !&quot;&quot;.equals(record.name)">
+                AND name = #{record.name}
+            </if>
+            <if test="record.appid != null and !&quot;&quot;.equals(record.appid)">
+                AND appid = #{record.appid}
+            </if>
+            <if test="record.secret != null and !&quot;&quot;.equals(record.secret)">
+                AND secret = #{record.secret}
+            </if>
+            <if test="record.mchId != null and !&quot;&quot;.equals(record.mchId)">
+                AND mch_id = #{record.mchId}
+            </if>
+            <if test="record.mchSecret != null and !&quot;&quot;.equals(record.mchSecret)">
+                AND mch_secret = #{record.mchSecret}
+            </if>
+            <if test="record.remark != null and !&quot;&quot;.equals(record.remark)">
+                AND remark = #{record.remark}
+            </if>
+            <if test="record.useFlag != null and !&quot;&quot;.equals(record.useFlag)">
+                AND use_flag = #{record.useFlag}
+            </if>
+            <!--generatedEnd-->
+            <if test="record.searchKey != null and !&quot;&quot;.equals(record.searchKey)">
+                <trim prefix="and (" suffix=")" prefixOverrides="OR">
+                    <!--generatedStart-->
+                    OR name LIKE concat('%',#{record.searchKey},'%')
+                    OR appid LIKE concat('%',#{record.searchKey},'%')
+                    OR secret LIKE concat('%',#{record.searchKey},'%')
+                    OR mch_id LIKE concat('%',#{record.searchKey},'%')
+                    OR mch_secret LIKE concat('%',#{record.searchKey},'%')
+                    OR remark LIKE concat('%',#{record.searchKey},'%')
+                    OR use_flag LIKE concat('%',#{record.searchKey},'%')
+                    <!--generatedEnd-->
+                </trim>
+            </if>
+
+            <if test="record.advancedQuery != null and !&quot;&quot;.equals(record.advancedQuery)">
+                <foreach item="item" index="index" collection="record.advancedQuery.split('_;')">
+                    <choose>
+                        <when test="item.indexOf('like') != -1">
+                            <foreach item="itemDetail" index="detailIndex" collection="item.split('_,')">
+                                <if test="detailIndex == 3">
+                                    concat('%',#{itemDetail},'%')
+                                </if>
+                                <if test="detailIndex &lt; 3">
+                                    ${itemDetail}
+                                </if>
+                            </foreach>
+                        </when>
+                        <otherwise>
+                            <foreach item="itemDetail" index="detailIndex" collection="item.split('_,')">
+                                <if test="detailIndex == 3">
+                                    #{itemDetail}
+                                </if>
+                                <if test="detailIndex &lt; 3">
+                                    ${itemDetail}
+                                </if>
+                            </foreach>
+                        </otherwise>
+                    </choose>
+                </foreach>
+            </if>
+        </where>
+        ORDER BY
+        <if test="record.orderByStr != null and !&quot;&quot;.equals(record.orderByStr)">
+            <trim suffixOverrides=",">
+                <foreach item="item" index="index" separator="," collection="record.orderByStr.split('_;')">
+                    <foreach item="itemDetail" index="detailIndex" collection="item.split('_,')">
+                        ${itemDetail}
+                    </foreach>
+                </foreach>
+            </trim>
+            ,
+        </if>
+        id DESC
+    </select>
+
+    <select id="queryAllWxMiniprogram" parameterType="java.util.Map" resultType="com.izouma.awesomeadmin.model.WxMiniprogram">
+        SELECT <include refid="Base_Column_List"/> FROM wx_miniprogram
+        <where>
+            AND del_flag = 'N'
+            <if test="idStr != null and !&quot;&quot;.equals(idStr)">
+                AND id IN (${idStr})
+            </if>
+            <!--generatedStart-->
+            <if test="id != null and !&quot;&quot;.equals(id)">
+                AND id = #{id}
+            </if>
+            <if test="delFlag != null and !&quot;&quot;.equals(delFlag)">
+                AND del_flag = #{delFlag}
+            </if>
+            <if test="updateTime != null and !&quot;&quot;.equals(updateTime)">
+                AND update_time = #{updateTime}
+            </if>
+            <if test="updateUser != null and !&quot;&quot;.equals(updateUser)">
+                AND update_user = #{updateUser}
+            </if>
+            <if test="createTime != null and !&quot;&quot;.equals(createTime)">
+                AND create_time = #{createTime}
+            </if>
+            <if test="createUser != null and !&quot;&quot;.equals(createUser)">
+                AND create_user = #{createUser}
+            </if>
+            <if test="name != null and !&quot;&quot;.equals(name)">
+                AND name = #{name}
+            </if>
+            <if test="appid != null and !&quot;&quot;.equals(appid)">
+                AND appid = #{appid}
+            </if>
+            <if test="secret != null and !&quot;&quot;.equals(secret)">
+                AND secret = #{secret}
+            </if>
+            <if test="mchId != null and !&quot;&quot;.equals(mchId)">
+                AND mch_id = #{mchId}
+            </if>
+            <if test="mchSecret != null and !&quot;&quot;.equals(mchSecret)">
+                AND mch_secret = #{mchSecret}
+            </if>
+            <if test="remark != null and !&quot;&quot;.equals(remark)">
+                AND remark = #{remark}
+            </if>
+            <if test="useFlag != null and !&quot;&quot;.equals(useFlag)">
+                AND use_flag = #{useFlag}
+            </if>
+            <!--generatedEnd-->
+            <if test="searchKey != null and !&quot;&quot;.equals(searchKey)">
+                <trim prefix="and (" suffix=")" prefixOverrides="OR">
+                    <!--generatedStart-->
+                    OR name LIKE concat('%',#{searchKey},'%')
+                    OR appid LIKE concat('%',#{searchKey},'%')
+                    OR secret LIKE concat('%',#{searchKey},'%')
+                    OR mch_id LIKE concat('%',#{searchKey},'%')
+                    OR mch_secret LIKE concat('%',#{searchKey},'%')
+                    OR remark LIKE concat('%',#{searchKey},'%')
+                    OR use_flag LIKE concat('%',#{searchKey},'%')
+                    <!--generatedEnd-->
+                </trim>
+            </if>
+            <if test="advancedQuery != null and !&quot;&quot;.equals(advancedQuery)">
+                <foreach item="item" index="index" collection="advancedQuery.split('_;')">
+                    <choose>
+                        <when test="item.indexOf('like') != -1">
+                            <foreach item="itemDetail" index="detailIndex" collection="item.split('_,')">
+                                <if test="detailIndex == 3">
+                                    concat('%',#{itemDetail},'%')
+                                </if>
+                                <if test="detailIndex &lt; 3">
+                                    ${itemDetail}
+                                </if>
+                            </foreach>
+                        </when>
+                        <otherwise>
+                            <foreach item="itemDetail" index="detailIndex" collection="item.split('_,')">
+                                <if test="detailIndex == 3">
+                                    #{itemDetail}
+                                </if>
+                                <if test="detailIndex &lt; 3">
+                                    ${itemDetail}
+                                </if>
+                            </foreach>
+                        </otherwise>
+                    </choose>
+                </foreach>
+            </if>
+        </where>
+        ORDER BY
+        <if test="orderByStr != null and !&quot;&quot;.equals(orderByStr)">
+            <trim suffixOverrides=",">
+                <foreach item="item" index="index" separator="," collection="orderByStr.split('_;')">
+                    <foreach item="itemDetail" index="detailIndex" collection="item.split('_,')">
+                        ${itemDetail}
+                    </foreach>
+                </foreach>
+            </trim>
+            ,
+        </if>
+        id DESC
+    </select>
+
+    <select id="queryWxMiniprogram" parameterType="java.util.Map" resultType="com.izouma.awesomeadmin.model.WxMiniprogram">
+        SELECT <include refid="Base_Column_List"/> FROM wx_miniprogram
+        <where>
+            AND del_flag = 'N'
+            <!--generatedStart-->
+            <if test="id != null and !&quot;&quot;.equals(id)">
+                AND id = #{id}
+            </if>
+            <if test="delFlag != null and !&quot;&quot;.equals(delFlag)">
+                AND del_flag = #{delFlag}
+            </if>
+            <if test="updateTime != null and !&quot;&quot;.equals(updateTime)">
+                AND update_time = #{updateTime}
+            </if>
+            <if test="updateUser != null and !&quot;&quot;.equals(updateUser)">
+                AND update_user = #{updateUser}
+            </if>
+            <if test="createTime != null and !&quot;&quot;.equals(createTime)">
+                AND create_time = #{createTime}
+            </if>
+            <if test="createUser != null and !&quot;&quot;.equals(createUser)">
+                AND create_user = #{createUser}
+            </if>
+            <if test="name != null and !&quot;&quot;.equals(name)">
+                AND name = #{name}
+            </if>
+            <if test="appid != null and !&quot;&quot;.equals(appid)">
+                AND appid = #{appid}
+            </if>
+            <if test="secret != null and !&quot;&quot;.equals(secret)">
+                AND secret = #{secret}
+            </if>
+            <if test="mchId != null and !&quot;&quot;.equals(mchId)">
+                AND mch_id = #{mchId}
+            </if>
+            <if test="mchSecret != null and !&quot;&quot;.equals(mchSecret)">
+                AND mch_secret = #{mchSecret}
+            </if>
+            <if test="remark != null and !&quot;&quot;.equals(remark)">
+                AND remark = #{remark}
+            </if>
+            <if test="useFlag != null and !&quot;&quot;.equals(useFlag)">
+                AND use_flag = #{useFlag}
+            </if>
+            <!--generatedEnd-->
+        </where>
+        LIMIT 1
+    </select>
+
+    <update id="delete">
+        UPDATE wx_miniprogram SET del_flag = 'Y'
+        WHERE
+        <if test="id != null and !&quot;&quot;.equals(id)">
+            id = #{id,jdbcType=INTEGER}
+        </if>
+        <if test="idStr != null and !&quot;&quot;.equals(idStr)">
+            id IN (${idStr})
+        </if>
+    </update>
+
+    <select id="query" parameterType="java.util.Map" resultType="com.izouma.awesomeadmin.model.WxMiniprogram">
+        SELECT
+        <include refid="Base_Column_List"/>
+        FROM wx_miniprogram
+        <where>
+            AND del_flag = 'N'
+            <!--generatedStart-->
+            <!--generatedEnd-->
+        </where>
+        ORDER BY id DESC
+    </select>
+</mapper>
+

+ 13 - 0
src/main/java/com/izouma/awesomeadmin/model/StoreInfo.java

@@ -124,6 +124,11 @@ public class StoreInfo {
      */
     private Integer orderRate;
 
+    /**
+     * 小程序Id
+     */
+    private String miniId;
+
 
     private List<ProductInfo> productInfoList;
 
@@ -561,5 +566,13 @@ public class StoreInfo {
     public void setOrderRate(Integer orderRate) {
         this.orderRate = orderRate;
     }
+
+    public String getMiniId() {
+        return miniId;
+    }
+
+    public void setMiniId(String miniId) {
+        this.miniId = miniId;
+    }
 }
 

+ 168 - 0
src/main/java/com/izouma/awesomeadmin/model/WxMiniprogram.java

@@ -0,0 +1,168 @@
+package com.izouma.awesomeadmin.model;
+
+import java.util.*;
+import com.fasterxml.jackson.annotation.JsonAutoDetect;
+import com.fasterxml.jackson.annotation.JsonInclude;
+
+
+@JsonAutoDetect
+@JsonInclude(JsonInclude.Include.NON_NULL)
+public class WxMiniprogram{
+    /*generatedStart*/
+    private Integer id;
+    private String delFlag;
+    private Date updateTime;
+    private String updateUser;
+    private Date createTime;
+    private String createUser;
+    private String name;
+    private String appid;
+    private String secret;
+    private String mchId;
+    private String mchSecret;
+    private String remark;
+    private String useFlag;
+
+    private String idStr;
+
+    private String searchKey;
+
+    /**
+    * and,test_name,like,value;or,remark,=,123
+    */
+    private String advancedQuery;
+
+    /**
+    * column_name_,desc_;column_name_,asc
+    */
+    private String orderByStr;
+    /*generatedEnd*/
+
+    /*generatedStart*/
+    public Integer getId(){
+        return this.id;
+    }
+
+    public void setId(Integer id){
+        this.id = id;
+    }
+    public String getDelFlag(){
+        return this.delFlag;
+    }
+
+    public void setDelFlag(String delFlag){
+        this.delFlag = delFlag;
+    }
+    public Date getUpdateTime(){
+        return this.updateTime;
+    }
+
+    public void setUpdateTime(Date updateTime){
+        this.updateTime = updateTime;
+    }
+    public String getUpdateUser(){
+        return this.updateUser;
+    }
+
+    public void setUpdateUser(String updateUser){
+        this.updateUser = updateUser;
+    }
+    public Date getCreateTime(){
+        return this.createTime;
+    }
+
+    public void setCreateTime(Date createTime){
+        this.createTime = createTime;
+    }
+    public String getCreateUser(){
+        return this.createUser;
+    }
+
+    public void setCreateUser(String createUser){
+        this.createUser = createUser;
+    }
+    public String getName(){
+        return this.name;
+    }
+
+    public void setName(String name){
+        this.name = name;
+    }
+    public String getAppid(){
+        return this.appid;
+    }
+
+    public void setAppid(String appid){
+        this.appid = appid;
+    }
+    public String getSecret(){
+        return this.secret;
+    }
+
+    public void setSecret(String secret){
+        this.secret = secret;
+    }
+    public String getMchId(){
+        return this.mchId;
+    }
+
+    public void setMchId(String mchId){
+        this.mchId = mchId;
+    }
+    public String getMchSecret(){
+        return this.mchSecret;
+    }
+
+    public void setMchSecret(String mchSecret){
+        this.mchSecret = mchSecret;
+    }
+    public String getRemark(){
+        return this.remark;
+    }
+
+    public void setRemark(String remark){
+        this.remark = remark;
+    }
+    public String getUseFlag(){
+        return this.useFlag;
+    }
+
+    public void setUseFlag(String useFlag){
+        this.useFlag = useFlag;
+    }
+
+    public String getSearchKey() {
+        return searchKey;
+    }
+
+    public void setSearchKey(String searchKey) {
+        this.searchKey = searchKey;
+    }
+
+    public String getAdvancedQuery() {
+        return advancedQuery;
+    }
+
+    public void setAdvancedQuery(String advancedQuery) {
+        this.advancedQuery = advancedQuery;
+    }
+
+    public String getOrderByStr() {
+        return orderByStr;
+    }
+
+    public void setOrderByStr(String orderByStr) {
+        this.orderByStr = orderByStr;
+    }
+
+    public String getIdStr() {
+        return idStr;
+    }
+
+    public void setIdStr(String idStr) {
+        this.idStr = idStr;
+    }
+    /*generatedEnd*/
+
+}
+

+ 28 - 0
src/main/java/com/izouma/awesomeadmin/service/WxMiniprogramService.java

@@ -0,0 +1,28 @@
+package com.izouma.awesomeadmin.service;
+
+import java.util.*;
+import com.izouma.awesomeadmin.dto.Page;
+import com.izouma.awesomeadmin.model.WxMiniprogram;
+
+
+/**
+*  service接口类
+*/
+public interface WxMiniprogramService{
+    /*generatedStart*/
+    List<WxMiniprogram> getWxMiniprogramList(WxMiniprogram record);
+
+    List<WxMiniprogram> getWxMiniprogramByPage(Page page, WxMiniprogram record);
+
+    WxMiniprogram getWxMiniprogramById(String id);
+
+    WxMiniprogram getWxMiniprogram(WxMiniprogram record);
+
+    boolean createWxMiniprogram(WxMiniprogram record);
+
+    boolean deleteWxMiniprogram(WxMiniprogram record);
+
+    boolean updateWxMiniprogram(WxMiniprogram record);
+    /*generatedEnd*/
+}
+

+ 117 - 0
src/main/java/com/izouma/awesomeadmin/service/impl/WxMiniprogramServiceImpl.java

@@ -0,0 +1,117 @@
+package com.izouma.awesomeadmin.service.impl;
+
+import java.util.*;
+import org.apache.log4j.Logger;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Service;
+import com.izouma.awesomeadmin.constant.AppConstant;
+import com.izouma.awesomeadmin.dto.Page;
+import com.izouma.awesomeadmin.model.WxMiniprogram;
+import com.izouma.awesomeadmin.service.WxMiniprogramService;
+import com.izouma.awesomeadmin.dao.WxMiniprogramMapper;
+
+/**
+*  service接口实现类
+*/
+@Service
+public class WxMiniprogramServiceImpl implements WxMiniprogramService{
+    /*generatedStart*/
+    private static Logger logger = Logger.getLogger(WxMiniprogramServiceImpl.class);
+
+    @Autowired
+    private WxMiniprogramMapper wxMiniprogramMapper;
+    /*generatedEnd*/
+
+    /*generatedStart*/
+    @Override
+    public List<WxMiniprogram> getWxMiniprogramList(WxMiniprogram record) {
+        logger.info("getWxMiniprogramList");
+        try {
+            return wxMiniprogramMapper.queryAllWxMiniprogram(record);
+        } catch (Exception e) {
+            logger.error("getWxMiniprogramList", e);
+        }
+        return null;
+    }
+
+    @Override
+    public List<WxMiniprogram> getWxMiniprogramByPage(Page page, WxMiniprogram record) {
+        logger.info("getWxMiniprogramByPage");
+        try {
+            Map<String, Object> parameter = new HashMap<String, Object>();
+            parameter.put("record", record);
+            parameter.put(AppConstant.PAGE, page);
+
+            return wxMiniprogramMapper.queryWxMiniprogramByPage(parameter);
+        } catch (Exception e) {
+            logger.error("getWxMiniprogramByPage", e);
+        }
+        return null;
+    }
+
+    @Override
+    public WxMiniprogram getWxMiniprogramById(String id) {
+        logger.info("getWxMiniprogramyId");
+        try {
+            return wxMiniprogramMapper.selectByPrimaryKey(Integer.valueOf(id));
+        } catch (Exception e) {
+            logger.error("getWxMiniprogramById", e);
+        }
+        return null;
+    }
+
+    @Override
+    public WxMiniprogram getWxMiniprogram(WxMiniprogram record) {
+        logger.info("getWxMiniprogram");
+        try {
+            return wxMiniprogramMapper.queryWxMiniprogram(record);
+        } catch (Exception e) {
+            logger.error("getWxMiniprogram", e);
+        }
+        return null;
+    }
+
+    @Override
+    public boolean createWxMiniprogram(WxMiniprogram record) {
+        logger.info("createWxMiniprogram");
+        try {
+            int updates = wxMiniprogramMapper.insertSelective(record);
+            if (updates > 0) {
+                 return true;
+            }
+        } catch (Exception e) {
+            logger.error("createWxMiniprogram", e);
+        }
+        return false;
+    }
+
+    @Override
+    public boolean deleteWxMiniprogram(WxMiniprogram record) {
+        logger.info("deleteWxMiniprogram");
+        try {
+            int updates = wxMiniprogramMapper.delete(record);
+            if (updates > 0) {
+                 return true;
+            }
+        } catch (Exception e) {
+             logger.error("deleteWxMiniprogram", e);
+        }
+        return false;
+    }
+
+    @Override
+    public boolean updateWxMiniprogram(WxMiniprogram record) {
+        logger.info("updateWxMiniprogram");
+        try {
+            int updates = wxMiniprogramMapper.updateByPrimaryKeySelective(record);
+            if (updates > 0) {
+                 return true;
+            }
+        } catch (Exception e) {
+             logger.error("updateWxMiniprogram", e);
+        }
+        return false;
+    }
+    /*generatedEnd*/
+}
+

+ 129 - 0
src/main/java/com/izouma/awesomeadmin/web/WxMiniprogramController.java

@@ -0,0 +1,129 @@
+package com.izouma.awesomeadmin.web;
+
+import java.util.*;
+
+import com.izouma.awesomeadmin.util.ExportExcelUtil;
+import org.apache.commons.lang.StringUtils;
+import org.apache.shiro.authz.annotation.RequiresAuthentication;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Controller;
+import org.springframework.web.bind.annotation.*;
+import com.izouma.awesomeadmin.constant.AppConstant;
+import com.izouma.awesomeadmin.dto.Page;
+import com.izouma.awesomeadmin.dto.Result;
+import com.izouma.awesomeadmin.model.WxMiniprogram;
+import com.izouma.awesomeadmin.service.WxMiniprogramService;
+
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
+
+@Controller
+@RequestMapping("/wxMiniprogram")
+public class WxMiniprogramController {
+    /*generatedStart*/
+    @Autowired
+    private WxMiniprogramService wxMiniprogramService;
+    /*generatedEnd*/
+
+    /*generatedStart*/
+    @RequiresAuthentication
+    @RequestMapping(value = "/all", method = RequestMethod.GET)
+    @ResponseBody
+    public Result all(WxMiniprogram record) {
+        List<WxMiniprogram> pp = wxMiniprogramService.getWxMiniprogramList(record);
+        return new Result(true, pp);
+    }
+
+    @RequestMapping(value = "/getWxMiniprogram", method = RequestMethod.GET)
+    @ResponseBody
+    public Result getWxMiniprogram(@RequestParam(required = false, value = "id") String id) {
+        WxMiniprogram data = wxMiniprogramService.getWxMiniprogramById(id);
+        return new Result(true, data);
+    }
+
+    @RequestMapping(value = "/getOne", method = RequestMethod.GET)
+    @ResponseBody
+    public Result getOne(WxMiniprogram record) {
+        WxMiniprogram data = wxMiniprogramService.getWxMiniprogram(record);
+        return new Result(true, data);
+    }
+
+    @RequestMapping(value = "/page", method = RequestMethod.GET)
+    @ResponseBody
+    public Result page(Page page, WxMiniprogram record) {
+        Map<String, Object> result = new HashMap<>();
+
+        List<WxMiniprogram> pp =wxMiniprogramService.getWxMiniprogramByPage(page, record);
+
+        result.put(AppConstant.PAGE, page);
+        result.put("pp", pp);
+        return new Result(true, result);
+    }
+
+    @RequestMapping(value = "/save", method = RequestMethod.POST)
+    @ResponseBody
+    public Result save(WxMiniprogram record) {
+        boolean num = wxMiniprogramService.createWxMiniprogram(record);
+        if (num) {
+        return new Result(true, record.getId());
+        }
+        return new Result(false, "保存异常");
+    }
+
+    @RequestMapping(value = "/update", method = RequestMethod.POST)
+    @ResponseBody
+    public Result updateWxMiniprogram(WxMiniprogram record) {
+        boolean num = wxMiniprogramService.updateWxMiniprogram(record);
+        if (num) {
+        return new Result(true, "保存成功");
+        }
+        return new Result(false, "保存异常");
+    }
+
+    @RequestMapping(value = "/del", method = RequestMethod.POST)
+    @ResponseBody
+    public Result deleteWxMiniprogram(WxMiniprogram record) {
+
+        boolean num = wxMiniprogramService.deleteWxMiniprogram(record);
+        if (num) {
+        return new Result(true, "删除成功");
+        }
+        return new Result(false, "删除异常");
+    }
+
+    @RequestMapping(value = "/exportExcel", method = RequestMethod.GET)
+    @ResponseBody
+    public void exportExcel(HttpServletRequest request, HttpServletResponse response, WxMiniprogram record) throws Exception {
+
+        List<WxMiniprogram> wxMiniprograms = wxMiniprogramService.getWxMiniprogramList(record);
+
+        String sheetName = "wx_miniprogram";
+        String titleName = "微信小程序数据表";
+        String fileName = "微信小程序表";
+        int columnNumber = 13;
+        int[] columnWidth = { 20,  20,  20,  20,  20,  20,  20,  20,  20,  20,  20,  20,  20 };
+        String[] columnName = {  "ID" ,   "删除标识" ,   "更新时间" ,   "更新人" ,   "创建时间" ,   "创建人" ,   "名称" ,   "appid" ,   "secret" ,   "mch_id" ,   "mch_secret" ,   "备注" ,   "可以"  };
+        String[][] dataList = new String[wxMiniprograms.size()][13];
+
+        for (int i = 0; i < wxMiniprograms.size(); i++) {
+                        dataList[i][0] = String.valueOf(wxMiniprograms.get(i).getId());
+                        dataList[i][1] = String.valueOf(wxMiniprograms.get(i).getDelFlag());
+                        dataList[i][2] = String.valueOf(wxMiniprograms.get(i).getUpdateTime());
+                        dataList[i][3] = String.valueOf(wxMiniprograms.get(i).getUpdateUser());
+                        dataList[i][4] = String.valueOf(wxMiniprograms.get(i).getCreateTime());
+                        dataList[i][5] = String.valueOf(wxMiniprograms.get(i).getCreateUser());
+                        dataList[i][6] = String.valueOf(wxMiniprograms.get(i).getName());
+                        dataList[i][7] = String.valueOf(wxMiniprograms.get(i).getAppid());
+                        dataList[i][8] = String.valueOf(wxMiniprograms.get(i).getSecret());
+                        dataList[i][9] = String.valueOf(wxMiniprograms.get(i).getMchId());
+                        dataList[i][10] = String.valueOf(wxMiniprograms.get(i).getMchSecret());
+                        dataList[i][11] = String.valueOf(wxMiniprograms.get(i).getRemark());
+                        dataList[i][12] = String.valueOf(wxMiniprograms.get(i).getUseFlag());
+                    }
+
+        ExportExcelUtil.ExportWithResponse(sheetName, titleName, fileName,
+                columnNumber, columnWidth, columnName, dataList, response);
+    }
+    /*generatedEnd*/
+}
+

+ 76 - 66
src/main/vue/src/components/MultiUpload.vue

@@ -1,12 +1,12 @@
 <template>
     <section>
         <el-upload
-            list-type="picture-card"
-            :action="url"
-            :on-preview="handlePictureCardPreview"
-            :on-remove="handleRemove"
-            :on-success="handleSuccess"
-            :file-list="fileList">
+                   list-type="picture-card"
+                   :action="url"
+                   :on-preview="handlePictureCardPreview"
+                   :on-remove="handleRemove"
+                   :on-success="handleSuccess"
+                   :file-list="fileList">
             <i class="el-icon-plus"></i>
             <div slot="tip" class="el-upload__tip">
                 <slot></slot>
@@ -18,73 +18,83 @@
     </section>
 </template>
 <script>
-    import {imageUrlPrefix} from '../config'
+import { imageUrlPrefix } from '../config';
 
-    const baseUrl = process.env.NODE_ENV === 'production' ? '../' : 'http://localhost:8080';
-    export default {
-        created() {
-            this.updateFileList(this.value);
-        },
-        props: {
-            value: Array,
-            usePrefix: {
-                type: Boolean,
-                default: true
-            },
-            prefix: {
-                type: String,
-                default: imageUrlPrefix
+const baseUrl =
+    process.env.NODE_ENV === 'production' ? '../' : 'http://localhost:8080';
+export default {
+    created() {
+        this.updateFileList(this.value);
+    },
+    props: {
+        value: {
+            type: Array,
+            default: () => {
+                return [];
             },
-            url: {
-                type: String,
-                default: baseUrl + '/assets/uploadFile'
-            }
         },
-        data() {
-            return {
-                dialogImageUrl: '',
-                dialogVisible: false,
-                fileList: []
+        usePrefix: {
+            type: Boolean,
+            default: true,
+        },
+        prefix: {
+            type: String,
+            default: imageUrlPrefix,
+        },
+        url: {
+            type: String,
+            default: baseUrl + '/assets/uploadFile',
+        },
+    },
+    data() {
+        return {
+            dialogImageUrl: '',
+            dialogVisible: false,
+            fileList: [],
+        };
+    },
+    methods: {
+        handleRemove(file, fileList) {
+            this.$emit('input', fileList.map(i => i.value));
+        },
+        handlePictureCardPreview(file) {
+            this.dialogImageUrl = file.url;
+            this.dialogVisible = true;
+        },
+        handleSuccess(response, file, fileList) {
+            if (response.data instanceof Array) {
+                file.value = response.data[0];
+            } else if (response.data instanceof String) {
+                file.value = response.data;
             }
+            this.$emit('input', fileList.map(i => i.value));
         },
-        methods: {
-            handleRemove(file, fileList) {
-                this.$emit('input', fileList.map(i => i.value));
-            },
-            handlePictureCardPreview(file) {
-                this.dialogImageUrl = file.url;
-                this.dialogVisible = true;
-            },
-            handleSuccess(response, file, fileList) {
-                if (response.data instanceof Array) {
-                    file.value = response.data[0];
-                } else if (response.data instanceof String) {
-                    file.value = response.data;
-                }
-                this.$emit('input', fileList.map(i => i.value));
-            },
-            updateFileList(list) {
-                this.fileList = list.map(i => {
-                    if (this.usePrefix && i && i.indexOf(this.prefix) === -1 && i.indexOf('http') === -1) {
-                        return {
-                            value: i,
-                            url: this.prefix + i
-                        }
-                    }
+        updateFileList(list) {
+            this.fileList = list.map(i => {
+                if (
+                    this.usePrefix &&
+                    i &&
+                    i.indexOf(this.prefix) === -1 &&
+                    i.indexOf('http') === -1
+                ) {
                     return {
                         value: i,
-                        url: i
-                    }
-                })
-            }
+                        url: this.prefix + i,
+                    };
+                }
+                return {
+                    value: i,
+                    url: i,
+                };
+            });
         },
-        watch: {
-            value(val) {
-                this.updateFileList(val);
-            }
-        }
-    }
+    },
+    watch: {
+        value(val) {
+            this.updateFileList(val);
+        },
+    },
+};
 </script>
 <style lang="less" scoped>
-
-</style>
+</style>

+ 119 - 95
src/main/vue/src/pages/ProductInfo.vue

@@ -11,30 +11,30 @@
                 </template>
 
             </el-form-item>
-            <el-form-item prop="typeFlag" label="类型">
+            <!-- <el-form-item prop="typeFlag" label="类型">
                 <template>
                     <el-select v-model="formData.typeFlag" clearable placeholder="请选择">
                         <el-option v-for="item in typeFlagOptions" :key="item.value" :label="item.label" :value="item.value">
                         </el-option>
                     </el-select>
                 </template>
-            </el-form-item>
+            </el-form-item> -->
 
-            <el-form-item prop="serviceType" label="服务大类">
+            <el-form-item prop="serviceType" label="类">
                 <el-select v-model="formData.serviceType" filterable placeholder="请选择" size="small">
-                    <el-option v-for="item in serviceTypes" :key="item.id" :label="item.shortName" :value="item.id">
+                    <el-option v-for="item in serviceTypes" :key="item.id" :label="item.typeName" :value="item.id">
                     </el-option>
                 </el-select>
 
             </el-form-item>
 
-            <el-form-item prop="subclass" label="服务小类">
+            <!-- <el-form-item prop="subclass" label="服务小类">
                 <el-select v-model="formData.subclass" filterable placeholder="请选择" size="small">
                     <el-option v-for="item in serviceTypeDetails[formData.serviceType]" :key="item.id" :label="item.typeName" :value="item.id">
                     </el-option>
                 </el-select>
 
-            </el-form-item>
+            </el-form-item> -->
 
             <el-form-item prop="title" label="标题">
                 <el-input v-model="formData.title" :disabled="'title'==subColumn"></el-input>
@@ -75,14 +75,13 @@
                 <el-input v-model="formData.salesVolume" :disabled="'salesVolume'==subColumn"></el-input>
             </el-form-item>
 
-
             <el-form-item prop="outFlag" label="外链">
-                <el-switch v-model="formData.outFlag" active-color="#13ce66" inactive-color="#ff4949" >
+                <el-switch v-model="formData.outFlag" active-color="#13ce66" inactive-color="#ff4949">
                 </el-switch>
             </el-form-item>
 
             <el-form-item v-if="formData.outFlag" prop="outUrl" label="外链地址">
-                <el-input v-model="formData.outUrl" ></el-input>
+                <el-input v-model="formData.outUrl"></el-input>
             </el-form-item>
 
             <el-form-item>
@@ -94,7 +93,7 @@
     </div>
 </template>
 <script>
-import formValidator from '../formValidator'
+import formValidator from '../formValidator';
 
 export default {
     created() {
@@ -104,68 +103,82 @@ export default {
         }
 
         if (this.$route.query.id) {
-            this.$http.get({
-                url: '/productInfo/getOne',
-                data: {
-                    id: this.$route.query.id
-                }
-            }).then(res => {
-                if (res.success) {
-
-
-                    this.formData = res.data;
-
-                    if (this.formData.serviceType) {
-
-                        this.formData.serviceType = Number(this.formData.serviceType);
-                    }
-                    if (this.formData.subclass) {
-                        this.formData.subclass = Number(this.formData.subclass);
-                    }
-
-                    this.formData.hotFlag = this.formData.hotFlag == 1 ? true : false;
-                    this.formData.homeFlag = this.formData.homeFlag == 1 ? true : false;
-                    this.formData.useFlag = this.formData.useFlag == 'Y' ? true : false;
-                    this.formData.onShelf = this.formData.onShelf == 'Y' ? true : false;
-                    this.formData.outFlag = this.formData.outFlag == 'Y' ? true : false;
-
-
-                    if (this.$route.query.column) {
-                        this.formData[this.subColumn] = this.subValue;
+            this.$http
+                .get({
+                    url: '/productInfo/getOne',
+                    data: {
+                        id: this.$route.query.id,
+                    },
+                })
+                .then(res => {
+                    if (res.success) {
+                        this.formData = res.data;
+
+                        if (this.formData.serviceType) {
+                            this.formData.serviceType = Number(
+                                this.formData.serviceType,
+                            );
+                        }
+                        if (this.formData.subclass) {
+                            this.formData.subclass = Number(
+                                this.formData.subclass,
+                            );
+                        }
+
+                        this.formData.hotFlag =
+                            this.formData.hotFlag == 1 ? true : false;
+                        this.formData.homeFlag =
+                            this.formData.homeFlag == 1 ? true : false;
+                        this.formData.useFlag =
+                            this.formData.useFlag == 'Y' ? true : false;
+                        this.formData.onShelf =
+                            this.formData.onShelf == 'Y' ? true : false;
+                        this.formData.outFlag =
+                            this.formData.outFlag == 'Y' ? true : false;
+
+                        if (this.$route.query.column) {
+                            this.formData[this.subColumn] = this.subValue;
+                        }
                     }
-                }
-            })
+                });
         } else {
             if (this.$route.query.column) {
                 this.formData[this.subColumn] = this.subValue;
             }
         }
 
+        this.$http
+            .get({
+                url: '/storeInfo/all',
+            })
+            .then(res => {
+                if (res.success) {
+                    this.storeInfos = res.data;
+                }
+            });
 
-        this.$http.get({
-            url: '/storeInfo/all'
-        }).then(res => {
-            if (res.success) {
-                this.storeInfos = res.data;
-
-            }
-        });
-
-
-        this.$http.get({
-            url: '/serviceType/all'
-        }).then(res => {
-            if (res.success) {
-                this.serviceTypes = res.data;
-
-                this.serviceTypes.forEach(element => {
+        // this.$http.get({
+        //     url: '/serviceType/all'
+        // }).then(res => {
+        //     if (res.success) {
+        //         this.serviceTypes = res.data;
 
-                    this.serviceTypeDetails[element.id] = element.serviceTypeDetailList
+        //         this.serviceTypes.forEach(element => {
 
-                });
-            }
-        });
+        //             this.serviceTypeDetails[element.id] = element.serviceTypeDetailList
 
+        //         });
+        //     }
+        // });
+        this.$http
+            .get({
+                url: '/itemType/all',
+            })
+            .then(res => {
+                if (res.success) {
+                    this.serviceTypes = res.data;
+                }
+            });
     },
     data() {
         return {
@@ -178,21 +191,23 @@ export default {
                 useFlag: true,
                 serviceType: 1,
                 onShelf: false,
-                storeId:'',
-            },
-            rules: {
+                storeId: '',
             },
+            rules: {},
             subColumn: '',
             subValue: '',
             serviceTypes: [],
             serviceTypeDetails: {},
-            typeFlagOptions: [{ label: '修图', value: 0 }, { label: '实体商品', value: 1 }],
-            storeInfos:[],
-        }
+            typeFlagOptions: [
+                { label: '修图', value: 0 },
+                { label: '实体商品', value: 1 },
+            ],
+            storeInfos: [],
+        };
     },
     methods: {
         onSave() {
-            this.$refs.form.validate((valid) => {
+            this.$refs.form.validate(valid => {
                 if (valid) {
                     this.submit();
                 } else {
@@ -211,37 +226,46 @@ export default {
 
             delete data.productPriceList;
 
-            this.$http.post({
-                url: this.formData.id ? '/productInfo/update' : '/productInfo/save',
-                data: data
-            }).then(res => {
-                if (res.success) {
-                    this.$message.success('成功');
-                    this.$router.go(-1);
-                } else {
-                    this.$message.warning('失败')
-                }
-            });
+            this.$http
+                .post({
+                    url: this.formData.id
+                        ? '/productInfo/update'
+                        : '/productInfo/save',
+                    data: data,
+                })
+                .then(res => {
+                    if (res.success) {
+                        this.$message.success('成功');
+                        this.$router.go(-1);
+                    } else {
+                        this.$message.warning('失败');
+                    }
+                });
         },
         onDelete() {
-            this.$alert('删除将无法恢复,确认要删除么?', '警告', { type: 'error' }).then(() => {
-                return this.$http.post({
-                    url: '/productInfo/del',
-                    data: { id: this.formData.id }
-                })
-            }).then(() => {
-                this.$message.success('删除成功');
-                this.$router.go(-1);
-            }).catch(action => {
-                if (action === 'cancel') {
-                    this.$message.info('删除取消');
-                } else {
-                    this.$message.error('删除失败');
-                }
+            this.$alert('删除将无法恢复,确认要删除么?', '警告', {
+                type: 'error',
             })
+                .then(() => {
+                    return this.$http.post({
+                        url: '/productInfo/del',
+                        data: { id: this.formData.id },
+                    });
+                })
+                .then(() => {
+                    this.$message.success('删除成功');
+                    this.$router.go(-1);
+                })
+                .catch(action => {
+                    if (action === 'cancel') {
+                        this.$message.info('删除取消');
+                    } else {
+                        this.$message.error('删除失败');
+                    }
+                });
         },
-    }
-}
+    },
+};
 </script>
 <style lang="less" scoped>
 </style>

+ 155 - 125
src/main/vue/src/pages/ProductInfos.vue

@@ -12,6 +12,10 @@
                 <el-option key="Y" label="上架" value="Y">
                 </el-option>
             </el-select>
+            <el-select v-model="itemType" clearable filterable placeholder="类目" @change="storeIdChange" size="small" style="width:120px">
+               <el-option v-for="item in itemTypes" :key="item.id" :label="item.typeName" :value="item.id">
+                </el-option>
+            </el-select>
             <el-input placeholder="关键字" v-model="filter1" clearable class="filter-item" size="small" style="width:120px"></el-input>
             <el-button @click="searchData" type="primary" size="small" icon="el-icon-search" class="filter-item">搜索
             </el-button>
@@ -40,49 +44,49 @@
             <el-table-column type="index" min-width="50" align="center">
             </el-table-column>
 
-            <el-table-column v-if="isColumnShow('serviceType')" align="center" :show-overflow-tooltip='true'  prop="serviceType" label="大类" :formatter="ServiceTypeFormatter" min-width="100">
+            <el-table-column v-if="isColumnShow('serviceType')" align="center" :show-overflow-tooltip='true' prop="serviceType" label="大类" :formatter="ServiceTypeFormatter" min-width="100">
             </el-table-column>
 
-            <el-table-column v-if="isColumnShow('subclass')" align="center" :show-overflow-tooltip='true'  prop="subclass" label="小类" :formatter="ServiceTypeDetailFormatter" min-width="100">
-            </el-table-column>
+            <!-- <el-table-column v-if="isColumnShow('subclass')" align="center" :show-overflow-tooltip='true' prop="subclass" label="小类" :formatter="ServiceTypeDetailFormatter" min-width="100">
+            </el-table-column> -->
 
-            <el-table-column v-if="isColumnShow('title')" align="center" :show-overflow-tooltip='true'  prop="title" label="标题" min-width="100">
+            <el-table-column v-if="isColumnShow('title')" align="center" :show-overflow-tooltip='true' prop="title" label="标题" min-width="100">
             </el-table-column>
 
             <el-table-column v-if="isColumnShow('image')" prop="image" label="主图" min-width="100">
                 <template slot-scope="{row}" v-if="row.image">
-                    <img :src="row.image+'?x-oss-process=image/resize,m_pad,h_60,w_60,color_FFFFFF'" style="cursor:pointer" @click="showImg(row.image)"/>
+                    <img :src="row.image+'?x-oss-process=image/resize,m_pad,h_60,w_60,color_FFFFFF'" style="cursor:pointer" @click="showImg(row.image)" />
                 </template>
 
             </el-table-column>
 
-            <el-table-column v-if="isColumnShow('serviceDetail')" align="center" :show-overflow-tooltip='true'  prop="serviceDetail" label="服务详情" min-width="100">
+            <el-table-column v-if="isColumnShow('serviceDetail')" align="center" :show-overflow-tooltip='true' prop="serviceDetail" label="服务详情" min-width="100">
             </el-table-column>
 
-            <el-table-column v-if="isColumnShow('inventory')" align="center" :show-overflow-tooltip='true'  prop="inventory" label="库存" min-width="100">
+            <el-table-column v-if="isColumnShow('inventory')" align="center" :show-overflow-tooltip='true' prop="inventory" label="库存" min-width="100">
             </el-table-column>
 
             <el-table-column v-if="isColumnShow('onShelf')" align="center" prop="onShelf" label="上下架" min-width="100">
-                 <template slot-scope="{row}">
-                  {{row.onShelf=='Y'?'上架':'下架'}}
+                <template slot-scope="{row}">
+                    {{row.onShelf=='Y'?'上架':'下架'}}
                 </template>
             </el-table-column>
 
             <el-table-column v-if="isColumnShow('useFlag')" align="center" prop="useFlag" label="可用" min-width="100">
-                 <template slot-scope="{row}">
-                  {{row.useFlag=='Y'?'可用':'不可用'}}
+                <template slot-scope="{row}">
+                    {{row.useFlag=='Y'?'可用':'不可用'}}
                 </template>
             </el-table-column>
 
             <el-table-column v-if="isColumnShow('hotFlag')" align="center" prop="hotFlag" label="热门" :formatter="YNFormatter" min-width="100">
                 <template slot-scope="{row}">
-                  {{row.hotFlag=='Y'?'热门':'不热门'}}
+                    {{row.hotFlag=='Y'?'热门':'不热门'}}
                 </template>
             </el-table-column>
 
             <el-table-column v-if="isColumnShow('homeFlag')" align="center" prop="homeFlag" label="首页" :formatter="YNFormatter" min-width="100">
                 <template slot-scope="{row}">
-                  {{row.homeFlag=='Y'?'是':'否'}}
+                    {{row.homeFlag=='Y'?'是':'否'}}
                 </template>
             </el-table-column>
 
@@ -99,8 +103,8 @@
             </el-table-column>
             <el-table-column label="操作" align="center" fixed="right" min-width="150">
                 <template slot-scope="scope">
-                    <el-button @click="detailRow(scope.row)" type="primary" size="mini" plain>详情</el-button>
-                    <el-button @click="editRow(scope.row)"  size="mini" plain>编辑</el-button>
+                    <!-- <el-button @click="detailRow(scope.row)" type="primary" size="mini" plain>详情</el-button> -->
+                    <el-button @click="editRow(scope.row)" size="mini" plain>编辑</el-button>
                 </template>
             </el-table-column>
         </el-table>
@@ -205,35 +209,45 @@
     </div>
 </template>
 <script>
-import { mapState } from 'vuex'
-import { format } from 'date-fns'
-import zh from 'date-fns/locale/zh_cn'
+import { mapState } from 'vuex';
+import { format } from 'date-fns';
+import zh from 'date-fns/locale/zh_cn';
 
 export default {
     created() {
-        this.$http.get({
-            url: '/serviceType/all'
-        }).then(res => {
-            if (res.success) {
-                this.serviceTypes = res.data;
-
-                this.serviceTypes.forEach(element => {
+        // this.$http.get({
+        //     url: '/serviceType/all'
+        // }).then(res => {
+        //     if (res.success) {
+        //         this.serviceTypes = res.data;
 
-                    this.serviceTypeDetails[element.id] = element.serviceTypeDetailList
+        //         this.serviceTypes.forEach(element => {
 
-                });
-            }
-        });
+        //             this.serviceTypeDetails[element.id] = element.serviceTypeDetailList
 
-        this.$http.get({
-            url: '/storeInfo/all'
-        }).then(res => {
-            if (res.success) {
-                this.storeInfos = res.data;
+        //         });
+        //     }
+        // });
 
-            }
-        });
+        this.$http
+            .get({
+                url: '/storeInfo/all',
+            })
+            .then(res => {
+                if (res.success) {
+                    this.storeInfos = res.data;
+                }
+            });
 
+        this.$http
+            .get({
+                url: '/itemType/all',
+            })
+            .then(res => {
+                if (res.success) {
+                    this.itemTypes = res.data;
+                }
+            });
 
         this.getData();
     },
@@ -250,72 +264,72 @@ export default {
                 {
                     label: '大类',
                     value: 'serviceType',
-                    show: true
+                    show: true,
                 },
                 {
                     label: '小类',
                     value: 'subclass',
-                    show: true
+                    show: false,
                 },
                 {
                     label: '标题',
                     value: 'title',
-                    show: true
+                    show: true,
                 },
                 {
                     label: '主图',
                     value: 'image',
-                    show: true
+                    show: true,
                 },
                 {
                     label: '服务详情',
                     value: 'serviceDetail',
-                    show: true
+                    show: true,
                 },
                 {
                     label: '库存',
                     value: 'inventory',
-                    show: true
+                    show: true,
                 },
                 {
                     label: '上下架',
                     value: 'onShelf',
-                    show: true
+                    show: true,
                 },
                 {
                     label: '可用',
                     value: 'useFlag',
-                    show: true
+                    show: true,
                 },
                 {
                     label: '热门',
                     value: 'hotFlag',
-                    show: true
+                    show: true,
                 },
                 {
                     label: '首页',
                     value: 'homeFlag',
-                    show: true
+                    show: true,
                 },
                 {
                     label: '排序',
                     value: 'rank',
-                    show: true
+                    show: true,
                 },
                 {
                     label: '店铺',
                     value: 'storeId',
-                    show: true
+                    show: true,
                 },
                 {
                     label: '类型',
                     value: 'typeFlag',
-                    show: true
+                    show: true,
                 },
                 {
                     label: '销量',
                     value: 'salesVolume',
-                    show: true
+                    show: true,
                 },
             ],
             multipleMode: false,
@@ -327,59 +341,59 @@ export default {
             advancedQueryColumns: [
                 {
                     label: '大类',
-                    value: 'service_type'
+                    value: 'service_type',
                 },
                 {
                     label: '小类',
-                    value: 'subclass'
+                    value: 'subclass',
                 },
                 {
                     label: '标题',
-                    value: 'title'
+                    value: 'title',
                 },
                 {
                     label: '主图',
-                    value: 'image'
+                    value: 'image',
                 },
                 {
                     label: '服务详情',
-                    value: 'service_detail'
+                    value: 'service_detail',
                 },
                 {
                     label: '库存',
-                    value: 'inventory'
+                    value: 'inventory',
                 },
                 {
                     label: '上下架',
-                    value: 'on_shelf'
+                    value: 'on_shelf',
                 },
                 {
                     label: '可用',
-                    value: 'use_flag'
+                    value: 'use_flag',
                 },
                 {
                     label: '热门',
-                    value: 'hot_flag'
+                    value: 'hot_flag',
                 },
                 {
                     label: '首页',
-                    value: 'home_flag'
+                    value: 'home_flag',
                 },
                 {
                     label: '排序',
-                    value: 'rank'
+                    value: 'rank',
                 },
                 {
                     label: '店铺',
-                    value: 'store_id'
+                    value: 'store_id',
                 },
                 {
                     label: '类型',
-                    value: 'type_flag'
+                    value: 'type_flag',
                 },
                 {
                     label: '销量',
-                    value: 'sales_volume'
+                    value: 'sales_volume',
                 },
             ],
             advancedQuerySearchKey: '',
@@ -391,13 +405,15 @@ export default {
             storeInfos: [],
             storeId: '',
             onShelfFlag: '',
-        }
+            itemType: '',
+            itemTypes: [],
+        };
     },
     computed: {
         ...mapState(['tableHeight']),
         selection() {
             return this.$refs.table.selection.map(i => i.id);
-        }
+        },
     },
     methods: {
         pageSizeChange(size) {
@@ -410,7 +426,6 @@ export default {
             this.getData();
         },
         getData() {
-
             var data = {
                 currentPage: this.currentPage,
                 pageNumber: this.pageSize,
@@ -419,22 +434,25 @@ export default {
                 orderByStr: this.orderByStr,
                 storeId: this.storeId,
                 onShelf: this.onShelfFlag,
-            }
+                serviceType: this.itemType,
+            };
 
             if (this.$route.query.column) {
                 var tempColumn = this.$route.query.column;
                 data[tempColumn.split(',')[1]] = tempColumn.split(',')[0];
             }
 
-            this.$http.get({
-                url: '/productInfo/page',
-                data: data
-            }).then(res => {
-                if (res.success) {
-                    this.totalNumber = res.data.page.totalNumber;
-                    this.tableData = res.data.pp;
-                }
-            })
+            this.$http
+                .get({
+                    url: '/productInfo/page',
+                    data: data,
+                })
+                .then(res => {
+                    if (res.success) {
+                        this.totalNumber = res.data.page.totalNumber;
+                        this.tableData = res.data.pp;
+                    }
+                });
         },
         isColumnShow(column) {
             var row = this.tableColumns.find(i => i.value === column);
@@ -452,16 +470,20 @@ export default {
                 query: {
                     id: row.id,
                     column: this.$route.query.column,
-                }
-            })
+                },
+            });
         },
         detailRow(row) {
-            window.open("https://www.tutuxiang.com/index#/product?id=" + row.id + "&breHref=%E9%A6%96%E9%A1%B5");
+            window.open(
+                'https://www.tutuxiang.com/index#/product?id=' +
+                    row.id +
+                    '&breHref=%E9%A6%96%E9%A1%B5',
+            );
         },
         operation1() {
             this.$notify({
                 title: '提示',
-                message: this.selection
+                message: this.selection,
             });
         },
         operation2() {
@@ -481,22 +503,31 @@ export default {
             }
         },
         advancedQuery() {
-
             this.advancedQuerySearchKey = '';
 
             if (this.advancedQueryFields.length > 0) {
-
                 var templist = [];
 
                 this.advancedQueryFields.forEach(item => {
-                    if (item.link && item.name && item.searchMethod && item.value) {
-                        var tempItem = item.link + '_,' + item.name + '_,' + item.searchMethod + '_,' + item.value;
+                    if (
+                        item.link &&
+                        item.name &&
+                        item.searchMethod &&
+                        item.value
+                    ) {
+                        var tempItem =
+                            item.link +
+                            '_,' +
+                            item.name +
+                            '_,' +
+                            item.searchMethod +
+                            '_,' +
+                            item.value;
                         templist.push(tempItem);
                     }
-                })
+                });
 
                 if (templist.length > 0) {
-
                     this.advancedQuerySearchKey = templist.join('_;');
                 }
             }
@@ -516,11 +547,9 @@ export default {
             }
         },
         tableSortQuery() {
-
             this.orderByStr = '';
 
             if (this.tableSortFields.length > 0) {
-
                 var templist = [];
 
                 this.tableSortFields.forEach(item => {
@@ -528,10 +557,9 @@ export default {
                         var tempItem = item.name + '_,' + item.order;
                         templist.push(tempItem);
                     }
-                })
+                });
 
                 if (templist.length > 0) {
-
                     this.orderByStr = templist.join('_;');
                 }
             }
@@ -540,54 +568,62 @@ export default {
             this.showTableSortDialog = false;
         },
         exportExcel() {
-            window.location.href = this.$baseUrl + "/productInfo/exportExcel?searchKey="
-                + this.filter1 + "&advancedQuery=" + this.advancedQuerySearchKey + "&orderByStr=" + this.orderByStr;
+            window.location.href =
+                this.$baseUrl +
+                '/productInfo/exportExcel?searchKey=' +
+                this.filter1 +
+                '&advancedQuery=' +
+                this.advancedQuerySearchKey +
+                '&orderByStr=' +
+                this.orderByStr;
         },
         searchData() {
             this.currentPage = 1;
             this.getData();
         },
         deleteRow(row) {
-            this.$alert('删除将无法恢复,确认要删除么?', '警告', { type: 'error' }).then(() => {
-                return this.$http.post({
-                    url: '/productInfo/del',
-                    data: { id: row.id }
-                })
-            }).then(() => {
-                this.$message.success('删除成功');
-                this.getData();
-            }).catch(action => {
-                if (action === 'cancel') {
-                    this.$message.info('删除取消');
-                } else {
-                    this.$message.error('删除失败');
-                }
+            this.$alert('删除将无法恢复,确认要删除么?', '警告', {
+                type: 'error',
             })
+                .then(() => {
+                    return this.$http.post({
+                        url: '/productInfo/del',
+                        data: { id: row.id },
+                    });
+                })
+                .then(() => {
+                    this.$message.success('删除成功');
+                    this.getData();
+                })
+                .catch(action => {
+                    if (action === 'cancel') {
+                        this.$message.info('删除取消');
+                    } else {
+                        this.$message.error('删除失败');
+                    }
+                });
         },
         DateTimeFormatter(row, column, cellValue) {
             if (cellValue) {
-                return format(cellValue, 'YYYY/MM/DD HH:mm', { locale: zh })
+                return format(cellValue, 'YYYY/MM/DD HH:mm', { locale: zh });
             }
-
         },
         DateFormatter(row, column, cellValue) {
             if (cellValue) {
-                return format(cellValue, 'YYYY/MM/DD', { locale: zh })
+                return format(cellValue, 'YYYY/MM/DD', { locale: zh });
             }
-
         },
         ServiceTypeFormatter(row, column, cellValue) {
             if (cellValue) {
                 var serviceType = '';
-                this.serviceTypes.forEach(item => {
+                this.itemTypes.forEach(item => {
                     if (item.id == Number(cellValue)) {
-                        serviceType = item.shortName;
+                        serviceType = item.typeName;
                     }
-                })
+                });
 
                 return serviceType;
             }
-
         },
 
         ServiceTypeDetailFormatter(row, column, cellValue) {
@@ -598,21 +634,17 @@ export default {
                         if (item.id == Number(cellValue)) {
                             serviceTypeDetail = item.typeName;
                         }
-                    })
+                    });
                 }
 
-
                 return serviceTypeDetail;
             }
-
         },
 
         YNFormatter(row, column, cellValue) {
             return cellValue ? 'Y' : 'N';
-
         },
         TypeFlagFormatter(row, column, cellValue) {
-
             var valueStr = '';
             switch (cellValue) {
                 case 0:
@@ -620,11 +652,10 @@ export default {
                     break;
                 case 1:
                     valueStr = '实体商品';
-                    break
+                    break;
             }
 
             return valueStr;
-
         },
         showImg(img) {
             this.imgSrc = img + '?x-oss-process=image/resize,l_500';
@@ -634,9 +665,8 @@ export default {
             this.currentPage = 1;
             this.getData();
         },
-
-    }
-}
+    },
+};
 </script>
 <style lang="less" scoped>
 </style>

+ 112 - 98
src/main/vue/src/pages/StoreIntroduction.vue

@@ -2,27 +2,17 @@
     <div>
         <el-form :model="formData" :rules="rules" ref="form" label-width="120px" label-position="right" size="small"
                  style="max-width: 500px;">
-            <el-form-item prop="introduction" label="介绍">
-                            <rich-text
-                                    v-model="formData.introduction"
-                                    :disabled="'introduction'==subColumn">
-                            </rich-text>
+
+            <el-form-item prop="title" label="标题">
+                <el-input v-model="formData.title" :disabled="'title'==subColumn"></el-input>
             </el-form-item>
             <el-form-item prop="banner" label="banner">
-                            <multi-upload v-model="formData.banner" :disabled="'banner'==subColumn"></multi-upload>
-            </el-form-item>
-            <el-form-item prop="address" label="地址">
-                <el-input v-model="formData.address" :disabled="'address'==subColumn"></el-input>
-            </el-form-item>
-            <el-form-item prop="longitude" label="经度">
-                <el-input v-model="formData.longitude" :disabled="'longitude'==subColumn"></el-input>
-            </el-form-item>
-            <el-form-item prop="latitude" label="纬度">
-                <el-input v-model="formData.latitude" :disabled="'latitude'==subColumn"></el-input>
+                <multi-upload v-model="formData.banner" :disabled="'banner'==subColumn"></multi-upload>
             </el-form-item>
-            <el-form-item prop="title" label="标题">
-                <el-input v-model="formData.title" :disabled="'title'==subColumn"></el-input>
+            <el-form-item prop="introduction" label="介绍">
+                <rich-text :height="500" v-model="formData.introduction" :noImage="true"></rich-text>
             </el-form-item>
+
             <el-form-item prop="userId" label="用户">
                 <el-input v-model="formData.userId" :disabled="'userId'==subColumn"></el-input>
             </el-form-item>
@@ -32,6 +22,16 @@
             <el-form-item prop="storeId" label="店铺">
                 <el-input v-model="formData.storeId" :disabled="'storeId'==subColumn"></el-input>
             </el-form-item>
+            
+            <el-form-item prop="address" label="地址">
+                <el-input v-model="formData.address" :disabled="'address'==subColumn"></el-input>
+            </el-form-item>
+            <el-form-item prop="longitude" label="经度">
+                <el-input v-model="formData.longitude" :disabled="'longitude'==subColumn"></el-input>
+            </el-form-item>
+            <el-form-item prop="latitude" label="纬度">
+                <el-input v-model="formData.latitude" :disabled="'latitude'==subColumn"></el-input>
+            </el-form-item>
             <el-form-item prop="remark" label="备注">
                 <el-input v-model="formData.remark" :disabled="'remark'==subColumn"></el-input>
             </el-form-item>
@@ -44,76 +44,76 @@
     </div>
 </template>
 <script>
-    import formValidator from '../formValidator'
-    import { mapState } from 'vuex'
-    import { format } from 'date-fns'
-    import zh from 'date-fns/locale/zh_cn'
+import formValidator from '../formValidator';
+import { mapState } from 'vuex';
+import { format } from 'date-fns';
+import zh from 'date-fns/locale/zh_cn';
+import RichText from '../components/RichText';
 
-    export default {
-        name: 'StoreIntroduction',
-        created() {
-
-            if (this.$route.query.column) {
-                this.subColumn = this.$route.query.column.split(',')[1];
-                this.subValue = this.$route.query.column.split(',')[0];
-            }
+export default {
+    name: 'StoreIntroduction',
+    created() {
+        if (this.$route.query.column) {
+            this.subColumn = this.$route.query.column.split(',')[1];
+            this.subValue = this.$route.query.column.split(',')[0];
+        }
 
-            if (this.$route.query.id) {
-                this.$http.get({
+        if (this.$route.query.id) {
+            this.$http
+                .get({
                     url: '/storeIntroduction/getOne',
                     data: {
-                        id: this.$route.query.id
-                    }
-                }).then(res => {
+                        id: this.$route.query.id,
+                    },
+                })
+                .then(res => {
                     if (res.success) {
-                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                this.formData = res.data;
+                        this.formData = res.data;
                         if (this.$route.query.column) {
                             this.formData[this.subColumn] = this.subValue;
                         }
                     }
-                })
-            } else {
-                if (this.$route.query.column) {
-                    this.formData[this.subColumn] = this.subValue;
-                }
-            }
-
-                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    },
-        data() {
-            return {
-                saving: false,
-                formData: {
-                },
-                rules: {
-                },
-                subColumn: '',
-                subValue: '',
+                });
+        } else {
+            if (this.$route.query.column) {
+                this.formData[this.subColumn] = this.subValue;
             }
+        }
+    },
+    data() {
+        return {
+            saving: false,
+            formData: {},
+            rules: {},
+            subColumn: '',
+            subValue: '',
+        };
+    },
+    computed: {
+        ...mapState(['userInfo']),
+    },
+    methods: {
+        onSave() {
+            this.$refs.form.validate(valid => {
+                if (valid) {
+                    this.logicalValidate();
+                } else {
+                    return false;
+                }
+            });
         },
-        computed: {
-            ...mapState(['userInfo']),
-        },
-        methods: {
-            onSave() {
-                this.$refs.form.validate((valid) => {
-                    if (valid) {
-                        this.logicalValidate();
-                    } else {
-                        return false;
-                    }
-                });
-            },
-            logicalValidate() {
-                let logicalData = {
-                };
+        logicalValidate() {
+            let logicalData = {};
 
-                if (JSON.stringify(logicalData) == '{}') {
-                    this.submit();
-                } else {
-                    this.$http.get({
+            if (JSON.stringify(logicalData) == '{}') {
+                this.submit();
+            } else {
+                this.$http
+                    .get({
                         url: '/storeIntroduction/getOne',
-                        data: logicalData
-                    }).then(res => {
+                        data: logicalData,
+                    })
+                    .then(res => {
                         if (res.success) {
                             let logicalFlag = true;
                             if (res.data) {
@@ -129,50 +129,64 @@
                             if (logicalFlag) {
                                 this.submit();
                             } else {
-                                this.$message.warning('逻辑关键字:'+''+'验证失败')
+                                this.$message.warning(
+                                    '逻辑关键字:' + '' + '验证失败',
+                                );
                             }
-
                         } else {
-                            this.$message.warning('逻辑关键字:'+''+'验证失败')
+                            this.$message.warning(
+                                '逻辑关键字:' + '' + '验证失败',
+                            );
                         }
                     });
-                }
-            },
-            submit() {
-                let data = {...this.formData};
+            }
+        },
+        submit() {
+            let data = { ...this.formData };
 
-                                                                                                                                                                                                                                                                                
-                this.$http.post({
-                    url: this.formData.id ? '/storeIntroduction/update' : '/storeIntroduction/save',
-                    data: data
-                }).then(res => {
+            this.$http
+                .post({
+                    url: this.formData.id
+                        ? '/storeIntroduction/update'
+                        : '/storeIntroduction/save',
+                    data: data,
+                })
+                .then(res => {
                     if (res.success) {
                         this.$message.success('成功');
                         this.$router.go(-1);
                     } else {
-                        this.$message.warning('失败')
+                        this.$message.warning('失败');
                     }
                 });
-            },
-            onDelete() {
-                this.$alert('删除将无法恢复,确认要删除么?', '警告', { type: 'error' }).then(() => {
+        },
+        onDelete() {
+            this.$alert('删除将无法恢复,确认要删除么?', '警告', {
+                type: 'error',
+            })
+                .then(() => {
                     return this.$http.post({
                         url: '/storeIntroduction/del',
-                        data: { id: this.formData.id }
-                    })
-                }).then(() => {
+                        data: { id: this.formData.id },
+                    });
+                })
+                .then(() => {
                     this.$message.success('删除成功');
                     this.$router.go(-1);
-                }).catch(action => {
+                })
+                .catch(action => {
                     if (action === 'cancel') {
                         this.$message.info('删除取消');
                     } else {
                         this.$message.error('删除失败');
                     }
-                })
-            },
-        }
-    }
+                });
+        },
+    },
+    components: {
+        RichText,
+    },
+};
 </script>
 <style lang="less" scoped>
 </style>

+ 407 - 394
src/main/vue/src/pages/StoreIntroductions.vue

@@ -1,7 +1,7 @@
 <template>
     <div>
         <div class="filters-container">
-        
+
             <el-input placeholder="关键字" size="small" v-model="filter1" clearable class="filter-item"></el-input>
             <el-button @click="searchData" type="primary" size="small" icon="el-icon-search" class="filter-item">搜索
             </el-button>
@@ -19,7 +19,7 @@
             </el-button>
             <el-dropdown trigger="click" size="medium" class="table-column-filter">
                 <span>
-                  筛选数据<i class="el-icon-arrow-down el-icon--right"></i>
+                    筛选数据<i class="el-icon-arrow-down el-icon--right"></i>
                 </span>
                 <el-dropdown-menu slot="dropdown" class="table-column-filter-wrapper">
                     <el-checkbox v-for="item in tableColumns" :key="item.value" v-model="item.show">{{item.label}}
@@ -28,106 +28,105 @@
             </el-dropdown>
         </div>
         <el-table
-                :data="tableData"
-                :height="tableHeight"
-                row-key="id"
-                ref="table">
+                  :data="tableData"
+                  :height="tableHeight"
+                  row-key="id"
+                  ref="table">
+            <el-table-column
+                             v-if="multipleMode"
+                             align="center"
+                             type="selection"
+                             width="50">
+            </el-table-column>
+            <el-table-column
+                             type="index"
+                             min-width="50"
+                             align="center">
+            </el-table-column>
+
+            <el-table-column
+                             v-if="isColumnShow('id')"
+                             prop="id"
+                             label="Id"
+                             min-width="50">
+            </el-table-column>
+
+            <el-table-column
+                             v-if="isColumnShow('title')"
+                             prop="title"
+                             label="标题"
+                             min-width="100">
+            </el-table-column>
+
+            <el-table-column
+                             v-if="isColumnShow('address')"
+                             prop="address"
+                             label="地址"
+                             min-width="100">
+            </el-table-column>
+
+            <el-table-column
+                             v-if="isColumnShow('longitude')"
+                             prop="longitude"
+                             label="经度"
+                             min-width="100">
+            </el-table-column>
+
+            <el-table-column
+                             v-if="isColumnShow('latitude')"
+                             prop="latitude"
+                             label="纬度"
+                             min-width="100">
+            </el-table-column>
+
+            <el-table-column
+                             v-if="isColumnShow('userId')"
+                             prop="userId"
+                             label="用户"
+                             min-width="100">
+            </el-table-column>
+
+            <el-table-column
+                             v-if="isColumnShow('miniId')"
+                             prop="miniId"
+                             label="小程序"
+                             min-width="100">
+            </el-table-column>
+
             <el-table-column
-                    v-if="multipleMode"
-                    align="center"
-                    type="selection"
-                    width="50">
+                             v-if="isColumnShow('storeId')"
+                             prop="storeId"
+                             label="店铺"
+                             min-width="100">
             </el-table-column>
+
             <el-table-column
-                    type="index"
-                    min-width="50"
-                    align="center">
+                             v-if="isColumnShow('remark')"
+                             prop="remark"
+                             label="备注"
+                             min-width="100">
             </el-table-column>
-                            
-                                            <el-table-column
-                                v-if="isColumnShow('id')"
-                                prop="id"
-                                label="Id"
-                                min-width="100">
-                        </el-table-column>
-                                                                                                                                                                                                            
-                                            <el-table-column
-                                v-if="isColumnShow('introduction')"
-                                prop="introduction"
-                                label="介绍"
-                                min-width="100">
-                        </el-table-column>
-                                                                
-                                            <el-table-column
-                                v-if="isColumnShow('banner')"
-                                prop="banner"
-                                label="banner"
-                                min-width="100">
-                        </el-table-column>
-                                                                
-                                            <el-table-column
-                                v-if="isColumnShow('address')"
-                                prop="address"
-                                label="地址"
-                                min-width="100">
-                        </el-table-column>
-                                                                
-                                            <el-table-column
-                                v-if="isColumnShow('longitude')"
-                                prop="longitude"
-                                label="经度"
-                                min-width="100">
-                        </el-table-column>
-                                                                
-                                            <el-table-column
-                                v-if="isColumnShow('latitude')"
-                                prop="latitude"
-                                label="纬度"
-                                min-width="100">
-                        </el-table-column>
-                                                                
-                                            <el-table-column
-                                v-if="isColumnShow('title')"
-                                prop="title"
-                                label="标题"
-                                min-width="100">
-                        </el-table-column>
-                                                                
-                                            <el-table-column
-                                v-if="isColumnShow('userId')"
-                                prop="userId"
-                                label="用户"
-                                min-width="100">
-                        </el-table-column>
-                                                                
-                                            <el-table-column
-                                v-if="isColumnShow('miniId')"
-                                prop="miniId"
-                                label="小程序"
-                                min-width="100">
-                        </el-table-column>
-                                                                
-                                            <el-table-column
-                                v-if="isColumnShow('storeId')"
-                                prop="storeId"
-                                label="店铺"
-                                min-width="100">
-                        </el-table-column>
-                                                                
-                                            <el-table-column
-                                v-if="isColumnShow('remark')"
-                                prop="remark"
-                                label="备注"
-                                min-width="100">
-                        </el-table-column>
-                                                            <el-table-column
-                    label="操作"
-                    align="center"
-                    fixed="right"
-                    min-width="150"
-            >
+
+            <el-table-column
+                             v-if="isColumnShow('introduction')"
+                             prop="introduction"
+                             label="介绍"
+                             min-width="100">
+            </el-table-column>
+
+            <el-table-column
+                             v-if="isColumnShow('banner')"
+                             prop="banner"
+                             label="banner"
+                             min-width="100">
+            </el-table-column>
+            <el-table-column
+                             label="操作"
+                             align="center"
+                             fixed="right"
+                             min-width="150">
                 <template slot-scope="scope">
-                                        <el-button @click="editRow(scope.row)" type="primary" size="mini" plain>编辑</el-button>
+                    <el-button @click="editRow(scope.row)" type="primary" size="mini" plain>编辑</el-button>
                     <el-button @click="deleteRow(scope.row)" type="danger" size="mini" plain>删除</el-button>
                 </template>
             </el-table-column>
@@ -142,14 +141,14 @@
                 </el-button-group>
             </div>
             <el-pagination
-                    background
-                    @size-change="pageSizeChange"
-                    @current-change="currentPageChange"
-                    :current-page="currentPage"
-                    :page-sizes="[10, 20, 30, 40, 50]"
-                    :page-size="pageSize"
-                    layout="total, sizes, prev, pager, next, jumper"
-                    :total="totalNumber">
+                           background
+                           @size-change="pageSizeChange"
+                           @current-change="currentPageChange"
+                           :current-page="currentPage"
+                           :page-sizes="[10, 20, 30, 40, 50]"
+                           :page-size="pageSize"
+                           layout="total, sizes, prev, pager, next, jumper"
+                           :total="totalNumber">
             </el-pagination>
         </div>
         <el-dialog title="高级查询" :visible.sync="showAdvancedQueryDialog">
@@ -244,325 +243,339 @@
     </div>
 </template>
 <script>
-    import {mapState} from 'vuex'
-    import {format} from 'date-fns'
-    import zh from 'date-fns/locale/zh_cn'
-
-    export default {
-        name: 'StoreIntroductions',
-        created() {
+import { mapState } from 'vuex';
+import { format } from 'date-fns';
+import zh from 'date-fns/locale/zh_cn';
+
+export default {
+    name: 'StoreIntroductions',
+    created() {
+        this.getData();
+    },
+    data() {
+        return {
+            totalNumber: 0,
+            totalPage: 10,
+            currentPage: 1,
+            pageSize: 20,
+            tableData: [],
+            filter1: '',
+            filter2: '',
+            tableColumns: [
+                {
+                    label: 'Id',
+                    value: 'id',
+                    show: true,
+                },
+                {
+                    label: '介绍',
+                    value: 'introduction',
+                    show: false,
+                },
+                {
+                    label: 'banner',
+                    value: 'banner',
+                    show: false,
+                },
+                {
+                    label: '地址',
+                    value: 'address',
+                    show: true,
+                },
+                {
+                    label: '经度',
+                    value: 'longitude',
+                    show: true,
+                },
+                {
+                    label: '纬度',
+                    value: 'latitude',
+                    show: true,
+                },
+                {
+                    label: '标题',
+                    value: 'title',
+                    show: true,
+                },
+                {
+                    label: '用户',
+                    value: 'userId',
+                    show: true,
+                },
+                {
+                    label: '小程序',
+                    value: 'miniId',
+                    show: true,
+                },
+                {
+                    label: '店铺',
+                    value: 'storeId',
+                    show: true,
+                },
+                {
+                    label: '备注',
+                    value: 'remark',
+                    show: true,
+                },
+            ],
+            multipleMode: false,
+            showAdvancedQueryDialog: false,
+            advancedQueryFields: [],
+            showTableSortDialog: false,
+            tableSortFields: [],
+            searchMethods: ['=', '!=', '>', '>=', '<', '<=', 'like'],
+            advancedQueryColumns: [
+                {
+                    label: 'Id',
+                    value: 'id',
+                },
+                {
+                    label: '介绍',
+                    value: 'introduction',
+                },
+                {
+                    label: 'banner',
+                    value: 'banner',
+                },
+                {
+                    label: '地址',
+                    value: 'address',
+                },
+                {
+                    label: '经度',
+                    value: 'longitude',
+                },
+                {
+                    label: '纬度',
+                    value: 'latitude',
+                },
+                {
+                    label: '标题',
+                    value: 'title',
+                },
+                {
+                    label: '用户',
+                    value: 'user_id',
+                },
+                {
+                    label: '小程序',
+                    value: 'mini_id',
+                },
+                {
+                    label: '店铺',
+                    value: 'store_id',
+                },
+                {
+                    label: '备注',
+                    value: 'remark',
+                },
+            ],
+            advancedQuerySearchKey: '',
+            orderByStr: '',
+            imgSrc: '',
+            imageDialogVisible: false,
+        };
+    },
+    computed: {
+        ...mapState(['tableHeight']),
+        selection() {
+            return this.$refs.table.selection.map(i => i.id);
+        },
+    },
+    methods: {
+        pageSizeChange(size) {
+            this.currentPage = 1;
+            this.pageSize = size;
             this.getData();
         },
-        data() {
-            return {
-                totalNumber: 0,
-                totalPage: 10,
-                currentPage: 1,
-                pageSize: 20,
-                tableData: [],
-                filter1: '',
-                filter2: '',
-                tableColumns: [
-                                                                        {
-                                label: 'Id',
-                                value: 'id',
-                                show: true
-                            },
-                                                                                                                                                                                                                                                                                                                            {
-                                label: '介绍',
-                                value: 'introduction',
-                                show: true
-                            },
-                                                                                                {
-                                label: 'banner',
-                                value: 'banner',
-                                show: true
-                            },
-                                                                                                {
-                                label: '地址',
-                                value: 'address',
-                                show: true
-                            },
-                                                                                                {
-                                label: '经度',
-                                value: 'longitude',
-                                show: true
-                            },
-                                                                                                {
-                                label: '纬度',
-                                value: 'latitude',
-                                show: true
-                            },
-                                                                                                {
-                                label: '标题',
-                                value: 'title',
-                                show: true
-                            },
-                                                                                                {
-                                label: '用户',
-                                value: 'userId',
-                                show: true
-                            },
-                                                                                                {
-                                label: '小程序',
-                                value: 'miniId',
-                                show: true
-                            },
-                                                                                                {
-                                label: '店铺',
-                                value: 'storeId',
-                                show: true
-                            },
-                                                                                                {
-                                label: '备注',
-                                value: 'remark',
-                                show: true
-                            },
-                                                            ],
-                multipleMode: false,
-                showAdvancedQueryDialog: false,
-                advancedQueryFields: [],
-                showTableSortDialog: false,
-                tableSortFields: [],
-                searchMethods: ['=', '!=', '>', '>=', '<', '<=', 'like'],
-                advancedQueryColumns: [
-                                                                        {
-                                label: 'Id',
-                                value: 'id'
-                            },
-                                                                                                                                                                                                                                                                                                                            {
-                                label: '介绍',
-                                value: 'introduction'
-                            },
-                                                                                                {
-                                label: 'banner',
-                                value: 'banner'
-                            },
-                                                                                                {
-                                label: '地址',
-                                value: 'address'
-                            },
-                                                                                                {
-                                label: '经度',
-                                value: 'longitude'
-                            },
-                                                                                                {
-                                label: '纬度',
-                                value: 'latitude'
-                            },
-                                                                                                {
-                                label: '标题',
-                                value: 'title'
-                            },
-                                                                                                {
-                                label: '用户',
-                                value: 'user_id'
-                            },
-                                                                                                {
-                                label: '小程序',
-                                value: 'mini_id'
-                            },
-                                                                                                {
-                                label: '店铺',
-                                value: 'store_id'
-                            },
-                                                                                                {
-                                label: '备注',
-                                value: 'remark'
-                            },
-                                                            ],
-                advancedQuerySearchKey: '',
-                orderByStr: '',
-                imgSrc: '',
-                imageDialogVisible: false,
-            }
+        currentPageChange(page) {
+            this.currentPage = page;
+            this.getData();
         },
-        computed: {
-            ...mapState(['tableHeight']),
-            selection() {
-                return this.$refs.table.selection.map(i => i.id);
+        getData() {
+            var data = {
+                currentPage: this.currentPage,
+                pageNumber: this.pageSize,
+                searchKey: this.filter1,
+                advancedQuery: this.advancedQuerySearchKey,
+                orderByStr: this.orderByStr,
+            };
+
+            if (this.$route.query.column) {
+                var tempColumn = this.$route.query.column;
+                data[tempColumn.split(',')[1]] = tempColumn.split(',')[0];
             }
-        },
-        methods: {
-            pageSizeChange(size) {
-                this.currentPage = 1;
-                this.pageSize = size;
-                this.getData();
-            },
-            currentPageChange(page) {
-                this.currentPage = page;
-                this.getData();
-            },
-            getData() {
-
-                var data = {
-                    currentPage: this.currentPage,
-                    pageNumber: this.pageSize,
-                    searchKey: this.filter1,
-                    advancedQuery: this.advancedQuerySearchKey,
-                    orderByStr: this.orderByStr,
-                }
 
-                if (this.$route.query.column) {
-                    var tempColumn = this.$route.query.column;
-                    data[tempColumn.split(',')[1]] = tempColumn.split(',')[0];
-                }
-
-                this.$http.get({
+            this.$http
+                .get({
                     url: '/storeIntroduction/page',
-                    data: data
-                }).then(res => {
+                    data: data,
+                })
+                .then(res => {
                     if (res.success) {
                         this.totalNumber = res.data.page.totalNumber;
                         this.tableData = res.data.pp;
                     }
-                })
-            },
-            isColumnShow(column) {
-                var row = this.tableColumns.find(i => i.value === column);
-                return row ? row.show : false;
-            },
-            toggleMultipleMode(multipleMode) {
-                this.multipleMode = multipleMode;
-                if (!multipleMode) {
-                    this.$refs.table.clearSelection();
-                }
-            },
-            editRow(row) {
-                this.$router.push({
-                    path: '/storeIntroduction',
-                    query: {
-                        id: row.id,
-                        column: this.$route.query.column,
-                    }
-                })
-            },
-            operation1() {
-                this.$notify({
-                    title: '提示',
-                    message: this.selection
                 });
-            },
-            operation2() {
-                this.$message('操作2');
-            },
-            addField() {
-                this.advancedQueryFields.push({
-                    link: 'AND',
-                    name: '',
-                    searchMethod: '=',
-                    value: '',
+        },
+        isColumnShow(column) {
+            var row = this.tableColumns.find(i => i.value === column);
+            return row ? row.show : false;
+        },
+        toggleMultipleMode(multipleMode) {
+            this.multipleMode = multipleMode;
+            if (!multipleMode) {
+                this.$refs.table.clearSelection();
+            }
+        },
+        editRow(row) {
+            this.$router.push({
+                path: '/storeIntroduction',
+                query: {
+                    id: row.id,
+                    column: this.$route.query.column,
+                },
+            });
+        },
+        operation1() {
+            this.$notify({
+                title: '提示',
+                message: this.selection,
+            });
+        },
+        operation2() {
+            this.$message('操作2');
+        },
+        addField() {
+            this.advancedQueryFields.push({
+                link: 'AND',
+                name: '',
+                searchMethod: '=',
+                value: '',
+            });
+        },
+        removeField(i) {
+            if (this.advancedQueryFields.length > 0) {
+                this.advancedQueryFields.splice(i, 1);
+            }
+        },
+        advancedQuery() {
+            this.advancedQuerySearchKey = '';
+
+            if (this.advancedQueryFields.length > 0) {
+                var templist = [];
+
+                this.advancedQueryFields.forEach(item => {
+                    if (
+                        item.link &&
+                        item.name &&
+                        item.searchMethod &&
+                        item.value
+                    ) {
+                        var tempItem =
+                            item.link +
+                            '_,' +
+                            item.name +
+                            '_,' +
+                            item.searchMethod +
+                            '_,' +
+                            item.value;
+                        templist.push(tempItem);
+                    }
                 });
-            },
-            removeField(i) {
-                if (this.advancedQueryFields.length > 0) {
-                    this.advancedQueryFields.splice(i, 1);
-                }
-            },
-            advancedQuery() {
 
-                this.advancedQuerySearchKey = '';
-
-                if (this.advancedQueryFields.length > 0) {
-
-                    var templist = [];
+                if (templist.length > 0) {
+                    this.advancedQuerySearchKey = templist.join('_;');
+                }
+            }
 
-                    this.advancedQueryFields.forEach(item => {
-                        if (item.link && item.name && item.searchMethod && item.value) {
-                            var tempItem = item.link + '_,' + item.name + '_,' + item.searchMethod + '_,' + item.value;
-                            templist.push(tempItem);
-                        }
-                    })
+            this.getData();
+            this.showAdvancedQueryDialog = false;
+        },
+        addSortField() {
+            this.tableSortFields.push({
+                name: '',
+                order: 'asc',
+            });
+        },
+        removeSortField(i) {
+            if (this.tableSortFields.length > 0) {
+                this.tableSortFields.splice(i, 1);
+            }
+        },
+        tableSortQuery() {
+            this.orderByStr = '';
 
-                    if (templist.length > 0) {
+            if (this.tableSortFields.length > 0) {
+                var templist = [];
 
-                        this.advancedQuerySearchKey = templist.join('_;');
+                this.tableSortFields.forEach(item => {
+                    if (item.name && item.order) {
+                        var tempItem = item.name + '_,' + item.order;
+                        templist.push(tempItem);
                     }
-                }
-
-                this.getData();
-                this.showAdvancedQueryDialog = false;
-            },
-            addSortField() {
-                this.tableSortFields.push({
-                    name: '',
-                    order: 'asc',
                 });
-            },
-            removeSortField(i) {
-                if (this.tableSortFields.length > 0) {
-                    this.tableSortFields.splice(i, 1);
-                }
-            },
-            tableSortQuery() {
-
-                this.orderByStr = '';
-
-                if (this.tableSortFields.length > 0) {
-
-                    var templist = [];
 
-                    this.tableSortFields.forEach(item => {
-                        if (item.name && item.order) {
-                            var tempItem = item.name + '_,' + item.order;
-                            templist.push(tempItem);
-                        }
-                    })
-
-                    if (templist.length > 0) {
-
-                        this.orderByStr = templist.join('_;');
-                    }
+                if (templist.length > 0) {
+                    this.orderByStr = templist.join('_;');
                 }
+            }
 
-                this.getData();
-                this.showTableSortDialog = false;
-            },
-            exportExcel() {
-                window.location.href = this.$baseUrl + "/storeIntroduction/exportExcel?searchKey="
-                        + this.filter1 + "&advancedQuery=" + this.advancedQuerySearchKey+"&orderByStr=" + this.orderByStr;
-            },
-            searchData() {
-                this.currentPage = 1;
-                this.getData();
-            },
-            deleteRow(row) {
-                this.$alert('删除将无法恢复,确认要删除么?', '警告', {type: 'error'}).then(() => {
+            this.getData();
+            this.showTableSortDialog = false;
+        },
+        exportExcel() {
+            window.location.href =
+                this.$baseUrl +
+                '/storeIntroduction/exportExcel?searchKey=' +
+                this.filter1 +
+                '&advancedQuery=' +
+                this.advancedQuerySearchKey +
+                '&orderByStr=' +
+                this.orderByStr;
+        },
+        searchData() {
+            this.currentPage = 1;
+            this.getData();
+        },
+        deleteRow(row) {
+            this.$alert('删除将无法恢复,确认要删除么?', '警告', {
+                type: 'error',
+            })
+                .then(() => {
                     return this.$http.post({
                         url: '/storeIntroduction/del',
-                        data: {id: row.id}
-                    })
-                }).then(() => {
+                        data: { id: row.id },
+                    });
+                })
+                .then(() => {
                     this.$message.success('删除成功');
                     this.getData();
-                }).catch(action => {
+                })
+                .catch(action => {
                     if (action === 'cancel') {
                         this.$message.info('删除取消');
                     } else {
                         this.$message.error('删除失败');
                     }
-                })
-            },
-            DateTimeFormatter(row, column, cellValue) {
-                if (cellValue) {
-                    return format(cellValue, 'YYYY/MM/DD HH:mm', {locale: zh})
-                }
-
-            },
-            DateFormatter(row, column, cellValue) {
-                if (cellValue) {
-                    return format(cellValue, 'YYYY/MM/DD', {locale: zh})
-                }
-
-            },
-            showImg(img) {
-                this.imgSrc = img;
-                this.imageDialogVisible = true;
-            },
-
-        }
-    }
+                });
+        },
+        DateTimeFormatter(row, column, cellValue) {
+            if (cellValue) {
+                return format(cellValue, 'YYYY/MM/DD HH:mm', { locale: zh });
+            }
+        },
+        DateFormatter(row, column, cellValue) {
+            if (cellValue) {
+                return format(cellValue, 'YYYY/MM/DD', { locale: zh });
+            }
+        },
+        showImg(img) {
+            this.imgSrc = img;
+            this.imageDialogVisible = true;
+        },
+    },
+};
 </script>
 <style lang="less" scoped>
-
 </style>

+ 166 - 0
src/main/vue/src/pages/WxMiniprogram.vue

@@ -0,0 +1,166 @@
+<template>
+    <div>
+        <el-form :model="formData" :rules="rules" ref="form" label-width="120px" label-position="right" size="small"
+                 style="max-width: 500px;">
+            <el-form-item prop="name" label="名称">
+                <el-input v-model="formData.name" :disabled="'name'==subColumn"></el-input>
+            </el-form-item>
+            <el-form-item prop="appid" label="appid">
+                <el-input v-model="formData.appid" :disabled="'appid'==subColumn"></el-input>
+            </el-form-item>
+            <el-form-item prop="secret" label="secret">
+                <el-input v-model="formData.secret" :disabled="'secret'==subColumn"></el-input>
+            </el-form-item>
+            <el-form-item prop="mchId" label="mch_id">
+                <el-input v-model="formData.mchId" :disabled="'mchId'==subColumn"></el-input>
+            </el-form-item>
+            <el-form-item prop="mchSecret" label="mch_secret">
+                <el-input v-model="formData.mchSecret" :disabled="'mchSecret'==subColumn"></el-input>
+            </el-form-item>
+            <el-form-item prop="remark" label="备注">
+                <el-input v-model="formData.remark" :disabled="'remark'==subColumn"></el-input>
+            </el-form-item>
+            <el-form-item prop="useFlag" label="可以">
+                <el-input v-model="formData.useFlag" :disabled="'useFlag'==subColumn"></el-input>
+            </el-form-item>
+            <el-form-item>
+                <el-button @click="onSave" :loading="$store.state.fetchingData" type="primary">保存</el-button>
+                <el-button @click="onDelete" v-if="formData.id" type="danger">删除</el-button>
+                <el-button @click="$router.go(-1)">取消</el-button>
+            </el-form-item>
+        </el-form>
+    </div>
+</template>
+<script>
+    import formValidator from '../formValidator'
+    import { mapState } from 'vuex'
+    import { format } from 'date-fns'
+    import zh from 'date-fns/locale/zh_cn'
+
+    export default {
+        name: 'WxMiniprogram',
+        created() {
+
+            if (this.$route.query.column) {
+                this.subColumn = this.$route.query.column.split(',')[1];
+                this.subValue = this.$route.query.column.split(',')[0];
+            }
+
+            if (this.$route.query.id) {
+                this.$http.get({
+                    url: '/wxMiniprogram/getOne',
+                    data: {
+                        id: this.$route.query.id
+                    }
+                }).then(res => {
+                    if (res.success) {
+                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            this.formData = res.data;
+                        if (this.$route.query.column) {
+                            this.formData[this.subColumn] = this.subValue;
+                        }
+                    }
+                })
+            } else {
+                if (this.$route.query.column) {
+                    this.formData[this.subColumn] = this.subValue;
+                }
+            }
+
+                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                },
+        data() {
+            return {
+                saving: false,
+                formData: {
+                },
+                rules: {
+                },
+                subColumn: '',
+                subValue: '',
+            }
+        },
+        computed: {
+            ...mapState(['userInfo']),
+        },
+        methods: {
+            onSave() {
+                this.$refs.form.validate((valid) => {
+                    if (valid) {
+                        this.logicalValidate();
+                    } else {
+                        return false;
+                    }
+                });
+            },
+            logicalValidate() {
+                let logicalData = {
+                };
+
+                if (JSON.stringify(logicalData) == '{}') {
+                    this.submit();
+                } else {
+                    this.$http.get({
+                        url: '/wxMiniprogram/getOne',
+                        data: logicalData
+                    }).then(res => {
+                        if (res.success) {
+                            let logicalFlag = true;
+                            if (res.data) {
+                                if (this.formData.id) {
+                                    if (res.data.id != this.formData.id) {
+                                        logicalFlag = false;
+                                    }
+                                } else {
+                                    logicalFlag = false;
+                                }
+                            }
+
+                            if (logicalFlag) {
+                                this.submit();
+                            } else {
+                                this.$message.warning('逻辑关键字:'+''+'验证失败')
+                            }
+
+                        } else {
+                            this.$message.warning('逻辑关键字:'+''+'验证失败')
+                        }
+                    });
+                }
+            },
+            submit() {
+                let data = {...this.formData};
+
+                                                                                                                                                                                                                                
+                this.$http.post({
+                    url: this.formData.id ? '/wxMiniprogram/update' : '/wxMiniprogram/save',
+                    data: data
+                }).then(res => {
+                    if (res.success) {
+                        this.$message.success('成功');
+                        this.$router.go(-1);
+                    } else {
+                        this.$message.warning('失败')
+                    }
+                });
+            },
+            onDelete() {
+                this.$alert('删除将无法恢复,确认要删除么?', '警告', { type: 'error' }).then(() => {
+                    return this.$http.post({
+                        url: '/wxMiniprogram/del',
+                        data: { id: this.formData.id }
+                    })
+                }).then(() => {
+                    this.$message.success('删除成功');
+                    this.$router.go(-1);
+                }).catch(action => {
+                    if (action === 'cancel') {
+                        this.$message.info('删除取消');
+                    } else {
+                        this.$message.error('删除失败');
+                    }
+                })
+            },
+        }
+    }
+</script>
+<style lang="less" scoped>
+</style>

+ 504 - 0
src/main/vue/src/pages/WxMiniprograms.vue

@@ -0,0 +1,504 @@
+<template>
+    <div>
+        <div class="filters-container">
+        
+            <el-input placeholder="关键字" size="small" v-model="filter1" clearable class="filter-item"></el-input>
+            <el-button @click="searchData" type="primary" size="small" icon="el-icon-search" class="filter-item">搜索
+            </el-button>
+            <el-button @click="showAdvancedQueryDialog = !showAdvancedQueryDialog" type="primary" size="small"
+                       icon="el-icon-search" class="filter-item">高级查询
+            </el-button>
+            <el-button @click="showTableSortDialog = !showTableSortDialog" type="primary" size="small"
+                       icon="el-icon-sort" class="filter-item">排序
+            </el-button>
+            <el-button @click="$router.push({path:'/wxMiniprogram',query:{column:$route.query.column}})" type="primary"
+                       size="small" icon="el-icon-edit"
+                       class="filter-item">添加
+            </el-button>
+            <el-button @click="exportExcel" type="primary" size="small" icon="el-icon-share" class="filter-item">导出EXCEL
+            </el-button>
+            <el-dropdown trigger="click" size="medium" class="table-column-filter">
+                <span>
+                  筛选数据<i class="el-icon-arrow-down el-icon--right"></i>
+                </span>
+                <el-dropdown-menu slot="dropdown" class="table-column-filter-wrapper">
+                    <el-checkbox v-for="item in tableColumns" :key="item.value" v-model="item.show">{{item.label}}
+                    </el-checkbox>
+                </el-dropdown-menu>
+            </el-dropdown>
+        </div>
+        <el-table
+                :data="tableData"
+                :height="tableHeight"
+                row-key="id"
+                ref="table">
+            <el-table-column
+                    v-if="multipleMode"
+                    align="center"
+                    type="selection"
+                    width="50">
+            </el-table-column>
+            <el-table-column
+                    type="index"
+                    min-width="50"
+                    align="center">
+            </el-table-column>
+                                                                                                                                                                                                    
+                                            <el-table-column
+                                v-if="isColumnShow('name')"
+                                prop="name"
+                                label="名称"
+                                min-width="100">
+                        </el-table-column>
+                                                                
+                                            <el-table-column
+                                v-if="isColumnShow('appid')"
+                                prop="appid"
+                                label="appid"
+                                min-width="100">
+                        </el-table-column>
+                                                                
+                                            <el-table-column
+                                v-if="isColumnShow('secret')"
+                                prop="secret"
+                                label="secret"
+                                min-width="100">
+                        </el-table-column>
+                                                                
+                                            <el-table-column
+                                v-if="isColumnShow('mchId')"
+                                prop="mchId"
+                                label="mch_id"
+                                min-width="100">
+                        </el-table-column>
+                                                                
+                                            <el-table-column
+                                v-if="isColumnShow('mchSecret')"
+                                prop="mchSecret"
+                                label="mch_secret"
+                                min-width="100">
+                        </el-table-column>
+                                                                
+                                            <el-table-column
+                                v-if="isColumnShow('remark')"
+                                prop="remark"
+                                label="备注"
+                                min-width="100">
+                        </el-table-column>
+                                                                
+                                            <el-table-column
+                                v-if="isColumnShow('useFlag')"
+                                prop="useFlag"
+                                label="可以"
+                                min-width="100">
+                        </el-table-column>
+                                                            <el-table-column
+                    label="操作"
+                    align="center"
+                    fixed="right"
+                    min-width="150"
+            >
+                <template slot-scope="scope">
+                                        <el-button @click="editRow(scope.row)" type="primary" size="mini" plain>编辑</el-button>
+                    <el-button @click="deleteRow(scope.row)" type="danger" size="mini" plain>删除</el-button>
+                </template>
+            </el-table-column>
+        </el-table>
+        <div class="pagination-wrapper">
+            <div class="multiple-mode-wrapper" v-if="0">
+                <el-button size="small" v-if="!multipleMode" @click="toggleMultipleMode(true)">批量编辑</el-button>
+                <el-button-group v-else>
+                    <el-button size="small" @click="operation1">批量操作1</el-button>
+                    <el-button size="small" @click="operation2">批量操作2</el-button>
+                    <el-button size="small" @click="toggleMultipleMode(false)">取消</el-button>
+                </el-button-group>
+            </div>
+            <el-pagination
+                    background
+                    @size-change="pageSizeChange"
+                    @current-change="currentPageChange"
+                    :current-page="currentPage"
+                    :page-sizes="[10, 20, 30, 40, 50]"
+                    :page-size="pageSize"
+                    layout="total, sizes, prev, pager, next, jumper"
+                    :total="totalNumber">
+            </el-pagination>
+        </div>
+        <el-dialog title="高级查询" :visible.sync="showAdvancedQueryDialog">
+            <el-button @click="addField" type="text" icon="el-icon-plus">添加</el-button>
+            <el-table :data="advancedQueryFields">
+
+                <el-table-column prop="link" label="链接符" align="center">
+                    <template slot-scope="{row}">
+                        <el-select placeholder="链接" size="small" v-model="row.link" class="filter-item">
+                            <el-option label="AND" value="AND">
+                            </el-option>
+                            <el-option label="OR" value="OR">
+                            </el-option>
+                        </el-select>
+                    </template>
+                </el-table-column>
+                <el-table-column prop="name" label="字段" align="center">
+                    <template slot-scope="{row}">
+                        <el-select v-model="row.name">
+
+                            <el-option v-for="item in advancedQueryColumns" :label="item.label" :value="item.value"
+                                       :key="item.value"></el-option>
+                        </el-select>
+                    </template>
+                </el-table-column>
+                <el-table-column prop="searchMethod" label="搜索方式" width="150" align="center">
+                    <template slot-scope="{row}">
+                        <el-select v-model="row.searchMethod">
+                            <el-option v-for="item in searchMethods" :label="item" :value="item"
+                                       :key="item"></el-option>
+                        </el-select>
+                    </template>
+                </el-table-column>
+                <el-table-column prop="value" label="参数" align="center">
+                    <template slot-scope="{row}">
+                        <el-input v-model="row.value"></el-input>
+                    </template>
+                </el-table-column>
+                <el-table-column width="60" align="center">
+                    <template slot-scope="{ row, column, $index }">
+                        <el-button @click="removeField($index)" size="small" type="text">删除</el-button>
+                    </template>
+                </el-table-column>
+            </el-table>
+
+            <span slot="footer" class="dialog-footer">
+
+                <el-button @click="advancedQuery" :loading="$store.state.fetchingData">确定</el-button>
+            </span>
+        </el-dialog>
+
+        <el-dialog title="排序" :visible.sync="showTableSortDialog">
+            <el-button @click="addSortField" type="text" icon="el-icon-plus">添加</el-button>
+            <el-table :data="tableSortFields">
+
+                <el-table-column prop="name" label="字段" align="center">
+                    <template slot-scope="{row}">
+                        <el-select v-model="row.name">
+
+                            <el-option v-for="item in advancedQueryColumns" :label="item.label" :value="item.value"
+                                       :key="item.value"></el-option>
+                        </el-select>
+                    </template>
+                </el-table-column>
+                <el-table-column prop="order" label="排序" align="center">
+                    <template slot-scope="{row}">
+                        <el-select v-model="row.order">
+                            <el-option label="降序" value="desc">
+                            </el-option>
+                            <el-option label="升序" value="asc">
+                            </el-option>
+                        </el-select>
+                    </template>
+                </el-table-column>
+                <el-table-column width="60" align="center">
+                    <template slot-scope="{ row, column, $index }">
+                        <el-button @click="removeSortField($index)" size="small" type="text">删除</el-button>
+                    </template>
+                </el-table-column>
+            </el-table>
+
+            <span slot="footer" class="dialog-footer">
+
+                <el-button @click="tableSortQuery" :loading="$store.state.fetchingData">确定</el-button>
+            </span>
+        </el-dialog>
+
+        <el-dialog title="查看图片" :visible.sync="imageDialogVisible" size="small">
+            <img width="100%" :src="imgSrc" alt="">
+        </el-dialog>
+
+    </div>
+</template>
+<script>
+    import {mapState} from 'vuex'
+    import {format} from 'date-fns'
+    import zh from 'date-fns/locale/zh_cn'
+
+    export default {
+        name: 'WxMiniprograms',
+        created() {
+            this.getData();
+        },
+        data() {
+            return {
+                totalNumber: 0,
+                totalPage: 10,
+                currentPage: 1,
+                pageSize: 20,
+                tableData: [],
+                filter1: '',
+                filter2: '',
+                tableColumns: [
+                                                                                                                                                                                                                                                                                                                                                {
+                                label: '名称',
+                                value: 'name',
+                                show: true
+                            },
+                                                                                                {
+                                label: 'appid',
+                                value: 'appid',
+                                show: true
+                            },
+                                                                                                {
+                                label: 'secret',
+                                value: 'secret',
+                                show: true
+                            },
+                                                                                                {
+                                label: 'mch_id',
+                                value: 'mchId',
+                                show: true
+                            },
+                                                                                                {
+                                label: 'mch_secret',
+                                value: 'mchSecret',
+                                show: true
+                            },
+                                                                                                {
+                                label: '备注',
+                                value: 'remark',
+                                show: true
+                            },
+                                                                                                {
+                                label: '可以',
+                                value: 'useFlag',
+                                show: true
+                            },
+                                                            ],
+                multipleMode: false,
+                showAdvancedQueryDialog: false,
+                advancedQueryFields: [],
+                showTableSortDialog: false,
+                tableSortFields: [],
+                searchMethods: ['=', '!=', '>', '>=', '<', '<=', 'like'],
+                advancedQueryColumns: [
+                                                                                                                                                                                                                                                                                                                                                {
+                                label: '名称',
+                                value: 'name'
+                            },
+                                                                                                {
+                                label: 'appid',
+                                value: 'appid'
+                            },
+                                                                                                {
+                                label: 'secret',
+                                value: 'secret'
+                            },
+                                                                                                {
+                                label: 'mch_id',
+                                value: 'mch_id'
+                            },
+                                                                                                {
+                                label: 'mch_secret',
+                                value: 'mch_secret'
+                            },
+                                                                                                {
+                                label: '备注',
+                                value: 'remark'
+                            },
+                                                                                                {
+                                label: '可以',
+                                value: 'use_flag'
+                            },
+                                                            ],
+                advancedQuerySearchKey: '',
+                orderByStr: '',
+                imgSrc: '',
+                imageDialogVisible: false,
+            }
+        },
+        computed: {
+            ...mapState(['tableHeight']),
+            selection() {
+                return this.$refs.table.selection.map(i => i.id);
+            }
+        },
+        methods: {
+            pageSizeChange(size) {
+                this.currentPage = 1;
+                this.pageSize = size;
+                this.getData();
+            },
+            currentPageChange(page) {
+                this.currentPage = page;
+                this.getData();
+            },
+            getData() {
+
+                var data = {
+                    currentPage: this.currentPage,
+                    pageNumber: this.pageSize,
+                    searchKey: this.filter1,
+                    advancedQuery: this.advancedQuerySearchKey,
+                    orderByStr: this.orderByStr,
+                }
+
+                if (this.$route.query.column) {
+                    var tempColumn = this.$route.query.column;
+                    data[tempColumn.split(',')[1]] = tempColumn.split(',')[0];
+                }
+
+                this.$http.get({
+                    url: '/wxMiniprogram/page',
+                    data: data
+                }).then(res => {
+                    if (res.success) {
+                        this.totalNumber = res.data.page.totalNumber;
+                        this.tableData = res.data.pp;
+                    }
+                })
+            },
+            isColumnShow(column) {
+                var row = this.tableColumns.find(i => i.value === column);
+                return row ? row.show : false;
+            },
+            toggleMultipleMode(multipleMode) {
+                this.multipleMode = multipleMode;
+                if (!multipleMode) {
+                    this.$refs.table.clearSelection();
+                }
+            },
+            editRow(row) {
+                this.$router.push({
+                    path: '/wxMiniprogram',
+                    query: {
+                        id: row.id,
+                        column: this.$route.query.column,
+                    }
+                })
+            },
+            operation1() {
+                this.$notify({
+                    title: '提示',
+                    message: this.selection
+                });
+            },
+            operation2() {
+                this.$message('操作2');
+            },
+            addField() {
+                this.advancedQueryFields.push({
+                    link: 'AND',
+                    name: '',
+                    searchMethod: '=',
+                    value: '',
+                });
+            },
+            removeField(i) {
+                if (this.advancedQueryFields.length > 0) {
+                    this.advancedQueryFields.splice(i, 1);
+                }
+            },
+            advancedQuery() {
+
+                this.advancedQuerySearchKey = '';
+
+                if (this.advancedQueryFields.length > 0) {
+
+                    var templist = [];
+
+                    this.advancedQueryFields.forEach(item => {
+                        if (item.link && item.name && item.searchMethod && item.value) {
+                            var tempItem = item.link + '_,' + item.name + '_,' + item.searchMethod + '_,' + item.value;
+                            templist.push(tempItem);
+                        }
+                    })
+
+                    if (templist.length > 0) {
+
+                        this.advancedQuerySearchKey = templist.join('_;');
+                    }
+                }
+
+                this.getData();
+                this.showAdvancedQueryDialog = false;
+            },
+            addSortField() {
+                this.tableSortFields.push({
+                    name: '',
+                    order: 'asc',
+                });
+            },
+            removeSortField(i) {
+                if (this.tableSortFields.length > 0) {
+                    this.tableSortFields.splice(i, 1);
+                }
+            },
+            tableSortQuery() {
+
+                this.orderByStr = '';
+
+                if (this.tableSortFields.length > 0) {
+
+                    var templist = [];
+
+                    this.tableSortFields.forEach(item => {
+                        if (item.name && item.order) {
+                            var tempItem = item.name + '_,' + item.order;
+                            templist.push(tempItem);
+                        }
+                    })
+
+                    if (templist.length > 0) {
+
+                        this.orderByStr = templist.join('_;');
+                    }
+                }
+
+                this.getData();
+                this.showTableSortDialog = false;
+            },
+            exportExcel() {
+                window.location.href = this.$baseUrl + "/wxMiniprogram/exportExcel?searchKey="
+                        + this.filter1 + "&advancedQuery=" + this.advancedQuerySearchKey+"&orderByStr=" + this.orderByStr;
+            },
+            searchData() {
+                this.currentPage = 1;
+                this.getData();
+            },
+            deleteRow(row) {
+                this.$alert('删除将无法恢复,确认要删除么?', '警告', {type: 'error'}).then(() => {
+                    return this.$http.post({
+                        url: '/wxMiniprogram/del',
+                        data: {id: row.id}
+                    })
+                }).then(() => {
+                    this.$message.success('删除成功');
+                    this.getData();
+                }).catch(action => {
+                    if (action === 'cancel') {
+                        this.$message.info('删除取消');
+                    } else {
+                        this.$message.error('删除失败');
+                    }
+                })
+            },
+            DateTimeFormatter(row, column, cellValue) {
+                if (cellValue) {
+                    return format(cellValue, 'YYYY/MM/DD HH:mm', {locale: zh})
+                }
+
+            },
+            DateFormatter(row, column, cellValue) {
+                if (cellValue) {
+                    return format(cellValue, 'YYYY/MM/DD', {locale: zh})
+                }
+
+            },
+            showImg(img) {
+                this.imgSrc = img;
+                this.imageDialogVisible = true;
+            },
+
+        }
+    }
+</script>
+<style lang="less" scoped>
+
+</style>

+ 10 - 0
src/main/vue/src/router/index.js

@@ -712,6 +712,16 @@ const router = new Router({
                     path: '/storeCases',
                     name: 'StoreCases',
                     component: () => import('../pages/StoreCases')
+                },
+                {
+                    path: '/wxMiniprogram',
+                    name: 'WxMiniprogram',
+                    component: () => import('../pages/WxMiniprogram')
+                },
+                {
+                    path: '/wxMiniprograms',
+                    name: 'WxMiniprograms',
+                    component: () => import('../pages/WxMiniprograms')
                 }
                 /**INSERT_LOCATION**/
         ]