dcs 4 weeks ago
parent
commit
e1ca0ad93a

+ 20 - 0
virgo.api/src/main/java/com/bosshand/virgo/api/workark/model/ProductLevel.java

@@ -22,6 +22,10 @@ public class ProductLevel {
      */
     private String showPictures;
 
+    private String iconName;
+
+    private String iconColor;
+
     private List<ProductLevel> children;
 
     List<Product> productList;
@@ -74,6 +78,22 @@ public class ProductLevel {
         this.showPictures = showPictures;
     }
 
+    public String getIconName() {
+        return iconName;
+    }
+
+    public void setIconName(String iconName) {
+        this.iconName = iconName;
+    }
+
+    public String getIconColor() {
+        return iconColor;
+    }
+
+    public void setIconColor(String iconColor) {
+        this.iconColor = iconColor;
+    }
+
     public List<ProductLevel> getChildren() {
         return children;
     }

+ 5 - 1
virgo.api/src/main/resources/mapper/ProductLevelMapper.xml

@@ -11,6 +11,8 @@
         <result column="remark" property="remark"/>
         <result column="sign" property="sign"/>
         <result column="showPictures" property="showPictures"/>
+        <result column="iconName" property="iconName"/>
+        <result column="iconColor" property="iconColor"/>
         <collection property="productList" ofType="com.bosshand.virgo.api.workark.model.Product" resultMap="com.bosshand.virgo.api.workark.dao.ProductDao.result" columnPrefix="product_"/>
     </resultMap>
 
@@ -49,7 +51,7 @@
     </select>
 
     <insert id="save" parameterType="com.bosshand.virgo.api.workark.model.ProductLevel" useGeneratedKeys="true" keyProperty="id">
-        INSERT into workark_product_level(name, parentId, remark, sign, showPictures) values(#{name}, #{parentId}, #{remark}, #{sign}, #{showPictures})
+        INSERT into workark_product_level(name, parentId, remark, sign, showPictures, iconName, iconColor) values(#{name}, #{parentId}, #{remark}, #{sign}, #{showPictures}, #{iconName}, #{iconColor})
     </insert>
 
     <update id="update" parameterType="com.bosshand.virgo.api.workark.model.ProductLevel">
@@ -59,6 +61,8 @@
             <if test="remark!=null">remark=#{remark},</if>
             <if test="sign!=null">sign=#{sign},</if>
             <if test="showPictures!=null">showPictures=#{showPictures},</if>
+            <if test="iconName!=null">iconName=#{iconName},</if>
+            <if test="iconColor!=null">iconColor=#{iconColor},</if>
         </trim>
         WHERE id=#{id}
     </update>