Sfoglia il codice sorgente

20190313添加展项类型

suochencheng 7 anni fa
parent
commit
dac33ab5d8

+ 41 - 0
src/main/java/com/izouma/awesomeadmin/constant/AppConstant.java

@@ -293,4 +293,45 @@ public interface AppConstant {
          */
         String PHYSICAL = "1";
     }
+
+
+    /**
+     * 金融数据类型
+     */
+    public interface FinancialDataType {
+
+        /**
+         * 金融大数据
+         */
+        Integer jin_rong_da_shu_ju = 0;
+
+        /**
+         * 安全管家
+         */
+        Integer an_quan_guan_jia = 1;
+        /**
+         * 超级账户
+         */
+        Integer chao_ji_zhang_hu = 2;
+
+        /**
+         * 全景行情
+         */
+        Integer quan_jing_hang_qing = 3;
+
+        /**
+         * 严选理财
+         */
+        Integer yan_xuan_li_cai = 4;
+        /**
+         * 涨乐u会员
+         */
+        Integer zhang_le_u_hui_yuan = 5;
+
+        /**
+         * 智能家族
+         */
+        Integer zhi_neng_jia_zu = 6;
+    }
+
 }

+ 164 - 135
src/main/java/com/izouma/awesomeadmin/dao/FinancialDataMapper.xml

@@ -1,17 +1,18 @@
 <?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.FinancialDataMapper" >
-    <resultMap id="BaseResultMap" type="com.izouma.awesomeadmin.model.FinancialData" >
-                <id column="id" property="id" jdbcType="INTEGER" />
-                                        <result column="del_flag" property="delFlag" jdbcType="CHAR" />
-                                <result column="update_time" property="updateTime" jdbcType="TIMESTAMP" />
-                                <result column="update_user" property="updateUser" jdbcType="VARCHAR" />
-                                <result column="create_time" property="createTime" jdbcType="TIMESTAMP" />
-                                <result column="create_user" property="createUser" jdbcType="VARCHAR" />
-                                <result column="station_id" property="stationId" jdbcType="INTEGER" />
-            </resultMap>
-    <sql id="Base_Column_List" >
-        <trim  suffixOverrides="," >
+<mapper namespace="com.izouma.awesomeadmin.dao.FinancialDataMapper">
+    <resultMap id="BaseResultMap" type="com.izouma.awesomeadmin.model.FinancialData">
+        <id column="id" property="id" jdbcType="INTEGER"/>
+        <result column="del_flag" property="delFlag" jdbcType="CHAR"/>
+        <result column="update_time" property="updateTime" jdbcType="TIMESTAMP"/>
+        <result column="update_user" property="updateUser" jdbcType="VARCHAR"/>
+        <result column="create_time" property="createTime" jdbcType="TIMESTAMP"/>
+        <result column="create_user" property="createUser" jdbcType="VARCHAR"/>
+        <result column="station_id" property="stationId" jdbcType="INTEGER"/>
+        <result column="type_flag" property="typeFlag" jdbcType="INTEGER"/>
+    </resultMap>
+    <sql id="Base_Column_List">
+        <trim suffixOverrides=",">
             id,
 
             del_flag,
@@ -26,92 +27,104 @@
 
             station_id,
 
-            </trim>
+            type_flag,
+
+        </trim>
     </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 financial_data
         where id = #{id,jdbcType=INTEGER}
     </select>
-    <delete id="deleteByPrimaryKey" parameterType="java.lang.Integer" >
+    <delete id="deleteByPrimaryKey" parameterType="java.lang.Integer">
         delete from financial_data
         where id = #{id,jdbcType=INTEGER}
     </delete>
-    <insert id="insertSelective" parameterType="com.izouma.awesomeadmin.model.FinancialData" useGeneratedKeys="true" keyProperty="id">
+    <insert id="insertSelective" parameterType="com.izouma.awesomeadmin.model.FinancialData" useGeneratedKeys="true"
+            keyProperty="id">
         insert into financial_data
-        <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="updateTime!= null" >
+            <if test="updateTime!= null">
                 update_time,
             </if>
-                <if test="updateUser!= null" >
+            <if test="updateUser!= null">
                 update_user,
             </if>
-                <if test="createTime!= null" >
+            <if test="createTime!= null">
                 create_time,
             </if>
-                <if test="createUser!= null" >
+            <if test="createUser!= null">
                 create_user,
             </if>
