|
|
@@ -612,11 +612,6 @@
|
|
|
boutique = #{boutique,jdbcType=INTEGER}
|
|
|
where id = #{id,jdbcType=VARCHAR}
|
|
|
</update>
|
|
|
-
|
|
|
- <update id="updateReleaseDate" parameterType="java.lang.String">
|
|
|
- update achievement set release_date = null
|
|
|
- where id = #{id,jdbcType=VARCHAR}
|
|
|
- </update>
|
|
|
|
|
|
<update id="batchDeleteByPrimaryKey" parameterType="java.util.List">
|
|
|
update achievement set deleted_sign = 1
|
|
|
@@ -831,107 +826,8 @@
|
|
|
)
|
|
|
</foreach>
|
|
|
</insert>
|
|
|
-
|
|
|
- <select id="findSearchAchievementListByPage" parameterType="String" resultType="com.goafanti.portal.bo.AchievementSearchListBo">
|
|
|
- select
|
|
|
- a.id, a.name, a.keyword,a.introduction,a.category,
|
|
|
- a.serial_number as serialNumber,
|
|
|
- a.data_category as dataCategory,
|
|
|
- a.owner_type as ownerType,
|
|
|
- a.owner_name as ownerName,
|
|
|
- a.field_a as fieldA,
|
|
|
- a.field_b as fieldB,
|
|
|
- a.transfer_price as transferPrice,
|
|
|
- a.maturity,
|
|
|
- a.introduction,a.boutique,
|
|
|
- a.transfer_mode as transferMode,
|
|
|
- a.technical_picture_url as technicalPictureUrl,
|
|
|
- b.name as fieldAs,
|
|
|
- ap.publish_page,ap.publish_platform,ap.publish_client,ap.if_top,ap.top_number,ap.show_number,bi.domain_name
|
|
|
- from achievement a
|
|
|
- right join achievement_publish ap on a.id=ap.achievement_id
|
|
|
- left join branch_information bi on bi.id=ap.publish_platform
|
|
|
- left join field_glossory b on a.field_a = b.id
|
|
|
- where a.deleted_sign = 0
|
|
|
- and ap.publish_client=0
|
|
|
- and ap.publish_page='W02'
|
|
|
- and bi.domain_name like "%"#{url,jdbcType=VARCHAR}"%"
|
|
|
- <if test="dataCategory != null and dataCategory != ''">
|
|
|
- and a.data_category = #{dataCategory,jdbcType=INTEGER}
|
|
|
- </if>
|
|
|
- <if test="category != null and category != ''">
|
|
|
- and a.category = #{category,jdbcType=INTEGER}
|
|
|
- </if>
|
|
|
- <if test="fieldA != null and fieldA != ''">
|
|
|
- and a.field_a = #{fieldA,jdbcType=INTEGER}
|
|
|
- </if>
|
|
|
- <if test="keyword != null and keyword != ''">
|
|
|
- and a.keyword like "%"#{keyword,jdbcType=VARCHAR}"%"
|
|
|
- </if>
|
|
|
- <if test="transferMode != null">
|
|
|
- and a.transfer_mode = #{transferMode,jdbcType=INTEGER}
|
|
|
- </if>
|
|
|
- <if test="upperPrice != null and upperPrice != ''">
|
|
|
- and a.transfer_price < #{upperPrice,jdbcType=VARCHAR}
|
|
|
- </if>
|
|
|
- <if test="lowerPrice != null and lowerPrice != ''">
|
|
|
- and a.transfer_price > #{lowerPrice,jdbcType=VARCHAR}
|
|
|
- </if>
|
|
|
- <if test="internationalFlag != null ">
|
|
|
- and a.international_flag = #{internationalFlag,jdbcType=INTEGER}
|
|
|
- </if>
|
|
|
- and a.audit_status = 3
|
|
|
- <if test="dateSort == 0">
|
|
|
- order by ap.if_top,ap.top_number,ap.show_number,a.release_date asc
|
|
|
- </if>
|
|
|
- <if test="dateSort == 1">
|
|
|
- order by ap.if_top asc,ap.top_number asc,ap.show_number asc,a.release_date desc
|
|
|
- </if>
|
|
|
- <if test="page_sql != null">
|
|
|
- ${page_sql}
|
|
|
- </if>
|
|
|
- </select>
|
|
|
-
|
|
|
- <select id="findSearchAchievementCount" parameterType="String" resultType="java.lang.Integer">
|
|
|
- select
|
|
|
- count(1)
|
|
|
- from achievement a
|
|
|
- right join achievement_publish ap on a.id=ap.achievement_id
|
|
|
- left join branch_information bi on bi.id=ap.publish_platform
|
|
|
- left join field_glossory b on a.field_a = b.id
|
|
|
- where a.deleted_sign = 0
|
|
|
- and ap.publish_client=0
|
|
|
- and ap.publish_page='W02'
|
|
|
- and bi.domain_name like "%"#{url,jdbcType=VARCHAR}"%"
|
|
|
- <if test="dataCategory != null and dataCategory != ''">
|
|
|
- and a.data_category = #{dataCategory,jdbcType=INTEGER}
|
|
|
- </if>
|
|
|
- <if test="category != null and category != ''">
|
|
|
- and a.category = #{category,jdbcType=INTEGER}
|
|
|
- </if>
|
|
|
- <if test="fieldA != null and fieldA != ''">
|
|
|
- and a.field_a = #{fieldA,jdbcType=INTEGER}
|
|
|
- </if>
|
|
|
- <if test="keyword != null and keyword != ''">
|
|
|
- and a.keyword like "%"#{keyword,jdbcType=VARCHAR}"%"
|
|
|
- </if>
|
|
|
- <if test="transferMode != null">
|
|
|
- and a.transfer_mode = #{transferMode,jdbcType=INTEGER}
|
|
|
- </if>
|
|
|
- <if test="upperPrice != null and upperPrice != ''">
|
|
|
- and a.transfer_price < #{upperPrice,jdbcType=VARCHAR}
|
|
|
- </if>
|
|
|
- <if test="lowerPrice != null and lowerPrice != ''">
|
|
|
- and a.transfer_price > #{lowerPrice,jdbcType=VARCHAR}
|
|
|
- </if>
|
|
|
- <if test="internationalFlag != null ">
|
|
|
- and a.international_flag = #{internationalFlag,jdbcType=INTEGER}
|
|
|
- </if>
|
|
|
- and a.audit_status = 3
|
|
|
-
|
|
|
- </select>
|
|
|
-
|
|
|
- <select id="selectAchievementSearchDetail" resultType="com.goafanti.portal.bo.AchievementDetailBo">
|
|
|
+
|
|
|
+ <select id="selectAchievementDetail" resultType="com.goafanti.portal.bo.AchievementDetailBo">
|
|
|
select
|
|
|
a.id,
|
|
|
a.owner_name as ownerName,
|
|
|
@@ -978,17 +874,6 @@
|
|
|
where a.id = #{1}
|
|
|
</select>
|
|
|
|
|
|
- <select id="findAchievementNumByUid" parameterType="java.lang.String" resultType="java.lang.Integer">
|
|
|
- select
|
|
|
- count(1)
|
|
|
- from achievement
|
|
|
- where
|
|
|
- deleted_sign = 0
|
|
|
- and release_status = 1
|
|
|
- and audit_status = 3
|
|
|
- and owner_id = #{uid,jdbcType=VARCHAR}
|
|
|
- </select>
|
|
|
-
|
|
|
<select id="findPartnerAchievementListByPage" parameterType="java.lang.String" resultType="com.goafanti.achievement.bo.AchievementPartnerListBo">
|
|
|
SELECT
|
|
|
id,
|
|
|
@@ -1097,143 +982,7 @@
|
|
|
WHERE
|
|
|
a.id = #{id,jdbcType=VARCHAR}
|
|
|
</select>
|
|
|
-
|
|
|
- <select id="findUserPortalSimilarByFieldA" resultType="com.goafanti.portal.bo.AchievementPortalSimilarListBo">
|
|
|
- SELECT
|
|
|
- a.id,
|
|
|
- a.name,
|
|
|
- a.maturity,
|
|
|
- dg.name as uprovince,
|
|
|
- dgg.name as ucity,
|
|
|
- dggg.name as oprovince,
|
|
|
- dgggg.name as ocity,
|
|
|
- a.transfer_price as transferPrice,
|
|
|
- a.bargaining_mode as bargainingMode
|
|
|
- FROM
|
|
|
- achievement a
|
|
|
- LEFT JOIN user_identity ui ON ui.uid = a.owner_id
|
|
|
- LEFT JOIN organization_identity oi on oi.uid = a.owner_id
|
|
|
- LEFT JOIN district_glossory dg on dg.id = ui.province
|
|
|
- LEFT JOIN district_glossory dgg on dgg.id = ui.city
|
|
|
- LEFT JOIN district_glossory dggg on dggg.id = oi.licence_province
|
|
|
- LEFT JOIN district_glossory dgggg on dgggg.id = oi.licence_city
|
|
|
- WHERE
|
|
|
- a.audit_status = 3
|
|
|
- AND a.deleted_sign = 0
|
|
|
- AND a.release_status = 1
|
|
|
- AND a.field_a = #{fieldA,jdbcType=INTEGER}
|
|
|
- AND a.id <![CDATA[ <> ]]> #{id,jdbcType=VARCHAR}
|
|
|
- order by a.serial_number desc
|
|
|
- limit 5
|
|
|
- </select>
|
|
|
-
|
|
|
- <select id="findOrgPortalSimilarByFieldA" resultType="com.goafanti.portal.bo.AchievementPortalSimilarListBo">
|
|
|
- SELECT
|
|
|
- a.id,
|
|
|
- a.name,
|
|
|
- a.maturity,
|
|
|
- dg.name as oprovince,
|
|
|
- dgg.name as ocity,
|
|
|
- dggg.name as uprovince,
|
|
|
- dgggg.name as ucity,
|
|
|
- a.transfer_price as transferPrice,
|
|
|
- a.bargaining_mode as bargainingMode
|
|
|
- FROM
|
|
|
- achievement a
|
|
|
- LEFT JOIN organization_identity oi ON oi.uid = a.owner_id
|
|
|
- LEFT JOIN user_identity ui ON ui.uid = a.owner_id
|
|
|
- LEFT JOIN district_glossory dg on dg.id = oi.licence_province
|
|
|
- LEFT JOIN district_glossory dgg on dgg.id = oi.licence_city
|
|
|
- LEFT JOIN district_glossory dggg on dggg.id = ui.province
|
|
|
- LEFT JOIN district_glossory dgggg on dgggg.id = ui.city
|
|
|
- WHERE
|
|
|
- a.audit_status = 3
|
|
|
- AND a.deleted_sign = 0
|
|
|
- AND a.release_status = 1
|
|
|
- AND a.field_a = #{fieldA,jdbcType=INTEGER}
|
|
|
- AND a.id <![CDATA[ <> ]]> #{id,jdbcType=VARCHAR}
|
|
|
- order by a.serial_number desc
|
|
|
- limit 5
|
|
|
- </select>
|
|
|
-
|
|
|
- <update id="updateOwnerId" parameterType="java.lang.String" >
|
|
|
- update achievement
|
|
|
- set owner_id = null
|
|
|
- where id = #{id,jdbcType=VARCHAR}
|
|
|
- </update>
|
|
|
-
|
|
|
- <select id="selectInternationalAchievement" resultType="com.goafanti.portal.bo.InternationalListBo">
|
|
|
- select
|
|
|
- a.id as id,
|
|
|
- a.name as techName,
|
|
|
- a.introduction,
|
|
|
- a.owner_name as ownerName,
|
|
|
- a.owner_type as ownerType,
|
|
|
- a.technical_picture_url as technicalPictureUrl,
|
|
|
- a.country_name_zh as countryNameZh
|
|
|
- from
|
|
|
- achievement a
|
|
|
- where
|
|
|
- a.deleted_sign = 0 and a.data_category = 1
|
|
|
- <!-- and a.release_status = 1 and nternational_flag = 1 -->
|
|
|
- order by
|
|
|
- a.release_date desc
|
|
|
- limit 0,5
|
|
|
- </select>
|
|
|
- <select id="findBoutiqueListByPage" parameterType="java.lang.String" resultType="com.goafanti.portal.bo.BoutiqueListBo">
|
|
|
- select
|
|
|
- a.id ,
|
|
|
- a.name,
|
|
|
- a.transfer_price as price,
|
|
|
- a.summary as sketch,
|
|
|
- a.technical_picture_url as pictureUrl,
|
|
|
- a.owner_type as ownerType,
|
|
|
- b.name as industryCatalog,
|
|
|
- a.owner_name as personName
|
|
|
- from
|
|
|
- achievement a
|
|
|
- left join
|
|
|
- field_glossory b
|
|
|
- on
|
|
|
- a.field_a = b.id
|
|
|
- where
|
|
|
- a.boutique = 1 and a.audit_status = 3 and a.deleted_sign=0
|
|
|
- <if test="fieldA != null and fieldA != ''">
|
|
|
- and a.field_a = #{fieldA,jdbcType=INTEGER}
|
|
|
- </if>
|
|
|
- <if test="dataCategory != null and dataCategory != ''">
|
|
|
- and data_category = #{dataCategory,jdbcType=INTEGER}
|
|
|
- </if>
|
|
|
- <if test="category != null and category != ''">
|
|
|
- and category = #{category,jdbcType=INTEGER}
|
|
|
- </if>
|
|
|
- order by a.create_time desc
|
|
|
- <if test="page_sql!=null">
|
|
|
- ${page_sql}
|
|
|
- </if>
|
|
|
- </select>
|
|
|
- <select id="findBoutiqueCount" parameterType="java.lang.String" resultType="java.lang.Integer">
|
|
|
- select
|
|
|
- count(0)
|
|
|
- from
|
|
|
- achievement a
|
|
|
- left join
|
|
|
- field_glossory b
|
|
|
- on
|
|
|
- a.field_a = b.id
|
|
|
- where
|
|
|
- a.boutique = 1 and a.audit_status = 3 and a.deleted_sign=0
|
|
|
- <if test="fieldA != null and fieldA != ''">
|
|
|
- and a.field_a = #{fieldA,jdbcType=INTEGER}
|
|
|
- </if>
|
|
|
- <if test="dataCategory != null and dataCategory != ''">
|
|
|
- and data_category = #{dataCategory,jdbcType=INTEGER}
|
|
|
- </if>
|
|
|
- <if test="category != null and category != ''">
|
|
|
- and category = #{category,jdbcType=INTEGER}
|
|
|
- </if>
|
|
|
- </select>
|
|
|
-
|
|
|
+
|
|
|
<select id="listAchievement" resultType="com.goafanti.achievement.bo.AchievementListBo">
|
|
|
select
|
|
|
a.id, a.name, a.keyword,a.introduction,a.category,
|
|
|
@@ -1254,32 +1003,7 @@
|
|
|
and a.audit_status = 3
|
|
|
order by a.release_date desc limit 0,12
|
|
|
</select>
|
|
|
-
|
|
|
- <!-- 查询猜你喜欢 -->
|
|
|
- <select id="selectCsutomerLike" resultType="com.goafanti.achievement.bo.AchievementListBo">
|
|
|
- select
|
|
|
- a.id, a.name, a.keyword,a.introduction,a.category,
|
|
|
- a.serial_number as serialNumber,
|
|
|
- a.data_category as dataCategory,
|
|
|
- a.owner_type as ownerType,
|
|
|
- a.owner_name as ownerName,
|
|
|
- a.field_a as fieldA,
|
|
|
- a.field_b as fieldB,
|
|
|
- a.transfer_price as transferPrice,
|
|
|
- a.technical_picture_url as technicalpictureurl
|
|
|
- from achievement a
|
|
|
- LEFT JOIN aft.achievement_interest b on a.id = b.achievement_id
|
|
|
- where
|
|
|
- a.deleted_sign = 0
|
|
|
- and category = 0
|
|
|
- and a.release_status = 1
|
|
|
- and a.audit_status = 3
|
|
|
- <if test="boutique != null">
|
|
|
- and a.boutique= #{boutique,jdbcType=INTEGER}
|
|
|
- </if>
|
|
|
- order by a.release_date desc limit 0,4
|
|
|
- </select>
|
|
|
-
|
|
|
+
|
|
|
<select id="countInterest" resultType="Integer">
|
|
|
select count(0)
|
|
|
from achievement_interest
|