|
@@ -4,6 +4,11 @@
|
|
|
|
|
|
<resultMap type="com.bosshand.virgo.api.model.Project" id="result">
|
|
|
<id column="id" property="id"/>
|
|
|
+ <result column="projectType" property="projectType"/>
|
|
|
+ <result column="specificLocation" property="specificLocation"/>
|
|
|
+ <result column="completionTime" property="completionTime"/>
|
|
|
+ <result column="buildingArea" property="buildingArea"/>
|
|
|
+
|
|
|
<result column="generateWeeklyDate" property="generateWeeklyDate"/>
|
|
|
<result column="type" property="type"/>
|
|
|
<result column="name" property="name"/>
|
|
@@ -22,6 +27,11 @@
|
|
|
|
|
|
<resultMap type="com.bosshand.virgo.api.model.Project" id="projectResult">
|
|
|
<id column="id" property="id"/>
|
|
|
+ <result column="projectType" property="projectType"/>
|
|
|
+ <result column="specificLocation" property="specificLocation"/>
|
|
|
+ <result column="completionTime" property="completionTime"/>
|
|
|
+ <result column="buildingArea" property="buildingArea"/>
|
|
|
+
|
|
|
<result column="generateWeeklyDate" property="generateWeeklyDate"/>
|
|
|
<result column="type" property="type"/>
|
|
|
<result column="name" property="name"/>
|
|
@@ -93,8 +103,8 @@
|
|
|
</select>
|
|
|
|
|
|
<insert id="insert" parameterType="com.bosshand.virgo.api.model.Project" useGeneratedKeys="true" keyProperty="id">
|
|
|
- INSERT INTO project(`generateWeeklyDate`, `type`, `name`, `createDate`, `organizationId`, `address`, `addressCode`, `picture`, `tagIds`, `comment`, `coordinates`, `supportingFacilities`, `data`)
|
|
|
- VALUES (#{generateWeeklyDate}, #{type}, #{name}, now(), #{organizationId}, #{address}, #{addressCode}, #{picture}, #{tagIds}, #{comment}, #{coordinates}, #{supportingFacilities}, #{data})
|
|
|
+ INSERT INTO project(`projectType`, `specificLocation`, `completionTime`, `buildingArea`, `generateWeeklyDate`, `type`, `name`, `createDate`, `organizationId`, `address`, `addressCode`, `picture`, `tagIds`, `comment`, `coordinates`, `supportingFacilities`, `data`)
|
|
|
+ VALUES (#{projectType}, #{specificLocation}, #{completionTime}, #{buildingArea}, #{generateWeeklyDate}, #{type}, #{name}, now(), #{organizationId}, #{address}, #{addressCode}, #{picture}, #{tagIds}, #{comment}, #{coordinates}, #{supportingFacilities}, #{data})
|
|
|
</insert>
|
|
|
|
|
|
<update id="delete">
|
|
@@ -104,6 +114,11 @@
|
|
|
<update id="update" parameterType="com.bosshand.virgo.api.model.Project">
|
|
|
UPDATE project
|
|
|
<trim prefix="set" suffixOverrides=",">
|
|
|
+ <if test="projectType!=null">projectType=#{projectType},</if>
|
|
|
+ <if test="specificLocation!=null">specificLocation=#{specificLocation},</if>
|
|
|
+ <if test="completionTime!=null">completionTime=#{completionTime},</if>
|
|
|
+ <if test="buildingArea!=null">buildingArea=#{buildingArea},</if>
|
|
|
+
|
|
|
<if test="type!=null">type=#{type},</if>
|
|
|
<if test="name!=null">name=#{name},</if>
|
|
|
<if test="createDate!=null">createDate=#{createDate},</if>
|
|
@@ -130,6 +145,7 @@
|
|
|
FIND_IN_SET (#{tagId}, tagIds)
|
|
|
</foreach>
|
|
|
</if>
|
|
|
+ <if test="projectType != null">and projectType = #{projectType}</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>
|
|
@@ -146,6 +162,7 @@
|
|
|
FIND_IN_SET (#{tagId}, a.tagIds)
|
|
|
</foreach>
|
|
|
</if>
|
|
|
+ <if test="p.projectType != null">and a.projectType = #{p.projectType}</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>
|