-                <if test="stationId!= null" >
+            <if test="stationId!= null">
                 station_id,
             </if>
-            </trim>
-        <trim prefix="values (" suffix=")" suffixOverrides="," >
-                    <if test="id != null" >
+            <if test="typeFlag!= null">
+                type_flag,
+            </if>
+        </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="updateTime != null" >
+            <if test="updateTime != null">
                 #{updateTime,jdbcType=TIMESTAMP},
             </if>
-                    <if test="updateUser != null" >
+            <if test="updateUser != null">
                 #{updateUser,jdbcType=VARCHAR},
             </if>
-                    <if test="createTime != null" >
+            <if test="createTime != null">
                 #{createTime,jdbcType=TIMESTAMP},
             </if>
-                    <if test="createUser != null" >
+            <if test="createUser != null">
                 #{createUser,jdbcType=VARCHAR},
             </if>
-                    <if test="stationId != null" >
+            <if test="stationId != null">
                 #{stationId,jdbcType=INTEGER},
             </if>
-                </trim>
+            <if test="typeFlag != null">
+                #{typeFlag,jdbcType=INTEGER},
+            </if>
+        </trim>
     </insert>
-    <update id="updateByPrimaryKeySelective" parameterType="com.izouma.awesomeadmin.model.FinancialData" >
+    <update id="updateByPrimaryKeySelective" parameterType="com.izouma.awesomeadmin.model.FinancialData">
         update financial_data
-        <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>
-                     <if test="delFlag != null" >
-               del_flag= #{delFlag,jdbcType=CHAR},
+            <if test="updateTime != null">
+                update_time= #{updateTime,jdbcType=TIMESTAMP},
             </if>
-                     <if test="updateTime != null" >
-               update_time= #{updateTime,jdbcType=TIMESTAMP},
+            <if test="updateUser != null">
+                update_user= #{updateUser,jdbcType=VARCHAR},
             </if>
-                     <if test="updateUser != null" >
-               update_user= #{updateUser,jdbcType=VARCHAR},
+            <if test="createTime != null">
+                create_time= #{createTime,jdbcType=TIMESTAMP},
             </if>
-                     <if test="createTime != null" >
-               create_time= #{createTime,jdbcType=TIMESTAMP},
+            <if test="createUser != null">
+                create_user= #{createUser,jdbcType=VARCHAR},
             </if>
-                     <if test="createUser != null" >
-               create_user= #{createUser,jdbcType=VARCHAR},
+            <if test="stationId != null">
+                station_id= #{stationId,jdbcType=INTEGER},
             </if>
-                     <if test="stationId != null" >
-               station_id= #{stationId,jdbcType=INTEGER},
+            <if test="typeFlag != null">
+                type_flag= #{typeFlag,jdbcType=INTEGER},
             </if>
-                 </set>
+        </set>
         where
         <if test="id != null and !&quot;&quot;.equals(id)">
             id = #{id,jdbcType=INTEGER}
@@ -126,39 +139,45 @@
         </if>
 
     </update>
-    <select id="queryFinancialDataByPage" parameterType="java.util.Map" resultType="com.izouma.awesomeadmin.model.FinancialData">
-        select <include refid="Base_Column_List"/> from financial_data
+    <select id="queryFinancialDataByPage" parameterType="java.util.Map"
+            resultType="com.izouma.awesomeadmin.model.FinancialData">
+        select
+        <include refid="Base_Column_List"/>
+        from financial_data
         <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 test="record.delFlag != null and !&quot;&quot;.equals(record.delFlag)">
+                and del_flag = #{record.delFlag}
             </if>
-                     <if test="record.updateTime != null and !&quot;&quot;.equals(record.updateTime)">
-                and  update_time = #{record.updateTime}
+            <if test="record.updateTime != null and !&quot;&quot;.equals(record.updateTime)">
+                and update_time = #{record.updateTime}
             </if>
-                     <if test="record.updateUser != null and !&quot;&quot;.equals(record.updateUser)">
-                and  update_user = #{record.updateUser}
+            <if test="record.updateUser != null and !&quot;&quot;.equals(record.updateUser)">
+                and update_user = #{record.updateUser}
             </if>
-                     <if test="record.createTime != null and !&quot;&quot;.equals(record.createTime)">
-                and  create_time = #{record.createTime}
+            <if test="record.createTime != null and !&quot;&quot;.equals(record.createTime)">
+                and create_time = #{record.createTime}
             </if>
