|
|
@@ -1013,19 +1013,23 @@
|
|
|
</foreach>
|
|
|
</update>
|
|
|
<select id="findAchievementListByPage" parameterType="String" resultType="com.goafanti.achievement.bo.AchievementListBo">
|
|
|
-
|
|
|
- select
|
|
|
+ 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
|
|
|
+ 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,
|
|
|
+ ap.publish_page,ap.publish_platform,ap.publish_client,ap.if_top,ap.top_number,ap.show_number
|
|
|
from achievement a
|
|
|
+ right join achievement_publish ap on a.id=ap.achievement_id
|
|
|
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
|
|
|
+ and ap.publish_client=0
|
|
|
+ and ap.publish_page='W01'
|
|
|
+ and ap.publish_platform='112461d9-2120-4809-b709-3cb5f5acfcc3'
|
|
|
<if test="ownerId != null">
|
|
|
and a.owner_id = #{ownerId,jdbcType=VARCHAR}
|
|
|
</if>
|
|
|
@@ -1069,8 +1073,7 @@
|
|
|
<if test="releaseStatus != null">
|
|
|
and a.release_status = #{releaseStatus,jdbcType=INTEGER}
|
|
|
</if>
|
|
|
-
|
|
|
- order by serial_number desc
|
|
|
+ order by ap.if_top,ap.top_number,ap.show_number asc
|
|
|
<if test="page_sql!=null">
|
|
|
${page_sql}
|
|
|
</if>
|
|
|
@@ -1080,9 +1083,16 @@
|
|
|
select
|
|
|
count(1)
|
|
|
from achievement a
|
|
|
+ right join achievement_publish ap on a.id=ap.achievement_id
|
|
|
+ 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
|
|
|
+ and ap.publish_client=0
|
|
|
+ and ap.publish_page='W01'
|
|
|
+ and ap.publish_platform='112461d9-2120-4809-b709-3cb5f5acfcc3'
|
|
|
<if test="ownerId != null">
|
|
|
and a.owner_id = #{ownerId,jdbcType=VARCHAR}
|
|
|
</if>
|