dcs 3 months ago
parent
commit
7d6c4cdbb7

+ 12 - 0
virgo.api/src/main/java/com/bosshand/virgo/api/workark/model/Product.java

@@ -84,6 +84,11 @@ public class Product {
      */
     private String subtitle;
 
+    /**
+     * 客服id
+     */
+    private String customerId;
+
     public Long getId() {
         return id;
     }
@@ -204,4 +209,11 @@ public class Product {
         this.subtitle = subtitle;
     }
 
+    public String getCustomerId() {
+        return customerId;
+    }
+
+    public void setCustomerId(String customerId) {
+        this.customerId = customerId;
+    }
 }

+ 13 - 2
virgo.api/src/main/resources/mapper/ProductMapper.xml

@@ -20,6 +20,7 @@
         <result column="detailedImage" property="detailedImage"/>
         <result column="contract" property="contract"/>
         <result column="subtitle" property="subtitle"/>
+        <result column="customerId" property="customerId"/>
     </resultMap>
 
     <select id="get" resultMap="result">
@@ -44,6 +45,9 @@
             <if test="productLevelId != 0">
                 and productLevelId = #{productLevelId}
             </if>
+            <if test="customerId != null">
+                and customerId = #{customerId}
+            </if>
             and deleteState != 1
         </where>
     </select>
@@ -66,6 +70,9 @@
             <if test="productLevelId != 0">
                 and productLevelId = #{productLevelId}
             </if>
+            <if test="customerId != null">
+                and customerId = #{customerId}
+            </if>
             and deleteState != 1
         </where>
     </select>
@@ -88,14 +95,17 @@
             <if test="p.productLevelId != 0">
                 and productLevelId = #{p.productLevelId}
             </if>
+            <if test="customerId != null">
+                and customerId = #{customerId}
+            </if>
             and deleteState != 1
         </where>
         order by createTime desc limit #{currIndex} , #{pageSize}
     </select>
 
     <insert id="save" useGeneratedKeys="true" keyProperty="id">
-        INSERT INTO workark_product (organizationId, type, productLevelId, createTime, name, price, intro, listDisplayImage, rotatingImages, detailedImage, contract, subtitle)
-        VALUES (#{organizationId}, #{type}, #{productLevelId}, now(), #{name}, #{price}, #{intro}, #{listDisplayImage}, #{rotatingImages}, #{detailedImage}, #{contract}, #{subtitle})
+        INSERT INTO workark_product (organizationId, type, productLevelId, createTime, name, price, intro, listDisplayImage, rotatingImages, detailedImage, contract, subtitle, customerId)
+        VALUES (#{organizationId}, #{type}, #{productLevelId}, now(), #{name}, #{price}, #{intro}, #{listDisplayImage}, #{rotatingImages}, #{detailedImage}, #{contract}, #{subtitle}, #{customerId})
     </insert>
 
     <update id="update" parameterType="com.bosshand.virgo.api.workark.model.Product">
@@ -114,6 +124,7 @@
             <if test="detailedImage!=null">detailedImage=#{detailedImage},</if>
             <if test="contract!=null">contract=#{contract},</if>
             <if test="subtitle!=null">subtitle=#{subtitle},</if>
+            <if test="customerId!=null">customerId=#{customerId},</if>
         </trim>
         WHERE id=#{id}
     </update>