-                     <if test="record.createUser != null and !&quot;&quot;.equals(record.createUser)">
-                and  create_user = #{record.createUser}
+            <if test="record.createUser != null and !&quot;&quot;.equals(record.createUser)">
+                and create_user = #{record.createUser}
             </if>
-                     <if test="record.stationId != null and !&quot;&quot;.equals(record.stationId)">
-                and  station_id = #{record.stationId}
+            <if test="record.stationId != null and !&quot;&quot;.equals(record.stationId)">
+                and station_id = #{record.stationId}
+            </if>
+            <if test="record.typeFlag != null and !&quot;&quot;.equals(record.typeFlag)">
+                and type_flag = #{record.typeFlag}
+            </if>
+            <if test="record.searchKey != null and !&quot;&quot;.equals(record.searchKey)">
+                <trim prefix="and (" suffix=")" prefixOverrides="OR">
+                    OR station_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  station_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('_;')">
@@ -212,73 +231,79 @@
         </if>
         id desc
     </select>
-    <select id="queryAllFinancialData" parameterType="java.util.Map" resultType="com.izouma.awesomeadmin.model.FinancialData">
-        select <include refid="Base_Column_List"/> from financial_data
+    <select id="queryAllFinancialData" parameterType="java.util.Map"
+            resultType="com.izouma.awesomeadmin.model.FinancialData">
+        select
+        <include refid="Base_Column_List"/>
+        from financial_data
         <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="updateTime != null and !&quot;&quot;.equals(updateTime)">
-                and  update_time = #{updateTime}
+            <if test="updateTime != null and !&quot;&quot;.equals(updateTime)">
+                and update_time = #{updateTime}
             </if>
-                    <if test="updateUser != null and !&quot;&quot;.equals(updateUser)">
-                and  update_user = #{updateUser}
+            <if test="updateUser != null and !&quot;&quot;.equals(updateUser)">
+                and update_user = #{updateUser}
             </if>
-                    <if test="createTime != null and !&quot;&quot;.equals(createTime)">
-                and  create_time = #{createTime}
+            <if test="createTime != null and !&quot;&quot;.equals(createTime)">
+                and create_time = #{createTime}
+            </if>
+            <if test="createUser != null and !&quot;&quot;.equals(createUser)">
+                and create_user = #{createUser}
             </if>
-                    <if test="createUser != null and !&quot;&quot;.equals(createUser)">
-                and  create_user = #{createUser}
+            <if test="stationId != null and !&quot;&quot;.equals(stationId)">
+                and station_id = #{stationId}
             </if>
-                    <if test="stationId != null and !&quot;&quot;.equals(stationId)">
-                and  station_id = #{stationId}
+            <if test="typeFlag != null and !&quot;&quot;.equals(typeFlag)">
+                and type_flag = #{typeFlag}
             </if>
