x1ongzhu пре 6 година
родитељ
комит
f5df1be3a0
29 измењених фајлова са 3581 додато и 532 уклоњено
  1. 5 4
      src/main/java/com/izouma/awesomeadmin/constant/AppConstant.java
  2. 9 3
      src/main/java/com/izouma/awesomeadmin/dao/CheckinRecordMapper.java
  3. 125 101
      src/main/java/com/izouma/awesomeadmin/dao/CheckinRecordMapper.xml
  4. 37 0
      src/main/java/com/izouma/awesomeadmin/dao/ShareRecordMapper.java
  5. 309 0
      src/main/java/com/izouma/awesomeadmin/dao/ShareRecordMapper.xml
  6. 33 0
      src/main/java/com/izouma/awesomeadmin/dao/SupplyInfoMapper.java
  7. 346 0
      src/main/java/com/izouma/awesomeadmin/dao/SupplyInfoMapper.xml
  8. 100 0
      src/main/java/com/izouma/awesomeadmin/model/ShareRecord.java
  9. 124 0
      src/main/java/com/izouma/awesomeadmin/model/SupplyInfo.java
  10. 8 3
      src/main/java/com/izouma/awesomeadmin/service/CheckinRecordService.java
  11. 29 0
      src/main/java/com/izouma/awesomeadmin/service/ShareRecordService.java
  12. 27 0
      src/main/java/com/izouma/awesomeadmin/service/SupplyInfoService.java
  13. 84 19
      src/main/java/com/izouma/awesomeadmin/service/impl/CheckinRecordServiceImpl.java
  14. 11 0
      src/main/java/com/izouma/awesomeadmin/service/impl/DrawServiceImpl.java
  15. 193 0
      src/main/java/com/izouma/awesomeadmin/service/impl/ShareRecordServiceImpl.java
  16. 137 0
      src/main/java/com/izouma/awesomeadmin/service/impl/SupplyInfoServiceImpl.java
  17. 56 35
      src/main/java/com/izouma/awesomeadmin/web/CheckinRecordController.java
  18. 128 0
      src/main/java/com/izouma/awesomeadmin/web/ShareRecordController.java
  19. 121 0
      src/main/java/com/izouma/awesomeadmin/web/SupplyInfoController.java
  20. 21 9
      src/main/java/com/izouma/awesomeadmin/web/UserInfoController.java
  21. 2 2
      src/main/vue/src/components/RichText.vue
  22. 3 0
      src/main/vue/src/pages/AwardInfo.vue
  23. 389 355
      src/main/vue/src/pages/AwardInfos.vue
  24. 1 1
      src/main/vue/src/pages/IntegralRecord.vue
  25. 154 0
      src/main/vue/src/pages/ShareRecord.vue
  26. 440 0
      src/main/vue/src/pages/ShareRecords.vue
  27. 176 0
      src/main/vue/src/pages/SupplyInfo.vue
  28. 493 0
      src/main/vue/src/pages/SupplyInfos.vue
  29. 20 0
      src/main/vue/src/router/index.js

+ 5 - 4
src/main/java/com/izouma/awesomeadmin/constant/AppConstant.java

