suochencheng 6 lat temu
rodzic
commit
f2a0962a23

+ 7 - 6
src/main/java/com/izouma/awesomeadmin/dao/ProductImageMapper.java

@@ -1,10 +1,9 @@
 package com.izouma.awesomeadmin.dao;
 
-import com.izouma.awesomeadmin.model.ProductImage;
+import java.util.*;
+import com.izouma.awesomeadmin.datasource.DataSource;
 import org.springframework.stereotype.Repository;
-
-import java.util.List;
-import java.util.Map;
+import com.izouma.awesomeadmin.model.ProductImage;
 
 
 /**
@@ -12,7 +11,7 @@ import java.util.Map;
 */
 @Repository("com.zoumaframe.dao.ProductImageMapper")
 public interface ProductImageMapper{
-
+    /*generatedStart*/
     int deleteByPrimaryKey(Integer id);
 
     int insertSelective(ProductImage record);
@@ -25,10 +24,12 @@ public interface ProductImageMapper{
 
     List<ProductImage> queryProductImageByPage(Map<String, Object> parameter);
 
-    int delete(String id);
+    int delete(ProductImage record);
 
     ProductImage queryProductImage(ProductImage record);
 
     List<ProductImage> query(ProductImage record);
+    /*generatedEnd*/
+
 }
 

+ 280 - 255
src/main/java/com/izouma/awesomeadmin/dao/ProductImageMapper.xml

@@ -1,212 +1,233 @@
 <?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.ProductImageMapper" >
-    <resultMap id="BaseResultMap" type="com.izouma.awesomeadmin.model.ProductImage" >
-                <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="product_id" property="productId" jdbcType="VARCHAR" />
-                                <result column="image" property="image" jdbcType="VARCHAR" />
-                                <result column="remark" property="remark" jdbcType="VARCHAR" />
-                                <result column="rank" property="rank" jdbcType="INTEGER" />
-                                <result column="name" property="name" jdbcType="VARCHAR" />
-            </resultMap>
-    <sql id="Base_Column_List" >
-        <trim  suffixOverrides="," >
-            id,
-
-            del_flag,
-
-            update_time,
-
-            update_user,
-
-            create_time,
-
-            create_user,
-
-            product_id,
-
-            image,
-
-            remark,
-
-            rank,
-
-            name,
-
-            </trim>
+<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
+<mapper namespace="com.izouma.awesomeadmin.dao.ProductImageMapper">
+    <resultMap id="BaseResultMap" type="com.izouma.awesomeadmin.model.ProductImage">
+        <!--generatedStart-->
+        <id column="id" property="id" jdbcType="INTEGER"/>
+        <result column="del_flag" property="delFlag" jdbcType="CHAR"/>
+        <result column="update_time" property="updateTime" jdbcType="TIMESTAMP"/>
+        <result column="update_user" property="updateUser" jdbcType="VARCHAR"/>
+        <result column="create_time" property="createTime" jdbcType="TIMESTAMP"/>
+        <result column="create_user" property="createUser" jdbcType="VARCHAR"/>
+        <result column="name" property="name" jdbcType="VARCHAR"/>
+        <result column="product_id" property="productId" jdbcType="INTEGER"/>
+        <result column="type_flag" property="typeFlag" jdbcType="INTEGER"/>
+        <result column="image" property="image" jdbcType="VARCHAR"/>
+        <result column="remark" property="remark" jdbcType="VARCHAR"/>
+        <result column="rank" property="rank" jdbcType="INTEGER"/>
+        <!--generatedEnd-->
+    </resultMap>
+
+    <sql id="Base_Column_List">
+        <!--generatedStart-->
+        id, del_flag, update_time, update_user, create_time, create_user, name, product_id, type_flag, image, remark, rank        <!--generatedEnd-->
     </sql>
-    <select id="selectByPrimaryKey" resultMap="BaseResultMap" parameterType="java.lang.Integer" >
-        select
-        <include refid="Base_Column_List" />
-        from product_image
-        where id = #{id,jdbcType=INTEGER}
+
+    <select id="selectByPrimaryKey" resultMap="BaseResultMap" parameterType="java.lang.Integer">
+        SELECT
+        <include refid="Base_Column_List"/>
+        FROM product_image
+        WHERE id = #{id,jdbcType=INTEGER}
     </select>
-    <delete id="deleteByPrimaryKey" parameterType="java.lang.Integer" >
-        delete from product_image
-        where id = #{id,jdbcType=INTEGER}
+
+    <delete id="deleteByPrimaryKey" parameterType="java.lang.Integer">
+        DELETE
+        FROM product_image
+        WHERE id = #{id,jdbcType=INTEGER}
     </delete>
+
     <insert id="insertSelective" parameterType="com.izouma.awesomeadmin.model.ProductImage" useGeneratedKeys="true" keyProperty="id">
-        insert into product_image
-        <trim prefix="(" suffix=")" suffixOverrides="," >
-                <if test="id!= null" >
+        INSERT INTO product_image
+        <trim prefix="(" suffix=")" suffixOverrides=",">
+            <!--generatedStart-->
+            <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="productId!= null" >
+            <if test="name!= null">
+                name,
+            </if>
+            <if test="productId!= null">
                 product_id,
             </if>
-                <if test="image!= null" >
+            <if test="typeFlag!= null">
+                type_flag,
+            </if>
+            <if test="image!= null">
                 image,
             </if>
-                <if test="remark!= null" >
+            <if test="remark!= null">
                 remark,
             </if>
-                <if test="rank!= null" >
+            <if test="rank!= null">
                 rank,
             </if>
-                <if test="name!= null" >
-                name,
-            </if>
-            </trim>
-        <trim prefix="values (" suffix=")" suffixOverrides="," >
-                    <if test="id != null" >
+            <!--generatedEnd-->
+        </trim>
+        <trim prefix="values (" suffix=")" suffixOverrides=",">
+            <!--generatedStart-->
+            <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="productId != null" >
-                #{productId,jdbcType=VARCHAR},
+            <if test="name != null">
+                #{name,jdbcType=VARCHAR},
+            </if>
+            <if test="productId != null">
+                #{productId,jdbcType=INTEGER},
+            </if>
+            <if test="typeFlag != null">
+                #{typeFlag,jdbcType=INTEGER},
             </if>
-                    <if test="image != null" >
+            <if test="image != null">
                 #{image,jdbcType=VARCHAR},
             </if>
-                    <if test="remark != null" >
+            <if test="remark != null">
                 #{remark,jdbcType=VARCHAR},
             </if>
-                    <if test="rank != null" >
+            <if test="rank != null">
                 #{rank,jdbcType=INTEGER},
             </if>
-                    <if test="name != null" >
-                #{name,jdbcType=VARCHAR},
-            </if>
-                </trim>
+            <!--generatedEnd-->
+        </trim>
     </insert>
-    <update id="updateByPrimaryKeySelective" parameterType="com.izouma.awesomeadmin.model.ProductImage" >
-        update product_image
-        <set >
-                    <if test="id != null" >
-               id= #{id,jdbcType=INTEGER},
+
+    <update id="updateByPrimaryKeySelective" parameterType="com.izouma.awesomeadmin.model.ProductImage">
+        UPDATE product_image
+        <set>
+            <!--generatedStart-->
+            <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="name != null">
+                name= #{name,jdbcType=VARCHAR},
             </if>
-                     <if test="productId != null" >
-               product_id= #{productId,jdbcType=VARCHAR},
+            <if test="productId != null">
+                product_id= #{productId,jdbcType=INTEGER},
             </if>
-                     <if test="image != null" >
-               image= #{image,jdbcType=VARCHAR},
+            <if test="typeFlag != null">
+                type_flag= #{typeFlag,jdbcType=INTEGER},
             </if>
-                     <if test="remark != null" >
-               remark= #{remark,jdbcType=VARCHAR},
+            <if test="image != null">
+                image= #{image,jdbcType=VARCHAR},
             </if>
-                     <if test="rank != null" >
-               rank= #{rank,jdbcType=INTEGER},
+            <if test="remark != null">
+                remark= #{remark,jdbcType=VARCHAR},
             </if>
-                     <if test="name != null" >
-               name= #{name,jdbcType=VARCHAR},
+            <if test="rank != null">
+                rank= #{rank,jdbcType=INTEGER},
             </if>
-                 </set>
-        where id = #{id,jdbcType=INTEGER}
+            <!--generatedEnd-->
+        </set>
+        WHERE
+        <if test="id != null and !&quot;&quot;.equals(id)">
+            id = #{id,jdbcType=INTEGER}
+        </if>
+        <if test="idStr != null and !&quot;&quot;.equals(idStr)">
+            id IN (${idStr})
+        </if>
     </update>
+
     <select id="queryProductImageByPage" parameterType="java.util.Map" resultType="com.izouma.awesomeadmin.model.ProductImage">
-        select <include refid="Base_Column_List"/> from product_image
+        SELECT <include refid="Base_Column_List"/> FROM product_image
         <where>
-            and del_flag = 'N'
-                    <if test="record.id != null and !&quot;&quot;.equals(record.id)">
-                and  id = #{record.id}
+            AND del_flag = 'N'
+            <if test="record.idStr != null and !&quot;&quot;.equals(record.idStr)">
+                AND id IN (${record.idStr})
             </if>
-                     <if test="record.delFlag != null and !&quot;&quot;.equals(record.delFlag)">
-                and  del_flag = #{record.delFlag}
+            <!--generatedStart-->
+            <if test="record.id != null and !&quot;&quot;.equals(record.id)">
+                AND id = #{record.id}
             </if>
-                     <if test="record.updateTime != null and !&quot;&quot;.equals(record.updateTime)">
-                and  update_time = #{record.updateTime}
+            <if test="record.delFlag != null and !&quot;&quot;.equals(record.delFlag)">
+                AND del_flag = #{record.delFlag}
             </if>
-                     <if test="record.updateUser != null and !&quot;&quot;.equals(record.updateUser)">
-                and  update_user = #{record.updateUser}
+            <if test="record.updateTime != null and !&quot;&quot;.equals(record.updateTime)">
+                AND update_time = #{record.updateTime}
             </if>
-                     <if test="record.createTime != null and !&quot;&quot;.equals(record.createTime)">
-                and  create_time = #{record.createTime}
+            <if test="record.updateUser != null and !&quot;&quot;.equals(record.updateUser)">
+                AND update_user = #{record.updateUser}
             </if>
-                     <if test="record.createUser != null and !&quot;&quot;.equals(record.createUser)">
-                and  create_user = #{record.createUser}
+            <if test="record.createTime != null and !&quot;&quot;.equals(record.createTime)">
+                AND create_time = #{record.createTime}
             </if>
-                     <if test="record.productId != null and !&quot;&quot;.equals(record.productId)">
-                and  product_id = #{record.productId}
+            <if test="record.createUser != null and !&quot;&quot;.equals(record.createUser)">
+                AND create_user = #{record.createUser}
             </if>
-                     <if test="record.image != null and !&quot;&quot;.equals(record.image)">
-                and  image = #{record.image}
+            <if test="record.name != null and !&quot;&quot;.equals(record.name)">
+                AND name = #{record.name}
             </if>
-                     <if test="record.remark != null and !&quot;&quot;.equals(record.remark)">
-                and  remark = #{record.remark}
+            <if test="record.productId != null and !&quot;&quot;.equals(record.productId)">
+                AND product_id = #{record.productId}
             </if>
-                     <if test="record.rank != null and !&quot;&quot;.equals(record.rank)">
-                and  rank = #{record.rank}
+            <if test="record.typeFlag != null and !&quot;&quot;.equals(record.typeFlag)">
+                AND type_flag = #{record.typeFlag}
             </if>
-                     <if test="record.name != null and !&quot;&quot;.equals(record.name)">
-                and  name = #{record.name}
+            <if test="record.image != null and !&quot;&quot;.equals(record.image)">
+                AND image = #{record.image}
+            </if>
+            <if test="record.remark != null and !&quot;&quot;.equals(record.remark)">
+                AND remark = #{record.remark}
+            </if>
+            <if test="record.rank != null and !&quot;&quot;.equals(record.rank)">
+                AND rank = #{record.rank}
+            </if>
+            <!--generatedEnd-->
+            <if test="record.searchKey != null and !&quot;&quot;.equals(record.searchKey)">
+                <trim prefix="and (" suffix=")" prefixOverrides="OR">
+                    <!--generatedStart-->
+                    OR name LIKE concat('%',#{record.searchKey},'%')
+                    OR product_id LIKE concat('%',#{record.searchKey},'%')
+                    OR type_flag LIKE concat('%',#{record.searchKey},'%')
+                    OR image LIKE concat('%',#{record.searchKey},'%')
+                    OR remark LIKE concat('%',#{record.searchKey},'%')
+                    OR rank LIKE concat('%',#{record.searchKey},'%')
+                    <!--generatedEnd-->
+                </trim>
             </if>
-                  <if test="record.searchKey != null and !&quot;&quot;.equals(record.searchKey)">
-             <trim prefix="and (" suffix=")" prefixOverrides="OR" >
-                                                                                                                                                                                                                                                                                                                                                                                                                                    OR  product_id LIKE concat('%',#{record.searchKey},'%')
-                                                                                                                                                                     OR  remark LIKE concat('%',#{record.searchKey},'%')
-                                                                                                    OR  rank LIKE concat('%',#{record.searchKey},'%')
-                                                                                                    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('_;')">
@@ -216,11 +237,9 @@
                                 <if test="detailIndex == 3">
                                     concat('%',#{itemDetail},'%')
                                 </if>
-
                                 <if test="detailIndex &lt; 3">
                                     ${itemDetail}
                                 </if>
-
                             </foreach>
                         </when>
                         <otherwise>
@@ -228,27 +247,17 @@
                                 <if test="detailIndex == 3">
                                     #{itemDetail}
                                 </if>
-
                                 <if test="detailIndex &lt; 3">
                                     ${itemDetail}
                                 </if>
-
                             </foreach>
                         </otherwise>
                     </choose>
-
-
                 </foreach>
-
-
             </if>
-
         </where>
-        order by
-
+        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('_,')">
@@ -258,93 +267,95 @@
             </trim>
             ,
         </if>
-        rank desc, id
+        id DESC
     </select>
+
     <select id="queryAllProductImage" parameterType="java.util.Map" resultType="com.izouma.awesomeadmin.model.ProductImage">
-        select <include refid="Base_Column_List"/> from product_image
+        SELECT <include refid="Base_Column_List"/> FROM product_image
         <where>
-            and del_flag = 'N'
-                    <if test="id != null and !&quot;&quot;.equals(id)">
-                and  id = #{id}
+            AND del_flag = 'N'
+            <if test="idStr != null and !&quot;&quot;.equals(idStr)">
+                AND id IN (${idStr})
             </if>
-                    <if test="delFlag != null and !&quot;&quot;.equals(delFlag)">
-                and  del_flag = #{delFlag}
+            <!--generatedStart-->
+            <if test="id != null and !&quot;&quot;.equals(id)">
+                AND id = #{id}
             </if>
-                    <if test="updateTime != null and !&quot;&quot;.equals(updateTime)">
-                and  update_time = #{updateTime}
+            <if test="delFlag != null and !&quot;&quot;.equals(delFlag)">
+                AND del_flag = #{delFlag}
             </if>
-                    <if test="updateUser != null and !&quot;&quot;.equals(updateUser)">
-                and  update_user = #{updateUser}
+            <if test="updateTime != null and !&quot;&quot;.equals(updateTime)">
+                AND update_time = #{updateTime}
             </if>
-                    <if test="createTime != null and !&quot;&quot;.equals(createTime)">
-                and  create_time = #{createTime}
+            <if test="updateUser != null and !&quot;&quot;.equals(updateUser)">
+                AND update_user = #{updateUser}
             </if>
-                    <if test="createUser != null and !&quot;&quot;.equals(createUser)">
-                and  create_user = #{createUser}
+            <if test="createTime != null and !&quot;&quot;.equals(createTime)">
+                AND create_time = #{createTime}
             </if>
-                    <if test="productId != null and !&quot;&quot;.equals(productId)">
-                and  product_id = #{productId}
+            <if test="createUser != null and !&quot;&quot;.equals(createUser)">
+                AND create_user = #{createUser}
             </if>
-                    <if test="image != null and !&quot;&quot;.equals(image)">
-                and  image = #{image}
+            <if test="name != null and !&quot;&quot;.equals(name)">
+                AND name = #{name}
             </if>
-                    <if test="remark != null and !&quot;&quot;.equals(remark)">
-                and  remark = #{remark}
+            <if test="productId != null and !&quot;&quot;.equals(productId)">
+                AND product_id = #{productId}
             </if>
-                    <if test="rank != null and !&quot;&quot;.equals(rank)">
-                and  rank = #{rank}
+            <if test="typeFlag != null and !&quot;&quot;.equals(typeFlag)">
+                AND type_flag = #{typeFlag}
             </if>
-                    <if test="name != null and !&quot;&quot;.equals(name)">
-                and  name = #{name}
+            <if test="image != null and !&quot;&quot;.equals(image)">
+                AND image = #{image}
             </if>
-                    <if test="searchKey != null and !&quot;&quot;.equals(searchKey)">
-                <trim prefix="and (" suffix=")" prefixOverrides="OR" >
-                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                OR  product_id LIKE concat('%',#{searchKey},'%')
-                                                                                                                                                                                                                                                        OR  remark LIKE concat('%',#{searchKey},'%')
-                                                                                                                                                        OR  rank LIKE concat('%',#{searchKey},'%')
-                                                                                                                                                        OR  name LIKE concat('%',#{searchKey},'%')
-                                                                                        </trim>
+            <if test="remark != null and !&quot;&quot;.equals(remark)">
+                AND remark = #{remark}
             </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>
-
+            <if test="rank != null and !&quot;&quot;.equals(rank)">
+                AND rank = #{rank}
+            </if>
+            <!--generatedEnd-->
+            <if test="searchKey != null and !&quot;&quot;.equals(searchKey)">
+                <trim prefix="and (" suffix=")" prefixOverrides="OR">
+                    <!--generatedStart-->
+                    OR name LIKE concat('%',#{searchKey},'%')
+                    OR product_id LIKE concat('%',#{searchKey},'%')
+                    OR type_flag LIKE concat('%',#{searchKey},'%')
+                    OR image LIKE concat('%',#{searchKey},'%')
+                    OR remark LIKE concat('%',#{searchKey},'%')
+                    OR rank LIKE concat('%',#{searchKey},'%')
+                    <!--generatedEnd-->
+                </trim>
+            </if>
+            <if test="advancedQuery != null and !&quot;&quot;.equals(advancedQuery)">
+                <foreach item="item" index="index" collection="advancedQuery.split('_;')">
+                    <choose>
+                        <when test="item.indexOf('like') != -1">
+                            <foreach item="itemDetail" index="detailIndex" collection="item.split('_,')">
+                                <if test="detailIndex == 3">
+                                    concat('%',#{itemDetail},'%')
+                                </if>
+                                <if test="detailIndex &lt; 3">
+                                    ${itemDetail}
+                                </if>
+                            </foreach>
+                        </when>
+                        <otherwise>
+                            <foreach item="itemDetail" index="detailIndex" collection="item.split('_,')">
+                                <if test="detailIndex == 3">
+                                    #{itemDetail}
+                                </if>
+                                <if test="detailIndex &lt; 3">
+                                    ${itemDetail}
+                                </if>
+                            </foreach>
+                        </otherwise>
+                    </choose>
                 </foreach>
-            </otherwise>
-        </choose>
-
-
-    </foreach>
-
-
-</if>
+            </if>
         </where>
-        order by
-
+        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('_,')">
@@ -354,62 +365,76 @@
             </trim>
             ,
         </if>
-
-        rank desc,id
+        id DESC
     </select>
+
     <select id="queryProductImage" parameterType="java.util.Map" resultType="com.izouma.awesomeadmin.model.ProductImage">
-        select <include refid="Base_Column_List"/> from product_image
+        SELECT <include refid="Base_Column_List"/> FROM product_image
         <where>
-            and del_flag = 'N'
-                    <if test="id != null and !&quot;&quot;.equals(id)">
-                and id = #{id}
+            AND del_flag = 'N'
+            <!--generatedStart-->
+            <if test="id != null and !&quot;&quot;.equals(id)">
+                AND id = #{id}
+            </if>
+            <if test="delFlag != null and !&quot;&quot;.equals(delFlag)">
+                AND del_flag = #{delFlag}
             </if>
-                     <if test="delFlag != null and !&quot;&quot;.equals(delFlag)">
-                and del_flag = #{delFlag}
+            <if test="updateTime != null and !&quot;&quot;.equals(updateTime)">
+                AND update_time = #{updateTime}
             </if>
-                     <if test="updateTime != null and !&quot;&quot;.equals(updateTime)">
-                and update_time = #{updateTime}
+            <if test="updateUser != null and !&quot;&quot;.equals(updateUser)">
+                AND update_user = #{updateUser}
             </if>
-                     <if test="updateUser != null and !&quot;&quot;.equals(updateUser)">
-                and update_user = #{updateUser}
+            <if test="createTime != null and !&quot;&quot;.equals(createTime)">
+                AND create_time = #{createTime}
             </if>
-                     <if test="createTime != null and !&quot;&quot;.equals(createTime)">
-                and create_time = #{createTime}
+            <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="name != null and !&quot;&quot;.equals(name)">
+                AND name = #{name}
             </if>
-                     <if test="productId != null and !&quot;&quot;.equals(productId)">
-                and product_id = #{productId}
+            <if test="productId != null and !&quot;&quot;.equals(productId)">
+                AND product_id = #{productId}
             </if>
-                     <if test="image != null and !&quot;&quot;.equals(image)">
-                and image = #{image}
+            <if test="typeFlag != null and !&quot;&quot;.equals(typeFlag)">
+                AND type_flag = #{typeFlag}
             </if>
-                     <if test="remark != null and !&quot;&quot;.equals(remark)">
-                and remark = #{remark}
+            <if test="image != null and !&quot;&quot;.equals(image)">
+                AND image = #{image}
             </if>
-                     <if test="rank != null and !&quot;&quot;.equals(rank)">
-                and rank = #{rank}
+            <if test="remark != null and !&quot;&quot;.equals(remark)">
+                AND remark = #{remark}
             </if>
-                     <if test="name != null and !&quot;&quot;.equals(name)">
-                and name = #{name}
+            <if test="rank != null and !&quot;&quot;.equals(rank)">
+                AND rank = #{rank}
             </if>
-         
+            <!--generatedEnd-->
         </where>
         LIMIT 1
     </select>
+
     <update id="delete">
         UPDATE product_image SET del_flag = 'Y'
-        <where>
-            AND id = #{id}
-        </where>
+        WHERE
+        <if test="id != null and !&quot;&quot;.equals(id)">
+            id = #{id,jdbcType=INTEGER}
+        </if>
+        <if test="idStr != null and !&quot;&quot;.equals(idStr)">
+            id IN (${idStr})
+        </if>
     </update>
+
     <select id="query" parameterType="java.util.Map" resultType="com.izouma.awesomeadmin.model.ProductImage">
-        select <include refid="Base_Column_List"/> from product_image
+        SELECT
+        <include refid="Base_Column_List"/>
+        FROM product_image
         <where>
-            and del_flag = 'N'
-                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        </where>
-        order by id desc
+            AND del_flag = 'N'
+            <!--generatedStart-->
+            <!--generatedEnd-->
+        </where>
+        ORDER BY id DESC
     </select>
 </mapper>
 

+ 16 - 4
src/main/java/com/izouma/awesomeadmin/dao/ProductInfoMapper.xml

@@ -26,6 +26,7 @@
         <result column="product_detail" property="productDetail" jdbcType="VARCHAR"/>
         <result column="out_url" property="outUrl" jdbcType="VARCHAR"/>
         <result column="out_flag" property="outFlag" jdbcType="CHAR"/>
+        <result column="down_payment" property="downPayment" jdbcType="DECIMAL"/>
     </resultMap>
     <sql id="Base_Column_List">
         <trim suffixOverrides=",">
@@ -77,6 +78,8 @@
 
             out_flag,
 
+            down_payment,
+
         </trim>
     </sql>
     <select id="selectByPrimaryKey" resultMap="BaseResultMap" parameterType="java.lang.Integer">
@@ -165,6 +168,9 @@
             <if test="outFlag != null">
                 out_flag,
             </if>
+            <if test="downPayment != null">
+                down_payment,
+            </if>
         </trim>
         <trim prefix="values (" suffix=")" suffixOverrides=",">
             <if test="id != null">
@@ -239,6 +245,9 @@
             <if test="outFlag != null">
                 #{outFlag,jdbcType=VARCHAR},
             </if>
+            <if test="downPayment != null">
+                #{downPayment},
+            </if>
         </trim>
     </insert>
     <update id="updateByPrimaryKeySelective" parameterType="com.izouma.awesomeadmin.model.ProductInfo">
@@ -316,6 +325,9 @@
             <if test="outFlag != null">
                 out_flag = #{outFlag,jdbcType=VARCHAR},
             </if>
+            <if test="downPayment != null">
+                down_payment = #{downPayment},
+            </if>
         </set>
         where
         <if test="id != null and !&quot;&quot;.equals(id)">
@@ -340,7 +352,7 @@
         `product_comment`
         WHERE
         del_flag = 'N'
-        AND product_id = product_info.id ) as  dsr
+        AND product_id = product_info.id ) as dsr
 
         from product_info
         <where>
@@ -496,7 +508,7 @@
         `product_comment`
         WHERE
         product_comment.del_flag = 'N'
-        AND product_comment.product_id = product_info.id ) as  dsr
+        AND product_comment.product_id = product_info.id ) as dsr
 
         from product_info
         <where>
@@ -651,13 +663,13 @@
         `product_comment`
         WHERE
         product_comment.del_flag = 'N'
-        AND product_comment.product_id = product_info.id ) as  dsr
+        AND product_comment.product_id = product_info.id ) as dsr
 
         from product_info
         <where>
             and del_flag = 'N'
             and use_flag = 'Y'
-            and  on_shelf = 'Y'
+            and on_shelf = 'Y'
             <if test="id != null and !&quot;&quot;.equals(id)">
                 and id = #{id}
             </if>

+ 58 - 37
src/main/java/com/izouma/awesomeadmin/model/ProductImage.java

@@ -1,38 +1,43 @@
 package com.izouma.awesomeadmin.model;
 
+import java.util.*;
 import com.fasterxml.jackson.annotation.JsonAutoDetect;
 import com.fasterxml.jackson.annotation.JsonInclude;
 
-import java.util.Date;
-
 
 @JsonAutoDetect
 @JsonInclude(JsonInclude.Include.NON_NULL)
 public class ProductImage{
+    /*generatedStart*/
     private Integer id;
     private String delFlag;
     private Date updateTime;
     private String updateUser;
     private Date createTime;
     private String createUser;
-    private String productId;
+    private String name;
+    private Integer productId;
+    private Integer typeFlag;
     private String image;
     private String remark;
     private Integer rank;
-    private String name;
 
-private String searchKey;
+    private String idStr;
+
+    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;
+    /*generatedEnd*/
 
+    /*generatedStart*/
     public Integer getId(){
         return this.id;
     }
@@ -75,13 +80,27 @@ private String orderByStr;
     public void setCreateUser(String createUser){
         this.createUser = createUser;
     }
-    public String getProductId(){
+    public String getName(){
+        return this.name;
+    }
+
+    public void setName(String name){
+        this.name = name;
+    }
+    public Integer getProductId(){
         return this.productId;
     }
 
-    public void setProductId(String productId){
+    public void setProductId(Integer productId){
         this.productId = productId;
     }
+    public Integer getTypeFlag(){
+        return this.typeFlag;
+    }
+
+    public void setTypeFlag(Integer typeFlag){
+        this.typeFlag = typeFlag;
+    }
     public String getImage(){
         return this.image;
     }
@@ -103,37 +122,39 @@ private String orderByStr;
     public void setRank(Integer rank){
         this.rank = rank;
     }
-    public String getName(){
-        return this.name;
+
+    public String getSearchKey() {
+        return searchKey;
     }
 
-    public void setName(String name){
-        this.name = name;
+    public void setSearchKey(String searchKey) {
+        this.searchKey = searchKey;
     }
 
-public String getSearchKey() {
-    return searchKey;
-}
+    public String getAdvancedQuery() {
+        return advancedQuery;
+    }
 
-public void setSearchKey(String searchKey) {
-    this.searchKey = searchKey;
-}
+    public void setAdvancedQuery(String advancedQuery) {
+        this.advancedQuery = advancedQuery;
+    }
 
-public String getAdvancedQuery() {
-    return advancedQuery;
-}
+    public String getOrderByStr() {
+        return orderByStr;
+    }
 
-public void setAdvancedQuery(String advancedQuery) {
-    this.advancedQuery = advancedQuery;
-}
+    public void setOrderByStr(String orderByStr) {
+        this.orderByStr = orderByStr;
+    }
 
-public String getOrderByStr() {
-    return orderByStr;
-}
+    public String getIdStr() {
+        return idStr;
+    }
 
-public void setOrderByStr(String orderByStr) {
-    this.orderByStr = orderByStr;
-}
+    public void setIdStr(String idStr) {
+        this.idStr = idStr;
+    }
+    /*generatedEnd*/
 
 }
 

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

@@ -68,6 +68,11 @@ public class ProductInfo {
      */
     private String orderByStr;
 
+    /**
+     * 定金
+     */
+    private BigDecimal downPayment;
+
     public Integer getId() {
         return this.id;
     }
@@ -339,5 +344,13 @@ public class ProductInfo {
     public void setDsr(Double dsr) {
         this.dsr = dsr;
     }
+
+    public BigDecimal getDownPayment() {
+        return downPayment;
+    }
+
+    public void setDownPayment(BigDecimal downPayment) {
+        this.downPayment = downPayment;
+    }
 }
 

+ 4 - 4
src/main/java/com/izouma/awesomeadmin/service/ProductImageService.java

@@ -1,16 +1,15 @@
 package com.izouma.awesomeadmin.service;
 
+import java.util.*;
 import com.izouma.awesomeadmin.dto.Page;
 import com.izouma.awesomeadmin.model.ProductImage;
 
-import java.util.List;
-
 
 /**
 *  service接口类
 */
 public interface ProductImageService{
-
+    /*generatedStart*/
     List<ProductImage> getProductImageList(ProductImage record);
 
     List<ProductImage> getProductImageByPage(Page page, ProductImage record);
@@ -21,8 +20,9 @@ public interface ProductImageService{
 
     boolean createProductImage(ProductImage record);
 
-    boolean deleteProductImage(String id);
+    boolean deleteProductImage(ProductImage record);
 
     boolean updateProductImage(ProductImage record);
+    /*generatedEnd*/
 }
 

+ 22 - 45
src/main/java/com/izouma/awesomeadmin/service/impl/ProductImageServiceImpl.java

@@ -1,140 +1,117 @@
 package com.izouma.awesomeadmin.service.impl;
 
+import java.util.*;
+import org.apache.log4j.Logger;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Service;
 import com.izouma.awesomeadmin.constant.AppConstant;
-import com.izouma.awesomeadmin.dao.ProductImageMapper;
 import com.izouma.awesomeadmin.dto.Page;
 import com.izouma.awesomeadmin.model.ProductImage;
 import com.izouma.awesomeadmin.service.ProductImageService;
-import org.apache.log4j.Logger;
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.stereotype.Service;
-
-import java.util.HashMap;
-import java.util.List;
-import java.util.Map;
+import com.izouma.awesomeadmin.dao.ProductImageMapper;
 
 /**
 *  service接口实现类
 */
 @Service
-public class ProductImageServiceImpl implements ProductImageService {
-
+public class ProductImageServiceImpl implements ProductImageService{
+    /*generatedStart*/
     private static Logger logger = Logger.getLogger(ProductImageServiceImpl.class);
 
     @Autowired
     private ProductImageMapper productImageMapper;
+    /*generatedEnd*/
 
+    /*generatedStart*/
     @Override
     public List<ProductImage> getProductImageList(ProductImage record) {
-
         logger.info("getProductImageList");
         try {
-
-        return productImageMapper.queryAllProductImage(record);
+            return productImageMapper.queryAllProductImage(record);
         } catch (Exception e) {
-        logger.error("getProductImageList", e);
+            logger.error("getProductImageList", e);
         }
-
         return null;
     }
+
     @Override
     public List<ProductImage> getProductImageByPage(Page page, ProductImage record) {
-
         logger.info("getProductImageByPage");
         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 productImageMapper.queryProductImageByPage(parameter);
+            return productImageMapper.queryProductImageByPage(parameter);
         } catch (Exception e) {
-        logger.error("getProductImageByPage", e);
+            logger.error("getProductImageByPage", e);
         }
-
         return null;
     }
 
     @Override
     public ProductImage getProductImageById(String id) {
-
         logger.info("getProductImageyId");
         try {
-
             return productImageMapper.selectByPrimaryKey(Integer.valueOf(id));
         } catch (Exception e) {
-        logger.error("getProductImageById", e);
+            logger.error("getProductImageById", e);
         }
-
         return null;
     }
 
     @Override
     public ProductImage getProductImage(ProductImage record) {
-
         logger.info("getProductImage");
         try {
-
             return productImageMapper.queryProductImage(record);
         } catch (Exception e) {
-        logger.error("getProductImage", e);
+            logger.error("getProductImage", e);
         }
-
         return null;
     }
 
     @Override
     public boolean createProductImage(ProductImage record) {
-
         logger.info("createProductImage");
         try {
-
             int updates = productImageMapper.insertSelective(record);
-
             if (updates > 0) {
                  return true;
             }
         } catch (Exception e) {
             logger.error("createProductImage", e);
         }
-
         return false;
     }
 
     @Override
-    public boolean deleteProductImage(String id) {
-
+    public boolean deleteProductImage(ProductImage record) {
         logger.info("deleteProductImage");
         try {
-
-             int updates = productImageMapper.delete(id);
-
+            int updates = productImageMapper.delete(record);
             if (updates > 0) {
                  return true;
             }
         } catch (Exception e) {
              logger.error("deleteProductImage", e);
         }
-
         return false;
     }
 
     @Override
     public boolean updateProductImage(ProductImage record) {
-
         logger.info("updateProductImage");
         try {
-
             int updates = productImageMapper.updateByPrimaryKeySelective(record);
-
             if (updates > 0) {
                  return true;
             }
         } catch (Exception e) {
              logger.error("updateProductImage", e);
         }
-
         return false;
     }
+    /*generatedEnd*/
 }
 

+ 27 - 65
src/main/java/com/izouma/awesomeadmin/web/ProductImageController.java

@@ -1,39 +1,31 @@
 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.ProductImage;
 import com.izouma.awesomeadmin.service.ProductImageService;
-import com.izouma.awesomeadmin.util.ExportExcelUtil;
-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.RequestMapping;
-import org.springframework.web.bind.annotation.RequestMethod;
-import org.springframework.web.bind.annotation.RequestParam;
-import org.springframework.web.bind.annotation.ResponseBody;
 
 import javax.servlet.http.HttpServletRequest;
 import javax.servlet.http.HttpServletResponse;
-import java.util.HashMap;
-import java.util.List;
-import java.util.Map;
 
-/**
-*  controller类
-*/
 @Controller
 @RequestMapping("/productImage")
-@RequiresAuthentication
 public class ProductImageController {
-
+    /*generatedStart*/
     @Autowired
     private ProductImageService productImageService;
+    /*generatedEnd*/
 
-    /**
-    * <p>获取全部记录。</p>
-    */
+    /*generatedStart*/
     @RequiresAuthentication
     @RequestMapping(value = "/all", method = RequestMethod.GET)
     @ResponseBody
@@ -42,9 +34,6 @@ public class ProductImageController {
         return new Result(true, pp);
     }
 
-    /**
-    * <p>根据Id。</p>
-    */
     @RequestMapping(value = "/getProductImage", method = RequestMethod.GET)
     @ResponseBody
     public Result getProductImage(@RequestParam(required = false, value = "id") String id) {
@@ -52,9 +41,6 @@ public class ProductImageController {
         return new Result(true, data);
     }
 
-    /**
-    * <p>根据条件获取。</p>
-    */
     @RequestMapping(value = "/getOne", method = RequestMethod.GET)
     @ResponseBody
     public Result getOne(ProductImage record) {
@@ -62,10 +48,6 @@ public class ProductImageController {
         return new Result(true, data);
     }
 
-
-    /**
-    * <p>分页查询。</p>
-    */
     @RequestMapping(value = "/page", method = RequestMethod.GET)
     @ResponseBody
     public Result page(Page page, ProductImage record) {
@@ -78,10 +60,6 @@ public class ProductImageController {
         return new Result(true, result);
     }
 
-
-    /**
-    * <p>保存。</p>
-    */
     @RequestMapping(value = "/save", method = RequestMethod.POST)
     @ResponseBody
     public Result save(ProductImage record) {
@@ -92,9 +70,6 @@ public class ProductImageController {
         return new Result(false, "保存异常");
     }
 
-    /**
-    * <p>更新信息。</p>
-    */
     @RequestMapping(value = "/update", method = RequestMethod.POST)
     @ResponseBody
     public Result updateProductImage(ProductImage record) {
@@ -105,62 +80,49 @@ public class ProductImageController {
         return new Result(false, "保存异常");
     }
 
-    /**
-    * <p>删除。</p>
-    */
     @RequestMapping(value = "/del", method = RequestMethod.POST)
     @ResponseBody
-    public Result deleteProductImage(@RequestParam(required = true, value = "id") String id) {
+    public Result deleteProductImage(ProductImage record) {
 
-        boolean num = productImageService.deleteProductImage(id);
+        boolean num = productImageService.deleteProductImage(record);
         if (num) {
         return new Result(true, "删除成功");
         }
         return new Result(false, "删除异常");
     }
 
-    /**
-    * 导出Excel
-    * @param request
-    * @param response
-    * @param record
-    * @throws Exception
-    */
     @RequestMapping(value = "/exportExcel", method = RequestMethod.GET)
     @ResponseBody
     public void exportExcel(HttpServletRequest request, HttpServletResponse response, ProductImage record) throws Exception {
 
-    List<ProductImage> productImages = productImageService.getProductImageList(record);
-
+        List<ProductImage> productImages = productImageService.getProductImageList(record);
 
         String sheetName = "product_image";
         String titleName = "商品图片数据表";
         String fileName = "商品图片表";
-        int columnNumber = 11;
-        int[] columnWidth = { 20,  20,  20,  20,  20,  20,  20,  20,  20,  20,  20 };
-        String[] columnName = {  "" ,   "删除标识" ,   "更新时间" ,   "更新人" ,   "创建时间" ,   "创建人" ,   "产品" ,   "图片" ,   "备注" ,   "排序" ,   "名称"  };
-        String[][] dataList = new String[productImages.size()][11];
+        int columnNumber = 12;
+        int[] columnWidth = { 20,  20,  20,  20,  20,  20,  20,  20,  20,  20,  20,  20 };
+        String[] columnName = {  "ID" ,   "删除标识" ,   "更新时间" ,   "更新人" ,   "创建时间" ,   "创建人" ,   "名称" ,   "商品" ,   "类型" ,   "图片" ,   "备注" ,   "排序"  };
+        String[][] dataList = new String[productImages.size()][12];
 
         for (int i = 0; i < productImages.size(); i++) {
-
                         dataList[i][0] = String.valueOf(productImages.get(i).getId());
                         dataList[i][1] = String.valueOf(productImages.get(i).getDelFlag());
                         dataList[i][2] = String.valueOf(productImages.get(i).getUpdateTime());
                         dataList[i][3] = String.valueOf(productImages.get(i).getUpdateUser());
                         dataList[i][4] = String.valueOf(productImages.get(i).getCreateTime());
                         dataList[i][5] = String.valueOf(productImages.get(i).getCreateUser());
-                        dataList[i][6] = String.valueOf(productImages.get(i).getProductId());
-                        dataList[i][7] = String.valueOf(productImages.get(i).getImage());
-                        dataList[i][8] = String.valueOf(productImages.get(i).getRemark());
-                        dataList[i][9] = String.valueOf(productImages.get(i).getRank());
-                        dataList[i][10] = String.valueOf(productImages.get(i).getName());
+                        dataList[i][6] = String.valueOf(productImages.get(i).getName());
+                        dataList[i][7] = String.valueOf(productImages.get(i).getProductId());
+                        dataList[i][8] = String.valueOf(productImages.get(i).getTypeFlag());
+                        dataList[i][9] = String.valueOf(productImages.get(i).getImage());
+                        dataList[i][10] = String.valueOf(productImages.get(i).getRemark());
+                        dataList[i][11] = String.valueOf(productImages.get(i).getRank());
                     }
 
-
         ExportExcelUtil.ExportWithResponse(sheetName, titleName, fileName,
-        columnNumber, columnWidth, columnName, dataList, response);
-
-
-        }
+                columnNumber, columnWidth, columnName, dataList, response);
     }
+    /*generatedEnd*/
+}
 

+ 174 - 73
src/main/vue/src/pages/ProductImage.vue

@@ -1,23 +1,44 @@
 <template>
     <div>
-        <el-form :model="formData" :rules="rules" ref="form" label-width="80px" label-position="right" size="small"
+        <el-form :model="formData" :rules="rules" ref="form" label-width="120px" label-position="right" size="small"
                  style="max-width: 500px;">
-                                                                                                                                                                                                                                    <el-form-item prop="productId" label="产品">
-                <el-input v-model="formData.productId" :disabled="'productId'==subColumn"></el-input>
+            <el-form-item prop="name" label="名称">
+                <el-input v-model="formData.name" :disabled="'name'==subColumn"></el-input>
             </el-form-item>
-                                                                                                                                                                                                                                                                                                                                                                                                                                                                         <el-form-item prop="image" label="图片">
-                 <single-upload v-model="formData.image" :disabled="'image'==subColumn"></single-upload>
-             </el-form-item>
-                                                                                                                                                                                <el-form-item prop="remark" label="备注">
-                <el-input v-model="formData.remark" :disabled="'remark'==subColumn"></el-input>
+            <el-form-item prop="productId" label="商品">
+                <template>
+                    <el-select v-model="formData.productId" clearable filterable placeholder="请选择" :disabled="'productId'==subColumn">
+                        <el-option
+                                   v-for="item in productIdOptions"
+                                   :key="item.id"
+                                   :label="item.title"
+                                   :value="item.id">
+                        </el-option>
+                    </el-select>
+                </template>
             </el-form-item>
-                                                                                                                                                                                                                                                                                                                            <el-form-item prop="rank" label="排序">
-                <el-input v-model="formData.rank" :disabled="'rank'==subColumn"></el-input>
+            <el-form-item prop="typeFlag" label="类型">
+                <template>
+                    <el-select v-model="formData.typeFlag" clearable placeholder="请选择" :disabled="'typeFlag'==subColumn">
+                        <el-option
+                                   v-for="item in typeFlagOptions"
+                                   :key="item.value"
+                                   :label="item.label"
+                                   :value="item.value">
+                        </el-option>
+                    </el-select>
+                </template>
             </el-form-item>
-                                                                                                                                                                                                                                                                                                                            <el-form-item prop="name" label="名称">
-                <el-input v-model="formData.name" :disabled="'name'==subColumn"></el-input>
+            <el-form-item prop="image" label="图片">
+                <single-upload v-model="formData.image" :disabled="'image'==subColumn"></single-upload>
+            </el-form-item>
+            <el-form-item prop="remark" label="备注">
+                <el-input v-model="formData.remark" :disabled="'remark'==subColumn"></el-input>
+            </el-form-item>
+            <el-form-item prop="rank" label="排序">
+                <el-input type="number" v-model="formData.rank" :disabled="'rank'==subColumn"></el-input>
             </el-form-item>
-                                                                                                                                                                                                                                                                                        <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>
@@ -26,92 +47,172 @@
     </div>
 </template>
 <script>
-    import formValidator from '../formValidator'
+import formValidator from '../formValidator';
+import { mapState } from 'vuex';
+import { format } from 'date-fns';
+import zh from 'date-fns/locale/zh_cn';
 
-    export default {
-        created() {
-            if (this.$route.query.column) {
-                this.subColumn = this.$route.query.column.split(',')[1];
-                this.subValue = this.$route.query.column.split(',')[0];
+export default {
+    name: 'ProductImage',
+    created() {
+        if (this.$route.query.column) {
+            this.subColumn = this.$route.query.column.split(',')[1];
+            this.subValue = this.$route.query.column.split(',')[0];
+
+            if ('productId' == this.subColumn) {
+                this.subValue = Number(this.subValue);
             }
+        }
 
-            if (this.$route.query.id) {
-                this.$http.get({
+        if (this.$route.query.id) {
+            this.$http
+                .get({
                     url: '/productImage/getOne',
                     data: {
-                        id: this.$route.query.id
-                    }
-                }).then(res => {
+                        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;
-                    }
+                        if (this.$route.query.column) {
+                            this.formData[this.subColumn] = this.subValue;
+                        }
                     }
-                })
-            }else {
-                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: '',
+        this.$http
+            .get({
+                url: '/productInfo/all',
+            })
+            .then(res => {
+                if (res.success) {
+                    this.productIdOptions = res.data;
+                }
+            });
+    },
+    data() {
+        return {
+            saving: false,
+            formData: {
+                typeFlag: 0,
+            },
+            rules: {},
+            productIdOptions: [],
+            typeFlagOptions: [
+                {
+                    value: 0,
+                    label: '轮播',
+                },
+                {
+                    value: 1,
+                    label: '客片',
+                },
+            ],
+            subColumn: '',
             subValue: '',
-        }
+        };
+    },
+    computed: {
+        ...mapState(['userInfo']),
+    },
+    methods: {
+        onSave() {
+            this.$refs.form.validate(valid => {
+                if (valid) {
+                    this.logicalValidate();
+                } else {
+                    return false;
+                }
+            });
         },
-        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 ? '/productImage/update' : '/productImage/save',
-                    data: data
-                }).then(res => {
+        logicalValidate() {
+            let logicalData = {};
+
+            if (JSON.stringify(logicalData) == '{}') {
+                this.submit();
+            } else {
+                this.$http
+                    .get({
+                        url: '/productImage/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
+                        ? '/productImage/update'
+                        : '/productImage/save',
+                    data: data,
+                })
+                .then(res => {
                     if (res.success) {
                         this.$message.success('成功');
                         this.$router.go(-1);
                     } else {
-                        this.$message.warning('失败')
+                        this.$message.warning('失败');
                     }
                 });
-            },
-            onDelete() {
-                this.$alert('删除将无法恢复,确认要删除么?', '警告', { type: 'error' }).then(() => {
+        },
+        onDelete() {
+            this.$alert('删除将无法恢复,确认要删除么?', '警告', {
+                type: 'error',
+            })
+                .then(() => {
                     return this.$http.post({
-                    url: '/productImage/del',
-                    data: { id: this.formData.id }
-                    })
-                }).then(() => {
+                        url: '/productImage/del',
+                        data: { id: this.formData.id },
+                    });
+                })
+                .then(() => {
                     this.$message.success('删除成功');
                     this.$router.go(-1);
-                }).catch(action => {
+                })
+                .catch(action => {
                     if (action === 'cancel') {
                         this.$message.info('删除取消');
                     } else {
                         this.$message.error('删除失败');
                     }
-                })
-            },
-        }
-    }
+                });
+        },
+    },
+};
 </script>
 <style lang="less" scoped>
 </style>

+ 189 - 91
src/main/vue/src/pages/ProductImages.vue

@@ -2,21 +2,29 @@
     <div>
         <div class="filters-container">
 
+            <el-select v-model="typeFlag" clearable filterable placeholder="类型" @change="searchData" size="small" style="width:120px">
+                <el-option v-for="item in typeFlagOptions" :key="item.value" :label="item.label" :value="item.value">
+                </el-option>
+            </el-select>
+
             <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 @click="showAdvancedQueryDialog = !showAdvancedQueryDialog" type="primary" size="small"
+                       icon="el-icon-search" class="filter-item">高级查询
             </el-button>
-            <el-button @click="$router.push({path:'/productImage',query:{column:$route.query.column}})" type="primary" size="small" icon="el-icon-edit" class="filter-item">添加
+            <!-- <el-button @click="showTableSortDialog = !showTableSortDialog" type="primary" size="small"
+                       icon="el-icon-sort" class="filter-item">排序
+            </el-button> -->
+            <el-button @click="$router.push({path:'/productImage',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>
+                    筛选数据<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}}
@@ -24,31 +32,73 @@
                 </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
+                  :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('productId')" prop="productId" label="产品" min-width="100">
+            <el-table-column
+                             v-if="isColumnShow('name')"
+                             prop="name"
+                             label="名称"
+                             min-width="100">
             </el-table-column>
 
-            <el-table-column v-if="isColumnShow('image')" prop="image" label="图片" min-width="100">
-                <template slot-scope="{row}" v-if="row.image">
-                    <img :src="row.image" @click="showImg(row.image)" style="width: 100px;height: 100px;vertical-align: middle;" />
-                </template>
+            <el-table-column
+                             v-if="isColumnShow('productId')"
+                             prop="productId"
+                             label="商品"
+                             min-width="100">
+            </el-table-column>
 
+            <el-table-column
+                             v-if="isColumnShow('typeFlag')"
+                             prop="typeFlag"
+                             label="类型"
+                             min-width="100">
             </el-table-column>
 
-            <el-table-column v-if="isColumnShow('remark')" prop="remark" label="备注" min-width="100">
+            <el-table-column
+                             v-if="isColumnShow('image')"
+                             prop="image"
+                             label="图片"
+                             min-width="100">
+                <template slot-scope="{row}">
+                    <img :src="row.image" @click="showImg(row.image)" style="width: 100px;height: 100px;vertical-align: middle;" />
+                </template>
+
             </el-table-column>
 
-            <el-table-column v-if="isColumnShow('rank')" prop="rank" label="排序" min-width="100">
+            <el-table-column
+                             v-if="isColumnShow('remark')"
+                             prop="remark"
+                             label="备注"
+                             min-width="100">
             </el-table-column>
 
-            <el-table-column v-if="isColumnShow('name')" prop="name" label="名称" min-width="100">
+            <el-table-column
+                             v-if="isColumnShow('rank')"
+                             prop="rank"
+                             label="排序"
+                             min-width="100">
             </el-table-column>
-            <el-table-column label="操作" align="center" fixed="right" min-width="150">
+            <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>
@@ -64,7 +114,15 @@
                     <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">
@@ -85,14 +143,16 @@
                     <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>
@@ -122,7 +182,8 @@
                     <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>
@@ -156,11 +217,12 @@
     </div>
 </template>
 <script>
-import { mapState } from 'vuex'
-import { format } from 'date-fns'
-import zh from 'date-fns/locale/zh_cn'
+import { mapState } from 'vuex';
+import { format } from 'date-fns';
+import zh from 'date-fns/locale/zh_cn';
 
 export default {
+    name: 'ProductImages',
     created() {
         this.getData();
     },
@@ -175,29 +237,45 @@ export default {
             filter2: '',
             tableColumns: [
                 {
-                    label: '产品',
+                    label: '名称',
+                    value: 'name',
+                    show: true,
+                },
+                {
+                    label: '商品',
                     value: 'productId',
-                    show: true
+                    show: true,
+                },
+                {
+                    label: '类型',
+                    value: 'typeFlag',
+                    show: true,
                 },
                 {
                     label: '图片',
                     value: 'image',
-                    show: true
+                    show: true,
                 },
                 {
                     label: '备注',
                     value: 'remark',
-                    show: true
+                    show: true,
                 },
                 {
                     label: '排序',
                     value: 'rank',
-                    show: true
+                    show: true,
                 },
+            ],
+            typeFlag: 0,
+            typeFlagOptions: [
                 {
-                    label: '名称',
-                    value: 'name',
-                    show: true
+                    value: 0,
+                    label: '轮播',
+                },
+                {
+                    value: 1,
+                    label: '客片',
                 },
             ],
             multipleMode: false,
@@ -208,37 +286,41 @@ export default {
             searchMethods: ['=', '!=', '>', '>=', '<', '<=', 'like'],
             advancedQueryColumns: [
                 {
-                    label: '产品',
-                    value: 'product_id'
+                    label: '名称',
+                    value: 'name',
+                },
+                {
+                    label: '商品',
+                    value: 'product_id',
+                },
+                {
+                    label: '类型',
+                    value: 'type_flag',
                 },
                 {
                     label: '图片',
-                    value: 'image'
+                    value: 'image',
                 },
                 {
                     label: '备注',
-                    value: 'remark'
+                    value: 'remark',
                 },
                 {
                     label: '排序',
-                    value: 'rank'
-                },
-                {
-                    label: '名称',
-                    value: 'name'
+                    value: 'rank',
                 },
             ],
             advancedQuerySearchKey: '',
             orderByStr: '',
             imgSrc: '',
             imageDialogVisible: false,
-        }
+        };
     },
     computed: {
         ...mapState(['tableHeight']),
         selection() {
             return this.$refs.table.selection.map(i => i.id);
-        }
+        },
     },
     methods: {
         pageSizeChange(size) {
@@ -251,29 +333,31 @@ export default {
             this.getData();
         },
         getData() {
-
             var data = {
                 currentPage: this.currentPage,
                 pageNumber: this.pageSize,
                 searchKey: this.filter1,
                 advancedQuery: this.advancedQuerySearchKey,
                 orderByStr: this.orderByStr,
-            }
+                typeFlag: this.typeFlag,
+            };
 
             if (this.$route.query.column) {
                 var tempColumn = this.$route.query.column;
                 data[tempColumn.split(',')[1]] = tempColumn.split(',')[0];
             }
 
-            this.$http.get({
-                url: '/productImage/page',
-                data: data
-            }).then(res => {
-                if (res.success) {
-                    this.totalNumber = res.data.page.totalNumber;
-                    this.tableData = res.data.pp;
-                }
-            })
+            this.$http
+                .get({
+                    url: '/productImage/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);
@@ -291,13 +375,13 @@ export default {
                 query: {
                     id: row.id,
                     column: this.$route.query.column,
-                }
-            })
+                },
+            });
         },
         operation1() {
             this.$notify({
                 title: '提示',
-                message: this.selection
+                message: this.selection,
             });
         },
         operation2() {
@@ -317,22 +401,31 @@ export default {
             }
         },
         advancedQuery() {
-
             this.advancedQuerySearchKey = '';
 
             if (this.advancedQueryFields.length > 0) {
-
                 var templist = [];
 
                 this.advancedQueryFields.forEach(item => {
-                    if (item.link && item.name && item.searchMethod && item.value) {
-                        var tempItem = item.link + '_,' + item.name + '_,' + item.searchMethod + '_,' + item.value;
+                    if (
+                        item.link &&
+                        item.name &&
+                        item.searchMethod &&
+                        item.value
+                    ) {
+                        var tempItem =
+                            item.link +
+                            '_,' +
+                            item.name +
+                            '_,' +
+                            item.searchMethod +
+                            '_,' +
+                            item.value;
                         templist.push(tempItem);
                     }
-                })
+                });
 
                 if (templist.length > 0) {
-
                     this.advancedQuerySearchKey = templist.join('_;');
                 }
             }
@@ -352,11 +445,9 @@ export default {
             }
         },
         tableSortQuery() {
-
             this.orderByStr = '';
 
             if (this.tableSortFields.length > 0) {
-
                 var templist = [];
 
                 this.tableSortFields.forEach(item => {
@@ -364,10 +455,9 @@ export default {
                         var tempItem = item.name + '_,' + item.order;
                         templist.push(tempItem);
                     }
-                })
+                });
 
                 if (templist.length > 0) {
-
                     this.orderByStr = templist.join('_;');
                 }
             }
@@ -376,49 +466,57 @@ export default {
             this.showTableSortDialog = false;
         },
         exportExcel() {
-            window.location.href = this.$baseUrl + "/productImage/exportExcel?searchKey="
-                + this.filter1 + "&advancedQuery=" + this.advancedQuerySearchKey + "&orderByStr=" + this.orderByStr;
+            window.location.href =
+                this.$baseUrl +
+                '/productImage/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: '/productImage/del',
-                    data: { id: row.id }
-                })
-            }).then(() => {
-                this.$message.success('删除成功');
-                this.getData();
-            }).catch(action => {
-                if (action === 'cancel') {
-                    this.$message.info('删除取消');
-                } else {
-                    this.$message.error('删除失败');
-                }
+            this.$alert('删除将无法恢复,确认要删除么?', '警告', {
+                type: 'error',
             })
+                .then(() => {
+                    return this.$http.post({
+                        url: '/productImage/del',
+                        data: { id: row.id },
+                    });
+                })
+                .then(() => {
+                    this.$message.success('删除成功');
+                    this.getData();
+                })
+                .catch(action => {
+                    if (action === 'cancel') {
+                        this.$message.info('删除取消');
+                    } else {
+                        this.$message.error('删除失败');
+                    }
+                });
         },
         DateTimeFormatter(row, column, cellValue) {
             if (cellValue) {
-                return format(cellValue, 'YYYY/MM/DD HH:mm', { locale: zh })
+                return format(cellValue, 'YYYY/MM/DD HH:mm', { locale: zh });
             }
-
         },
         DateFormatter(row, column, cellValue) {
             if (cellValue) {
-                return format(cellValue, 'YYYY/MM/DD', { locale: zh })
+                return format(cellValue, 'YYYY/MM/DD', { locale: zh });
             }
-
         },
         showImg(img) {
             this.imgSrc = img;
             this.imageDialogVisible = true;
         },
-
-    }
-}
+    },
+};
 </script>
 <style lang="less" scoped>
 </style>

+ 5 - 2
src/main/vue/src/pages/ProductInfo.vue

@@ -51,6 +51,9 @@
             <el-form-item prop="price" label="默认价格">
                 <el-input v-model="formData.price"></el-input>
             </el-form-item>
+            <el-form-item prop="downPayment" label="定金价格">
+                <el-input v-model="formData.downPayment"></el-input>
+            </el-form-item>
             <el-form-item prop="onShelf" label="上下架">
                 <el-switch v-model="formData.onShelf" active-color="#13ce66" inactive-color="#ff4949" :disabled="'onShelf'==subColumn">
                 </el-switch>
@@ -75,14 +78,14 @@
                 <el-input v-model="formData.salesVolume" :disabled="'salesVolume'==subColumn"></el-input>
             </el-form-item>
 
-            <el-form-item prop="outFlag" label="外链">
+            <!-- <el-form-item prop="outFlag" label="外链">
                 <el-switch v-model="formData.outFlag" active-color="#13ce66" inactive-color="#ff4949">
                 </el-switch>
             </el-form-item>
 
             <el-form-item v-if="formData.outFlag" prop="outUrl" label="外链地址">
                 <el-input v-model="formData.outUrl"></el-input>
-            </el-form-item>
+            </el-form-item> -->
 
             <el-form-item>
                 <el-button @click="onSave" :loading="$store.state.fetchingData" type="primary">保存</el-button>

+ 17 - 2
src/main/vue/src/pages/ProductInfos.vue

@@ -13,7 +13,7 @@
                 </el-option>
             </el-select>
             <el-select v-model="itemType" clearable filterable placeholder="类目" @change="storeIdChange" size="small" style="width:120px">
-               <el-option v-for="item in itemTypes" :key="item.id" :label="item.typeName" :value="item.id">
+                <el-option v-for="item in itemTypes" :key="item.id" :label="item.typeName" :value="item.id">
                 </el-option>
             </el-select>
             <el-input placeholder="关键字" v-model="filter1" clearable class="filter-item" size="small" style="width:120px"></el-input>
@@ -101,10 +101,25 @@
 
             <el-table-column v-if="isColumnShow('salesVolume')" align="center" prop="salesVolume" label="销量" min-width="100">
             </el-table-column>
-            <el-table-column label="操作" align="center" fixed="right" min-width="150">
+            <el-table-column label="操作" align="center" fixed="right" min-width="170">
                 <template slot-scope="scope">
                     <!-- <el-button @click="detailRow(scope.row)" type="primary" size="mini" plain>详情</el-button> -->
+
                     <el-button @click="editRow(scope.row)" size="mini" plain>编辑</el-button>
+
+                    <el-dropdown>
+                        <el-button type="warning" size="mini" plain>
+                            更多
+                            <i class="el-icon-arrow-down el-icon--right"></i>
+                        </el-button>
+                        <el-dropdown-menu slot="dropdown">
+                            <el-button @click="$router.push({path:'/productImages',query:{column:scope.row.id+',productId'}})" type="primary" size="small" plain>图片</el-button>
+                            <el-button @click="$router.push({path:'/productParameters',query:{column:scope.row.id+',productId'}})" type="primary" size="small" plain>详情</el-button>
+                            <el-button @click="$router.push({path:'/productComments',query:{column:scope.row.id+',productId'}})" type="primary" size="small" plain>评论</el-button>
+
+                        </el-dropdown-menu>
+                    </el-dropdown>
+
                 </template>
             </el-table-column>
         </el-table>

+ 142 - 82
src/main/vue/src/pages/ProductParameter.vue

@@ -2,14 +2,30 @@
     <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="productId" label="产品ID">
-                <el-input v-model="formData.productId" :disabled="'productId'==subColumn"></el-input>
+            <el-form-item prop="productId" label="商品">
+                <template>
+                    <el-select v-model="formData.productId" clearable filterable placeholder="请选择" :disabled="'productId'==subColumn">
+                        <el-option
+                                   v-for="item in productIdOptions"
+                                   :key="item.id"
+                                   :label="item.title"
+                                   :value="item.id">
+                        </el-option>
+                    </el-select>
+                </template>
             </el-form-item>
             <el-form-item prop="parameterKey" label="产品参数Key">
                 <el-input v-model="formData.parameterKey" :disabled="'parameterKey'==subColumn"></el-input>
             </el-form-item>
             <el-form-item prop="parameterValue" label="产品参数值">
-                <el-input v-model="formData.parameterValue" :disabled="'parameterValue'==subColumn"></el-input>
+                <template>
+                    <div v-for="(item,index) in formData.parameterValue" :key="index+item" style="margin-bottom:10px">
+                        <el-input v-model="formData.parameterValue[index]" style="width:180px"></el-input>
+                        <el-button @click="onDeleteKeyword(index)" type="danger">删除</el-button>
+                    </div>
+                    <el-button @click="addKeyword" type="primary">添加</el-button>
+                </template>
+
             </el-form-item>
             <el-form-item prop="remark" label="备注">
                 <el-input v-model="formData.remark" :disabled="'remark'==subColumn"></el-input>
@@ -26,76 +42,99 @@
     </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: 'ProductParameter',
-        created() {
+import formValidator from '../formValidator';
+import { mapState } from 'vuex';
+import { format } from 'date-fns';
+import zh from 'date-fns/locale/zh_cn';
 
-            if (this.$route.query.column) {
-                this.subColumn = this.$route.query.column.split(',')[1];
-                this.subValue = this.$route.query.column.split(',')[0];
+export default {
+    name: 'ProductParameter',
+    created() {
+        if (this.$route.query.column) {
+            this.subColumn = this.$route.query.column.split(',')[1];
+            this.subValue = this.$route.query.column.split(',')[0];
+            if ('productId' == this.subColumn) {
+                this.subValue = Number(this.subValue);
             }
+        }
 
-            if (this.$route.query.id) {
-                this.$http.get({
+        if (this.$route.query.id) {
+            this.$http
+                .get({
                     url: '/productParameter/getOne',
                     data: {
-                        id: this.$route.query.id
-                    }
-                }).then(res => {
+                        id: this.$route.query.id,
+                    },
+                })
+                .then(res => {
                     if (res.success) {
-                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    this.formData = res.data;
+                        if (res.data.parameterValue) {
+                            res.data.parameterValue = res.data.parameterValue.split(
+                                ',',
+                            );
+                        } else {
+                            res.data.parameterValue = [];
+                        }
+
+                        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;
-                }
+                });
+        } 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;
-                    }
-                });
+        this.$http
+            .get({
+                url: '/productInfo/all',
+            })
+            .then(res => {
+                if (res.success) {
+                    this.productIdOptions = res.data;
+                }
+            });
+    },
+    data() {
+        return {
+            saving: false,
+            formData: {
+                parameterValue: [],
             },
-            logicalValidate() {
-                let logicalData = {
-                };
-
-                if (JSON.stringify(logicalData) == '{}') {
-                    this.submit();
+            rules: {},
+            subColumn: '',
+            subValue: '',
+            productIdOptions: [],
+        };
+    },
+    computed: {
+        ...mapState(['userInfo']),
+    },
+    methods: {
+        onSave() {
+            this.$refs.form.validate(valid => {
+                if (valid) {
+                    this.logicalValidate();
                 } else {
-                    this.$http.get({
+                    return false;
+                }
+            });
+        },
+        logicalValidate() {
+            let logicalData = {};
+
+            if (JSON.stringify(logicalData) == '{}') {
+                this.submit();
+            } else {
+                this.$http
+                    .get({
                         url: '/productParameter/getOne',
-                        data: logicalData
-                    }).then(res => {
+                        data: logicalData,
+                    })
+                    .then(res => {
                         if (res.success) {
                             let logicalFlag = true;
                             if (res.data) {
@@ -111,50 +150,71 @@
                             if (logicalFlag) {
                                 this.submit();
                             } else {
-                                this.$message.warning('逻辑关键字:'+''+'验证失败')
+                                this.$message.warning(
+                                    '逻辑关键字:' + '' + '验证失败',
+                                );
                             }
-
                         } else {
-                            this.$message.warning('逻辑关键字:'+''+'验证失败')
+                            this.$message.warning(
+                                '逻辑关键字:' + '' + '验证失败',
+                            );
                         }
                     });
-                }
-            },
-            submit() {
-                let data = {...this.formData};
+            }
+        },
+        submit() {
+            let data = { ...this.formData };
 
-                                                                                                                                                                                                
-                this.$http.post({
-                    url: this.formData.id ? '/productParameter/update' : '/productParameter/save',
-                    data: data
-                }).then(res => {
+            data.parameterValue = data.parameterValue.join();
+
+            this.$http
+                .post({
+                    url: this.formData.id
+                        ? '/productParameter/update'
+                        : '/productParameter/save',
+                    data: data,
+                })
+                .then(res => {
                     if (res.success) {
                         this.$message.success('成功');
                         this.$router.go(-1);
                     } else {
-                        this.$message.warning('失败')
+                        this.$message.warning('失败');
                     }
                 });
-            },
-            onDelete() {
-                this.$alert('删除将无法恢复,确认要删除么?', '警告', { type: 'error' }).then(() => {
+        },
+        onDelete() {
+            this.$alert('删除将无法恢复,确认要删除么?', '警告', {
+                type: 'error',
+            })
+                .then(() => {
                     return this.$http.post({
                         url: '/productParameter/del',
-                        data: { id: this.formData.id }
-                    })
-                }).then(() => {
+                        data: { id: this.formData.id },
+                    });
+                })
+                .then(() => {
                     this.$message.success('删除成功');
                     this.$router.go(-1);
-                }).catch(action => {
+                })
+                .catch(action => {
                     if (action === 'cancel') {
                         this.$message.info('删除取消');
                     } else {
                         this.$message.error('删除失败');
                     }
-                })
-            },
-        }
-    }
+                });
+        },
+        onDeleteKeyword(index) {
+            console.log('111');
+            this.formData.parameterValue.splice(index, 1);
+        },
+        addKeyword() {
+            this.formData.parameterValue.push('');
+            console.log('222');
+        },
+    },
+};
 </script>
 <style lang="less" scoped>
 </style>

+ 312 - 298
src/main/vue/src/pages/ProductParameters.vue

@@ -1,7 +1,7 @@
 <template>
     <div>
         <div class="filters-container">
-        
+
             <el-input placeholder="关键字" size="small" v-model="filter1" clearable class="filter-item"></el-input>
             <el-button @click="searchData" type="primary" size="small" icon="el-icon-search" class="filter-item">搜索
             </el-button>
@@ -19,7 +19,7 @@
             </el-button>
             <el-dropdown trigger="click" size="medium" class="table-column-filter">
                 <span>
-                  筛选数据<i class="el-icon-arrow-down el-icon--right"></i>
+                    筛选数据<i class="el-icon-arrow-down el-icon--right"></i>
                 </span>
                 <el-dropdown-menu slot="dropdown" class="table-column-filter-wrapper">
                     <el-checkbox v-for="item in tableColumns" :key="item.value" v-model="item.show">{{item.label}}
@@ -28,64 +28,64 @@
             </el-dropdown>
         </div>
         <el-table
-                :data="tableData"
-                :height="tableHeight"
-                row-key="id"
-                ref="table">
+                  :data="tableData"
+                  :height="tableHeight"
+                  row-key="id"
+                  ref="table">
+            <el-table-column
+                             v-if="multipleMode"
+                             align="center"
+                             type="selection"
+                             width="50">
+            </el-table-column>
             <el-table-column
-                    v-if="multipleMode"
-                    align="center"
-                    type="selection"
-                    width="50">
+                             type="index"
+                             min-width="50"
+                             align="center">
             </el-table-column>
+
             <el-table-column
-                    type="index"
-                    min-width="50"
-                    align="center">
+                             v-if="isColumnShow('productId')"
+                             prop="productId"
+                             label="产品ID"
+                             min-width="50">
             </el-table-column>
-                                                                                                                                                                                                    
-                                            <el-table-column
-                                v-if="isColumnShow('productId')"
-                                prop="productId"
-                                label="产品ID"
-                                min-width="100">
-                        </el-table-column>
-                                                                
-                                            <el-table-column
-                                v-if="isColumnShow('parameterKey')"
-                                prop="parameterKey"
-                                label="产品参数Key"
-                                min-width="100">
-                        </el-table-column>
-                                                                
-                                            <el-table-column
-                                v-if="isColumnShow('parameterValue')"
-                                prop="parameterValue"
-                                label="产品参数值"
-                                min-width="100">
-                        </el-table-column>
-                                                                
-                                            <el-table-column
-                                v-if="isColumnShow('remark')"
-                                prop="remark"
-                                label="备注"
-                                min-width="100">
-                        </el-table-column>
-                                                                
-                                            <el-table-column
-                                v-if="isColumnShow('rank')"
-                                prop="rank"
-                                label="排序"
-                                min-width="100">
-                        </el-table-column>
-                                                            <el-table-column
-                    label="操作"
-                    align="center"
-                    fixed="right"
-                    min-width="150"
-            >
+
+            <el-table-column
+                             v-if="isColumnShow('parameterKey')"
+                             prop="parameterKey"
+                             label="产品参数Key"
+                             min-width="100">
+            </el-table-column>
+
+            <el-table-column
+                             :show-overflow-tooltip="true"
+                             v-if="isColumnShow('parameterValue')"
+                             prop="parameterValue"
+                             label="产品参数值"
+                             min-width="100">
+            </el-table-column>
+
+            <el-table-column
+                             v-if="isColumnShow('remark')"
+                             prop="remark"
+                             label="备注"
+                             min-width="100">
+            </el-table-column>
+
+            <el-table-column
+                             v-if="isColumnShow('rank')"
+                             prop="rank"
+                             label="排序"
+                             min-width="100">
+            </el-table-column>
+            <el-table-column
+                             label="操作"
+                             align="center"
+                             fixed="right"
+                             min-width="150">
                 <template slot-scope="scope">
-                                        <el-button @click="editRow(scope.row)" type="primary" size="mini" plain>编辑</el-button>
+                    <el-button @click="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>
@@ -100,14 +100,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">
@@ -202,271 +202,285 @@
     </div>
 </template>
 <script>
-    import {mapState} from 'vuex'
-    import {format} from 'date-fns'
-    import zh from 'date-fns/locale/zh_cn'
-
-    export default {
-        name: 'ProductParameters',
-        created() {
+import { mapState } from 'vuex';
+import { format } from 'date-fns';
+import zh from 'date-fns/locale/zh_cn';
+
+export default {
+    name: 'ProductParameters',
+    created() {
+        this.getData();
+    },
+    data() {
+        return {
+            totalNumber: 0,
+            totalPage: 10,
+            currentPage: 1,
+            pageSize: 20,
+            tableData: [],
+            filter1: '',
+            filter2: '',
+            tableColumns: [
+                {
+                    label: '产品ID',
+                    value: 'productId',
+                    show: true,
+                },
+                {
+                    label: '产品参数Key',
+                    value: 'parameterKey',
+                    show: true,
+                },
+                {
+                    label: '产品参数值',
+                    value: 'parameterValue',
+                    show: true,
+                },
+                {
+                    label: '备注',
+                    value: 'remark',
+                    show: true,
+                },
+                {
+                    label: '排序',
+                    value: 'rank',
+                    show: true,
+                },
+            ],
+            multipleMode: false,
+            showAdvancedQueryDialog: false,
+            advancedQueryFields: [],
+            showTableSortDialog: false,
+            tableSortFields: [],
+            searchMethods: ['=', '!=', '>', '>=', '<', '<=', 'like'],
+            advancedQueryColumns: [
+                {
+                    label: '产品ID',
+                    value: 'product_id',
+                },
+                {
+                    label: '产品参数Key',
+                    value: 'parameter_key',
+                },
+                {
+                    label: '产品参数值',
+                    value: 'parameter_value',
+                },
+                {
+                    label: '备注',
+                    value: 'remark',
+                },
+                {
+                    label: '排序',
+                    value: 'rank',
+                },
+            ],
+            advancedQuerySearchKey: '',
+            orderByStr: '',
+            imgSrc: '',
+            imageDialogVisible: false,
+        };
+    },
+    computed: {
+        ...mapState(['tableHeight']),
+        selection() {
+            return this.$refs.table.selection.map(i => i.id);
+        },
+    },
+    methods: {
+        pageSizeChange(size) {
+            this.currentPage = 1;
+            this.pageSize = size;
             this.getData();
         },
-        data() {
-            return {
-                totalNumber: 0,
-                totalPage: 10,
-                currentPage: 1,
-                pageSize: 20,
-                tableData: [],
-                filter1: '',
-                filter2: '',
-                tableColumns: [
-                                                                                                                                                                                                                                                                                                                                                {
-                                label: '产品ID',
-                                value: 'productId',
-                                show: true
-                            },
-                                                                                                {
-                                label: '产品参数Key',
-                                value: 'parameterKey',
-                                show: true
-                            },
-                                                                                                {
-                                label: '产品参数值',
-                                value: 'parameterValue',
-                                show: true
-                            },
-                                                                                                {
-                                label: '备注',
-                                value: 'remark',
-                                show: true
-                            },
-                                                                                                {
-                                label: '排序',
-                                value: 'rank',
-                                show: true
-                            },
-                                                            ],
-                multipleMode: false,
-                showAdvancedQueryDialog: false,
-                advancedQueryFields: [],
-                showTableSortDialog: false,
-                tableSortFields: [],
-                searchMethods: ['=', '!=', '>', '>=', '<', '<=', 'like'],
-                advancedQueryColumns: [
-                                                                                                                                                                                                                                                                                                                                                {
-                                label: '产品ID',
-                                value: 'product_id'
-                            },
-                                                                                                {
-                                label: '产品参数Key',
-                                value: 'parameter_key'
-                            },
-                                                                                                {
-                                label: '产品参数值',
-                                value: 'parameter_value'
-                            },
-                                                                                                {
-                                label: '备注',
-                                value: 'remark'
-                            },
-                                                                                                {
-                                label: '排序',
-                                value: 'rank'
-                            },
-                                                            ],
-                advancedQuerySearchKey: '',
-                orderByStr: '',
-                imgSrc: '',
-                imageDialogVisible: false,
-            }
+        currentPageChange(page) {
+            this.currentPage = page;
+            this.getData();
         },
-        computed: {
-            ...mapState(['tableHeight']),
-            selection() {
-                return this.$refs.table.selection.map(i => i.id);
+        getData() {
+            var data = {
+                currentPage: this.currentPage,
+                pageNumber: this.pageSize,
+                searchKey: this.filter1,
+                advancedQuery: this.advancedQuerySearchKey,
+                orderByStr: this.orderByStr,
+            };
+
+            if (this.$route.query.column) {
+                var tempColumn = this.$route.query.column;
+                data[tempColumn.split(',')[1]] = tempColumn.split(',')[0];
             }
-        },
-        methods: {
-            pageSizeChange(size) {
-                this.currentPage = 1;
-                this.pageSize = size;
-                this.getData();
-            },
-            currentPageChange(page) {
-                this.currentPage = page;
-                this.getData();
-            },
-            getData() {
-
-                var data = {
-                    currentPage: this.currentPage,
-                    pageNumber: this.pageSize,
-                    searchKey: this.filter1,
-                    advancedQuery: this.advancedQuerySearchKey,
-                    orderByStr: this.orderByStr,
-                }
 
-                if (this.$route.query.column) {
-                    var tempColumn = this.$route.query.column;
-                    data[tempColumn.split(',')[1]] = tempColumn.split(',')[0];
-                }
-
-                this.$http.get({
+            this.$http
+                .get({
                     url: '/productParameter/page',
-                    data: data
-                }).then(res => {
+                    data: data,
+                })
+                .then(res => {
                     if (res.success) {
                         this.totalNumber = res.data.page.totalNumber;
                         this.tableData = res.data.pp;
                     }
-                })
-            },
-            isColumnShow(column) {
-                var row = this.tableColumns.find(i => i.value === column);
-                return row ? row.show : false;
-            },
-            toggleMultipleMode(multipleMode) {
-                this.multipleMode = multipleMode;
-                if (!multipleMode) {
-                    this.$refs.table.clearSelection();
-                }
-            },
-            editRow(row) {
-                this.$router.push({
-                    path: '/productParameter',
-                    query: {
-                        id: row.id,
-                        column: this.$route.query.column,
-                    }
-                })
-            },
-            operation1() {
-                this.$notify({
-                    title: '提示',
-                    message: this.selection
                 });
-            },
-            operation2() {
-                this.$message('操作2');
-            },
-            addField() {
-                this.advancedQueryFields.push({
-                    link: 'AND',
-                    name: '',
-                    searchMethod: '=',
-                    value: '',
+        },
+        isColumnShow(column) {
+            var row = this.tableColumns.find(i => i.value === column);
+            return row ? row.show : false;
+        },
+        toggleMultipleMode(multipleMode) {
+            this.multipleMode = multipleMode;
+            if (!multipleMode) {
+                this.$refs.table.clearSelection();
+            }
+        },
+        editRow(row) {
+            this.$router.push({
+                path: '/productParameter',
+                query: {
+                    id: row.id,
+                    column: this.$route.query.column,
+                },
+            });
+        },
+        operation1() {
+            this.$notify({
+                title: '提示',
+                message: this.selection,
+            });
+        },
+        operation2() {
+            this.$message('操作2');
+        },
+        addField() {
+            this.advancedQueryFields.push({
+                link: 'AND',
+                name: '',
+                searchMethod: '=',
+                value: '',
+            });
+        },
+        removeField(i) {
+            if (this.advancedQueryFields.length > 0) {
+                this.advancedQueryFields.splice(i, 1);
+            }
+        },
+        advancedQuery() {
+            this.advancedQuerySearchKey = '';
+
+            if (this.advancedQueryFields.length > 0) {
+                var templist = [];
+
+                this.advancedQueryFields.forEach(item => {
+                    if (
+                        item.link &&
+                        item.name &&
+                        item.searchMethod &&
+                        item.value
+                    ) {
+                        var tempItem =
+                            item.link +
+                            '_,' +
+                            item.name +
+                            '_,' +
+                            item.searchMethod +
+                            '_,' +
+                            item.value;
+                        templist.push(tempItem);
+                    }
                 });
-            },
-            removeField(i) {
-                if (this.advancedQueryFields.length > 0) {
-                    this.advancedQueryFields.splice(i, 1);
-                }
-            },
-            advancedQuery() {
-
-                this.advancedQuerySearchKey = '';
-
-                if (this.advancedQueryFields.length > 0) {
 
-                    var templist = [];
+                if (templist.length > 0) {
+                    this.advancedQuerySearchKey = templist.join('_;');
+                }
+            }
 
-                    this.advancedQueryFields.forEach(item => {
-                        if (item.link && item.name && item.searchMethod && item.value) {
-                            var tempItem = item.link + '_,' + item.name + '_,' + item.searchMethod + '_,' + item.value;
-                            templist.push(tempItem);
-                        }
-                    })
+            this.getData();
+            this.showAdvancedQueryDialog = false;
+        },
+        addSortField() {
+            this.tableSortFields.push({
+                name: '',
+                order: 'asc',
+            });
+        },
+        removeSortField(i) {
+            if (this.tableSortFields.length > 0) {
+                this.tableSortFields.splice(i, 1);
+            }
+        },
+        tableSortQuery() {
+            this.orderByStr = '';
 
-                    if (templist.length > 0) {
+            if (this.tableSortFields.length > 0) {
+                var templist = [];
 
-                        this.advancedQuerySearchKey = templist.join('_;');
+                this.tableSortFields.forEach(item => {
+                    if (item.name && item.order) {
+                        var tempItem = item.name + '_,' + item.order;
+                        templist.push(tempItem);
                     }
-                }
-
-                this.getData();
-                this.showAdvancedQueryDialog = false;
-            },
-            addSortField() {
-                this.tableSortFields.push({
-                    name: '',
-                    order: 'asc',
                 });
-            },
-            removeSortField(i) {
-                if (this.tableSortFields.length > 0) {
-                    this.tableSortFields.splice(i, 1);
-                }
-            },
-            tableSortQuery() {
-
-                this.orderByStr = '';
-
-                if (this.tableSortFields.length > 0) {
-
-                    var templist = [];
 
-                    this.tableSortFields.forEach(item => {
-                        if (item.name && item.order) {
-                            var tempItem = item.name + '_,' + item.order;
-                            templist.push(tempItem);
-                        }
-                    })
-
-                    if (templist.length > 0) {
-
-                        this.orderByStr = templist.join('_;');
-                    }
+                if (templist.length > 0) {
+                    this.orderByStr = templist.join('_;');
                 }
+            }
 
-                this.getData();
-                this.showTableSortDialog = false;
-            },
-            exportExcel() {
-                window.location.href = this.$baseUrl + "/productParameter/exportExcel?searchKey="
-                        + this.filter1 + "&advancedQuery=" + this.advancedQuerySearchKey+"&orderByStr=" + this.orderByStr;
-            },
-            searchData() {
-                this.currentPage = 1;
-                this.getData();
-            },
-            deleteRow(row) {
-                this.$alert('删除将无法恢复,确认要删除么?', '警告', {type: 'error'}).then(() => {
+            this.getData();
+            this.showTableSortDialog = false;
+        },
+        exportExcel() {
+            window.location.href =
+                this.$baseUrl +
+                '/productParameter/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: '/productParameter/del',
-                        data: {id: row.id}
-                    })
-                }).then(() => {
+                        data: { id: row.id },
+                    });
+                })
+                .then(() => {
                     this.$message.success('删除成功');
                     this.getData();
-                }).catch(action => {
+                })
+                .catch(action => {
                     if (action === 'cancel') {
                         this.$message.info('删除取消');
                     } else {
                         this.$message.error('删除失败');
                     }
-                })
-            },
-            DateTimeFormatter(row, column, cellValue) {
-                if (cellValue) {
-                    return format(cellValue, 'YYYY/MM/DD HH:mm', {locale: zh})
-                }
-
-            },
-            DateFormatter(row, column, cellValue) {
-                if (cellValue) {
-                    return format(cellValue, 'YYYY/MM/DD', {locale: zh})
-                }
-
-            },
-            showImg(img) {
-                this.imgSrc = img;
-                this.imageDialogVisible = true;
-            },
-
-        }
-    }
+                });
+        },
+        DateTimeFormatter(row, column, cellValue) {
+            if (cellValue) {
+                return format(cellValue, 'YYYY/MM/DD HH:mm', { locale: zh });
+            }
+        },
+        DateFormatter(row, column, cellValue) {
+            if (cellValue) {
+                return format(cellValue, 'YYYY/MM/DD', { locale: zh });
+            }
+        },
+        showImg(img) {
+            this.imgSrc = img;
+            this.imageDialogVisible = true;
+        },
+    },
+};
 </script>
 <style lang="less" scoped>
-
 </style>

+ 2 - 1
src/main/vue/src/pages/StoreInfos.vue

@@ -84,7 +84,8 @@
 
       <el-table-column label="操作" align="center" fixed="right" min-width="220">
         <template slot-scope="scope">
-          <el-button @click="detailRow(scope.row)"  size="mini" plain>详情</el-button>
+          <!-- <el-button @click="detailRow(scope.row)"  size="mini" plain>详情</el-button> -->
+          <el-button @click="$router.push({path:'/productInfos',query:{column:scope.row.id+',storeId'}})" type="primary" size="small" plain>商品</el-button>
           <el-button @click="editRow(scope.row)" type="primary" size="mini" plain>编辑</el-button>
           <el-button @click="updateRow(scope.row,'N')" v-if="scope.row.useFlag=='Y'" type="danger" size="mini" plain>下架</el-button>
           <el-button @click="updateRow(scope.row,'Y')" v-if="scope.row.useFlag=='N'" type="success" size="mini" plain>上架</el-button>

+ 7 - 1
src/main/vue/src/pages/StoreIntroduction.vue

@@ -22,7 +22,7 @@
             <el-form-item prop="storeId" label="店铺">
                 <el-input v-model="formData.storeId" :disabled="'storeId'==subColumn"></el-input>
             </el-form-item>
-            
+
             <el-form-item prop="address" label="地址">
                 <el-input v-model="formData.address" :disabled="'address'==subColumn"></el-input>
             </el-form-item>
@@ -72,6 +72,12 @@ export default {
                         if (this.$route.query.column) {
                             this.formData[this.subColumn] = this.subValue;
                         }
+
+                        if (this.formData.banner) {
+                            this.formData.banner = this.formData.banner.split(
+                                ',',
+                            );
+                        }
                     }
                 });
         } else {

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

@@ -398,16 +398,6 @@ const router = new Router({
             name: 'SystemConfigs',
             component: () => import('../pages/SystemConfigs')
         },
-        {
-            path: '/userOrder',
-            name: 'UserOrder',
-            component: () => import('../pages/UserOrder')
-        },
-        {
-            path: '/userOrders',
-            name: 'UserOrders',
-            component: () => import('../pages/UserOrders')
-        },
         {
             path: '/storeLabel',
             name: 'StoreLabel',