|
@@ -7,6 +7,7 @@
|
|
|
<result column="name" property="name"/>
|
|
|
<result column="createDate" property="createDate"/>
|
|
|
<result column="organizationId" property="organizationId"/>
|
|
|
+ <result column="organizationName" property="organizationName"/>
|
|
|
<result column="address" property="address"/>
|
|
|
<result column="picture" property="picture"/>
|
|
|
<result column="tagIds" property="tagIds"/>
|
|
@@ -103,17 +104,17 @@
|
|
|
</select>
|
|
|
|
|
|
<select id="getLimit" resultMap="result">
|
|
|
- SELECT * FROM project
|
|
|
+ SELECT a.*, b.name as organizationName FROM project a LEFT JOIN mgr_organization b ON a.organizationId = b.id
|
|
|
<where>
|
|
|
- and deleteState = 0
|
|
|
- <if test="p.organizationId!=0">and organizationId=#{p.organizationId}</if>
|
|
|
+ and a.deleteState = 0
|
|
|
+ <if test="p.organizationId!=0">and a.organizationId=#{p.organizationId}</if>
|
|
|
<if test="p.tagIds != null">and
|
|
|
<foreach item="tagId" collection="p.tagIds.split(',')" open="(" separator=" and " close=")">
|
|
|
- FIND_IN_SET (#{tagId}, tagIds)
|
|
|
+ FIND_IN_SET (#{tagId}, a.tagIds)
|
|
|
</foreach>
|
|
|
</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.name!=null">and a.name=#{p.name}</if>
|
|
|
+ <if test="p.createDate!=null and p.createDate !=''">and a.createDate = #{p.createDate}</if>
|
|
|
</where>
|
|
|
limit #{currIndex} , #{pageSize}
|
|
|
</select>
|