Просмотр исходного кода

Merge remote-tracking branch 'origin/master'

panhui 7 лет назад
Родитель
Сommit
39002c7d97

+ 33 - 0
src/main/java/com/izouma/awesomeadmin/dao/CaseInfoMapper.java

@@ -0,0 +1,33 @@
+package com.izouma.awesomeadmin.dao;
+
+import java.util.*;
+import com.izouma.awesomeadmin.datasource.DataSource;
+import org.springframework.stereotype.Repository;
+import com.izouma.awesomeadmin.model.CaseInfo;
+
+
+/**
+*  Dao接口
+*/
+@Repository("com.zoumaframe.dao.CaseInfoMapper")
+public interface CaseInfoMapper{
+
+    int deleteByPrimaryKey(Integer id);
+
+    int insertSelective(CaseInfo record);
+
+    CaseInfo selectByPrimaryKey(Integer id);
+
+    int updateByPrimaryKeySelective(CaseInfo record);
+
+    List<CaseInfo> queryAllCaseInfo(CaseInfo record);
+
+    List<CaseInfo> queryCaseInfoByPage(Map<String, Object> parameter);
+
+    int delete(CaseInfo record);
+
+    CaseInfo queryCaseInfo(CaseInfo record);
+
+    List<CaseInfo> query(CaseInfo record);
+}
+

+ 491 - 0
src/main/java/com/izouma/awesomeadmin/dao/CaseInfoMapper.xml