-                    <if test="searchKey != null and !&quot;&quot;.equals(searchKey)">
-                <trim prefix="and (" suffix=")" prefixOverrides="OR" >
-                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                OR  station_id LIKE concat('%',#{searchKey},'%')
-                                                                                        </trim>
+            <if test="searchKey != null and !&quot;&quot;.equals(searchKey)">
+                <trim prefix="and (" suffix=")" prefixOverrides="OR">
+                    OR station_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>
-
-                    <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>
-            </otherwise>
-        </choose>
+                                <if test="detailIndex &lt; 3">
+                                    ${itemDetail}
+                                </if>
+
+                            </foreach>
+                        </otherwise>
+                    </choose>
 
 
-    </foreach>
+                </foreach>
 
 
-</if>
+            </if>
         </where>
         order by
 
@@ -298,31 +323,33 @@
         id desc
     </select>
     <select id="queryFinancialData" parameterType="java.util.Map" resultMap="dataMap">
-        select <include refid="Base_Column_List"/> , 1 as app_type , 0 as video_type from financial_data
+        select
+        <include refid="Base_Column_List"/>
+        , 1 as app_type , 0 as video_type from financial_data
         <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="updateTime != null and !&quot;&quot;.equals(updateTime)">
+            <if test="updateTime != null and !&quot;&quot;.equals(updateTime)">
                 and update_time = #{updateTime}
             </if>
-                     <if test="updateUser != null and !&quot;&quot;.equals(updateUser)">
+            <if test="updateUser != null and !&quot;&quot;.equals(updateUser)">
                 and update_user = #{updateUser}
             </if>
-                     <if test="createTime != null and !&quot;&quot;.equals(createTime)">
+            <if test="createTime != null and !&quot;&quot;.equals(createTime)">
                 and create_time = #{createTime}
             </if>
-                     <if test="createUser != null and !&quot;&quot;.equals(createUser)">
+            <if test="createUser != null and !&quot;&quot;.equals(createUser)">
                 and create_user = #{createUser}
             </if>
-                     <if test="stationId != null and !&quot;&quot;.equals(stationId)">
+            <if test="stationId != null and !&quot;&quot;.equals(stationId)">
                 and station_id = #{stationId}
             </if>
-         
+
         </where>
         LIMIT 1
     </select>
@@ -342,10 +369,12 @@
         </if>
     </update>
     <select id="query" parameterType="java.util.Map" resultType="com.izouma.awesomeadmin.model.FinancialData">
-        select <include refid="Base_Column_List"/> from financial_data
+        select
+        <include refid="Base_Column_List"/>
+        from financial_data
         <where>
             and del_flag = 'N'
-                                                                                                                                                                                                                                                                                                                                                                                                                            </where>
+        </where>
         order by id desc
     </select>
 
@@ -353,11 +382,11 @@
         <association property="app" javaType="com.izouma.awesomeadmin.model.FileInfo"
                      select="com.izouma.awesomeadmin.dao.FileInfoMapper.queryFileInfo"
                      column="{fatherId =  id ,type = app_type }">
-     </association>
+        </association>
 
-      <collection property="video" ofType="com.izouma.awesomeadmin.model.FileInfo"
-                select="com.izouma.awesomeadmin.dao.FileInfoMapper.queryAllFileInfo"
-                  column="{fatherId =  id ,type = video_type}">
+        <collection property="video" ofType="com.izouma.awesomeadmin.model.FileInfo"
+                    select="com.izouma.awesomeadmin.dao.FileInfoMapper.queryAllFileInfo"
+                    column="{fatherId =  id ,type = video_type}">
         </collection>
     </resultMap>
 </mapper>

+ 65 - 47
src/main/java/com/izouma/awesomeadmin/model/FinancialData.java

@@ -1,13 +1,14 @@
 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 FinancialData{
+public class FinancialData {
     private Integer id;
     private String delFlag;
     private Date updateTime;
@@ -23,15 +24,20 @@ public class FinancialData{
 
     private String searchKey;
 
-/**
-* and,test_name,like,value;or,remark,=,123
-*/
-private String advancedQuery;
+    /**
+     * and,test_name,like,value;or,remark,=,123
+     */
+    private String advancedQuery;
+
+    /**
+     * column_name_,desc_;column_name_,asc
+     */
+    private String orderByStr;
 
-/**
-* column_name_,desc_;column_name_,asc
-*/
-private String orderByStr;
+    /**
+     * 数据类型
+     */
+    private Integer typeFlag;
 
     public Integer getVersion() {
         return version;
@@ -41,87 +47,93 @@ private String orderByStr;
         this.version = version;
     }
 
-    public Integer getId(){
+    public Integer getId() {
         return this.id;
     }
 
-    public void setId(Integer id){
+    public void setId(Integer id) {
         this.id = id;
     }
-    public String getDelFlag(){
+
+    public String getDelFlag() {
         return this.delFlag;
     }
 
-    public void setDelFlag(String delFlag){
+    public void setDelFlag(String delFlag) {
         this.delFlag = delFlag;
     }
-    public Date getUpdateTime(){
+
+    public Date getUpdateTime() {
         return this.updateTime;
     }
 
-    public void setUpdateTime(Date updateTime){
+    public void setUpdateTime(Date updateTime) {
         this.updateTime = updateTime;
     }
-    public String getUpdateUser(){
+
+    public String getUpdateUser() {
         return this.updateUser;
     }
 
-    public void setUpdateUser(String updateUser){
+    public void setUpdateUser(String updateUser) {
         this.updateUser = updateUser;
     }
-    public Date getCreateTime(){
+
+    public Date getCreateTime() {
         return this.createTime;
     }
 
-    public void setCreateTime(Date createTime){
+    public void setCreateTime(Date createTime) {
         this.createTime = createTime;
     }
-    public String getCreateUser(){
+
+    public String getCreateUser() {
         return this.createUser;
     }
 
-    public void setCreateUser(String createUser){
+    public void setCreateUser(String createUser) {
         this.createUser = createUser;
     }
-    public Integer getStationId(){
+
+    public Integer getStationId() {
         return this.stationId;
     }
 
-    public void setStationId(Integer stationId){
+    public void setStationId(Integer stationId) {
         this.stationId = stationId;
     }
 
-public String getSearchKey() {
-    return searchKey;
-}
+    public String getSearchKey() {
+        return searchKey;
+    }
 
-public void setSearchKey(String searchKey) {
-    this.searchKey = searchKey;
-}
+    public void setSearchKey(String searchKey) {
+        this.searchKey = searchKey;
+    }
 
-public String getAdvancedQuery() {
-    return advancedQuery;
-}
+    public String getAdvancedQuery() {
+        return advancedQuery;
+    }
 
-public void setAdvancedQuery(String advancedQuery) {
-    this.advancedQuery = advancedQuery;
-}
+    public void setAdvancedQuery(String advancedQuery) {
+        this.advancedQuery = advancedQuery;
+    }
 
-public String getOrderByStr() {
-    return orderByStr;
-}
+    public String getOrderByStr() {
+        return orderByStr;
+    }
 
-public void setOrderByStr(String orderByStr) {
-    this.orderByStr = orderByStr;
-}
+    public void setOrderByStr(String orderByStr) {
+        this.orderByStr = orderByStr;
+    }
 
-public String getIdStr() {
-    return idStr;
-}
+    public String getIdStr() {
+        return idStr;
+    }
 
-public void setIdStr(String idStr) {
-    this.idStr = idStr;
-}
+    public void setIdStr(String idStr) {
+        this.idStr = idStr;
+    }
 
     public List<FileInfo> getVideo() {
         return video;
@@ -139,6 +151,12 @@ public void setIdStr(String idStr) {
         this.app = app;
     }
 
+    public Integer getTypeFlag() {
+        return typeFlag;
+    }
 
+    public void setTypeFlag(Integer typeFlag) {
+        this.typeFlag = typeFlag;
+    }
 }
 

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

@@ -111,7 +111,7 @@ public class FinancialDataController {
             OperateHistory oh = new OperateHistory();
             oh.setUsername(userInfo.getUsername());
             oh.setStationId(Integer.parseInt(userInfo.getDepartId()));
-            oh.setContent("添加金融大数据: id="+record.getId());
+            oh.setContent("添加展项管理: id="+record.getId());
             operateHistoryService.createOperateHistory(oh);
 
         return new Result(true, record.getId());
@@ -133,7 +133,7 @@ public class FinancialDataController {
             OperateHistory oh = new OperateHistory();
             oh.setUsername(userInfo.getUsername());
             oh.setStationId(Integer.parseInt(userInfo.getDepartId()));
-            oh.setContent("更新金融大数据: id="+record.getId());
+            oh.setContent("更新展项管理: id="+record.getId());
             operateHistoryService.createOperateHistory(oh);
 
             return new Result(true, "保存成功");

+ 167 - 0
src/main/vue/src/pages/FileInfoForApp.vue

@@ -0,0 +1,167 @@
+<template>
+  <div>
+    <el-form :model="formData" :rules="rules" ref="form" label-width="80px" label-position="right" size="small" style="max-width: 500px;">
+      <el-form-item prop="url" label="资源地址">
+        <el-input v-model="formData.url" :disabled="true"></el-input>
+      </el-form-item>
+      <el-form-item prop="url" label="资源上传">
+        <el-upload class="upload-demo" :file-list="fileList" :multiple="false" :action="$baseUrl+'/assets/uploadFile'" :on-success="haleSuccess">
+          <el-button size="small" type="primary">点击上传</el-button>
+          <div slot="tip" class="el-upload__tip">文件大小限制</div>
+        </el-upload>
+      </el-form-item>
+      <el-form-item v-if="formData.type<0" prop="type" label="类型:0:data_video  1:data_app">
+        <template>
+          <el-select v-model="formData.type" clearable placeholder="请选择" :disabled="subType!=''">
+            <el-option v-for="item in typeOptions" :key="item.value" :label="item.label" :value="item.value"></el-option>
+          </el-select>
+        </template>
+      </el-form-item>
+      <el-form-item v-if="formData.type==0" prop="image" label="video配图">
+        <single-upload v-model="formData.image" :disabled="'imgUrl'==subColumn"></single-upload>
+      </el-form-item>
+      <el-form-item v-if="formData.type<0" prop="fatherId" label="父类id">
+        <el-input type="number" v-model="formData.fatherId" :disabled="'fatherId'==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>1" type="danger">删除</el-button>
+        <el-button @click="$router.go(-1)">取消</el-button>
+      </el-form-item>
+    </el-form>
+  </div>
+</template>
+<script>
+import formValidator from "../formValidator";
+
+export default {
+  created() {
+    if (this.$route.query.column) {
+      this.subColumn = this.$route.query.column.split(",")[1];
+      this.subValue = this.$route.query.column.split(",")[0];
+    }
+
+    if (this.$route.query.type >= 0) {
+      this.subType = this.$route.query.type;
+    }
+
+    if (this.subValue) {
+      this.$http
+        .get({
+          url: "/fileInfo/getOne",
+          data: {
+            fatherId: this.subValue
+          }
+        })
+        .then(res => {
+          if (res.success) {
+
+            if (res.data) {
+              this.formData = res.data;
+              var nameList = res.data.url.split("/");
+              var jsonp = {
+                name: nameList[nameList.length - 1],
+                url: res.data.url
+              };
+              this.fileList.push(jsonp);
+            }
+
+            if (this.$route.query.column) {
+              this.formData[this.subColumn] = this.subValue;
+            }
+
+
+            if (this.$route.query.type >= 0) {
+              this.formData.type = Number(this.subType);
+            }
+          }
+        });
+    } else {
+      if (this.$route.query.column) {
+        this.formData[this.subColumn] = this.subValue;
+      }
+
+      if (this.$route.query.type >= 0) {
+        this.formData.type = Number(this.subType);
+      }
+    }
+  },
+  data() {
+    return {
+      saving: false,
+      formData: {
+        url: '',
+      },
+      rules: {
+        url: [{ required: true, message: "请上传资源", trigger: "blur" }]
+      },
+      typeOptions: [{ value: 0, label: "video" }, { value: 1, label: "app" }],
+      subColumn: "",
+      subValue: "",
+      fileList: [],
+      subType: ""
+    };
+  },
+  methods: {
+    onSave() {
+      this.$refs.form.validate(valid => {
+        if (valid) {
+          this.submit();
+        } else {
+          return false;
+        }
+      });
+    },
+    submit() {
+      var data = JSON.parse(JSON.stringify(this.formData));
+      this.$http
+        .post({
+          url: this.formData.id ? "/fileInfo/update" : "/fileInfo/save",
+          data: data
+        })
+        .then(res => {
+          if (res.success) {
+            this.$message.success("成功");
+            this.$router.go(-1);
+          } else {
+            this.$message.warning("失败");
+          }
+        });
+    },
+    haleSuccess(file) {
+      // console.log(file)
+      file.data.forEach(item => {
+        var nameList = item.split("/");
+        var jsonp = {
+          name: nameList[nameList.length - 1],
+          url: item
+        };
+        this.fileList.splice(0, 1, jsonp);
+        this.formData.url = item;
+      });
+    },
+    onDelete() {
+      this.$alert("删除将无法恢复,确认要删除么?", "警告", { type: "error" })
+        .then(() => {
+          return this.$http.post({
+            url: "/fileInfo/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>

+ 274 - 275
src/main/vue/src/pages/FinancialDatas.vue

@@ -3,36 +3,18 @@
         <div class="filters-container">
 
         </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 :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 type="index" min-width="50" align="center">
             </el-table-column>
-            <el-table-column
-                v-if="isColumnShow('stationId')"
-                prop="stationId"
-                label="营业厅"
-                :formatter="stationFormatter"
-                min-width="100">
+            <el-table-column v-if="isColumnShow('stationId')" prop="stationId" label="营业厅" :formatter="stationFormatter" min-width="100">
             </el-table-column>
 
-            <el-table-column
-                label="操作"
-                align="center"
-                fixed="right"
-                min-width="150"
-            >
+            <el-table-column prop="typeFlag" label="展项类型" :formatter="typeFlagFormatter" min-width="100">
+            </el-table-column>
+
+            <el-table-column label="操作" align="center" fixed="right" min-width="150">
                 <template slot-scope="scope">
                     <el-button @click="editApp(scope.row)" type="primary" size="mini" plain>APP管理</el-button>
                     <el-button @click="editVideo(scope.row)" type="primary" size="mini" plain>video管理</el-button>
@@ -50,15 +32,7 @@
                     <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 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">
@@ -79,16 +53,14 @@
                     <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-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-option v-for="item in searchMethods" :label="item" :value="item" :key="item"></el-option>
                         </el-select>
                     </template>
                 </el-table-column>
@@ -118,8 +90,7 @@
                     <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-option v-for="item in advancedQueryColumns" :label="item.label" :value="item.value" :key="item.value"></el-option>
                         </el-select>
                     </template>
                 </el-table-column>
@@ -153,275 +124,303 @@
     </div>
 </template>
 <script>
-    import {mapState} from 'vuex'
-    import {format} from 'date-fns'
-    import zh from 'date-fns/locale/zh_cn'
-
-    export default {
-        created() {
+import { mapState } from 'vuex'
+import { format } from 'date-fns'
+import zh from 'date-fns/locale/zh_cn'
+
+export default {
+    created() {
+        this.getData();
+
+        this.$http.get({
+            url: '/stationInfo/all'
+        }).then(res => {
+            if (res.success) {
+                this.stations = res.data;
+            }
+        });
+    },
+    data() {
+        return {
+            totalNumber: 0,
+            totalPage: 10,
+            currentPage: 1,
+            stations: [],
+            pageSize: 20,
+            tableData: [],
+            filter1: '',
+            filter2: '',
+            tableColumns: [
+                {
+                    label: '运营点ID',
+                    value: 'stationId',
+                    show: true
+                },
+            ],
+            multipleMode: false,
+            showAdvancedQueryDialog: false,
+            advancedQueryFields: [],
+            showTableSortDialog: false,
+            tableSortFields: [],
+            searchMethods: ['=', '!=', '>', '>=', '<', '<=', 'like'],
+            advancedQueryColumns: [
+                {
+                    label: '运营点ID',
+                    value: 'station_id'
+                },
+            ],
+            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: '/stationInfo/all'
+                url: '/financialData/page',
+                data: data
             }).then(res => {
                 if (res.success) {
-                    this.stations = res.data;
+                    this.totalNumber = res.data.page.totalNumber;
+                    this.tableData = res.data.pp;
                 }
-            });
+            })
         },
-        data() {
-            return {
-                totalNumber: 0,
-                totalPage: 10,
-                currentPage: 1,
-                stations:[],
-                pageSize: 20,
-                tableData: [],
-                filter1: '',
-                filter2: '',
-                tableColumns: [
-                    {
-                        label: '运营点ID',
-                        value: 'stationId',
-                        show: true
-                    },
-                ],
-                multipleMode: false,
-                showAdvancedQueryDialog: false,
-                advancedQueryFields: [],
-                showTableSortDialog: false,
-                tableSortFields: [],
-                searchMethods: ['=', '!=', '>', '>=', '<', '<=', 'like'],
-                advancedQueryColumns: [
-                    {
-                        label: '运营点ID',
-                        value: 'station_id'
-                    },
-                ],
-                advancedQuerySearchKey: '',
-                orderByStr: '',
-                imgSrc: '',
-                imageDialogVisible: false,
-            }
+        isColumnShow(column) {
+            var row = this.tableColumns.find(i => i.value === column);
+            return row ? row.show : false;
         },
-        computed: {
-            ...mapState(['tableHeight']),
-            selection() {
-                return this.$refs.table.selection.map(i => i.id);
+        toggleMultipleMode(multipleMode) {
+            this.multipleMode = multipleMode;
+            if (!multipleMode) {
+                this.$refs.table.clearSelection();
             }
         },
-        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: '/financialData/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: '/financialData',
-                    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);
+        editRow(row) {
+            this.$router.push({
+                path: '/financialData',
+                query: {
+                    id: row.id,
+                    column: this.$route.query.column,
                 }
-            },
-            advancedQuery() {
+            })
+        },
+        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 = '';
+            this.advancedQuerySearchKey = '';
 
-                if (this.advancedQueryFields.length > 0) {
+            if (this.advancedQueryFields.length > 0) {
 
-                    var templist = [];
+                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);
-                        }
-                    })
+                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) {
+                if (templist.length > 0) {
 
-                        this.advancedQuerySearchKey = templist.join('_;');
-                    }
+                    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.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 = '';
+            this.orderByStr = '';
 
-                if (this.tableSortFields.length > 0) {
+            if (this.tableSortFields.length > 0) {
 
-                    var templist = [];
+                var templist = [];
 
-                    this.tableSortFields.forEach(item => {
-                        if (item.name && item.order) {
-                            var tempItem = item.name + '_,' + item.order;
-                            templist.push(tempItem);
-                        }
-                    })
+                this.tableSortFields.forEach(item => {
+                    if (item.name && item.order) {
+                        var tempItem = item.name + '_,' + item.order;
+                        templist.push(tempItem);
+                    }
+                })
 
-                    if (templist.length > 0) {
+                if (templist.length > 0) {
 
-                        this.orderByStr = templist.join('_;');
-                    }
+                    this.orderByStr = templist.join('_;');
                 }
+            }
 
-                this.getData();
-                this.showTableSortDialog = false;
-            },
-            exportExcel() {
-                window.location.href = this.$baseUrl + "/financialData/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: '/financialData/del',
-                        data: {id: row.id}
-                    })
-                }).then(() => {
-                    this.$message.success('删除成功');
-                    this.getData();
-                }).catch(action => {
-                    if (action === 'cancel') {
-                        this.$message.info('删除取消');
-                    } else {
-                        this.$message.error('删除失败');
-                    }
+            this.getData();
+            this.showTableSortDialog = false;
+        },
+        exportExcel() {
+            window.location.href = this.$baseUrl + "/financialData/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: '/financialData/del',
+                    data: { id: row.id }
                 })
-            },
-            DateTimeFormatter(row, column, cellValue) {
-                if (cellValue) {
-                    return format(cellValue, 'YYYY/MM/DD HH:mm', {locale: zh})
+            }).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 })
+            }
+
+        },
+        editApp(row) {
+            this.$router.push({
+                path: '/fileInfoForApp',
+                query: {
+                    column: row.id + ',fatherId',
+                    type: 1,
+                }
+            })
+        },
+        editVideo(row) {
+            this.$router.push({
+                path: '/fileInfos',
+                query: {
+                    column: row.id + ',fatherId',
+                    type: 0,
                 }
+            })
+        },
+        DateFormatter(row, column, cellValue) {
+            if (cellValue) {
+                return format(cellValue, 'YYYY/MM/DD', { locale: zh })
+            }
 
-            },
-            editApp(row) {
-                this.$router.push({
-                    path: '/fileInfo',
-                    query: {
-                        id: row.id,
-                        column: row.id + ',fatherId',
-                        type: 1,
-                    }
-                })
-            },
-            editVideo(row) {
-                this.$router.push({
-                    path: '/fileInfos',
-                    query: {
-                        id: row.id,
-                        column: row.id + ',fatherId',
-                        type: 0,
+        },
+        stationFormatter(row, column, cellValue) {
+            if (cellValue) {
+                var stationId = '';
+                this.stations.forEach(item => {
+                    if (item.id == Number(cellValue)) {
+                        stationId = item.stationName;
                     }
                 })
-            },
-            DateFormatter(row, column, cellValue) {
-                if (cellValue) {
-                    return format(cellValue, 'YYYY/MM/DD', {locale: zh})
-                }
 
-            },
-            stationFormatter(row, column, cellValue) {
-                if (cellValue) {
-                    var stationId = '';
-                    this.stations.forEach(item => {
-                        if (item.id == Number(cellValue)) {
-                            stationId = item.stationName;
-                        }
-                    })
-
-                    return stationId;
-                }
-            },
-            showImg(img) {
-                this.imgSrc = img;
-                this.imageDialogVisible = true;
-            },
+                return stationId;
+            }
+        },
+        typeFlagFormatter(row, column, cellValue) {
+
+            var label = '';
+            switch (cellValue) {
+                case 0:
+                    label = '金融大数据';
+                    break;
+                case 1:
+                    label = '安全管家';
+                    break;
+                case 2:
+                    label = '超级账户';
+                    break;
+                case 3:
+                    label = '全景行情';
+                    break;
+                case 4:
+                    label = '严选理财';
+                    break;
+                case 5:
+                    label = '涨乐u会员';
+                    break;
+                case 6:
+                    label = '智能家族';
+                    break;
+                default:
+                    label = '未知';
+            }
+
+            return label
+        },
+        showImg(img) {
+            this.imgSrc = img;
+            this.imageDialogVisible = true;
+        },
 
-        }
     }
+}
 </script>
 <style lang="less" scoped>
-
 </style>

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

@@ -785,6 +785,11 @@ const router = new Router({
                     name: 'FileInfo',
                     component: () => import('../pages/FileInfo')
                 },
+                {
+                    path: '/fileInfoForApp',
+                    name: 'FileInfoForApp',
+                    component: () => import('../pages/FileInfoForApp')
+                },
                 {
                     path: '/fileInfos',
                     name: 'FileInfos',