|
@@ -4,6 +4,7 @@
|
|
|
|
|
|
<resultMap type="com.bosshand.virgo.api.model.Project" id="result">
|
|
|
<id column="id" property="id"/>
|
|
|
+ <result column="type" property="type"/>
|
|
|
<result column="name" property="name"/>
|
|
|
<result column="createDate" property="createDate"/>
|
|
|
<result column="organizationId" property="organizationId"/>
|
|
@@ -17,6 +18,7 @@
|
|
|
|
|
|
<resultMap type="com.bosshand.virgo.api.model.Project" id="projectResult">
|
|
|
<id column="id" property="id"/>
|
|
|
+ <result column="type" property="type"/>
|
|
|
<result column="name" property="name"/>
|
|
|
<result column="createDate" property="createDate"/>
|
|
|
<result column="organizationId" property="organizationId"/>
|
|
@@ -65,8 +67,8 @@
|
|
|
</select>
|
|
|
|
|
|
<insert id="insert" parameterType="com.bosshand.virgo.api.model.Project" useGeneratedKeys="true" keyProperty="id">
|
|
|
- INSERT INTO project(`name`, `createDate`, `organizationId`, `address`, `picture`, `tagIds`, `comment`, `data`)
|
|
|
- VALUES (#{name}, now(), #{organizationId}, #{address}, #{picture}, #{tagIds}, #{comment}, #{data})
|
|
|
+ INSERT INTO project(`type`, `name`, `createDate`, `organizationId`, `address`, `picture`, `tagIds`, `comment`, `data`)
|
|
|
+ VALUES (#{type}, #{name}, now(), #{organizationId}, #{address}, #{picture}, #{tagIds}, #{comment}, #{data})
|
|
|
</insert>
|
|
|
|
|
|
<update id="delete">
|
|
@@ -76,6 +78,7 @@
|
|
|
<update id="update" parameterType="com.bosshand.virgo.api.model.Project">
|
|
|
UPDATE project
|
|
|
<trim prefix="set" suffixOverrides=",">
|
|
|
+ <if test="type!=null">type=#{type},</if>
|
|
|
<if test="name!=null">name=#{name},</if>
|
|
|
<if test="createDate!=null">createDate=#{createDate},</if>
|
|
|
<if test="organizationId!=0">organizationId=#{organizationId},</if>
|
|
@@ -98,6 +101,7 @@
|
|
|
FIND_IN_SET (#{tagId}, tagIds)
|
|
|
</foreach>
|
|
|
</if>
|
|
|
+ <if test="type != null">and type = #{type}</if>
|
|
|
<if test="name != null and name !=''">and name = #{name}</if>
|
|
|
<if test="createDate != null and createDate !=''">and createDate = #{createDate}</if>
|
|
|
</where>
|
|
@@ -113,6 +117,7 @@
|
|
|
FIND_IN_SET (#{tagId}, a.tagIds)
|
|
|
</foreach>
|
|
|
</if>
|
|
|
+ <if test="p.type != null">and a.type = #{p.type}</if>
|
|
|
<if test="p.name!=null">and a.name=#{p.name}</if>
|
|
|
<if test="p.createDate!=null and p.createDate !=''">and a.createDate = #{p.createDate}</if>
|
|
|
</where>
|