@@ -0,0 +1,491 @@
+<?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.CaseInfoMapper">
+    <resultMap id="BaseResultMap" type="com.izouma.awesomeadmin.model.CaseInfo">
+        <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="type_flag" property="typeFlag" jdbcType="INTEGER"/>
+        <result column="case_name" property="caseName" jdbcType="VARCHAR"/>
+        <result column="remark" property="remark" jdbcType="VARCHAR"/>
+        <result column="image" property="image" jdbcType="VARCHAR"/>
+        <result column="introduce_image" property="introduceImage" jdbcType="VARCHAR"/>
+        <result column="home_flag" property="homeFlag" jdbcType="CHAR"/>
+        <result column="rank" property="rank" jdbcType="INTEGER"/>
+    </resultMap>
+    <sql id="Base_Column_List">
+        <trim suffixOverrides=",">
+            id,
+
+            del_flag,
+
+            update_time,
+
+            update_user,
+
+            create_time,
+
+            create_user,
+
+            type_flag,
+
+            case_name,
+
+            remark,
+
+            image,
+
+            introduce_image,
+
+            home_flag,
+
+            rank,
+
+        </trim>
+    </sql>
+    <select id="selectByPrimaryKey" resultMap="BaseResultMap" parameterType="java.lang.Integer">
+        select
+        <include refid="Base_Column_List"/>
+        from case_info
+        where id = #{id,jdbcType=INTEGER}
+    </select>
+    <delete id="deleteByPrimaryKey" parameterType="java.lang.Integer">
+        delete from case_info
+        where id = #{id,jdbcType=INTEGER}
+    </delete>
+    <insert id="insertSelective" parameterType="com.izouma.awesomeadmin.model.CaseInfo" useGeneratedKeys="true"
+            keyProperty="id">
+        insert into case_info
+        <trim prefix="(" suffix=")" suffixOverrides=",">
+            <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="typeFlag!= null">
+                type_flag,
+            </if>
+            <if test="caseName!= null">
+                case_name,
+            </if>
+            <if test="remark!= null">
+                remark,
+            </if>
+            <if test="image!= null">
+                image,
+            </if>
+            <if test="introduceImage!= null">
+                introduce_image,
+            </if>
+            <if test="homeFlag!= null">
+                home_flag,
+            </if>
+            <if test="rank!= null">
+                rank,
+            </if>
+        </trim>
+        <trim prefix="values (" suffix=")" suffixOverrides=",">
+            <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="typeFlag != null">
+                #{typeFlag,jdbcType=INTEGER},
+            </if>
+            <if test="caseName != null">
+                #{caseName,jdbcType=VARCHAR},
+            </if>
+            <if test="remark != null">
+                #{remark,jdbcType=VARCHAR},
+            </if>
+            <if test="image != null">
+                #{image,jdbcType=VARCHAR},
+            </if>
+            <if test="introduceImage != null">
+                #{introduceImage,jdbcType=VARCHAR},
+            </if>
+            <if test="homeFlag != null">
+                #{homeFlag,jdbcType=CHAR},
+            </if>
+            <if test="rank != null">
+                #{rank,jdbcType=INTEGER},
+            </if>
+        </trim>
+    </insert>
+    <update id="updateByPrimaryKeySelective" parameterType="com.izouma.awesomeadmin.model.CaseInfo">
+        update case_info
+        <set>
+            <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="typeFlag != null">
+                type_flag= #{typeFlag,jdbcType=INTEGER},
+            </if>
+            <if test="caseName != null">
+                case_name= #{caseName,jdbcType=VARCHAR},
+            </if>
+            <if test="remark != null">
+                remark= #{remark,jdbcType=VARCHAR},
+            </if>
+            <if test="image != null">
+                image= #{image,jdbcType=VARCHAR},
+            </if>
+            <if test="introduceImage != null">
+                introduce_image= #{introduceImage,jdbcType=VARCHAR},
+            </if>
+            <if test="homeFlag != null">
+                home_flag= #{homeFlag,jdbcType=CHAR},
+            </if>
+            <if test="rank != null">
+                rank= #{rank,jdbcType=INTEGER},
+            </if>
+        </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="queryCaseInfoByPage" parameterType="java.util.Map" resultType="com.izouma.awesomeadmin.model.CaseInfo">
+        select
+        <include refid="Base_Column_List"/>
+        from case_info
+        <where>
+            and del_flag = 'N'
+            <if test="record.idStr != null and !&quot;&quot;.equals(record.idStr)">
+                and id in (${record.idStr})
+            </if>
+            <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.typeFlag != null and !&quot;&quot;.equals(record.typeFlag)">
+                and type_flag = #{record.typeFlag}
+            </if>
+            <if test="record.caseName != null and !&quot;&quot;.equals(record.caseName)">
+                and case_name = #{record.caseName}
+            </if>
+            <if test="record.remark != null and !&quot;&quot;.equals(record.remark)">
+                and remark = #{record.remark}
+            </if>
+            <if test="record.image != null and !&quot;&quot;.equals(record.image)">
+                and image = #{record.image}
+            </if>
+            <if test="record.introduceImage != null and !&quot;&quot;.equals(record.introduceImage)">
+                and introduce_image = #{record.introduceImage}
+            </if>
+            <if test="record.homeFlag != null and !&quot;&quot;.equals(record.homeFlag)">
+                and home_flag = #{record.homeFlag}
+            </if>
+            <if test="record.rank != null and !&quot;&quot;.equals(record.rank)">
+                and rank = #{record.rank}
+            </if>
+            <if test="record.searchKey != null and !&quot;&quot;.equals(record.searchKey)">
+                <trim prefix="and (" suffix=")" prefixOverrides="OR">
+                    OR type_flag LIKE concat('%',#{record.searchKey},'%')
+                    OR case_name LIKE concat('%',#{record.searchKey},'%')
+                    OR remark LIKE concat('%',#{record.searchKey},'%')
+                    OR image LIKE concat('%',#{record.searchKey},'%')
+                    OR introduce_image LIKE concat('%',#{record.searchKey},'%')
+                    OR home_flag LIKE concat('%',#{record.searchKey},'%')
+                    OR rank LIKE concat('%',#{record.searchKey},'%')
+                </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>
+        rank desc , id desc
+    </select>
+    <select id="queryAllCaseInfo" parameterType="java.util.Map" resultType="com.izouma.awesomeadmin.model.CaseInfo">
+        select
+        <include refid="Base_Column_List"/>
+        from case_info
+        <where>
+            and del_flag = 'N'
+            <if test="idStr != null and !&quot;&quot;.equals(idStr)">
+                and id in (${idStr})
+            </if>
+            <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="typeFlag != null and !&quot;&quot;.equals(typeFlag)">
+                and type_flag = #{typeFlag}
+            </if>
+            <if test="caseName != null and !&quot;&quot;.equals(caseName)">
+                and case_name = #{caseName}
+            </if>
+            <if test="remark != null and !&quot;&quot;.equals(remark)">
+                and remark = #{remark}
+            </if>
+            <if test="image != null and !&quot;&quot;.equals(image)">
+                and image = #{image}
+            </if>
+            <if test="introduceImage != null and !&quot;&quot;.equals(introduceImage)">
+                and introduce_image = #{introduceImage}
+            </if>
+            <if test="homeFlag != null and !&quot;&quot;.equals(homeFlag)">
+                and home_flag = #{homeFlag}
+            </if>
+            <if test="rank != null and !&quot;&quot;.equals(rank)">
+                and rank = #{rank}
+            </if>
+            <if test="searchKey != null and !&quot;&quot;.equals(searchKey)">
+                <trim prefix="and (" suffix=")" prefixOverrides="OR">
+                    OR type_flag LIKE concat('%',#{searchKey},'%')
+                    OR case_name LIKE concat('%',#{searchKey},'%')
+                    OR remark LIKE concat('%',#{searchKey},'%')
+                    OR image LIKE concat('%',#{searchKey},'%')
+                    OR introduce_image LIKE concat('%',#{searchKey},'%')
+                    OR home_flag LIKE concat('%',#{searchKey},'%')
+                    OR rank LIKE concat('%',#{searchKey},'%')
+                </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>
+
+        rank desc , id desc
+    </select>
+    <select id="queryCaseInfo" parameterType="java.util.Map" resultType="com.izouma.awesomeadmin.model.CaseInfo">
+        select
+        <include refid="Base_Column_List"/>
+        from case_info
+        <where>
+            and del_flag = 'N'
+            <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="typeFlag != null and !&quot;&quot;.equals(typeFlag)">
+                and type_flag = #{typeFlag}
+            </if>
+            <if test="caseName != null and !&quot;&quot;.equals(caseName)">
+                and case_name = #{caseName}
+            </if>
+            <if test="remark != null and !&quot;&quot;.equals(remark)">
+                and remark = #{remark}
+            </if>
+            <if test="image != null and !&quot;&quot;.equals(image)">
+                and image = #{image}
+            </if>
+            <if test="introduceImage != null and !&quot;&quot;.equals(introduceImage)">
+                and introduce_image = #{introduceImage}
+            </if>
+            <if test="homeFlag != null and !&quot;&quot;.equals(homeFlag)">
+                and home_flag = #{homeFlag}
+            </if>
+            <if test="rank != null and !&quot;&quot;.equals(rank)">
+                and rank = #{rank}
+            </if>
+
+        </where>
+        LIMIT 1
+    </select>
+    <update id="delete">
+        UPDATE case_info 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.CaseInfo">
+        select
+        <include refid="Base_Column_List"/>
+        from case_info
+        <where>
+            and del_flag = 'N'
+        </where>
+        order by id desc
+    </select>
+</mapper>
+

+ 1 - 1
src/main/java/com/izouma/awesomeadmin/dao/FeedbackMapper.java

@@ -24,7 +24,7 @@ public interface FeedbackMapper{
 
     List<Feedback> queryFeedbackByPage(Map<String, Object> parameter);
 
-    int delete(String id);
+    int delete(Feedback record);
 
     Feedback queryFeedback(Feedback record);
 

+ 26 - 9
src/main/java/com/izouma/awesomeadmin/dao/FeedbackMapper.xml

@@ -160,12 +160,23 @@
                image= #{image,jdbcType=VARCHAR},
             </if>
                  </set>
-        where id = #{id,jdbcType=INTEGER}
+        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="queryFeedbackByPage" parameterType="java.util.Map" resultType="com.izouma.awesomeadmin.model.Feedback">
         select <include refid="Base_Column_List"/> from feedback
         <where>
             and del_flag = 'N'
+            <if test="record.idStr != null and !&quot;&quot;.equals(record.idStr)">
+                and id in (${record.idStr})
+            </if>
                     <if test="record.id != null and !&quot;&quot;.equals(record.id)">
                 and  id = #{record.id}
             </if>
@@ -201,8 +212,7 @@
             </if>
                   <if test="record.searchKey != null and !&quot;&quot;.equals(record.searchKey)">
              <trim prefix="and (" suffix=")" prefixOverrides="OR" >
-                                                                                                                                                                                                                                                                                                                                                                                                                                    OR  user_id LIKE concat('%',#{record.searchKey},'%')
-                                                                                                    OR  user_name LIKE concat('%',#{record.searchKey},'%')
+                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                     OR  user_name LIKE concat('%',#{record.searchKey},'%')
                                                                                                     OR  telephone LIKE concat('%',#{record.searchKey},'%')
                                                                                                     OR  remark LIKE concat('%',#{record.searchKey},'%')
                                                                                                     OR  image LIKE concat('%',#{record.searchKey},'%')
@@ -265,6 +275,9 @@
         select <include refid="Base_Column_List"/> from feedback
         <where>
             and del_flag = 'N'
+            <if test="idStr != null and !&quot;&quot;.equals(idStr)">
+                and id in (${idStr})
+            </if>
                     <if test="id != null and !&quot;&quot;.equals(id)">
                 and  id = #{id}
             </if>
@@ -300,8 +313,7 @@
             </if>
                     <if test="searchKey != null and !&quot;&quot;.equals(searchKey)">
                 <trim prefix="and (" suffix=")" prefixOverrides="OR" >
-                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                OR  user_id LIKE concat('%',#{searchKey},'%')
-                                                                                                                                                        OR  user_name LIKE concat('%',#{searchKey},'%')
+                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                OR  user_name LIKE concat('%',#{searchKey},'%')
                                                                                                                                                         OR  telephone LIKE concat('%',#{searchKey},'%')
                                                                                                                                                         OR  remark LIKE concat('%',#{searchKey},'%')
                                                                                                                                                         OR  image LIKE concat('%',#{searchKey},'%')
@@ -402,15 +414,20 @@
     </select>
     <update id="delete">
         UPDATE feedback SET del_flag = 'Y'
-        <where>
-            AND id = #{id}
-        </where>
+        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.Feedback">
         select <include refid="Base_Column_List"/> from feedback
         <where>
             and del_flag = 'N'
-                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            </where>
+                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        </where>
         order by id desc
     </select>
 </mapper>

+ 164 - 0
src/main/java/com/izouma/awesomeadmin/model/CaseInfo.java

@@ -0,0 +1,164 @@
+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 CaseInfo{
+    private Integer id;
+    private String delFlag;
+    private Date updateTime;
+    private String updateUser;
+    private Date createTime;
+    private String createUser;
+    private Integer typeFlag;
+    private String caseName;
+    private String remark;
+    private String image;
+    private String introduceImage;
+    private String homeFlag;
+    private Integer rank;
+
+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;
+
+    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 Integer getTypeFlag(){
+        return this.typeFlag;
+    }
+
+    public void setTypeFlag(Integer typeFlag){
+        this.typeFlag = typeFlag;
+    }
+    public String getCaseName(){
+        return this.caseName;
+    }
+
+    public void setCaseName(String caseName){
+        this.caseName = caseName;
+    }
+    public String getRemark(){
+        return this.remark;
+    }
+
+    public void setRemark(String remark){
+        this.remark = remark;
+    }
+    public String getImage(){
+        return this.image;
+    }
+
+    public void setImage(String image){
+        this.image = image;
+    }
+    public String getIntroduceImage(){
+        return this.introduceImage;
+    }
+
+    public void setIntroduceImage(String introduceImage){
+        this.introduceImage = introduceImage;
+    }
+    public String getHomeFlag(){
+        return this.homeFlag;
+    }
+
+    public void setHomeFlag(String homeFlag){
+        this.homeFlag = homeFlag;
+    }
+    public Integer getRank(){
+        return this.rank;
+    }
+
+    public void setRank(Integer rank){
+        this.rank = rank;
+    }
+
+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;
+}
+
+}
+

+ 10 - 0
src/main/java/com/izouma/awesomeadmin/model/Feedback.java

@@ -20,6 +20,8 @@ public class Feedback{
     private String remark;
     private String image;
 
+private String idStr;
+
 private String searchKey;
 
 /**
@@ -134,5 +136,13 @@ public void setOrderByStr(String orderByStr) {
     this.orderByStr = orderByStr;
 }
 
+public String getIdStr() {
+    return idStr;
+}
+
+public void setIdStr(String idStr) {
+    this.idStr = idStr;
+}
+
 }
 

+ 27 - 0
src/main/java/com/izouma/awesomeadmin/service/CaseInfoService.java

@@ -0,0 +1,27 @@
+package com.izouma.awesomeadmin.service;
+
+import java.util.*;
+import com.izouma.awesomeadmin.dto.Page;
+import com.izouma.awesomeadmin.model.CaseInfo;
+
+
+/**
+*  service接口类
+*/
+public interface CaseInfoService{
+
+    List<CaseInfo> getCaseInfoList(CaseInfo record);
+
+    List<CaseInfo> getCaseInfoByPage(Page page, CaseInfo record);
+
+    CaseInfo getCaseInfoById(String id);
+
+    CaseInfo getCaseInfo(CaseInfo record);
+
+    boolean createCaseInfo(CaseInfo record);
+
+    boolean deleteCaseInfo(CaseInfo record);
+
+    boolean updateCaseInfo(CaseInfo record);
+}
+

+ 1 - 1
src/main/java/com/izouma/awesomeadmin/service/FeedbackService.java

@@ -20,7 +20,7 @@ public interface FeedbackService{
 
     boolean createFeedback(Feedback record);
 
-    boolean deleteFeedback(String id);
+    boolean deleteFeedback(Feedback record);
 
     boolean updateFeedback(Feedback record);
 }

+ 137 - 0
src/main/java/com/izouma/awesomeadmin/service/impl/CaseInfoServiceImpl.java

@@ -0,0 +1,137 @@
+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.CaseInfo;
+import com.izouma.awesomeadmin.service.CaseInfoService;
+import com.izouma.awesomeadmin.dao.CaseInfoMapper;
+
+/**
+*  service接口实现类
+*/
+@Service
+public class CaseInfoServiceImpl implements CaseInfoService{
+
+    private static Logger logger = Logger.getLogger(CaseInfoServiceImpl.class);
+
+    @Autowired
+    private CaseInfoMapper caseInfoMapper;
+
+    @Override
+    public List<CaseInfo> getCaseInfoList(CaseInfo record) {
+
+        logger.info("getCaseInfoList");
+        try {
+
+        return caseInfoMapper.queryAllCaseInfo(record);
+        } catch (Exception e) {
+        logger.error("getCaseInfoList", e);
+        }
+
+        return null;
+    }
+    @Override
+    public List<CaseInfo> getCaseInfoByPage(Page page, CaseInfo record) {
+
+        logger.info("getCaseInfoByPage");
+        try {
+
+        Map<String, Object> parameter = new HashMap<String, Object>();
+        parameter.put("record", record);
+        parameter.put(AppConstant.PAGE, page);
+
+        return caseInfoMapper.queryCaseInfoByPage(parameter);
+        } catch (Exception e) {
+        logger.error("getCaseInfoByPage", e);
+        }
+
+        return null;
+    }
+
+    @Override
+    public CaseInfo getCaseInfoById(String id) {
+
+        logger.info("getCaseInfoyId");
+        try {
+
+            return caseInfoMapper.selectByPrimaryKey(Integer.valueOf(id));
+        } catch (Exception e) {
+        logger.error("getCaseInfoById", e);
+        }
+
+        return null;
+    }
+
+    @Override
+    public CaseInfo getCaseInfo(CaseInfo record) {
+
+        logger.info("getCaseInfo");
+        try {
+
+            return caseInfoMapper.queryCaseInfo(record);
+        } catch (Exception e) {
+        logger.error("getCaseInfo", e);
+        }
+
+        return null;
+    }
+
+    @Override
+    public boolean createCaseInfo(CaseInfo record) {
+
+        logger.info("createCaseInfo");
+        try {
+
+            int updates = caseInfoMapper.insertSelective(record);
+
+            if (updates > 0) {
+                 return true;
+            }
+        } catch (Exception e) {
+            logger.error("createCaseInfo", e);
+        }
+
+        return false;
+    }
+
+    @Override
+    public boolean deleteCaseInfo(CaseInfo record) {
+
+        logger.info("deleteCaseInfo");
+        try {
+
+             int updates = caseInfoMapper.delete(record);
+
+            if (updates > 0) {
+                 return true;
+            }
+        } catch (Exception e) {
+             logger.error("deleteCaseInfo", e);
+        }
+
+        return false;
+    }
+
+    @Override
+    public boolean updateCaseInfo(CaseInfo record) {
+
+        logger.info("updateCaseInfo");
+        try {
+
+            int updates = caseInfoMapper.updateByPrimaryKeySelective(record);
+
+            if (updates > 0) {
+                 return true;
+            }
+        } catch (Exception e) {
+             logger.error("updateCaseInfo", e);
+        }
+
+        return false;
+    }
+}
+

+ 2 - 2
src/main/java/com/izouma/awesomeadmin/service/impl/FeedbackServiceImpl.java

@@ -99,12 +99,12 @@ public class FeedbackServiceImpl implements FeedbackService{
     }
 
     @Override
-    public boolean deleteFeedback(String id) {
+    public boolean deleteFeedback(Feedback record) {
 
         logger.info("deleteFeedback");
         try {
 
-             int updates = feedbackMapper.delete(id);
+             int updates = feedbackMapper.delete(record);
 
             if (updates > 0) {
                  return true;

+ 164 - 0
src/main/java/com/izouma/awesomeadmin/web/CaseInfoController.java

@@ -0,0 +1,164 @@
+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.CaseInfo;
+import com.izouma.awesomeadmin.service.CaseInfoService;
+
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
+
+/**
+*  controller类
+*/
+@Controller
+@RequestMapping("/caseInfo")
+public class CaseInfoController {
+
+    @Autowired
+    private CaseInfoService caseInfoService;
+
+    /**
+    * <p>获取全部记录。</p>
+    */
+    @RequiresAuthentication
+    @RequestMapping(value = "/all", method = RequestMethod.GET)
+    @ResponseBody
+    public Result all(CaseInfo record) {
+        List<CaseInfo> pp = caseInfoService.getCaseInfoList(record);
+        return new Result(true, pp);
+    }
+
+    /**
+    * <p>根据Id。</p>
+    */
+    @RequestMapping(value = "/getCaseInfo", method = RequestMethod.GET)
+    @ResponseBody
+    public Result getCaseInfo(@RequestParam(required = false, value = "id") String id) {
+        CaseInfo data = caseInfoService.getCaseInfoById(id);
+        return new Result(true, data);
+    }
+
+    /**
+    * <p>根据条件获取。</p>
+    */
+    @RequestMapping(value = "/getOne", method = RequestMethod.GET)
+    @ResponseBody
+    public Result getOne(CaseInfo record) {
+        CaseInfo data = caseInfoService.getCaseInfo(record);
+        return new Result(true, data);
+    }
+
+
+    /**
+    * <p>分页查询。</p>
+    */
+    @RequestMapping(value = "/page", method = RequestMethod.GET)
+    @ResponseBody
+    public Result page(Page page, CaseInfo record) {
+        Map<String, Object> result = new HashMap<>();
+
+        List<CaseInfo> pp =caseInfoService.getCaseInfoByPage(page, record);
+
+        result.put(AppConstant.PAGE, page);
+        result.put("pp", pp);
+        return new Result(true, result);
+    }
+
+
+    /**
+    * <p>保存。</p>
+    */
+    @RequestMapping(value = "/save", method = RequestMethod.POST)
+    @ResponseBody
+    public Result save(CaseInfo record) {
+        boolean num = caseInfoService.createCaseInfo(record);
+        if (num) {
+        return new Result(true, record.getId());
+        }
+        return new Result(false, "保存异常");
+    }
+
+    /**
+    * <p>更新信息。</p>
+    */
+    @RequestMapping(value = "/update", method = RequestMethod.POST)
+    @ResponseBody
+    public Result updateCaseInfo(CaseInfo record) {
+        boolean num = caseInfoService.updateCaseInfo(record);
+        if (num) {
+        return new Result(true, "保存成功");
+        }
+        return new Result(false, "保存异常");
+    }
+
+    /**
+    * <p>删除。</p>
+    */
+    @RequestMapping(value = "/del", method = RequestMethod.POST)
+    @ResponseBody
+    public Result deleteCaseInfo(CaseInfo record) {
+
+        boolean num = caseInfoService.deleteCaseInfo(record);
+        if (num) {
+        return new Result(true, "删除成功");
+        }
+        return new Result(false, "删除异常");
+    }
+
+    /**
+    * 导出Excel
+    * @param request
+    * @param response
+    * @param record
+    * @throws Exception
+    */
+    @RequestMapping(value = "/exportExcel", method = RequestMethod.GET)
+    @ResponseBody
+    public void exportExcel(HttpServletRequest request, HttpServletResponse response, CaseInfo record) throws Exception {
+
+    List<CaseInfo> caseInfos = caseInfoService.getCaseInfoList(record);
+
+
+        String sheetName = "case_info";
+        String titleName = "官网案例数据表";
+        String fileName = "官网案例表";
+        int columnNumber = 13;
+        int[] columnWidth = { 20,  20,  20,  20,  20,  20,  20,  20,  20,  20,  20,  20,  20 };
+        String[] columnName = {  "" ,   "删除标识" ,   "更新时间" ,   "更新人" ,   "创建时间" ,   "创建人" ,   "分类" ,   "名称" ,   "介绍" ,   "封面图片" ,   "介绍图片" ,   "首页" ,   "排序"  };
+        String[][] dataList = new String[caseInfos.size()][13];
+
+        for (int i = 0; i < caseInfos.size(); i++) {
+
+                        dataList[i][0] = String.valueOf(caseInfos.get(i).getId());
+                        dataList[i][1] = String.valueOf(caseInfos.get(i).getDelFlag());
+                        dataList[i][2] = String.valueOf(caseInfos.get(i).getUpdateTime());
+                        dataList[i][3] = String.valueOf(caseInfos.get(i).getUpdateUser());
+                        dataList[i][4] = String.valueOf(caseInfos.get(i).getCreateTime());
+                        dataList[i][5] = String.valueOf(caseInfos.get(i).getCreateUser());
+                        dataList[i][6] = String.valueOf(caseInfos.get(i).getTypeFlag());
+                        dataList[i][7] = String.valueOf(caseInfos.get(i).getCaseName());
+                        dataList[i][8] = String.valueOf(caseInfos.get(i).getRemark());
+                        dataList[i][9] = String.valueOf(caseInfos.get(i).getImage());
+                        dataList[i][10] = String.valueOf(caseInfos.get(i).getIntroduceImage());
+                        dataList[i][11] = String.valueOf(caseInfos.get(i).getHomeFlag());
+                        dataList[i][12] = String.valueOf(caseInfos.get(i).getRank());
+                    }
+
+
+        ExportExcelUtil.ExportWithResponse(sheetName, titleName, fileName,
+        columnNumber, columnWidth, columnName, dataList, response);
+
+
+        }
+    }
+

+ 2 - 2
src/main/java/com/izouma/awesomeadmin/web/FeedbackController.java

@@ -106,9 +106,9 @@ public class FeedbackController {
     */
     @RequestMapping(value = "/del", method = RequestMethod.POST)
     @ResponseBody
-    public Result deleteFeedback(@RequestParam(required = true, value = "id") String id) {
+    public Result deleteFeedback(Feedback record) {
 
-        boolean num = feedbackService.deleteFeedback(id);
+        boolean num = feedbackService.deleteFeedback(record);
         if (num) {
         return new Result(true, "删除成功");
         }

+ 148 - 0
src/main/vue/src/pages/CaseInfo.vue

@@ -0,0 +1,148 @@
+<template>
+    <div>
+        <el-form :model="formData" :rules="rules" ref="form" label-width="80px" label-position="right" size="small" style="max-width: 500px;">
+            <el-form-item prop="typeFlag" label="分类">
+                <template>
+                    <el-select v-model="formData.typeFlag" clearable placeholder="请选择" :disabled="'typeFlag'==subColumn">
+                        <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 prop="caseName" label="名称">
+                <el-input v-model="formData.caseName" :disabled="'caseName'==subColumn"></el-input>
+            </el-form-item>
+            <el-form-item prop="remark" label="介绍">
+                <el-input type="textarea" v-model="formData.remark" :disabled="'remark'==subColumn"></el-input>
+            </el-form-item>
+            <el-form-item prop="image" label="封面图片">
+                <single-upload v-model="formData.image" :disabled="'image'==subColumn"></single-upload>
+            </el-form-item>
+            <el-form-item prop="introduceImage" label="介绍图片">
+                <multi-upload v-model="formData.introduceImage" :disabled="'introduceImage'==subColumn"></multi-upload>
+            </el-form-item>
+            <el-form-item prop="homeFlag" label="首页">
+                <el-switch v-model="formData.homeFlag" active-color="#13ce66" inactive-color="#ff4949" :disabled="'homeFlag'==subColumn">
+                </el-switch>
+            </el-form-item>
+            <el-form-item prop="rank" label="排序">
+                <el-input type="number" v-model="formData.rank" :disabled="'rank'==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'
+
+export default {
+    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: '/caseInfo/getOne',
+                data: {
+                    id: this.$route.query.id
+                }
+            }).then(res => {
+                if (res.success) {
+
+
+                    this.formData = res.data;
+
+                    this.formData.homeFlag = this.formData.homeFlag == '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;
+            }
+        }
+
+    },
+    data() {
+        return {
+            saving: false,
+            formData: {
+                homeFlag: 'N'
+            },
+            rules: {
+            },
+            typeFlagOptions: [{
+                value: 0,
+                label: 'APP开发'
+            }, {
+                value: 1,
+                label: '微信开发'
+            }, {
+                value: 2,
+                label: '溯源系统'
+            }, {
+                value: 3,
+                label: '网站建设'
+            }],
+            subColumn: '',
+            subValue: '',
+        }
+    },
+    methods: {
+        onSave() {
+            this.$refs.form.validate((valid) => {
+                if (valid) {
+                    this.submit();
+                } else {
+                    return false;
+                }
+            });
+        },
+        submit() {
+            var data = JSON.parse(JSON.stringify(this.formData));
+
+            data.homeFlag = this.formData.homeFlag ? 'Y' : 'N';
+
+            this.$http.post({
+                url: this.formData.id ? '/caseInfo/update' : '/caseInfo/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: '/caseInfo/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>

+ 523 - 0
src/main/vue/src/pages/CaseInfos.vue

@@ -0,0 +1,523 @@
+<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:'/caseInfo',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('id')"
+                                prop="id"
+                                label=""
+                                min-width="100">
+                        </el-table-column>
+                                                                                                                                                                                                            
+                                            <el-table-column
+                                v-if="isColumnShow('typeFlag')"
+                                prop="typeFlag"
+                                label="分类"
+                                min-width="100">
+                        </el-table-column>
+                                                                
+                                            <el-table-column
+                                v-if="isColumnShow('caseName')"
+                                prop="caseName"
+                                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
+                                v-if="isColumnShow('image')"
+                                prop="image"
+                                label="封面图片"
+                                min-width="100">
+                            <template slot-scope="{row}">
+                                <img :src="row.image" @click="showImg(row.image)" style="width: 100px;height: 100px;vertical-align: middle;" />
+                            </template>
+
+                        </el-table-column>
+                                                                    
+                                            <el-table-column
+                                v-if="isColumnShow('introduceImage')"
+                                prop="introduceImage"
+                                label="介绍图片"
+                                min-width="100">
+                        </el-table-column>
+                                                                
+                                            <el-table-column
+                                v-if="isColumnShow('homeFlag')"
+                                prop="homeFlag"
+                                label="首页"
+                                min-width="100">
+                        </el-table-column>
+                                                                
+                                            <el-table-column
+                                v-if="isColumnShow('rank')"
+                                prop="rank"
+                                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 {
+        created() {
+            this.getData();
+        },
+        data() {
+            return {
+                totalNumber: 0,
+                totalPage: 10,
+                currentPage: 1,
+                pageSize: 20,
+                tableData: [],
+                filter1: '',
+                filter2: '',
+                tableColumns: [
+                                                                        {
+                                label: '',
+                                value: 'id',
+                                show: true
+                            },
+                                                                                                                                                                                                                                                                                                                            {
+                                label: '分类',
+                                value: 'typeFlag',
+                                show: true
+                            },
+                                                                                                {
+                                label: '名称',
+                                value: 'caseName',
+                                show: true
+                            },
+                                                                                                {
+                                label: '介绍',
+                                value: 'remark',
+                                show: true
+                            },
+                                                                                                {
+                                label: '封面图片',
+                                value: 'image',
+                                show: true
+                            },
+                                                                                                {
+                                label: '介绍图片',
+                                value: 'introduceImage',
+                                show: true
+                            },
+                                                                                                {
+                                label: '首页',
+                                value: 'homeFlag',
+                                show: true
+                            },
+                                                                                                {
+                                label: '排序',
+                                value: 'rank',
+                                show: true
+                            },
+                                                            ],
+                multipleMode: false,
+                showAdvancedQueryDialog: false,
+                advancedQueryFields: [],
+                showTableSortDialog: false,
+                tableSortFields: [],
+                searchMethods: ['=', '!=', '>', '>=', '<', '<=', 'like'],
+                advancedQueryColumns: [
+                                                                        {
+                                label: '',
+                                value: 'id'
+                            },
+                                                                                                                                                                                                                                                                                                                            {
+                                label: '分类',
+                                value: 'type_flag'
+                            },
+                                                                                                {
+                                label: '名称',
+                                value: 'case_name'
+                            },
+                                                                                                {
+                                label: '介绍',
+                                value: 'remark'
+                            },
+                                                                                                {
+                                label: '封面图片',
+                                value: 'image'
+                            },
+                                                                                                {
+                                label: '介绍图片',
+                                value: 'introduce_image'
+                            },
+                                                                                                {
+                                label: '首页',
+                                value: 'home_flag'
+                            },
+                                                                                                {
+                                label: '排序',
+                                value: 'rank'
+                            },
+                                                            ],
+                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: '/caseInfo/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: '/caseInfo',
+                    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 + "/caseInfo/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: '/caseInfo/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>

+ 5 - 8
src/main/vue/src/pages/Feedback.vue

@@ -2,10 +2,7 @@
     <div>
         <el-form :model="formData" :rules="rules" ref="form" label-width="80px" label-position="right" size="small"
                  style="max-width: 500px;">
-                                                                                                                                                                                                                                    <el-form-item prop="userId" label="用户">
-                <el-input v-model="formData.userId" :disabled="'userId'==subColumn"></el-input>
-            </el-form-item>
-                                                                                                                                                                                                                                                                                                                            <el-form-item prop="userName" label="姓名">
+                                                                                                                                                                                                                                                                <el-form-item prop="userName" label="姓名">
                 <el-input v-model="formData.userName" :disabled="'userName'==subColumn"></el-input>
             </el-form-item>
                                                                                                                                                                                                                                                                                                                             <el-form-item prop="telephone" label="电话">
@@ -14,10 +11,10 @@
                                                                                                                                                                                                                                                                                                                             <el-form-item prop="remark" label="描述">
                 <el-input v-model="formData.remark" :disabled="'remark'==subColumn"></el-input>
             </el-form-item>
-                                                                                                                                                                                                                                                                                                                            <el-form-item prop="image" label="图片">
-                <el-input v-model="formData.image" :disabled="'image'==subColumn"></el-input>
-            </el-form-item>
-                                                                                                                                                                                                                                                                                        <el-form-item>
+                                                                                                                                                                                                                                                                                                                                                                                                                                                                         <el-form-item prop="image" label="图片">
+                 <single-upload v-model="formData.image" :disabled="'image'==subColumn"></single-upload>
+             </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>

+ 35 - 14
src/main/vue/src/pages/Feedbacks.vue

@@ -43,14 +43,22 @@
                     min-width="50"
                     align="center">
             </el-table-column>
-                                                                                                                                                                                                    
+                            
                                             <el-table-column
-                                v-if="isColumnShow('userId')"
-                                prop="userId"
-                                label="用户"
+                                v-if="isColumnShow('id')"
+                                prop="id"
+                                label=""
                                 min-width="100">
                         </el-table-column>
-                                                                
+                                                                                                                                                    
+                                            <el-table-column
+                                v-if="isColumnShow('createTime')"
+                                prop="createTime"
+                                label="创建时间"
+                                :formatter="DateTimeFormatter"
+                                min-width="100">
+                        </el-table-column>
+                                                                                                                        
                                             <el-table-column
                                 v-if="isColumnShow('userName')"
                                 prop="userName"
@@ -77,8 +85,12 @@
                                 prop="image"
                                 label="图片"
                                 min-width="100">
+                            <template slot-scope="{row}">
+                                <img :src="row.image" @click="showImg(row.image)" style="width: 100px;height: 100px;vertical-align: middle;" />
+                            </template>
+
                         </el-table-column>
-                                                            <el-table-column
+                                                                <el-table-column
                     label="操作"
                     align="center"
                     fixed="right"
@@ -220,12 +232,17 @@
                 filter1: '',
                 filter2: '',
                 tableColumns: [
-                                                                                                                                                                                                                                                                                                                                                {
-                                label: '用户',
-                                value: 'userId',
+                                                                        {
+                                label: '',
+                                value: 'id',
                                 show: true
                             },
-                                                                                                {
+                                                                                                                                                                                                                                    {
+                                label: '创建时间',
+                                value: 'createTime',
+                                show: true
+                            },
+                                                                                                                                                                                        {
                                 label: '姓名',
                                 value: 'userName',
                                 show: true
@@ -253,11 +270,15 @@
                 tableSortFields: [],
                 searchMethods: ['=', '!=', '>', '>=', '<', '<=', 'like'],
                 advancedQueryColumns: [
-                                                                                                                                                                                                                                                                                                                                                {
-                                label: '用户',
-                                value: 'user_id'
+                                                                        {
+                                label: '',
+                                value: 'id'
                             },
-                                                                                                {
+                                                                                                                                                                                                                                    {
+                                label: '创建时间',
+                                value: 'create_time'
+                            },
+                                                                                                                                                                                        {
                                 label: '姓名',
                                 value: 'user_name'
                             },

+ 1 - 1
src/main/vue/src/pages/GenCode.vue

@@ -400,7 +400,7 @@ export default {
                 dataSourceCode: 'dataSource',
                 className: '',
                 subtables: [],
-                typeFlag:'图途象',
+                typeFlag:'官网',
 
             },
             fields: [

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

@@ -200,6 +200,26 @@ const router = new Router({
                     name: 'Testvue',
                     component: () => import('../pages/Testvue')
                 },
+                {
+                    path: '/feedback',
+                    name: 'Feedback',
+                    component: () => import('../pages/Feedback')
+                },
+                {
+                    path: '/feedbacks',
+                    name: 'Feedbacks',
+                    component: () => import('../pages/Feedbacks')
+                },
+                {
+                    path: '/caseInfo',
+                    name: 'CaseInfo',
+                    component: () => import('../pages/CaseInfo')
+                },
+                {
+                    path: '/caseInfos',
+                    name: 'CaseInfos',
+                    component: () => import('../pages/CaseInfos')
+                }
                 /**INSERT_LOCATION**/
             ]
         },