@@ -3,13 +3,13 @@ package com.izouma.awesomeadmin.constant;
 public interface AppConstant {
     String PAGE = "page";
 
-    public interface MissionType {
+    interface MissionType {
         int NORMAL = 1;
         int DAILY  = 2;
         int EVENT  = 3;
     }
 
-    public interface IntegralTpye {
+    interface IntegralTpye {
         int MISSION       = 1;
         int CHECKIN       = 2;
         int PUBLISH_AWARD = 3;
@@ -17,14 +17,15 @@ public interface AppConstant {
         int SYSTEM        = 5;
         int RECHARGE      = 6;
         int DRAW          = 7;
+        int SHARE         = 8;
     }
 
-    public interface AwardType {
+    interface AwardType {
         int PHYSICAL = 1;
         int VIRTUAL  = 2;
     }
 
-    public interface UserMissionType {
+    interface UserMissionType {
         int UNFINISH = 1;
         int FINISH   = 2;
         int OVERDUE  = 3;

+ 9 - 3
src/main/java/com/izouma/awesomeadmin/dao/CheckinRecordMapper.java

@@ -1,16 +1,18 @@
 package com.izouma.awesomeadmin.dao;
 
 import java.util.*;
+
 import com.izouma.awesomeadmin.datasource.DataSource;
+import org.apache.ibatis.annotations.Param;
 import org.springframework.stereotype.Repository;
 import com.izouma.awesomeadmin.model.CheckinRecord;
 
 
 /**
-*  Dao接口
-*/
+ * Dao接口
+ */
 @Repository("com.zoumaframe.dao.CheckinRecordMapper")
-public interface CheckinRecordMapper{
+public interface CheckinRecordMapper {
 
     int deleteByPrimaryKey(Integer id);
 
@@ -29,5 +31,9 @@ public interface CheckinRecordMapper{
     CheckinRecord queryCheckinRecord(CheckinRecord record);
 
     List<CheckinRecord> query(CheckinRecord record);
+
+    List<CheckinRecord> queryTodayRecord(@Param("userId") Integer userId);
+
+    List<CheckinRecord> queryMonthRecord(@Param("userId") Integer userId, @Param("yearMonth") String yearMonth);
 }
 

+ 125 - 101
src/main/java/com/izouma/awesomeadmin/dao/CheckinRecordMapper.xml

@@ -1,71 +1,73 @@
 <?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.CheckinRecordMapper" >
-    <resultMap id="BaseResultMap" type="com.izouma.awesomeadmin.model.CheckinRecord" >
-                <id column="id" property="id" jdbcType="INTEGER" />
-                                        <result column="del_flag" property="delFlag" jdbcType="CHAR" />
-                                <result column="user_id" property="userId" jdbcType="INTEGER" />
-                                <result column="create_time" property="createTime" jdbcType="TIMESTAMP" />
-            </resultMap>
-    <sql id="Base_Column_List" >
+<mapper namespace="com.izouma.awesomeadmin.dao.CheckinRecordMapper">
+    <resultMap id="BaseResultMap" type="com.izouma.awesomeadmin.model.CheckinRecord">
+        <id column="id" property="id" jdbcType="INTEGER"/>
+        <result column="del_flag" property="delFlag" jdbcType="CHAR"/>
+        <result column="user_id" property="userId" jdbcType="INTEGER"/>
+        <result column="create_time" property="createTime" jdbcType="TIMESTAMP"/>
+    </resultMap>
+    <sql id="Base_Column_List">
         id, del_flag, user_id, create_time    </sql>
-    <select id="selectByPrimaryKey" resultMap="BaseResultMap" parameterType="java.lang.Integer" >
+    <select id="selectByPrimaryKey" resultMap="BaseResultMap" parameterType="java.lang.Integer">
         select
-        <include refid="Base_Column_List" />
+        <include refid="Base_Column_List"/>
         from checkin_record
         where id = #{id,jdbcType=INTEGER}
     </select>
-    <delete id="deleteByPrimaryKey" parameterType="java.lang.Integer" >
-        delete from checkin_record
-        where id = #{id,jdbcType=INTEGER}
+    <delete id="deleteByPrimaryKey" parameterType="java.lang.Integer">
+        DELETE
+        FROM checkin_record
+        WHERE id = #{id,jdbcType=INTEGER}
     </delete>
-    <insert id="insertSelective" parameterType="com.izouma.awesomeadmin.model.CheckinRecord" useGeneratedKeys="true" keyProperty="id">
+    <insert id="insertSelective" parameterType="com.izouma.awesomeadmin.model.CheckinRecord" useGeneratedKeys="true"
+            keyProperty="id">
         insert into checkin_record
-        <trim prefix="(" suffix=")" suffixOverrides="," >
-                <if test="id!= null" >
+        <trim prefix="(" suffix=")" suffixOverrides=",">
+            <if test="id!= null">
                 id,
             </if>
-                <if test="delFlag!= null" >
+            <if test="delFlag!= null">
                 del_flag,
             </if>
-                <if test="userId!= null" >
+            <if test="userId!= null">
                 user_id,
             </if>
-                <if test="createTime!= null" >
+            <if test="createTime!= null">
                 create_time,
             </if>
-            </trim>
-        <trim prefix="values (" suffix=")" suffixOverrides="," >
-                    <if test="id != null" >
+        </trim>
+        <trim prefix="values (" suffix=")" suffixOverrides=",">
+            <if test="id != null">
                 #{id,jdbcType=INTEGER},
             </if>
-                    <if test="delFlag != null" >
+            <if test="delFlag != null">
                 #{delFlag,jdbcType=CHAR},
             </if>
-                    <if test="userId != null" >
+            <if test="userId != null">
                 #{userId,jdbcType=INTEGER},
             </if>
-                    <if test="createTime != null" >
+            <if test="createTime != null">
                 #{createTime,jdbcType=TIMESTAMP},
             </if>
-                </trim>
+        </trim>
     </insert>
-    <update id="updateByPrimaryKeySelective" parameterType="com.izouma.awesomeadmin.model.CheckinRecord" >
+    <update id="updateByPrimaryKeySelective" parameterType="com.izouma.awesomeadmin.model.CheckinRecord">
         update checkin_record
-        <set >
-                    <if test="id != null" >
-               id= #{id,jdbcType=INTEGER},
+        <set>
+            <if test="id != null">
+                id= #{id,jdbcType=INTEGER},
             </if>
-                     <if test="delFlag != null" >
-               del_flag= #{delFlag,jdbcType=CHAR},
+            <if test="delFlag != null">
+                del_flag= #{delFlag,jdbcType=CHAR},
             </if>
-                     <if test="userId != null" >
-               user_id= #{userId,jdbcType=INTEGER},
+            <if test="userId != null">
+                user_id= #{userId,jdbcType=INTEGER},
             </if>
-                     <if test="createTime != null" >
-               create_time= #{createTime,jdbcType=TIMESTAMP},
+            <if test="createTime != null">
+                create_time= #{createTime,jdbcType=TIMESTAMP},
             </if>
-                 </set>
+        </set>
         where
         <if test="id != null and !&quot;&quot;.equals(id)">
             id = #{id,jdbcType=INTEGER}
@@ -75,30 +77,33 @@
             id in (${idStr})
         </if>
     </update>
-    <select id="queryCheckinRecordByPage" parameterType="java.util.Map" resultType="com.izouma.awesomeadmin.model.CheckinRecord">
-        select <include refid="Base_Column_List"/> from checkin_record
+    <select id="queryCheckinRecordByPage" parameterType="java.util.Map"
+            resultType="com.izouma.awesomeadmin.model.CheckinRecord">
+        select
+        <include refid="Base_Column_List"/>
+        from checkin_record
         <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 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.delFlag != null and !&quot;&quot;.equals(record.delFlag)">
-                and  del_flag = #{record.delFlag}
+            <if test="record.userId != null and !&quot;&quot;.equals(record.userId)">
+                and user_id = #{record.userId}
             </if>
-                     <if test="record.userId != null and !&quot;&quot;.equals(record.userId)">
-                and  user_id = #{record.userId}
+            <if test="record.createTime != null and !&quot;&quot;.equals(record.createTime)">
+                and create_time = #{record.createTime}
             </if>
-                     <if test="record.createTime != null and !&quot;&quot;.equals(record.createTime)">
-                and  create_time = #{record.createTime}
+            <if test="record.searchKey != null and !&quot;&quot;.equals(record.searchKey)">
+                <trim prefix="and (" suffix=")" prefixOverrides="OR">
+                    OR user_id LIKE concat('%',#{record.searchKey},'%')
+                </trim>
             </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},'%')
-                                                                                                                              </trim>
-         </if>
 
             <if test="record.advancedQuery != null and !&quot;&quot;.equals(record.advancedQuery)">
                 <foreach item="item" index="index" collection="record.advancedQuery.split('_;')">
@@ -152,64 +157,67 @@
         </if>
         id desc
     </select>
-    <select id="queryAllCheckinRecord" parameterType="java.util.Map" resultType="com.izouma.awesomeadmin.model.CheckinRecord">
-        select <include refid="Base_Column_List"/> from checkin_record
+    <select id="queryAllCheckinRecord" parameterType="java.util.Map"
+            resultType="com.izouma.awesomeadmin.model.CheckinRecord">
+        select
+        <include refid="Base_Column_List"/>
+        from checkin_record
         <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 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 test="delFlag != null and !&quot;&quot;.equals(delFlag)">
+                and del_flag = #{delFlag}
             </if>
-                    <if test="userId != null and !&quot;&quot;.equals(userId)">
-                and  user_id = #{userId}
+            <if test="userId != null and !&quot;&quot;.equals(userId)">
+                and user_id = #{userId}
             </if>
-                    <if test="createTime != null and !&quot;&quot;.equals(createTime)">
-                and  create_time = #{createTime}
+            <if test="createTime != null and !&quot;&quot;.equals(createTime)">
+                and create_time = #{createTime}
             </if>
-                    <if test="searchKey != null and !&quot;&quot;.equals(searchKey)">
-                <trim prefix="and (" suffix=")" prefixOverrides="OR" >
-                                                                                                                                                                                                                                                OR  user_id LIKE concat('%',#{searchKey},'%')
-                                                                                                                                                                                        </trim>
+            <if test="searchKey != null and !&quot;&quot;.equals(searchKey)">
+                <trim prefix="and (" suffix=")" prefixOverrides="OR">
+                    OR user_id 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="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>
+                                <if test="detailIndex &lt; 3">
+                                    ${itemDetail}
+                                </if>
 
-                </foreach>
-            </when>
-            <otherwise>
-                <foreach item="itemDetail" index="detailIndex" collection="item.split('_,')">
-                    <if test="detailIndex == 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>
+                                <if test="detailIndex &lt; 3">
+                                    ${itemDetail}
+                                </if>
 
-                </foreach>
-            </otherwise>
-        </choose>
+                            </foreach>
+                        </otherwise>
+                    </choose>
 
 
-    </foreach>
+                </foreach>
 
 
-</if>
+            </if>
         </where>
         order by
 
@@ -228,23 +236,26 @@
 
         id desc
     </select>
-    <select id="queryCheckinRecord" parameterType="java.util.Map" resultType="com.izouma.awesomeadmin.model.CheckinRecord">
-        select <include refid="Base_Column_List"/> from checkin_record
+    <select id="queryCheckinRecord" parameterType="java.util.Map"
+            resultType="com.izouma.awesomeadmin.model.CheckinRecord">
+        select
+        <include refid="Base_Column_List"/>
+        from checkin_record
         <where>
             and del_flag = 'N'
-                    <if test="id != null and !&quot;&quot;.equals(id)">
+            <if test="id != null and !&quot;&quot;.equals(id)">
                 and id = #{id}
             </if>
-                     <if test="delFlag != null and !&quot;&quot;.equals(delFlag)">
+            <if test="delFlag != null and !&quot;&quot;.equals(delFlag)">
                 and del_flag = #{delFlag}
             </if>
-                     <if test="userId != null and !&quot;&quot;.equals(userId)">
+            <if test="userId != null and !&quot;&quot;.equals(userId)">
                 and user_id = #{userId}
             </if>
-                     <if test="createTime != null and !&quot;&quot;.equals(createTime)">
+            <if test="createTime != null and !&quot;&quot;.equals(createTime)">
                 and create_time = #{createTime}
             </if>
-         
+
         </where>
         LIMIT 1
     </select>
@@ -260,11 +271,24 @@
         </if>
     </update>
     <select id="query" parameterType="java.util.Map" resultType="com.izouma.awesomeadmin.model.CheckinRecord">
-        select <include refid="Base_Column_List"/> from checkin_record
+        select
+        <include refid="Base_Column_List"/>
+        from checkin_record
         <where>
             and del_flag = 'N'
-                                                                                                                                                                                                                                                                                                                                        </where>
+        </where>
         order by id desc
     </select>
+    <select id="queryTodayRecord" resultType="com.izouma.awesomeadmin.model.CheckinRecord">
+        SELECT
+        <include refid="Base_Column_List"/>
+        FROM checkin_record WHERE del_flag = 'N' AND to_days(create_time) = to_days(now()) AND user_id = #{userId}
+    </select>
+    <select id="queryMonthRecord" resultType="com.izouma.awesomeadmin.model.CheckinRecord">
+        SELECT
+        <include refid="Base_Column_List"/>
+        FROM checkin_record WHERE del_flag = 'N' AND DATE_FORMAT(create_time, '%Y%m') = #{yearMonth}
+        AND user_id = #{userId}
+    </select>
 </mapper>
 

+ 37 - 0
src/main/java/com/izouma/awesomeadmin/dao/ShareRecordMapper.java

@@ -0,0 +1,37 @@
+package com.izouma.awesomeadmin.dao;
+
+import java.util.*;
+
+import com.izouma.awesomeadmin.datasource.DataSource;
+import org.apache.ibatis.annotations.Param;
+import org.springframework.stereotype.Repository;
+import com.izouma.awesomeadmin.model.ShareRecord;
+
+
+/**
+ * Dao接口
+ */
+@Repository("com.zoumaframe.dao.ShareRecordMapper")
+public interface ShareRecordMapper {
+
+    int deleteByPrimaryKey(Integer id);
+
+    int insertSelective(ShareRecord record);
+
+    ShareRecord selectByPrimaryKey(Integer id);
+
+    int updateByPrimaryKeySelective(ShareRecord record);
+
+    List<ShareRecord> queryAllShareRecord(ShareRecord record);
+
+    List<ShareRecord> queryShareRecordByPage(Map<String, Object> parameter);
+
+    int delete(ShareRecord record);
+
+    ShareRecord queryShareRecord(ShareRecord record);
+
+    List<ShareRecord> query(ShareRecord record);
+
+    List<ShareRecord> queryTodayRecord(@Param("userId") Integer userId);
+}
+

+ 309 - 0
src/main/java/com/izouma/awesomeadmin/dao/ShareRecordMapper.xml

@@ -0,0 +1,309 @@
+<?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.ShareRecordMapper">
+    <resultMap id="BaseResultMap" type="com.izouma.awesomeadmin.model.ShareRecord">
+        <id column="id" property="id" jdbcType="INTEGER"/>
+        <result column="del_flag" property="delFlag" jdbcType="CHAR"/>
+        <result column="user_id" property="userId" jdbcType="INTEGER"/>
+        <result column="link_id" property="linkId" jdbcType="INTEGER"/>
+        <result column="create_time" property="createTime" jdbcType="TIMESTAMP"/>
+    </resultMap>
+    <sql id="Base_Column_List">
+        id, del_flag, user_id, link_id, create_time    </sql>
+    <select id="selectByPrimaryKey" resultMap="BaseResultMap" parameterType="java.lang.Integer">
+        select
+        <include refid="Base_Column_List"/>
+        from share_record
+        where id = #{id,jdbcType=INTEGER}
+    </select>
+    <delete id="deleteByPrimaryKey" parameterType="java.lang.Integer">
+        DELETE
+        FROM share_record
+        WHERE id = #{id,jdbcType=INTEGER}
+    </delete>
+    <insert id="insertSelective" parameterType="com.izouma.awesomeadmin.model.ShareRecord" useGeneratedKeys="true"
+            keyProperty="id">
+        insert into share_record
+        <trim prefix="(" suffix=")" suffixOverrides=",">
+            <if test="id!= null">
+                id,
+            </if>
+            <if test="delFlag!= null">
+                del_flag,
+            </if>
+            <if test="userId!= null">
+                user_id,
+            </if>
+            <if test="linkId!= null">
+                link_id,
+            </if>
+            <if test="createTime!= null">
+                create_time,
+            </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="userId != null">
+                #{userId,jdbcType=INTEGER},
+            </if>
+            <if test="linkId != null">
+                #{linkId,jdbcType=INTEGER},
+            </if>
+            <if test="createTime != null">
+                #{createTime,jdbcType=TIMESTAMP},
+            </if>
+        </trim>
+    </insert>
+    <update id="updateByPrimaryKeySelective" parameterType="com.izouma.awesomeadmin.model.ShareRecord">
+        update share_record
+        <set>
+            <if test="id != null">
+                id= #{id,jdbcType=INTEGER},
+            </if>
+            <if test="delFlag != null">
+                del_flag= #{delFlag,jdbcType=CHAR},
+            </if>
+            <if test="userId != null">
+                user_id= #{userId,jdbcType=INTEGER},
+            </if>
+            <if test="linkId != null">
+                link_id= #{linkId,jdbcType=INTEGER},
+            </if>
+            <if test="createTime != null">
+                create_time= #{createTime,jdbcType=TIMESTAMP},
+            </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="queryShareRecordByPage" parameterType="java.util.Map"
+            resultType="com.izouma.awesomeadmin.model.ShareRecord">
+        select
+        <include refid="Base_Column_List"/>
+        from share_record
+        <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.userId != null and !&quot;&quot;.equals(record.userId)">
+                and user_id = #{record.userId}
+            </if>
+            <if test="record.linkId != null and !&quot;&quot;.equals(record.linkId)">
+                and link_id = #{record.linkId}
+            </if>
+            <if test="record.createTime != null and !&quot;&quot;.equals(record.createTime)">
+                and create_time = #{record.createTime}
+            </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 link_id 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>
+        id desc
+    </select>
+    <select id="queryAllShareRecord" parameterType="java.util.Map"
+            resultType="com.izouma.awesomeadmin.model.ShareRecord">
+        select
+        <include refid="Base_Column_List"/>
+        from share_record
+        <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="userId != null and !&quot;&quot;.equals(userId)">
+                and user_id = #{userId}
+            </if>
+            <if test="linkId != null and !&quot;&quot;.equals(linkId)">
+                and link_id = #{linkId}
+            </if>
+            <if test="createTime != null and !&quot;&quot;.equals(createTime)">
+                and create_time = #{createTime}
+            </if>
+            <if test="searchKey != null and !&quot;&quot;.equals(searchKey)">
+                <trim prefix="and (" suffix=")" prefixOverrides="OR">
+                    OR user_id LIKE concat('%',#{searchKey},'%')
+                    OR link_id 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>
+
+        id desc
+    </select>
+    <select id="queryShareRecord" parameterType="java.util.Map" resultType="com.izouma.awesomeadmin.model.ShareRecord">
+        select
+        <include refid="Base_Column_List"/>
+        from share_record
+        <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="userId != null and !&quot;&quot;.equals(userId)">
+                and user_id = #{userId}
+            </if>
+            <if test="linkId != null and !&quot;&quot;.equals(linkId)">
+                and link_id = #{linkId}
+            </if>
+            <if test="createTime != null and !&quot;&quot;.equals(createTime)">
+                and create_time = #{createTime}
+            </if>
+
+        </where>
+        LIMIT 1
+    </select>
+    <update id="delete">
+        UPDATE share_record 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.ShareRecord">
+        select
+        <include refid="Base_Column_List"/>
+        from share_record
+        <where>
+            and del_flag = 'N'
+        </where>
+        order by id desc
+    </select>
+    <select id="queryTodayRecord" resultType="com.izouma.awesomeadmin.model.ShareRecord">
+        select
+        <include refid="Base_Column_List"/>
+        from share_record
+        WHERE del_flag = 'N' and to_days(create_time) = to_days(now())
+    </select>
+</mapper>
+

+ 33 - 0
src/main/java/com/izouma/awesomeadmin/dao/SupplyInfoMapper.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.SupplyInfo;
+
+
+/**
+*  Dao接口
+*/
+@Repository("com.zoumaframe.dao.SupplyInfoMapper")
+public interface SupplyInfoMapper{
+
+    int deleteByPrimaryKey(Integer id);
+
+    int insertSelective(SupplyInfo record);
+
+    SupplyInfo selectByPrimaryKey(Integer id);
+
+    int updateByPrimaryKeySelective(SupplyInfo record);
+
+    List<SupplyInfo> queryAllSupplyInfo(SupplyInfo record);
+
+    List<SupplyInfo> querySupplyInfoByPage(Map<String, Object> parameter);
+
+    int delete(SupplyInfo record);
+
+    SupplyInfo querySupplyInfo(SupplyInfo record);
+
+    List<SupplyInfo> query(SupplyInfo record);
+}
+

+ 346 - 0
src/main/java/com/izouma/awesomeadmin/dao/SupplyInfoMapper.xml

@@ -0,0 +1,346 @@
+<?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.SupplyInfoMapper" >
+    <resultMap id="BaseResultMap" type="com.izouma.awesomeadmin.model.SupplyInfo" >
+                <id column="id" property="id" jdbcType="INTEGER" />
+                                        <result column="del_flag" property="delFlag" jdbcType="CHAR" />
+                                <result column="name" property="name" jdbcType="VARCHAR" />
+                                <result column="cover" property="cover" jdbcType="VARCHAR" />
+                                <result column="pic" property="pic" jdbcType="VARCHAR" />
+                                <result column="detail" property="detail" jdbcType="VARCHAR" />
+                                <result column="stock" property="stock" jdbcType="INTEGER" />
+                                <result column="create_time" property="createTime" jdbcType="TIMESTAMP" />
+            </resultMap>
+    <sql id="Base_Column_List" >
+        id, del_flag, name, cover, pic, detail, stock, create_time    </sql>
+    <select id="selectByPrimaryKey" resultMap="BaseResultMap" parameterType="java.lang.Integer" >
+        select
+        <include refid="Base_Column_List" />
+        from supply_info
+        where id = #{id,jdbcType=INTEGER}
+    </select>
+    <delete id="deleteByPrimaryKey" parameterType="java.lang.Integer" >
+        delete from supply_info
+        where id = #{id,jdbcType=INTEGER}
+    </delete>
+    <insert id="insertSelective" parameterType="com.izouma.awesomeadmin.model.SupplyInfo" useGeneratedKeys="true" keyProperty="id">
+        insert into supply_info
+        <trim prefix="(" suffix=")" suffixOverrides="," >
+                <if test="id!= null" >
+                id,
+            </if>
+                <if test="delFlag!= null" >
+                del_flag,
+            </if>
+                <if test="name!= null" >
+                name,
+            </if>
+                <if test="cover!= null" >
+                cover,
+            </if>
+                <if test="pic!= null" >
+                pic,
+            </if>
+                <if test="detail!= null" >
+                detail,
+            </if>
+                <if test="stock!= null" >
+                stock,
+            </if>
+                <if test="createTime!= null" >
+                create_time,
+            </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="name != null" >
+                #{name,jdbcType=VARCHAR},
+            </if>
+                    <if test="cover != null" >
+                #{cover,jdbcType=VARCHAR},
+            </if>
+                    <if test="pic != null" >
+                #{pic,jdbcType=VARCHAR},
+            </if>
+                    <if test="detail != null" >
+                #{detail,jdbcType=VARCHAR},
+            </if>
+                    <if test="stock != null" >
+                #{stock,jdbcType=INTEGER},
+            </if>
+                    <if test="createTime != null" >
+                #{createTime,jdbcType=TIMESTAMP},
+            </if>
+                </trim>
+    </insert>
+    <update id="updateByPrimaryKeySelective" parameterType="com.izouma.awesomeadmin.model.SupplyInfo" >
+        update supply_info
+        <set >
+                    <if test="id != null" >
+               id= #{id,jdbcType=INTEGER},
+            </if>
+                     <if test="delFlag != null" >
+               del_flag= #{delFlag,jdbcType=CHAR},
+            </if>
+                     <if test="name != null" >
+               name= #{name,jdbcType=VARCHAR},
+            </if>
+                     <if test="cover != null" >
+               cover= #{cover,jdbcType=VARCHAR},
+            </if>
+                     <if test="pic != null" >
+               pic= #{pic,jdbcType=VARCHAR},
+            </if>
+                     <if test="detail != null" >
+               detail= #{detail,jdbcType=VARCHAR},
+            </if>
+                     <if test="stock != null" >
+               stock= #{stock,jdbcType=INTEGER},
+            </if>
+                     <if test="createTime != null" >
+               create_time= #{createTime,jdbcType=TIMESTAMP},
+            </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="querySupplyInfoByPage" parameterType="java.util.Map" resultType="com.izouma.awesomeadmin.model.SupplyInfo">
+        select <include refid="Base_Column_List"/> from supply_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.name != null and !&quot;&quot;.equals(record.name)">
+                and  name = #{record.name}
+            </if>
+                     <if test="record.cover != null and !&quot;&quot;.equals(record.cover)">
+                and  cover = #{record.cover}
+            </if>
+                     <if test="record.pic != null and !&quot;&quot;.equals(record.pic)">
+                and  pic = #{record.pic}
+            </if>
+                     <if test="record.detail != null and !&quot;&quot;.equals(record.detail)">
+                and  detail = #{record.detail}
+            </if>
+                     <if test="record.stock != null and !&quot;&quot;.equals(record.stock)">
+                and  stock = #{record.stock}
+            </if>
+                     <if test="record.createTime != null and !&quot;&quot;.equals(record.createTime)">
+                and  create_time = #{record.createTime}
+            </if>
+                  <if test="record.searchKey != null and !&quot;&quot;.equals(record.searchKey)">
+             <trim prefix="and (" suffix=")" prefixOverrides="OR" >
+                                                                                                                                                                OR  name 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>
+        id desc
+    </select>
+    <select id="queryAllSupplyInfo" parameterType="java.util.Map" resultType="com.izouma.awesomeadmin.model.SupplyInfo">
+        select <include refid="Base_Column_List"/> from supply_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="name != null and !&quot;&quot;.equals(name)">
+                and  name = #{name}
+            </if>
+                    <if test="cover != null and !&quot;&quot;.equals(cover)">
+                and  cover = #{cover}
+            </if>
+                    <if test="pic != null and !&quot;&quot;.equals(pic)">
+                and  pic = #{pic}
+            </if>
+                    <if test="detail != null and !&quot;&quot;.equals(detail)">
+                and  detail = #{detail}
+            </if>
+                    <if test="stock != null and !&quot;&quot;.equals(stock)">
+                and  stock = #{stock}
+            </if>
+                    <if test="createTime != null and !&quot;&quot;.equals(createTime)">
+                and  create_time = #{createTime}
+            </if>
+                    <if test="searchKey != null and !&quot;&quot;.equals(searchKey)">
+                <trim prefix="and (" suffix=")" prefixOverrides="OR" >
+                                                                                                                                                                                                                                                OR  name 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>
+
+        id desc
+    </select>
+    <select id="querySupplyInfo" parameterType="java.util.Map" resultType="com.izouma.awesomeadmin.model.SupplyInfo">
+        select <include refid="Base_Column_List"/> from supply_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="name != null and !&quot;&quot;.equals(name)">
+                and name = #{name}
+            </if>
+                     <if test="cover != null and !&quot;&quot;.equals(cover)">
+                and cover = #{cover}
+            </if>
+                     <if test="pic != null and !&quot;&quot;.equals(pic)">
+                and pic = #{pic}
+            </if>
+                     <if test="detail != null and !&quot;&quot;.equals(detail)">
+                and detail = #{detail}
+            </if>
+                     <if test="stock != null and !&quot;&quot;.equals(stock)">
+                and stock = #{stock}
+            </if>
+                     <if test="createTime != null and !&quot;&quot;.equals(createTime)">
+                and create_time = #{createTime}
+            </if>
+         
+        </where>
+        LIMIT 1
+    </select>
+    <update id="delete">
+        UPDATE supply_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.SupplyInfo">
+        select <include refid="Base_Column_List"/> from supply_info
+        <where>
+            and del_flag = 'N'
+                                                                                                                                                                                                                                                                                                                                                                                                                                                        </where>
+        order by id desc
+    </select>
+</mapper>
+

+ 100 - 0
src/main/java/com/izouma/awesomeadmin/model/ShareRecord.java

@@ -0,0 +1,100 @@
+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 ShareRecord{
+    private Integer id;
+    private String delFlag;
+    private Integer userId;
+    private Integer linkId;
+    private Date createTime;
+
+    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 Integer getUserId(){
+        return this.userId;
+    }
+
+    public void setUserId(Integer userId){
+        this.userId = userId;
+    }
+    public Integer getLinkId(){
+        return this.linkId;
+    }
+
+    public void setLinkId(Integer linkId){
+        this.linkId = linkId;
+    }
+    public Date getCreateTime(){
+        return this.createTime;
+    }
+
+    public void setCreateTime(Date createTime){
+        this.createTime = createTime;
+    }
+
+    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;
+    }
+
+}
+

+ 124 - 0
src/main/java/com/izouma/awesomeadmin/model/SupplyInfo.java

@@ -0,0 +1,124 @@
+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 SupplyInfo{
+    private Integer id;
+    private String delFlag;
+    private String name;
+    private String cover;
+    private String pic;
+    private String detail;
+    private Integer stock;
+    private Date createTime;
+
+    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 String getName(){
+        return this.name;
+    }
+
+    public void setName(String name){
+        this.name = name;
+    }
+    public String getCover(){
+        return this.cover;
+    }
+
+    public void setCover(String cover){
+        this.cover = cover;
+    }
+    public String getPic(){
+        return this.pic;
+    }
+
+    public void setPic(String pic){
+        this.pic = pic;
+    }
+    public String getDetail(){
+        return this.detail;
+    }
+
+    public void setDetail(String detail){
+        this.detail = detail;
+    }
+    public Integer getStock(){
+        return this.stock;
+    }
+
+    public void setStock(Integer stock){
+        this.stock = stock;
+    }
+    public Date getCreateTime(){
+        return this.createTime;
+    }
+
+    public void setCreateTime(Date createTime){
+        this.createTime = createTime;
+    }
+
+    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;
+    }
+
+}
+

+ 8 - 3
src/main/java/com/izouma/awesomeadmin/service/CheckinRecordService.java

@@ -1,14 +1,15 @@
 package com.izouma.awesomeadmin.service;
 
 import java.util.*;
+
 import com.izouma.awesomeadmin.dto.Page;
 import com.izouma.awesomeadmin.model.CheckinRecord;
 
 
 /**
-*  service接口类
-*/
-public interface CheckinRecordService{
+ * service接口类
+ */
+public interface CheckinRecordService {
 
     List<CheckinRecord> getCheckinRecordList(CheckinRecord record);
 
@@ -23,5 +24,9 @@ public interface CheckinRecordService{
     boolean deleteCheckinRecord(CheckinRecord record);
 
     boolean updateCheckinRecord(CheckinRecord record);
+
+    Map<String,Object> checkin();
+
+    List<CheckinRecord> getMonthCheckinRecord(String yearMonth);
 }
 

+ 29 - 0
src/main/java/com/izouma/awesomeadmin/service/ShareRecordService.java

@@ -0,0 +1,29 @@
+package com.izouma.awesomeadmin.service;
+
+import java.util.*;
+import com.izouma.awesomeadmin.dto.Page;
+import com.izouma.awesomeadmin.model.ShareRecord;
+
+
+/**
+*  service接口类
+*/
+public interface ShareRecordService{
+
+    List<ShareRecord> getShareRecordList(ShareRecord record);
+
+    List<ShareRecord> getShareRecordByPage(Page page, ShareRecord record);
+
+    ShareRecord getShareRecordById(String id);
+
+    ShareRecord getShareRecord(ShareRecord record);
+
+    boolean createShareRecord(ShareRecord record);
+
+    boolean deleteShareRecord(ShareRecord record);
+
+    boolean updateShareRecord(ShareRecord record);
+
+    boolean share(ShareRecord record);
+}
+

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

@@ -0,0 +1,27 @@
+package com.izouma.awesomeadmin.service;
+
+import java.util.*;
+import com.izouma.awesomeadmin.dto.Page;
+import com.izouma.awesomeadmin.model.SupplyInfo;
+
+
+/**
+*  service接口类
+*/
+public interface SupplyInfoService{
+
+    List<SupplyInfo> getSupplyInfoList(SupplyInfo record);
+
+    List<SupplyInfo> getSupplyInfoByPage(Page page, SupplyInfo record);
+
+    SupplyInfo getSupplyInfoById(String id);
+
+    SupplyInfo getSupplyInfo(SupplyInfo record);
+
+    boolean createSupplyInfo(SupplyInfo record);
+
+    boolean deleteSupplyInfo(SupplyInfo record);
+
+    boolean updateSupplyInfo(SupplyInfo record);
+}
+

+ 84 - 19
src/main/java/com/izouma/awesomeadmin/service/impl/CheckinRecordServiceImpl.java

@@ -1,7 +1,14 @@
 package com.izouma.awesomeadmin.service.impl;
 
 import java.util.*;
+
+import com.izouma.awesomeadmin.model.IntegralRecord;
+import com.izouma.awesomeadmin.model.UserInfo;
+import com.izouma.awesomeadmin.service.IntegralRecordService;
+import com.izouma.awesomeadmin.service.SystemConfigService;
+import com.izouma.awesomeadmin.service.UserInfoService;
 import org.apache.log4j.Logger;
+import org.apache.shiro.SecurityUtils;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Service;
 import com.izouma.awesomeadmin.constant.AppConstant;
@@ -11,15 +18,21 @@ import com.izouma.awesomeadmin.service.CheckinRecordService;
 import com.izouma.awesomeadmin.dao.CheckinRecordMapper;
 
 /**
-*  service接口实现类
-*/
+ * service接口实现类
+ */
 @Service
-public class CheckinRecordServiceImpl implements CheckinRecordService{
+public class CheckinRecordServiceImpl implements CheckinRecordService {
 
     private static Logger logger = Logger.getLogger(CheckinRecordServiceImpl.class);
 
     @Autowired
-    private CheckinRecordMapper checkinRecordMapper;
+    private CheckinRecordMapper   checkinRecordMapper;
+    @Autowired
+    private UserInfoService       userInfoService;
+    @Autowired
+    private IntegralRecordService integralRecordService;
+    @Autowired
+    private SystemConfigService   systemConfigService;
 
     @Override
     public List<CheckinRecord> getCheckinRecordList(CheckinRecord record) {
@@ -27,26 +40,27 @@ public class CheckinRecordServiceImpl implements CheckinRecordService{
         logger.info("getCheckinRecordList");
         try {
 
-        return checkinRecordMapper.queryAllCheckinRecord(record);
+            return checkinRecordMapper.queryAllCheckinRecord(record);
         } catch (Exception e) {
-        logger.error("getCheckinRecordList", e);
+            logger.error("getCheckinRecordList", e);
         }
 
         return null;
     }
+
     @Override
     public List<CheckinRecord> getCheckinRecordByPage(Page page, CheckinRecord record) {
 
         logger.info("getCheckinRecordByPage");
         try {
 
-        Map<String, Object> parameter = new HashMap<String, Object>();
-        parameter.put("record", record);
-        parameter.put(AppConstant.PAGE, page);
+            Map<String, Object> parameter = new HashMap<String, Object>();
+            parameter.put("record", record);
+            parameter.put(AppConstant.PAGE, page);
 
-        return checkinRecordMapper.queryCheckinRecordByPage(parameter);
+            return checkinRecordMapper.queryCheckinRecordByPage(parameter);
         } catch (Exception e) {
-        logger.error("getCheckinRecordByPage", e);
+            logger.error("getCheckinRecordByPage", e);
         }
 
         return null;
@@ -60,7 +74,7 @@ public class CheckinRecordServiceImpl implements CheckinRecordService{
 
             return checkinRecordMapper.selectByPrimaryKey(Integer.valueOf(id));
         } catch (Exception e) {
-        logger.error("getCheckinRecordById", e);
+            logger.error("getCheckinRecordById", e);
         }
 
         return null;
@@ -74,7 +88,7 @@ public class CheckinRecordServiceImpl implements CheckinRecordService{
 
             return checkinRecordMapper.queryCheckinRecord(record);
         } catch (Exception e) {
-        logger.error("getCheckinRecord", e);
+            logger.error("getCheckinRecord", e);
         }
 
         return null;
@@ -89,7 +103,7 @@ public class CheckinRecordServiceImpl implements CheckinRecordService{
             int updates = checkinRecordMapper.insertSelective(record);
 
             if (updates > 0) {
-                 return true;
+                return true;
             }
         } catch (Exception e) {
             logger.error("createCheckinRecord", e);
@@ -104,13 +118,13 @@ public class CheckinRecordServiceImpl implements CheckinRecordService{
         logger.info("deleteCheckinRecord");
         try {
 
-             int updates = checkinRecordMapper.delete(record);
+            int updates = checkinRecordMapper.delete(record);
 
             if (updates > 0) {
-                 return true;
+                return true;
             }
         } catch (Exception e) {
-             logger.error("deleteCheckinRecord", e);
+            logger.error("deleteCheckinRecord", e);
         }
 
         return false;
@@ -125,13 +139,64 @@ public class CheckinRecordServiceImpl implements CheckinRecordService{
             int updates = checkinRecordMapper.updateByPrimaryKeySelective(record);
 
             if (updates > 0) {
-                 return true;
+                return true;
             }
         } catch (Exception e) {
-             logger.error("updateCheckinRecord", e);
+            logger.error("updateCheckinRecord", e);
         }
 
         return false;
     }
+
+    @Override
+    public Map<String, Object> checkin() {
+        logger.info("checkin");
+        try {
+            Map<String, Object> map = new HashMap<>();
+            UserInfo userInfo = (UserInfo) SecurityUtils.getSubject().getPrincipal();
+            userInfo = userInfoService.getUserInfoById(userInfo.getId().toString());
+            List<CheckinRecord> list = checkinRecordMapper.queryTodayRecord(userInfo.getId());
+            if (list != null && list.size() > 0) {
+                throw new RuntimeException("您今日已签到");
+            }
+            int checkinIntegral = systemConfigService.getInt("checkin_integral", 50);
+
+            CheckinRecord checkinRecord = new CheckinRecord();
+            checkinRecord.setUserId(userInfo.getId());
+            createCheckinRecord(checkinRecord);
+
+            UserInfo u = new UserInfo();
+            u.setIntegral(userInfo.getIntegral() + checkinIntegral);
+            u.setId(userInfo.getId());
+            userInfoService.updateUserInfo(u);
+
+            IntegralRecord integralRecord = new IntegralRecord();
+            integralRecord.setUserId(userInfo.getId());
+            integralRecord.setModify(checkinIntegral);
+            integralRecord.setBalance(u.getIntegral());
+            integralRecord.setLinkId(checkinRecord.getId());
+            integralRecord.setDetail("签到");
+            integralRecord.setType(AppConstant.IntegralTpye.CHECKIN);
+            integralRecordService.createIntegralRecord(integralRecord);
+
+            map.put("checkinIntegral", checkinIntegral);
+            return map;
+        } catch (Exception e) {
+            logger.error("checkin", e);
+        }
+        return null;
+    }
+
+    @Override
+    public List<CheckinRecord> getMonthCheckinRecord(String yearMonth) {
+        logger.info("getMonthCheckinRecord");
+        try {
+            UserInfo userInfo = (UserInfo) SecurityUtils.getSubject().getPrincipal();
+            return checkinRecordMapper.queryMonthRecord(userInfo.getId(), yearMonth);
+        } catch (Exception e) {
+            logger.error("getMonthCheckinRecord", e);
+        }
+        return null;
+    }
 }
 

+ 11 - 0
src/main/java/com/izouma/awesomeadmin/service/impl/DrawServiceImpl.java

@@ -31,6 +31,8 @@ public class DrawServiceImpl implements DrawService {
     private UserInfoService       userInfoService;
     @Autowired
     private IntegralRecordService integralRecordService;
+    @Autowired
+    private CompanyInfoService    companyInfoService;
 
     @Override
     public Map<String, Object> getDrawSession(Boolean refresh) {
@@ -153,6 +155,15 @@ public class DrawServiceImpl implements DrawService {
                     awardInfo.setCollectTime(new Date());
                     awardInfoService.updateAwardInfo(awardInfo);
                     map.put("winAward", awardInfo);
+
+                    if (awardInfo.getUserId() != null) {
+                        UserInfo provideUser = userInfoService.getUserInfoById(awardInfo.getUserId().toString());
+                        map.put("provideUser", provideUser);
+                    }
+                    if (awardInfo.getCompanyId() != null) {
+                        CompanyInfo provideCompany = companyInfoService.getCompanyInfoById(awardInfo.getCompanyId().toString());
+                        map.put("provideCompany", provideCompany);
+                    }
                 } else {
                     msg = "很遗憾,未中奖~";
                 }

+ 193 - 0
src/main/java/com/izouma/awesomeadmin/service/impl/ShareRecordServiceImpl.java

@@ -0,0 +1,193 @@
+package com.izouma.awesomeadmin.service.impl;
+
+import java.util.*;
+
+import com.izouma.awesomeadmin.model.IntegralRecord;
+import com.izouma.awesomeadmin.model.SystemConfig;
+import com.izouma.awesomeadmin.model.UserInfo;
+import com.izouma.awesomeadmin.service.IntegralRecordService;
+import com.izouma.awesomeadmin.service.SystemConfigService;
+import com.izouma.awesomeadmin.service.UserInfoService;
+import org.apache.log4j.Logger;
+import org.apache.shiro.SecurityUtils;
+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.ShareRecord;
+import com.izouma.awesomeadmin.service.ShareRecordService;
+import com.izouma.awesomeadmin.dao.ShareRecordMapper;
+
+/**
+ * service接口实现类
+ */
+@Service
+public class ShareRecordServiceImpl implements ShareRecordService {
+
+    private static Logger logger = Logger.getLogger(ShareRecordServiceImpl.class);
+
+    @Autowired
+    private ShareRecordMapper     shareRecordMapper;
+    @Autowired
+    private UserInfoService       userInfoService;
+    @Autowired
+    private SystemConfigService   systemConfigService;
+    @Autowired
+    private IntegralRecordService integralRecordService;
+
+    @Override
+    public List<ShareRecord> getShareRecordList(ShareRecord record) {
+
+        logger.info("getShareRecordList");
+        try {
+
+            return shareRecordMapper.queryAllShareRecord(record);
+        } catch (Exception e) {
+            logger.error("getShareRecordList", e);
+        }
+
+        return null;
+    }
+
+    @Override
+    public List<ShareRecord> getShareRecordByPage(Page page, ShareRecord record) {
+
+        logger.info("getShareRecordByPage");
+        try {
+
+            Map<String, Object> parameter = new HashMap<String, Object>();
+            parameter.put("record", record);
+            parameter.put(AppConstant.PAGE, page);
+
+            return shareRecordMapper.queryShareRecordByPage(parameter);
+        } catch (Exception e) {
+            logger.error("getShareRecordByPage", e);
+        }
+
+        return null;
+    }
+
+    @Override
+    public ShareRecord getShareRecordById(String id) {
+
+        logger.info("getShareRecordyId");
+        try {
+
+            return shareRecordMapper.selectByPrimaryKey(Integer.valueOf(id));
+        } catch (Exception e) {
+            logger.error("getShareRecordById", e);
+        }
+
+        return null;
+    }
+
+    @Override
+    public ShareRecord getShareRecord(ShareRecord record) {
+
+        logger.info("getShareRecord");
+        try {
+
+            return shareRecordMapper.queryShareRecord(record);
+        } catch (Exception e) {
+            logger.error("getShareRecord", e);
+        }
+
+        return null;
+    }
+
+    @Override
+    public boolean createShareRecord(ShareRecord record) {
+
+        logger.info("createShareRecord");
+        try {
+
+            int updates = shareRecordMapper.insertSelective(record);
+
+            if (updates > 0) {
+                return true;
+            }
+        } catch (Exception e) {
+            logger.error("createShareRecord", e);
+        }
+
+        return false;
+    }
+
+    @Override
+    public boolean deleteShareRecord(ShareRecord record) {
+
+        logger.info("deleteShareRecord");
+        try {
+
+            int updates = shareRecordMapper.delete(record);
+
+            if (updates > 0) {
+                return true;
+            }
+        } catch (Exception e) {
+            logger.error("deleteShareRecord", e);
+        }
+
+        return false;
+    }
+
+    @Override
+    public boolean updateShareRecord(ShareRecord record) {
+
+        logger.info("updateShareRecord");
+        try {
+
+            int updates = shareRecordMapper.updateByPrimaryKeySelective(record);
+
+            if (updates > 0) {
+                return true;
+            }
+        } catch (Exception e) {
+            logger.error("updateShareRecord", e);
+        }
+
+        return false;
+    }
+
+    @Override
+    public boolean share(ShareRecord record) {
+        logger.info("share");
+        try {
+            UserInfo userInfo = (UserInfo) SecurityUtils.getSubject().getPrincipal();
+            List<ShareRecord> list = shareRecordMapper.queryTodayRecord(userInfo.getId());
+
+            ShareRecord shareRecord = new ShareRecord();
+            shareRecord.setUserId(userInfo.getId());
+            shareRecord.setLinkId(record.getLinkId());
+            createShareRecord(shareRecord);
+
+            int maxShareTimes = systemConfigService.getInt("share_times", 3);
+            int shareIntegral = systemConfigService.getInt("share_integral", 10);
+            if (list != null && list.size() >= maxShareTimes) {
+                throw new RuntimeException("已达今日分享上线");
+            }
+
+            userInfo = userInfoService.getUserInfoById(userInfo.getId().toString());
+            UserInfo u = new UserInfo();
+            u.setId(userInfo.getId());
+            u.setIntegral(userInfo.getIntegral() + shareIntegral);
+            userInfoService.updateUserInfo(u);
+
+            IntegralRecord integralRecord = new IntegralRecord();
+            integralRecord.setUserId(userInfo.getId());
+            integralRecord.setModify(shareIntegral);
+            integralRecord.setBalance(userInfo.getIntegral());
+            integralRecord.setLinkId(shareRecord.getId());
+            integralRecord.setDetail("分享");
+            integralRecord.setType(AppConstant.IntegralTpye.SHARE);
+            integralRecordService.createIntegralRecord(integralRecord);
+
+            return true;
+
+        } catch (Exception e) {
+            logger.error("share", e);
+        }
+        return false;
+    }
+}
+

+ 137 - 0
src/main/java/com/izouma/awesomeadmin/service/impl/SupplyInfoServiceImpl.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.SupplyInfo;
+import com.izouma.awesomeadmin.service.SupplyInfoService;
+import com.izouma.awesomeadmin.dao.SupplyInfoMapper;
+
+/**
+*  service接口实现类
+*/
+@Service
+public class SupplyInfoServiceImpl implements SupplyInfoService{
+
+    private static Logger logger = Logger.getLogger(SupplyInfoServiceImpl.class);
+
+    @Autowired
+    private SupplyInfoMapper supplyInfoMapper;
+
+    @Override
+    public List<SupplyInfo> getSupplyInfoList(SupplyInfo record) {
+
+        logger.info("getSupplyInfoList");
+        try {
+
+        return supplyInfoMapper.queryAllSupplyInfo(record);
+        } catch (Exception e) {
+        logger.error("getSupplyInfoList", e);
+        }
+
+        return null;
+    }
+    @Override
+    public List<SupplyInfo> getSupplyInfoByPage(Page page, SupplyInfo record) {
+
+        logger.info("getSupplyInfoByPage");
+        try {
+
+        Map<String, Object> parameter = new HashMap<String, Object>();
+        parameter.put("record", record);
+        parameter.put(AppConstant.PAGE, page);
+
+        return supplyInfoMapper.querySupplyInfoByPage(parameter);
+        } catch (Exception e) {
+        logger.error("getSupplyInfoByPage", e);
+        }
+
+        return null;
+    }
+
+    @Override
+    public SupplyInfo getSupplyInfoById(String id) {
+
+        logger.info("getSupplyInfoyId");
+        try {
+
+            return supplyInfoMapper.selectByPrimaryKey(Integer.valueOf(id));
+        } catch (Exception e) {
+        logger.error("getSupplyInfoById", e);
+        }
+
+        return null;
+    }
+
+    @Override
+    public SupplyInfo getSupplyInfo(SupplyInfo record) {
+
+        logger.info("getSupplyInfo");
+        try {
+
+            return supplyInfoMapper.querySupplyInfo(record);
+        } catch (Exception e) {
+        logger.error("getSupplyInfo", e);
+        }
+
+        return null;
+    }
+
+    @Override
+    public boolean createSupplyInfo(SupplyInfo record) {
+
+        logger.info("createSupplyInfo");
+        try {
+
+            int updates = supplyInfoMapper.insertSelective(record);
+
+            if (updates > 0) {
+                 return true;
+            }
+        } catch (Exception e) {
+            logger.error("createSupplyInfo", e);
+        }
+
+        return false;
+    }
+
+    @Override
+    public boolean deleteSupplyInfo(SupplyInfo record) {
+
+        logger.info("deleteSupplyInfo");
+        try {
+
+             int updates = supplyInfoMapper.delete(record);
+
+            if (updates > 0) {
+                 return true;
+            }
+        } catch (Exception e) {
+             logger.error("deleteSupplyInfo", e);
+        }
+
+        return false;
+    }
+
+    @Override
+    public boolean updateSupplyInfo(SupplyInfo record) {
+
+        logger.info("updateSupplyInfo");
+        try {
+
+            int updates = supplyInfoMapper.updateByPrimaryKeySelective(record);
+
+            if (updates > 0) {
+                 return true;
+            }
+        } catch (Exception e) {
+             logger.error("updateSupplyInfo", e);
+        }
+
+        return false;
+    }
+}
+

+ 56 - 35
src/main/java/com/izouma/awesomeadmin/web/CheckinRecordController.java

@@ -18,8 +18,8 @@ import javax.servlet.http.HttpServletRequest;
 import javax.servlet.http.HttpServletResponse;
 
 /**
-*  controller类
-*/
+ * controller类
+ */
 @Controller
 @RequestMapping("/checkinRecord")
 public class CheckinRecordController {
@@ -28,8 +28,8 @@ public class CheckinRecordController {
     private CheckinRecordService checkinRecordService;
 
     /**
-    * <p>获取全部记录。</p>
-    */
+     * <p>获取全部记录。</p>
+     */
     @RequiresAuthentication
     @RequestMapping(value = "/all", method = RequestMethod.GET)
     @ResponseBody
@@ -39,8 +39,8 @@ public class CheckinRecordController {
     }
 
     /**
-    * <p>根据Id。</p>
-    */
+     * <p>根据Id。</p>
+     */
     @RequestMapping(value = "/getCheckinRecord", method = RequestMethod.GET)
     @ResponseBody
     public Result getCheckinRecord(@RequestParam(required = false, value = "id") String id) {
@@ -49,8 +49,8 @@ public class CheckinRecordController {
     }
 
     /**
-    * <p>根据条件获取。</p>
-    */
+     * <p>根据条件获取。</p>
+     */
     @RequestMapping(value = "/getOne", method = RequestMethod.GET)
     @ResponseBody
     public Result getOne(CheckinRecord record) {
@@ -60,14 +60,14 @@ public class CheckinRecordController {
 
 
     /**
-    * <p>分页查询。</p>
-    */
+     * <p>分页查询。</p>
+     */
     @RequestMapping(value = "/page", method = RequestMethod.GET)
     @ResponseBody
     public Result page(Page page, CheckinRecord record) {
         Map<String, Object> result = new HashMap<>();
 
-        List<CheckinRecord> pp =checkinRecordService.getCheckinRecordByPage(page, record);
+        List<CheckinRecord> pp = checkinRecordService.getCheckinRecordByPage(page, record);
 
         result.put(AppConstant.PAGE, page);
         result.put("pp", pp);
@@ -76,80 +76,101 @@ public class CheckinRecordController {
 
 
     /**
-    * <p>保存。</p>
-    */
+     * <p>保存。</p>
+     */
     @RequestMapping(value = "/save", method = RequestMethod.POST)
     @ResponseBody
     public Result save(CheckinRecord record) {
         boolean num = checkinRecordService.createCheckinRecord(record);
         if (num) {
-        return new Result(true, record.getId());
+            return new Result(true, record.getId());
         }
         return new Result(false, "保存异常");
     }
 
     /**
-    * <p>更新信息。</p>
-    */
+     * <p>更新信息。</p>
+     */
     @RequestMapping(value = "/update", method = RequestMethod.POST)
     @ResponseBody
     public Result updateCheckinRecord(CheckinRecord record) {
         boolean num = checkinRecordService.updateCheckinRecord(record);
         if (num) {
-        return new Result(true, "保存成功");
+            return new Result(true, "保存成功");
         }
         return new Result(false, "保存异常");
     }
 
     /**
-    * <p>删除。</p>
-    */
+     * <p>删除。</p>
+     */
     @RequestMapping(value = "/del", method = RequestMethod.POST)
     @ResponseBody
     public Result deleteCheckinRecord(CheckinRecord record) {
 
         boolean num = checkinRecordService.deleteCheckinRecord(record);
         if (num) {
-        return new Result(true, "删除成功");
+            return new Result(true, "删除成功");
         }
         return new Result(false, "删除异常");
     }
 
     /**
-    * 导出Excel
-    * @param request
-    * @param response
-    * @param record
-    * @throws Exception
-    */
+     * 导出Excel
+     *
+     * @param request
+     * @param response
+     * @param record
+     * @throws Exception
+     */
     @RequestMapping(value = "/exportExcel", method = RequestMethod.GET)
     @ResponseBody
     public void exportExcel(HttpServletRequest request, HttpServletResponse response, CheckinRecord record) throws Exception {
 
-    List<CheckinRecord> checkinRecords = checkinRecordService.getCheckinRecordList(record);
+        List<CheckinRecord> checkinRecords = checkinRecordService.getCheckinRecordList(record);
 
 
         String sheetName = "checkin_record";
         String titleName = "签到记录数据表";
         String fileName = "签到记录表";
         int columnNumber = 4;
-        int[] columnWidth = { 20,  20,  20,  20 };
-        String[] columnName = {  "" ,   "删除标识" ,   "用户id" ,   "创建时间"  };
+        int[] columnWidth = {20, 20, 20, 20};
+        String[] columnName = {"", "删除标识", "用户id", "创建时间"};
         String[][] dataList = new String[checkinRecords.size()][4];
 
         for (int i = 0; i < checkinRecords.size(); i++) {
 
-                        dataList[i][0] = String.valueOf(checkinRecords.get(i).getId());
-                        dataList[i][1] = String.valueOf(checkinRecords.get(i).getDelFlag());
-                        dataList[i][2] = String.valueOf(checkinRecords.get(i).getUserId());
-                        dataList[i][3] = String.valueOf(checkinRecords.get(i).getCreateTime());
-                    }
+            dataList[i][0] = String.valueOf(checkinRecords.get(i).getId());
+            dataList[i][1] = String.valueOf(checkinRecords.get(i).getDelFlag());
+            dataList[i][2] = String.valueOf(checkinRecords.get(i).getUserId());
+            dataList[i][3] = String.valueOf(checkinRecords.get(i).getCreateTime());
+        }
 
 
         ExportExcelUtil.ExportWithResponse(sheetName, titleName, fileName,
-        columnNumber, columnWidth, columnName, dataList, response);
+                columnNumber, columnWidth, columnName, dataList, response);
+    }
 
+    @RequestMapping("/checkin")
+    @ResponseBody
+    @RequiresAuthentication
+    public Result checkin() {
+        Map<String, Object> map = checkinRecordService.checkin();
+        if (map != null) {
+            return new Result(true, "签到成功");
+        }
+        return new Result(false, "签到失败");
+    }
 
+    @RequestMapping("/monthRecord")
+    @ResponseBody
+    @RequiresAuthentication
+    public Result monthRecord(String yearMonth) {
+        List<CheckinRecord> list = checkinRecordService.getMonthCheckinRecord(yearMonth);
+        if (list != null) {
+            return new Result(true, list);
         }
+        return new Result(false, "失败");
     }
+}
 

+ 128 - 0
src/main/java/com/izouma/awesomeadmin/web/ShareRecordController.java

@@ -0,0 +1,128 @@
+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.ShareRecord;
+import com.izouma.awesomeadmin.service.ShareRecordService;
+
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
+
+@Controller
+@RequestMapping("/shareRecord")
+public class ShareRecordController {
+
+    @Autowired
+    private ShareRecordService shareRecordService;
+
+    @RequiresAuthentication
+    @RequestMapping(value = "/all", method = RequestMethod.GET)
+    @ResponseBody
+    public Result all(ShareRecord record) {
+        List<ShareRecord> pp = shareRecordService.getShareRecordList(record);
+        return new Result(true, pp);
+    }
+
+    @RequestMapping(value = "/getShareRecord", method = RequestMethod.GET)
+    @ResponseBody
+    public Result getShareRecord(@RequestParam(required = false, value = "id") String id) {
+        ShareRecord data = shareRecordService.getShareRecordById(id);
+        return new Result(true, data);
+    }
+
+    @RequestMapping(value = "/getOne", method = RequestMethod.GET)
+    @ResponseBody
+    public Result getOne(ShareRecord record) {
+        ShareRecord data = shareRecordService.getShareRecord(record);
+        return new Result(true, data);
+    }
+
+    @RequestMapping(value = "/page", method = RequestMethod.GET)
+    @ResponseBody
+    public Result page(Page page, ShareRecord record) {
+        Map<String, Object> result = new HashMap<>();
+
+        List<ShareRecord> pp = shareRecordService.getShareRecordByPage(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(ShareRecord record) {
+        boolean num = shareRecordService.createShareRecord(record);
+        if (num) {
+            return new Result(true, record.getId());
+        }
+        return new Result(false, "保存异常");
+    }
+
+    @RequestMapping(value = "/update", method = RequestMethod.POST)
+    @ResponseBody
+    public Result updateShareRecord(ShareRecord record) {
+        boolean num = shareRecordService.updateShareRecord(record);
+        if (num) {
+            return new Result(true, "保存成功");
+        }
+        return new Result(false, "保存异常");
+    }
+
+    @RequestMapping(value = "/del", method = RequestMethod.POST)
+    @ResponseBody
+    public Result deleteShareRecord(ShareRecord record) {
+
+        boolean num = shareRecordService.deleteShareRecord(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, ShareRecord record) throws Exception {
+
+        List<ShareRecord> shareRecords = shareRecordService.getShareRecordList(record);
+
+        String sheetName = "share_record";
+        String titleName = "分享记录数据表";
+        String fileName = "分享记录表";
+        int columnNumber = 5;
+        int[] columnWidth = {20, 20, 20, 20, 20};
+        String[] columnName = {"", "删除标识", "用户id", "关联id", "创建时间"};
+        String[][] dataList = new String[shareRecords.size()][5];
+
+        for (int i = 0; i < shareRecords.size(); i++) {
+            dataList[i][0] = String.valueOf(shareRecords.get(i).getId());
+            dataList[i][1] = String.valueOf(shareRecords.get(i).getDelFlag());
+            dataList[i][2] = String.valueOf(shareRecords.get(i).getUserId());
+            dataList[i][3] = String.valueOf(shareRecords.get(i).getLinkId());
+            dataList[i][4] = String.valueOf(shareRecords.get(i).getCreateTime());
+        }
+
+        ExportExcelUtil.ExportWithResponse(sheetName, titleName, fileName,
+                columnNumber, columnWidth, columnName, dataList, response);
+    }
+
+    @RequestMapping("/share")
+    @ResponseBody
+    @RequiresAuthentication
+    public Result share(ShareRecord shareRecord) {
+        if (shareRecordService.share(shareRecord)) {
+            return new Result(true, "分享成功");
+        }
+        return new Result(false, "失败");
+    }
+}
+

+ 121 - 0
src/main/java/com/izouma/awesomeadmin/web/SupplyInfoController.java

@@ -0,0 +1,121 @@
+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.SupplyInfo;
+import com.izouma.awesomeadmin.service.SupplyInfoService;
+
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
+
+@Controller
+@RequestMapping("/supplyInfo")
+public class SupplyInfoController {
+
+    @Autowired
+    private SupplyInfoService supplyInfoService;
+
+    @RequiresAuthentication
+    @RequestMapping(value = "/all", method = RequestMethod.GET)
+    @ResponseBody
+    public Result all(SupplyInfo record) {
+        List<SupplyInfo> pp = supplyInfoService.getSupplyInfoList(record);
+        return new Result(true, pp);
+    }
+
+    @RequestMapping(value = "/getSupplyInfo", method = RequestMethod.GET)
+    @ResponseBody
+    public Result getSupplyInfo(@RequestParam(required = false, value = "id") String id) {
+        SupplyInfo data = supplyInfoService.getSupplyInfoById(id);
+        return new Result(true, data);
+    }
+
+    @RequestMapping(value = "/getOne", method = RequestMethod.GET)
+    @ResponseBody
+    public Result getOne(SupplyInfo record) {
+        SupplyInfo data = supplyInfoService.getSupplyInfo(record);
+        return new Result(true, data);
+    }
+
+    @RequestMapping(value = "/page", method = RequestMethod.GET)
+    @ResponseBody
+    public Result page(Page page, SupplyInfo record) {
+        Map<String, Object> result = new HashMap<>();
+
+        List<SupplyInfo> pp =supplyInfoService.getSupplyInfoByPage(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(SupplyInfo record) {
+        boolean num = supplyInfoService.createSupplyInfo(record);
+        if (num) {
+        return new Result(true, record.getId());
+        }
+        return new Result(false, "保存异常");
+    }
+
+    @RequestMapping(value = "/update", method = RequestMethod.POST)
+    @ResponseBody
+    public Result updateSupplyInfo(SupplyInfo record) {
+        boolean num = supplyInfoService.updateSupplyInfo(record);
+        if (num) {
+        return new Result(true, "保存成功");
+        }
+        return new Result(false, "保存异常");
+    }
+
+    @RequestMapping(value = "/del", method = RequestMethod.POST)
+    @ResponseBody
+    public Result deleteSupplyInfo(SupplyInfo record) {
+
+        boolean num = supplyInfoService.deleteSupplyInfo(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, SupplyInfo record) throws Exception {
+
+        List<SupplyInfo> supplyInfos = supplyInfoService.getSupplyInfoList(record);
+
+        String sheetName = "supply_info";
+        String titleName = "物料信息数据表";
+        String fileName = "物料信息表";
+        int columnNumber = 8;
+        int[] columnWidth = { 20,  20,  20,  20,  20,  20,  20,  20 };
+        String[] columnName = {  "" ,   "删除标识" ,   "名称" ,   "封面" ,   "图片" ,   "详情" ,   "库存" ,   "创建时间"  };
+        String[][] dataList = new String[supplyInfos.size()][8];
+
+        for (int i = 0; i < supplyInfos.size(); i++) {
+                        dataList[i][0] = String.valueOf(supplyInfos.get(i).getId());
+                        dataList[i][1] = String.valueOf(supplyInfos.get(i).getDelFlag());
+                        dataList[i][2] = String.valueOf(supplyInfos.get(i).getName());
+                        dataList[i][3] = String.valueOf(supplyInfos.get(i).getCover());
+                        dataList[i][4] = String.valueOf(supplyInfos.get(i).getPic());
+                        dataList[i][5] = String.valueOf(supplyInfos.get(i).getDetail());
+                        dataList[i][6] = String.valueOf(supplyInfos.get(i).getStock());
+                        dataList[i][7] = String.valueOf(supplyInfos.get(i).getCreateTime());
+                    }
+
+        ExportExcelUtil.ExportWithResponse(sheetName, titleName, fileName,
+                columnNumber, columnWidth, columnName, dataList, response);
+    }
+}
+

+ 21 - 9
src/main/java/com/izouma/awesomeadmin/web/UserInfoController.java

@@ -3,7 +3,9 @@ package com.izouma.awesomeadmin.web;
 import com.izouma.awesomeadmin.constant.AppConstant;
 import com.izouma.awesomeadmin.dto.Page;
 import com.izouma.awesomeadmin.dto.Result;
+import com.izouma.awesomeadmin.model.CompanyInfo;
 import com.izouma.awesomeadmin.model.UserInfo;
+import com.izouma.awesomeadmin.service.CompanyInfoService;
 import com.izouma.awesomeadmin.service.DepartInfoService;
 import com.izouma.awesomeadmin.service.UserInfoService;
 import com.izouma.awesomeadmin.util.ExportExcelUtil;
@@ -35,9 +37,11 @@ import java.util.Map;
 public class UserInfoController {
 
     @Autowired
-    private UserInfoService   userInfoService;
+    private UserInfoService    userInfoService;
     @Autowired
-    private DepartInfoService departInfoService;
+    private DepartInfoService  departInfoService;
+    @Autowired
+    private CompanyInfoService companyInfoService;
 
     /**
      * <p>获取全部记录。</p>
@@ -57,21 +61,29 @@ public class UserInfoController {
     @RequiresAuthentication
     @RequestMapping(value = "/getUserInfo", method = RequestMethod.GET)
     @ResponseBody
-    public Result getUserInfo(@RequestParam(required = false, value = "id") String id) {
+    public Map getUserInfo(@RequestParam(required = false, value = "id") String id) {
+        Map<String, Object> map = new HashMap<>();
         if (StringUtils.isEmpty(id)) {
             try {
                 Subject subject = SecurityUtils.getSubject();
                 UserInfo userInfo = (UserInfo) subject.getPrincipal();
-                if (userInfo != null) {
-                    return new Result(true, userInfo);
-                }
+                id = userInfo.getId().toString();
             } catch (Exception ignored) {
 
             }
         }
-
-        UserInfo data = userInfoService.getUserInfoById(id);
-        return new Result(true, data);
+        UserInfo userInfo = userInfoService.getUserInfoById(id);
+        if (userInfo != null) {
+            map.put("success", true);
+            if (userInfo.getCompanyId() != null) {
+                CompanyInfo companyInfo = companyInfoService.getCompanyInfoById(userInfo.getCompanyId().toString());
+                map.put("companyInfo", companyInfo);
+                map.put("data", userInfo);
+                return map;
+            }
+        }
+        map.put("success", false);
+        return map;
     }
 
     /**

+ 2 - 2
src/main/vue/src/components/RichText.vue

@@ -1,6 +1,6 @@
 <template>
     <div v-if="disabled" v-html="content" class="preview"></div>
-    <textarea v-else v-model="content" ref="editor" @load="load"></textarea>
+    <textarea v-else v-model="content" ref="editor" @load="load" style="width: 800px"></textarea>
 </template>
 <script>
     import axios from 'axios';
@@ -61,7 +61,7 @@
                     menubar: false,
                     branding: false,
                     statusbar: false,
-                    height: 300,
+                    height: 400,
                     toolbar: 'undo redo | styleselect bold italic strikethrough forecolor backcolor  | image media link blockquote visualblocks insert | formatselect | alignleft aligncenter alignright alignjustify | bullist numlist outdent indent | removeformat | preview fullscreen code help',
                     plugins: [
                         'advlist autolink lists link image charmap print preview anchor textcolor',

Разлика између датотеке није приказан због своје велике величине
+ 3 - 0
src/main/vue/src/pages/AwardInfo.vue


+ 389 - 355
src/main/vue/src/pages/AwardInfos.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>
@@ -28,166 +28,191 @@
             </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('price')"
-                prop="price"
-                label="价格"
-                min-width="100">
-            </el-table-column>
-
-            <el-table-column
-                v-if="isColumnShow('detail')"
-                prop="detail"
-                label="详情"
-                min-width="100">
-            </el-table-column>
-
+                :data="tableData"
+                :height="tableHeight"
+                row-key="id"
+                ref="table">
             <el-table-column
-                v-if="isColumnShow('integral')"
-                prop="integral"
-                label="积分"
-                min-width="100">
+                    v-if="multipleMode"
+                    align="center"
+                    type="selection"
+                    width="50">
             </el-table-column>
-
-            <el-table-column
-                v-if="isColumnShow('threshold')"
-                prop="threshold"
-                label="门槛"
-                min-width="100">
-            </el-table-column>
-
             <el-table-column
-                v-if="isColumnShow('type')"
-                prop="type"
-                label="类型"
-                min-width="100">
+                    type="index"
+                    min-width="50"
+                    align="center">
             </el-table-column>
-
-            <el-table-column
-                v-if="isColumnShow('userId')"
-                prop="userId"
-                label="用户id"
-                min-width="100">
-            </el-table-column>
-
-            <el-table-column
-                v-if="isColumnShow('companyId')"
-                prop="companyId"
-                label="公司id"
-                min-width="100">
-            </el-table-column>
-
-            <el-table-column
-                v-if="isColumnShow('source')"
-                prop="source"
-                label="来源"
-                min-width="100">
-            </el-table-column>
-
-            <el-table-column
-                v-if="isColumnShow('collected')"
-                prop="collected"
-                label="已领取"
-                min-width="100">
-            </el-table-column>
-
-            <el-table-column
-                v-if="isColumnShow('transferred')"
-                prop="transferred"
-                label="已转赠"
-                min-width="100">
-            </el-table-column>
-
-            <el-table-column
-                v-if="isColumnShow('collectUser')"
-                prop="collectUser"
-                label="获奖人"
-                min-width="100">
-            </el-table-column>
-
-            <el-table-column
-                v-if="isColumnShow('transferUser')"
-                prop="transferUser"
-                label="转赠人"
-                min-width="100">
-            </el-table-column>
-
-            <el-table-column
-                v-if="isColumnShow('createdTime')"
-                prop="createdTime"
-                label="创建时间"
-                :formatter="DateTimeFormatter"
-                min-width="100">
-            </el-table-column>
-
-            <el-table-column
-                v-if="isColumnShow('collectTime')"
-                prop="collectTime"
-                label="领取时间"
-                :formatter="DateTimeFormatter"
-                min-width="100">
-            </el-table-column>
-
-            <el-table-column
-                v-if="isColumnShow('transferTime')"
-                prop="transferTime"
-                label="转赠时间"
-                :formatter="DateTimeFormatter"
-                min-width="100">
-            </el-table-column>
-
-            <el-table-column
-                v-if="isColumnShow('shipped')"
-                prop="shipped"
-                label="发货"
-                min-width="100">
-            </el-table-column>
-
-            <el-table-column
-                v-if="isColumnShow('shippedTime')"
-                prop="shippedTime"
-                label="发货时间"
-                :formatter="DateTimeFormatter"
-                min-width="100">
-            </el-table-column>
-
-            <el-table-column
-                v-if="isColumnShow('trackingNumber')"
-                prop="trackingNumber"
-                label="物流单号"
-                min-width="100">
-            </el-table-column>
-            <el-table-column
-                label="操作"
-                align="center"
-                fixed="right"
-                min-width="150"
+                                                                                    
+                                            <el-table-column
+                                v-if="isColumnShow('name')"
+                                prop="name"
+                                label="名称"
+                                min-width="100">
+                        </el-table-column>
+                                                                
+                                            <el-table-column
+                                v-if="isColumnShow('price')"
+                                prop="price"
+                                label="价格"
+                                min-width="100">
+                        </el-table-column>
+                                                                
+                                            <el-table-column
+                                v-if="isColumnShow('cover')"
+                                prop="cover"
+                                label="封面"
+                                min-width="100">
+                            <template slot-scope="{row}">
+                                <img :src="row.cover" @click="showImg(row.cover)" style="width: 100px;height: 100px;vertical-align: middle;" />
+                            </template>
+
+                        </el-table-column>
+                                                                
+                                            <el-table-column
+                                v-if="isColumnShow('pic')"
+                                prop="pic"
+                                label="图片"
+                                min-width="100">
+                        </el-table-column>
+                                                                
+                                            <el-table-column
+                                v-if="isColumnShow('detail')"
+                                prop="detail"
+                                label="详情"
+                                min-width="100">
+                        </el-table-column>
+                                                                
+                                            <el-table-column
+                                v-if="isColumnShow('integral')"
+                                prop="integral"
+                                label="积分"
+                                min-width="100">
+                        </el-table-column>
+                                                                
+                                            <el-table-column
+                                v-if="isColumnShow('threshold')"
+                                prop="threshold"
+                                label="门槛"
+                                min-width="100">
+                        </el-table-column>
+                                                                
+                                            <el-table-column
+                                v-if="isColumnShow('type')"
+                                prop="type"
+                                label="类型"
+                                min-width="100">
+                        </el-table-column>
+                                                                
+                                            <el-table-column
+                                v-if="isColumnShow('userId')"
+                                prop="userId"
+                                label="用户id"
+                                min-width="100">
+                        </el-table-column>
+                                                                
+                                            <el-table-column
+                                v-if="isColumnShow('companyId')"
+                                prop="companyId"
+                                label="公司id"
+                                min-width="100">
+                        </el-table-column>
+                                                                
+                                            <el-table-column
+                                v-if="isColumnShow('source')"
+                                prop="source"
+                                label="来源"
+                                min-width="100">
+                        </el-table-column>
+                                                                
+                                            <el-table-column
+                                v-if="isColumnShow('collected')"
+                                prop="collected"
+                                label="已领取"
+                                min-width="100">
+                        </el-table-column>
+                                                                
+                                            <el-table-column
+                                v-if="isColumnShow('transferred')"
+                                prop="transferred"
+                                label="已转赠"
+                                min-width="100">
+                        </el-table-column>
+                                                                
+                                            <el-table-column
+                                v-if="isColumnShow('collectUser')"
+                                prop="collectUser"
+                                label="获奖人"
+                                min-width="100">
+                        </el-table-column>
+                                                                
+                                            <el-table-column
+                                v-if="isColumnShow('transferUser')"
+                                prop="transferUser"
+                                label="转赠人"
+                                min-width="100">
+                        </el-table-column>
+                                                                
+                                            <el-table-column
+                                v-if="isColumnShow('createdTime')"
+                                prop="createdTime"
+                                label="创建时间"
+                                :formatter="DateTimeFormatter"
+                                min-width="100">
+                        </el-table-column>
+                                                                
+                                            <el-table-column
+                                v-if="isColumnShow('collectTime')"
+                                prop="collectTime"
+                                label="领取时间"
+                                :formatter="DateTimeFormatter"
+                                min-width="100">
+                        </el-table-column>
+                                                                
+                                            <el-table-column
+                                v-if="isColumnShow('transferTime')"
+                                prop="transferTime"
+                                label="转赠时间"
+                                :formatter="DateTimeFormatter"
+                                min-width="100">
+                        </el-table-column>
+                                                                
+                                            <el-table-column
+                                v-if="isColumnShow('shipped')"
+                                prop="shipped"
+                                label="发货"
+                                min-width="100">
+                        </el-table-column>
+                                                                
+                                            <el-table-column
+                                v-if="isColumnShow('shippedTime')"
+                                prop="shippedTime"
+                                label="发货时间"
+                                :formatter="DateTimeFormatter"
+                                min-width="100">
+                        </el-table-column>
+                                                                
+                                            <el-table-column
+                                v-if="isColumnShow('trackingNumber')"
+                                prop="trackingNumber"
+                                label="物流单号"
+                                min-width="100">
+                        </el-table-column>
+                                                                
+                                            <el-table-column
+                                v-if="isColumnShow('isCheckin')"
+                                prop="isCheckin"
+                                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="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>
@@ -202,14 +227,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">
@@ -323,112 +348,117 @@
                 filter1: '',
                 filter2: '',
                 tableColumns: [
-                    {
-                        label: '名称',
-                        value: 'name',
-                        show: true
-                    },
-                    {
-                        label: '价格',
-                        value: 'price',
-                        show: true
-                    },
-                    {
-                        label: '封面',
-                        value: 'cover',
-                        show: true
-                    },
-                    {
-                        label: '图片',
-                        value: 'pic',
-                        show: true
-                    },
-                    {
-                        label: '详情',
-                        value: 'detail',
-                        show: true
-                    },
-                    {
-                        label: '积分',
-                        value: 'integral',
-                        show: true
-                    },
-                    {
-                        label: '门槛',
-                        value: 'threshold',
-                        show: true
-                    },
-                    {
-                        label: '类型',
-                        value: 'type',
-                        show: true
-                    },
-                    {
-                        label: '用户id',
-                        value: 'userId',
-                        show: true
-                    },
-                    {
-                        label: '公司id',
-                        value: 'companyId',
-                        show: true
-                    },
-                    {
-                        label: '来源',
-                        value: 'source',
-                        show: true
-                    },
-                    {
-                        label: '已领取',
-                        value: 'collected',
-                        show: true
-                    },
-                    {
-                        label: '已转赠',
-                        value: 'transferred',
-                        show: true
-                    },
-                    {
-                        label: '获奖人',
-                        value: 'collectUser',
-                        show: true
-                    },
-                    {
-                        label: '转赠人',
-                        value: 'transferUser',
-                        show: true
-                    },
-                    {
-                        label: '创建时间',
-                        value: 'createdTime',
-                        show: true
-                    },
-                    {
-                        label: '领取时间',
-                        value: 'collectTime',
-                        show: true
-                    },
-                    {
-                        label: '转赠时间',
-                        value: 'transferTime',
-                        show: true
-                    },
-                    {
-                        label: '发货',
-                        value: 'shipped',
-                        show: true
-                    },
-                    {
-                        label: '发货时间',
-                        value: 'shippedTime',
-                        show: true
-                    },
-                    {
-                        label: '物流单号',
-                        value: 'trackingNumber',
-                        show: true
-                    },
-                ],
+                                                                                                                                                                {
+                                label: '名称',
+                                value: 'name',
+                                show: true
+                            },
+                                                                                                {
+                                label: '价格',
+                                value: 'price',
+                                show: true
+                            },
+                                                                                                {
+                                label: '封面',
+                                value: 'cover',
+                                show: true
+                            },
+                                                                                                {
+                                label: '图片',
+                                value: 'pic',
+                                show: true
+                            },
+                                                                                                {
+                                label: '详情',
+                                value: 'detail',
+                                show: true
+                            },
+                                                                                                {
+                                label: '积分',
+                                value: 'integral',
+                                show: true
+                            },
+                                                                                                {
+                                label: '门槛',
+                                value: 'threshold',
+                                show: true
+                            },
+                                                                                                {
+                                label: '类型',
+                                value: 'type',
+                                show: true
+                            },
+                                                                                                {
+                                label: '用户id',
+                                value: 'userId',
+                                show: true
+                            },
+                                                                                                {
+                                label: '公司id',
+                                value: 'companyId',
+                                show: true
+                            },
+                                                                                                {
+                                label: '来源',
+                                value: 'source',
+                                show: true
+                            },
+                                                                                                {
+                                label: '已领取',
+                                value: 'collected',
+                                show: true
+                            },
+                                                                                                {
+                                label: '已转赠',
+                                value: 'transferred',
+                                show: true
+                            },
+                                                                                                {
+                                label: '获奖人',
+                                value: 'collectUser',
+                                show: true
+                            },
+                                                                                                {
+                                label: '转赠人',
+                                value: 'transferUser',
+                                show: true
+                            },
+                                                                                                {
+                                label: '创建时间',
+                                value: 'createdTime',
+                                show: true
+                            },
+                                                                                                {
+                                label: '领取时间',
+                                value: 'collectTime',
+                                show: true
+                            },
+                                                                                                {
+                                label: '转赠时间',
+                                value: 'transferTime',
+                                show: true
+                            },
+                                                                                                {
+                                label: '发货',
+                                value: 'shipped',
+                                show: true
+                            },
+                                                                                                {
+                                label: '发货时间',
+                                value: 'shippedTime',
+                                show: true
+                            },
+                                                                                                {
+                                label: '物流单号',
+                                value: 'trackingNumber',
+                                show: true
+                            },
+                                                                                                {
+                                label: '签到礼品',
+                                value: 'isCheckin',
+                                show: true
+                            },
+                                                            ],
                 multipleMode: false,
                 showAdvancedQueryDialog: false,
                 advancedQueryFields: [],
@@ -436,91 +466,95 @@
                 tableSortFields: [],
                 searchMethods: ['=', '!=', '>', '>=', '<', '<=', 'like'],
                 advancedQueryColumns: [
-                    {
-                        label: '名称',
-                        value: 'name'
-                    },
-                    {
-                        label: '价格',
-                        value: 'price'
-                    },
-                    {
-                        label: '封面',
-                        value: 'cover'
-                    },
-                    {
-                        label: '图片',
-                        value: 'pic'
-                    },
-                    {
-                        label: '详情',
-                        value: 'detail'
-                    },
-                    {
-                        label: '积分',
-                        value: 'integral'
-                    },
-                    {
-                        label: '门槛',
-                        value: 'threshold'
-                    },
-                    {
-                        label: '类型',
-                        value: 'type'
-                    },
-                    {
-                        label: '用户id',
-                        value: 'user_id'
-                    },
-                    {
-                        label: '公司id',
-                        value: 'company_id'
-                    },
-                    {
-                        label: '来源',
-                        value: 'source'
-                    },
-                    {
-                        label: '已领取',
-                        value: 'collected'
-                    },
-                    {
-                        label: '已转赠',
-                        value: 'transferred'
-                    },
-                    {
-                        label: '获奖人',
-                        value: 'collect_user'
-                    },
-                    {
-                        label: '转赠人',
-                        value: 'transfer_user'
-                    },
-                    {
-                        label: '创建时间',
-                        value: 'created_time'
-                    },
-                    {
-                        label: '领取时间',
-                        value: 'collect_time'
-                    },
-                    {
-                        label: '转赠时间',
-                        value: 'transfer_time'
-                    },
-                    {
-                        label: '发货',
-                        value: 'shipped'
-                    },
-                    {
-                        label: '发货时间',
-                        value: 'shipped_time'
-                    },
-                    {
-                        label: '物流单号',
-                        value: 'tracking_number'
-                    },
-                ],
+                                                                                                                                                                {
+                                label: '名称',
+                                value: 'name'
+                            },
+                                                                                                {
+                                label: '价格',
+                                value: 'price'
+                            },
+                                                                                                {
+                                label: '封面',
+                                value: 'cover'
+                            },
+                                                                                                {
+                                label: '图片',
+                                value: 'pic'
+                            },
+                                                                                                {
+                                label: '详情',
+                                value: 'detail'
+                            },
+                                                                                                {
+                                label: '积分',
+                                value: 'integral'
+                            },
+                                                                                                {
+                                label: '门槛',
+                                value: 'threshold'
+                            },
+                                                                                                {
+                                label: '类型',
+                                value: 'type'
+                            },
+                                                                                                {
+                                label: '用户id',
+                                value: 'user_id'
+                            },
+                                                                                                {
+                                label: '公司id',
+                                value: 'company_id'
+                            },
+                                                                                                {
+                                label: '来源',
+                                value: 'source'
+                            },
+                                                                                                {
+                                label: '已领取',
+                                value: 'collected'
+                            },
+                                                                                                {
+                                label: '已转赠',
+                                value: 'transferred'
+                            },
+                                                                                                {
+                                label: '获奖人',
+                                value: 'collect_user'
+                            },
+                                                                                                {
+                                label: '转赠人',
+                                value: 'transfer_user'
+                            },
+                                                                                                {
+                                label: '创建时间',
+                                value: 'created_time'
+                            },
+                                                                                                {
+                                label: '领取时间',
+                                value: 'collect_time'
+                            },
+                                                                                                {
+                                label: '转赠时间',
+                                value: 'transfer_time'
+                            },
+                                                                                                {
+                                label: '发货',
+                                value: 'shipped'
+                            },
+                                                                                                {
+                                label: '发货时间',
+                                value: 'shipped_time'
+                            },
+                                                                                                {
+                                label: '物流单号',
+                                value: 'tracking_number'
+                            },
+                                                                                                {
+                                label: '签到礼品',
+                                value: 'is_checkin'
+                            },
+                                                            ],
                 advancedQuerySearchKey: '',
                 orderByStr: '',
                 imgSrc: '',
@@ -670,7 +704,7 @@
             },
             exportExcel() {
                 window.location.href = this.$baseUrl + "/awardInfo/exportExcel?searchKey="
-                    + this.filter1 + "&advancedQuery=" + this.advancedQuerySearchKey + "&orderByStr=" + this.orderByStr;
+                        + this.filter1 + "&advancedQuery=" + this.advancedQuerySearchKey+"&orderByStr=" + this.orderByStr;
             },
             searchData() {
                 this.currentPage = 1;

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

@@ -86,7 +86,7 @@
                 },
                 rules: {
                 },
-            typeOptions:[{"label":"任务","value":1},{"label":"签到","value":2},{"label":"发布奖品","value":3},{"label":"领取奖品","value":4},{"label":"系统","value":5},{"label":"充值","value":6},{"label":"抽奖","value":7}],
+            typeOptions:[{"label":"任务","value":1},{"label":"签到","value":2},{"label":"发布奖品","value":3},{"label":"领取奖品","value":4},{"label":"系统","value":5},{"label":"充值","value":6},{"label":"抽奖","value":7},{"label":"分享","value":8}],
                 subColumn: '',
                 subValue: '',
             }

+ 154 - 0
src/main/vue/src/pages/ShareRecord.vue

@@ -0,0 +1,154 @@
+<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="userId" label="用户id">
+                <el-input v-model="formData.userId" :disabled="'userId'==subColumn"></el-input>
+            </el-form-item>
+            <el-form-item prop="linkId" label="关联id">
+                <el-input v-model="formData.linkId" :disabled="'linkId'==subColumn"></el-input>
+            </el-form-item>
+            <el-form-item prop="createTime" label="创建时间">
+                <el-input v-model="formData.createTime" :disabled="'createTime'==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: 'ShareRecord',
+        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: '/shareRecord/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: '/shareRecord/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 ? '/shareRecord/update' : '/shareRecord/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: '/shareRecord/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>

+ 440 - 0
src/main/vue/src/pages/ShareRecords.vue

@@ -0,0 +1,440 @@
+<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:'/shareRecord',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('userId')"
+                                prop="userId"
+                                label="用户id"
+                                min-width="100">
+                        </el-table-column>
+                                                                
+                                            <el-table-column
+                                v-if="isColumnShow('linkId')"
+                                prop="linkId"
+                                label="关联id"
+                                min-width="100">
+                        </el-table-column>
+                                                                
+                                            <el-table-column
+                                v-if="isColumnShow('createTime')"
+                                prop="createTime"
+                                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: 'ShareRecords',
+        created() {
+            this.getData();
+        },
+        data() {
+            return {
+                totalNumber: 0,
+                totalPage: 10,
+                currentPage: 1,
+                pageSize: 20,
+                tableData: [],
+                filter1: '',
+                filter2: '',
+                tableColumns: [
+                                                                                                                                                                {
+                                label: '用户id',
+                                value: 'userId',
+                                show: true
+                            },
+                                                                                                {
+                                label: '关联id',
+                                value: 'linkId',
+                                show: true
+                            },
+                                                                                                {
+                                label: '创建时间',
+                                value: 'createTime',
+                                show: true
+                            },
+                                                            ],
+                multipleMode: false,
+                showAdvancedQueryDialog: false,
+                advancedQueryFields: [],
+                showTableSortDialog: false,
+                tableSortFields: [],
+                searchMethods: ['=', '!=', '>', '>=', '<', '<=', 'like'],
+                advancedQueryColumns: [
+                                                                                                                                                                {
+                                label: '用户id',
+                                value: 'user_id'
+                            },
+                                                                                                {
+                                label: '关联id',
+                                value: 'link_id'
+                            },
+                                                                                                {
+                                label: '创建时间',
+                                value: 'create_time'
+                            },
+                                                            ],
+                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: '/shareRecord/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: '/shareRecord',
+                    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 + "/shareRecord/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: '/shareRecord/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>

+ 176 - 0
src/main/vue/src/pages/SupplyInfo.vue

@@ -0,0 +1,176 @@
+<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="cover" label="封面">
+                            <single-upload v-model="formData.cover" :disabled="'cover'==subColumn"></single-upload>
+            </el-form-item>
+            <el-form-item prop="pic" label="图片">
+                            <multi-upload v-model="formData.pic" :disabled="'pic'==subColumn"></multi-upload>
+            </el-form-item>
+            <el-form-item prop="detail" label="详情">
+                            <rich-text
+                                    v-model="formData.detail"
+                                    :disabled="'detail'==subColumn">
+                            </rich-text>
+            </el-form-item>
+            <el-form-item prop="stock" label="库存">
+                <el-input type="number" v-model="formData.stock" :disabled="'stock'==subColumn"></el-input>
+            </el-form-item>
+            <el-form-item prop="createTime" label="创建时间">
+                <el-input v-model="formData.createTime" disabled></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: 'SupplyInfo',
+        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: '/supplyInfo/getOne',
+                    data: {
+                        id: this.$route.query.id
+                    }
+                }).then(res => {
+                    if (res.success) {
+                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    if(res.data.createTime){
+                                    res.data.createTime = format(new Date(res.data.createTime), 'YYYY/MM/DD HH:mm', { locale: zh });
+                                }
+                                                                                                        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: {
+createTime:format(new Date(), 'YYYY/MM/DD HH:mm', { locale: zh }),
+                },
+                rules: {
+                    name: [
+                        {required: true, message: '请输入 名称', trigger: 'blur'},
+                    ],
+                },
+                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: '/supplyInfo/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};
+
+                                                                                                                                                if(data.createTime){
+                    data.createTime = Date.parse(new Date(data.createTime));
+                }
+                
+                this.$http.post({
+                    url: this.formData.id ? '/supplyInfo/update' : '/supplyInfo/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: '/supplyInfo/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>

+ 493 - 0
src/main/vue/src/pages/SupplyInfos.vue

@@ -0,0 +1,493 @@
+<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:'/supplyInfo',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('cover')"
+                                prop="cover"
+                                label="封面"
+                                min-width="100">
+                            <template slot-scope="{row}">
+                                <img :src="row.cover" @click="showImg(row.cover)" style="width: 100px;height: 100px;vertical-align: middle;" />
+                            </template>
+
+                        </el-table-column>
+                                                                
+                                            <el-table-column
+                                v-if="isColumnShow('pic')"
+                                prop="pic"
+                                label="图片"
+                                min-width="100">
+                        </el-table-column>
+                                                                
+                                            <el-table-column
+                                v-if="isColumnShow('detail')"
+                                prop="detail"
+                                label="详情"
+                                min-width="100">
+                        </el-table-column>
+                                                                
+                                            <el-table-column
+                                v-if="isColumnShow('stock')"
+                                prop="stock"
+                                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
+                    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: 'SupplyInfos',
+        created() {
+            this.getData();
+        },
+        data() {
+            return {
+                totalNumber: 0,
+                totalPage: 10,
+                currentPage: 1,
+                pageSize: 20,
+                tableData: [],
+                filter1: '',
+                filter2: '',
+                tableColumns: [
+                                                                                                                                                                {
+                                label: '名称',
+                                value: 'name',
+                                show: true
+                            },
+                                                                                                {
+                                label: '封面',
+                                value: 'cover',
+                                show: true
+                            },
+                                                                                                {
+                                label: '图片',
+                                value: 'pic',
+                                show: true
+                            },
+                                                                                                {
+                                label: '详情',
+                                value: 'detail',
+                                show: true
+                            },
+                                                                                                {
+                                label: '库存',
+                                value: 'stock',
+                                show: true
+                            },
+                                                                                                {
+                                label: '创建时间',
+                                value: 'createTime',
+                                show: true
+                            },
+                                                            ],
+                multipleMode: false,
+                showAdvancedQueryDialog: false,
+                advancedQueryFields: [],
+                showTableSortDialog: false,
+                tableSortFields: [],
+                searchMethods: ['=', '!=', '>', '>=', '<', '<=', 'like'],
+                advancedQueryColumns: [
+                                                                                                                                                                {
+                                label: '名称',
+                                value: 'name'
+                            },
+                                                                                                {
+                                label: '封面',
+                                value: 'cover'
+                            },
+                                                                                                {
+                                label: '图片',
+                                value: 'pic'
+                            },
+                                                                                                {
+                                label: '详情',
+                                value: 'detail'
+                            },
+                                                                                                {
+                                label: '库存',
+                                value: 'stock'
+                            },
+                                                                                                {
+                                label: '创建时间',
+                                value: 'create_time'
+                            },
+                                                            ],
+                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: '/supplyInfo/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: '/supplyInfo',
+                    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 + "/supplyInfo/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: '/supplyInfo/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>

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

@@ -214,6 +214,26 @@ const router = new Router({
                     path: '/drawRecords',
                     name: 'DrawRecords',
                     component: () => import('../pages/DrawRecords')
+                },
+                {
+                    path: '/shareRecord',
+                    name: 'ShareRecord',
+                    component: () => import('../pages/ShareRecord')
+                },
+                {
+                    path: '/shareRecords',
+                    name: 'ShareRecords',
+                    component: () => import('../pages/ShareRecords')
+                },
+                {
+                    path: '/supplyInfo',
+                    name: 'SupplyInfo',
+                    component: () => import('../pages/SupplyInfo')
+                },
+                {
+                    path: '/supplyInfos',
+                    name: 'SupplyInfos',
+                    component: () => import('../pages/SupplyInfos')
                 }
                 /**INSERT_LOCATION**/
             ]

Неке датотеке нису приказане због велике количине промена