|
@@ -933,94 +933,7 @@
|
|
|
#{item}
|
|
#{item}
|
|
|
</foreach>
|
|
</foreach>
|
|
|
</update>
|
|
</update>
|
|
|
- <select id="findAchievementListByPage" parameterType="String" resultType="com.goafanti.achievement.bo.AchievementListBo">
|
|
|
|
|
-
|
|
|
|
|
- select
|
|
|
|
|
- a.id, a.serial_number as serialNumber, a.data_category as dataCategory, a.boutique,
|
|
|
|
|
- a.name, a.keyword, a.category, a.introduction,owner_postal_address as ownerPostalAddress,
|
|
|
|
|
- a.owner_name as ownerName, a.owner_type as ownerType, a.owner_mobile as ownerMobile,a.field_a as fieldA,a.field_b ,a.field_c as fieldC,
|
|
|
|
|
- a.status, a.release_date as releaseDate, a.audit_status as auditStatus,f.name as field,f2.name as fieldB,ifnull(b.countInterest,0) as countInterest
|
|
|
|
|
- from achievement a
|
|
|
|
|
- left join (
|
|
|
|
|
- select count(0) as countInterest,achievement_id from achievement_interest group by achievement_id
|
|
|
|
|
- )b on a.id = b.achievement_id
|
|
|
|
|
- left join field_glossory f on a.field_a=f.id
|
|
|
|
|
- left join field_glossory f2 on a.field_b=f2.id
|
|
|
|
|
- where deleted_sign = 0
|
|
|
|
|
- <if test="ownerId != null">
|
|
|
|
|
- and a.owner_id = #{ownerId,jdbcType=VARCHAR}
|
|
|
|
|
- </if>
|
|
|
|
|
- <if test="serialNumber != null">
|
|
|
|
|
- and a.serial_number = #{serialNumber,jdbcType=INTEGER}
|
|
|
|
|
- </if>
|
|
|
|
|
- <if test="auditStatus != null">
|
|
|
|
|
- and a.audit_status = #{auditStatus,jdbcType=INTEGER}
|
|
|
|
|
- </if>
|
|
|
|
|
- <if test="name != null">
|
|
|
|
|
-
|
|
|
|
|
- and a.name = #{name,jdbcType=VARCHAR}
|
|
|
|
|
-
|
|
|
|
|
- </if>
|
|
|
|
|
- <if test="keyword != null">
|
|
|
|
|
-
|
|
|
|
|
- and a.keyword like "%"#{keyword,jdbcType=VARCHAR}"%"
|
|
|
|
|
-
|
|
|
|
|
- </if>
|
|
|
|
|
- <if test="dataCategory != null and dataCategory != ''">
|
|
|
|
|
- and a.data_category = #{dataCategory,jdbcType=INTEGER}
|
|
|
|
|
- </if>
|
|
|
|
|
- <if test="category != null">
|
|
|
|
|
- and a.category = #{category,jdbcType=INTEGER}
|
|
|
|
|
- </if>
|
|
|
|
|
- <if test="ownerType != null">
|
|
|
|
|
- and a.owner_type = #{ownerType,jdbcType=INTEGER}
|
|
|
|
|
- </if>
|
|
|
|
|
- <if test="fieldA != null">
|
|
|
|
|
- and a.field_a = #{fieldA,jdbcType=VARCHAR}
|
|
|
|
|
- </if>
|
|
|
|
|
- <if test="status != null">
|
|
|
|
|
- and a.status = #{status,jdbcType=INTEGER}
|
|
|
|
|
- </if>
|
|
|
|
|
- <if test="rStart != null">
|
|
|
|
|
- and a.release_date <![CDATA[ >= ]]> #{rStart,jdbcType=TIMESTAMP}
|
|
|
|
|
- </if>
|
|
|
|
|
- <if test="rEnd != null">
|
|
|
|
|
- and a.release_date <![CDATA[ < ]]> #{rEnd,jdbcType=TIMESTAMP}
|
|
|
|
|
- </if>
|
|
|
|
|
- <if test="releaseStatus != null">
|
|
|
|
|
- and a.release_status = #{releaseStatus,jdbcType=INTEGER}
|
|
|
|
|
- </if>
|
|
|
|
|
- order by serial_number desc
|
|
|
|
|
- <if test="page_sql!=null">
|
|
|
|
|
- ${page_sql}
|
|
|
|
|
- </if>
|
|
|
|
|
- </select>
|
|
|
|
|
|
|
|
|
|
- <select id="findAchievementCount" parameterType="String" resultType="java.lang.Integer">
|
|
|
|
|
- select
|
|
|
|
|
- count(1)
|
|
|
|
|
- from achievement a
|
|
|
|
|
- left join (
|
|
|
|
|
- select count(0) as countInterest,achievement_id from achievement_interest group by achievement_id
|
|
|
|
|
- )b on a.id = b.achievement_id
|
|
|
|
|
- left join field_glossory f on a.field_a=f.id
|
|
|
|
|
- left join field_glossory f2 on a.field_b=f2.id
|
|
|
|
|
- where deleted_sign = 0
|
|
|
|
|
- <if test="ownerId != null">
|
|
|
|
|
- and a.owner_id = #{ownerId,jdbcType=VARCHAR}
|
|
|
|
|
- </if>
|
|
|
|
|
- <if test="serialNumber != null">
|
|
|
|
|
- and a.serial_number = #{serialNumber,jdbcType=INTEGER}
|
|
|
|
|
- </if>
|
|
|
|
|
- <if test="auditStatus != null">
|
|
|
|
|
- and a.audit_status = #{auditStatus,jdbcType=INTEGER}
|
|
|
|
|
- </if>
|
|
|
|
|
- <if test="name != null">
|
|
|
|
|
-
|
|
|
|
|
- and a.name = #{name,jdbcType=VARCHAR}
|
|
|
|
|
-
|
|
|
|
|
- </if>
|
|
|
|
|
- </select>
|
|
|
|
|
<select id="findAppAchievementListByPage" parameterType="String" resultType="com.goafanti.achievement.bo.AchievementListBo">
|
|
<select id="findAppAchievementListByPage" parameterType="String" resultType="com.goafanti.achievement.bo.AchievementListBo">
|
|
|
|
|
|
|
|
select
|
|
select
|
|
@@ -2271,8 +2184,8 @@ audit_status=2
|
|
|
and info_sources=1
|
|
and info_sources=1
|
|
|
order by release_date limit #{0}
|
|
order by release_date limit #{0}
|
|
|
</select>
|
|
</select>
|
|
|
-<select id="ListMyAchievement" resultType="com.goafanti.demand.bo.DemandAchievementListBo">
|
|
|
|
|
-select
|
|
|
|
|
|
|
+<select id="listMyAchievementByPage" resultType="com.goafanti.demand.bo.DemandAchievementListBo">
|
|
|
|
|
+ select
|
|
|
a.id, a.serial_number as serialNumber, a.data_category as dataCategory,
|
|
a.id, a.serial_number as serialNumber, a.data_category as dataCategory,
|
|
|
a.name, a.release_date as releaseDate, a.audit_status as auditStatus
|
|
a.name, a.release_date as releaseDate, a.audit_status as auditStatus
|
|
|
from achievement a
|
|
from achievement a
|
|
@@ -2301,4 +2214,28 @@ select
|
|
|
${page_sql}
|
|
${page_sql}
|
|
|
</if>
|
|
</if>
|
|
|
</select>
|
|
</select>
|
|
|
|
|
+<select id="listMyAchievementCount" resultType="java.lang.Integer">
|
|
|
|
|
+ select
|
|
|
|
|
+ count(0)
|
|
|
|
|
+ from achievement a
|
|
|
|
|
+ where deleted_sign = 0
|
|
|
|
|
+ <if test="ownerId != null">
|
|
|
|
|
+ and a.owner_id = #{ownerId,jdbcType=VARCHAR}
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test="auditStatus != null">
|
|
|
|
|
+ and a.audit_status = #{auditStatus,jdbcType=INTEGER}
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test="name != null">
|
|
|
|
|
+ and a.name like "%"#{name,jdbcType=VARCHAR}"%"
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test="dataCategory != null and dataCategory != ''">
|
|
|
|
|
+ and a.data_category = #{dataCategory,jdbcType=INTEGER}
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test="rStart != null">
|
|
|
|
|
+ and a.release_date <![CDATA[ >= ]]> #{rStart,jdbcType=TIMESTAMP}
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test="rEnd != null">
|
|
|
|
|
+ and a.release_date <![CDATA[ < ]]> #{rEnd,jdbcType=TIMESTAMP}
|
|
|
|
|
+ </if>
|
|
|
|
|
+</select>
|
|
|
</mapper>
|
|
</mapper>
|