dcs il y a 11 mois
Parent
commit
b9531703ec
1 fichiers modifiés avec 2 ajouts et 1 suppressions
  1. 2 1
      virgo.api/src/main/resources/mapper/TagMapper.xml

+ 2 - 1
virgo.api/src/main/resources/mapper/TagMapper.xml

@@ -50,7 +50,7 @@
     </select>
 
     <insert id="insert" useGeneratedKeys="true" keyProperty="id">
-        INSERT INTO tag (name, type, organizationId) VALUES (#{name}, #{type}, #{organizationId})
+        INSERT INTO tag (code, name, type, organizationId) VALUES (#{code}, #{name}, #{type}, #{organizationId})
     </insert>
 
     <delete id="delete">
@@ -60,6 +60,7 @@
     <update id="update" parameterType="com.bosshand.virgo.api.model.Tag">
         UPDATE tag
         <trim prefix="set" suffixOverrides=",">
+            <if test="code!=null">code=#{code},</if>
             <if test="name!=null">name=#{name},</if>
             <if test="type!=-1">type=#{type},</if>
             <if test="organizationId!=0">organizationId=#{organizationId},</if>