|
@@ -9,7 +9,7 @@
|
|
<result column="organizationId" property="organizationId"/>
|
|
<result column="organizationId" property="organizationId"/>
|
|
<result column="address" property="address"/>
|
|
<result column="address" property="address"/>
|
|
<result column="picture" property="picture"/>
|
|
<result column="picture" property="picture"/>
|
|
- <result column="tagId" property="tagId"/>
|
|
|
|
|
|
+ <result column="tagIds" property="tagIds"/>
|
|
<result column="comment" property="comment"/>
|
|
<result column="comment" property="comment"/>
|
|
<result column="data" property="data"/>
|
|
<result column="data" property="data"/>
|
|
</resultMap>
|
|
</resultMap>
|
|
@@ -21,7 +21,7 @@
|
|
<result column="organizationId" property="organizationId"/>
|
|
<result column="organizationId" property="organizationId"/>
|
|
<result column="address" property="address"/>
|
|
<result column="address" property="address"/>
|
|
<result column="picture" property="picture"/>
|
|
<result column="picture" property="picture"/>
|
|
- <result column="tagId" property="tagId"/>
|
|
|
|
|
|
+ <result column="tagIds" property="tagIds"/>
|
|
<result column="comment" property="comment"/>
|
|
<result column="comment" property="comment"/>
|
|
<result column="data" property="data"/>
|
|
<result column="data" property="data"/>
|
|
<collection property="projectItemList" ofType="com.bosshand.virgo.api.model.ProjectItem" resultMap="com.bosshand.virgo.api.dao.ProjectItemDao.projectItemResult" columnPrefix="projectItem_"/>
|
|
<collection property="projectItemList" ofType="com.bosshand.virgo.api.model.ProjectItem" resultMap="com.bosshand.virgo.api.dao.ProjectItemDao.projectItemResult" columnPrefix="projectItem_"/>
|
|
@@ -53,8 +53,8 @@
|
|
</select>
|
|
</select>
|
|
|
|
|
|
<insert id="insert" parameterType="com.bosshand.virgo.api.model.Project" useGeneratedKeys="true" keyProperty="id">
|
|
<insert id="insert" parameterType="com.bosshand.virgo.api.model.Project" useGeneratedKeys="true" keyProperty="id">
|
|
- INSERT INTO project(`name`, `createDate`, `organizationId`, `address`, `picture`, `tagId`, `comment`, `data`)
|
|
|
|
- VALUES (#{name}, now(), #{organizationId}, #{address}, #{picture}, #{tagId}, #{comment}, #{data})
|
|
|
|
|
|
+ INSERT INTO project(`name`, `createDate`, `organizationId`, `address`, `picture`, `tagIds`, `comment`, `data`)
|
|
|
|
+ VALUES (#{name}, now(), #{organizationId}, #{address}, #{picture}, #{tagIds}, #{comment}, #{data})
|
|
</insert>
|
|
</insert>
|
|
|
|
|
|
<update id="delete">
|
|
<update id="delete">
|
|
@@ -69,7 +69,7 @@
|
|
<if test="organizationId!=0">organizationId=#{organizationId},</if>
|
|
<if test="organizationId!=0">organizationId=#{organizationId},</if>
|
|
<if test="address!=null">address=#{address},</if>
|
|
<if test="address!=null">address=#{address},</if>
|
|
<if test="picture!=null">picture=#{picture},</if>
|
|
<if test="picture!=null">picture=#{picture},</if>
|
|
- <if test="tagId!=0">tagId=#{tagId},</if>
|
|
|
|
|
|
+ <if test="tagIds!=null">tagIds=#{tagIds},</if>
|
|
<if test="comment!=null">comment=#{comment},</if>
|
|
<if test="comment!=null">comment=#{comment},</if>
|
|
<if test="data!=null">data=#{data},</if>
|
|
<if test="data!=null">data=#{data},</if>
|
|
</trim>
|
|
</trim>
|
|
@@ -81,7 +81,11 @@
|
|
<where>
|
|
<where>
|
|
and deleteState = 0
|
|
and deleteState = 0
|
|
<if test="organizationId != 0">and organizationId = #{organizationId}</if>
|
|
<if test="organizationId != 0">and organizationId = #{organizationId}</if>
|
|
- <if test="tagId != 0">and tagId = #{tagId}</if>
|
|
|
|
|
|
+ <if test="tagIds != null">and
|
|
|
|
+ <foreach item="tagId" collection="tagIds.split(',')" open="(" separator=" and " close=")">
|
|
|
|
+ FIND_IN_SET (#{tagId}, tagIds)
|
|
|
|
+ </foreach>
|
|
|
|
+ </if>
|
|
<if test="name != null and name !=''">and name = #{name}</if>
|
|
<if test="name != null and name !=''">and name = #{name}</if>
|
|
<if test="createDate != null and createDate !=''">and createDate = #{createDate}</if>
|
|
<if test="createDate != null and createDate !=''">and createDate = #{createDate}</if>
|
|
</where>
|
|
</where>
|
|
@@ -92,7 +96,11 @@
|
|
<where>
|
|
<where>
|
|
and deleteState = 0
|
|
and deleteState = 0
|
|
<if test="p.organizationId!=0">and organizationId=#{p.organizationId}</if>
|
|
<if test="p.organizationId!=0">and organizationId=#{p.organizationId}</if>
|
|
- <if test="p.tagId != 0">and tagId = #{p.tagId}</if>
|
|
|
|
|
|
+ <if test="p.tagIds != null">and
|
|
|
|
+ <foreach item="tagId" collection="p.tagIds.split(',')" open="(" separator=" and " close=")">
|
|
|
|
+ FIND_IN_SET (#{tagId}, tagIds)
|
|
|
|
+ </foreach>
|
|
|
|
+ </if>
|
|
<if test="p.name!=null">and name=#{p.name}</if>
|
|
<if test="p.name!=null">and name=#{p.name}</if>
|
|
<if test="p.createDate!=null and p.createDate !=''">and createDate = #{p.createDate}</if>
|
|
<if test="p.createDate!=null and p.createDate !=''">and createDate = #{p.createDate}</if>
|
|
</where>
|
|
</where>
|