|
|
@@ -62,18 +62,18 @@
|
|
|
<result column="picture_url_min" property="pictureUrlMin" jdbcType="VARCHAR" />
|
|
|
</resultMap>
|
|
|
<sql id="Base_Column_List">
|
|
|
- id, serial_number, data_category, name, keyword, category, summary, introduction,
|
|
|
- technical_picture_url, field_a, field_b, field_c, maturity, maturity_picture_url,
|
|
|
- maturity_text_file_url, maturity_video_url, innovation, owner_id, owner_name, owner_type, owner_id_number,
|
|
|
- owner_mobile, owner_email, owner_postal_address, cooperation_mode, transfer_mode,
|
|
|
- bargaining_mode, transfer_price, technical_scene, breakthrough, patent_case, awards,
|
|
|
- team_des, parameter, tech_plan_url, business_plan_url, org_id, org_name, org_address,
|
|
|
- org_email, org_contacts, org_contacts_mobile, contacts, manager_id, salesman_id,
|
|
|
+ id, serial_number, data_category, name, keyword, category, summary, introduction,
|
|
|
+ technical_picture_url, field_a, field_b, field_c, maturity, maturity_picture_url,
|
|
|
+ maturity_text_file_url, maturity_video_url, innovation, owner_id, owner_name, owner_type, owner_id_number,
|
|
|
+ owner_mobile, owner_email, owner_postal_address, cooperation_mode, transfer_mode,
|
|
|
+ bargaining_mode, transfer_price, technical_scene, breakthrough, patent_case, awards,
|
|
|
+ team_des, parameter, tech_plan_url, business_plan_url, org_id, org_name, org_address,
|
|
|
+ org_email, org_contacts, org_contacts_mobile, contacts, manager_id, salesman_id,
|
|
|
status, create_time, release_status, release_date, deleted_sign, audit_status, tech_broker_id,
|
|
|
country_name_zh,international_flag,jmrh_flag,boutique,picture_url_min
|
|
|
</sql>
|
|
|
<select id="selectByPrimaryKey" parameterType="java.lang.String" resultMap="BaseResultMap">
|
|
|
- select
|
|
|
+ select
|
|
|
<include refid="Base_Column_List" />
|
|
|
from achievement
|
|
|
where id = #{id,jdbcType=VARCHAR}
|
|
|
@@ -83,26 +83,26 @@
|
|
|
where id = #{id,jdbcType=VARCHAR}
|
|
|
</delete>
|
|
|
<insert id="insert" parameterType="com.goafanti.common.model.Achievement">
|
|
|
- insert into achievement (id, serial_number, data_category,
|
|
|
- name, keyword, category,
|
|
|
- summary, introduction, technical_picture_url,
|
|
|
- field_a, field_b, field_c,
|
|
|
- maturity, innovation, owner_id, owner_postal_address, cooperation_mode,
|
|
|
- transfer_mode, bargaining_mode, transfer_price, patent_case,
|
|
|
- awards, team_des, parameter, status,
|
|
|
- create_time, release_status, release_date,
|
|
|
+ insert into achievement (id, serial_number, data_category,
|
|
|
+ name, keyword, category,
|
|
|
+ summary, introduction, technical_picture_url,
|
|
|
+ field_a, field_b, field_c,
|
|
|
+ maturity, innovation, owner_id, owner_postal_address, cooperation_mode,
|
|
|
+ transfer_mode, bargaining_mode, transfer_price, patent_case,
|
|
|
+ awards, team_des, parameter, status,
|
|
|
+ create_time, release_status, release_date,
|
|
|
deleted_sign, audit_status,international_flag,boutique,is_hot,info_sources,picture_url_min)
|
|
|
- values (#{id,jdbcType=VARCHAR}, #{serialNumber,jdbcType=INTEGER}, #{dataCategory,jdbcType=INTEGER},
|
|
|
- #{name,jdbcType=VARCHAR}, #{keyword,jdbcType=VARCHAR}, #{category,jdbcType=INTEGER},
|
|
|
- #{summary,jdbcType=VARCHAR}, #{introduction,jdbcType=LONGVARCHAR}, #{technicalPictureUrl,jdbcType=VARCHAR},
|
|
|
- #{fieldA,jdbcType=INTEGER}, #{fieldB,jdbcType=INTEGER}, #{fieldC,jdbcType=INTEGER},
|
|
|
+ values (#{id,jdbcType=VARCHAR}, #{serialNumber,jdbcType=INTEGER}, #{dataCategory,jdbcType=INTEGER},
|
|
|
+ #{name,jdbcType=VARCHAR}, #{keyword,jdbcType=VARCHAR}, #{category,jdbcType=INTEGER},
|
|
|
+ #{summary,jdbcType=VARCHAR}, #{introduction,jdbcType=LONGVARCHAR}, #{technicalPictureUrl,jdbcType=VARCHAR},
|
|
|
+ #{fieldA,jdbcType=INTEGER}, #{fieldB,jdbcType=INTEGER}, #{fieldC,jdbcType=INTEGER},
|
|
|
#{maturity,jdbcType=INTEGER}, #{innovation,jdbcType=INTEGER}, #{ownerId,jdbcType=VARCHAR}
|
|
|
- , #{ownerPostalAddress,jdbcType=VARCHAR}, #{cooperationMode,jdbcType=INTEGER},
|
|
|
- #{transferMode,jdbcType=INTEGER}, #{bargainingMode,jdbcType=INTEGER}, #{transferPrice,jdbcType=DECIMAL},
|
|
|
- #{patentCase,jdbcType=VARCHAR},
|
|
|
- #{awards,jdbcType=VARCHAR}, #{teamDes,jdbcType=VARCHAR}, #{parameter,jdbcType=VARCHAR},
|
|
|
- #{status,jdbcType=INTEGER},
|
|
|
- #{createTime,jdbcType=TIMESTAMP}, #{releaseStatus,jdbcType=INTEGER}, #{releaseDate,jdbcType=TIMESTAMP},
|
|
|
+ , #{ownerPostalAddress,jdbcType=VARCHAR}, #{cooperationMode,jdbcType=INTEGER},
|
|
|
+ #{transferMode,jdbcType=INTEGER}, #{bargainingMode,jdbcType=INTEGER}, #{transferPrice,jdbcType=DECIMAL},
|
|
|
+ #{patentCase,jdbcType=VARCHAR},
|
|
|
+ #{awards,jdbcType=VARCHAR}, #{teamDes,jdbcType=VARCHAR}, #{parameter,jdbcType=VARCHAR},
|
|
|
+ #{status,jdbcType=INTEGER},
|
|
|
+ #{createTime,jdbcType=TIMESTAMP}, #{releaseStatus,jdbcType=INTEGER}, #{releaseDate,jdbcType=TIMESTAMP},
|
|
|
#{deletedSign,jdbcType=INTEGER}, #{auditStatus,jdbcType=INTEGER},
|
|
|
#{internationalFlag,jdbcType=INTEGER},#{boutique,jdbcType=INTEGER},#{isHot,jdbcType=INTEGER},#{infoSources,jdbcType=INTEGER},#{pictureUrlMin,jdbcType=VARCHAR})
|
|
|
</insert>
|
|
|
@@ -599,16 +599,16 @@
|
|
|
picture_url_min=#{pictureUrlMin,jdbcType=VARCHAR},
|
|
|
where id = #{id,jdbcType=VARCHAR}
|
|
|
</update>
|
|
|
-
|
|
|
+
|
|
|
<update id="batchDeleteByPrimaryKey" parameterType="java.util.List">
|
|
|
update achievement set deleted_sign = 1
|
|
|
- where id in
|
|
|
+ where id in
|
|
|
<foreach item="item" collection="list" open="(" separator="," close=")">
|
|
|
#{item}
|
|
|
</foreach>
|
|
|
</update>
|
|
|
<select id="findAchievementListWithPid" resultType="com.goafanti.portal.bo.AchievementObject">
|
|
|
- select a.name,a.id,release_date as releaseDate,technical_picture_url as technicalPictureUrl,data_category as dataCategory,is_hot as isHot
|
|
|
+ select a.name,a.id,release_date as releaseDate,technical_picture_url as technicalPictureUrl,data_category as dataCategory,is_hot as isHot
|
|
|
,field_a as fieldA,field_b as fieldB,ic.name as fieldAS,icc.name as fieldBS
|
|
|
from achievement a
|
|
|
left join industry_category ic on ic.id=a.field_a
|
|
|
@@ -650,19 +650,19 @@
|
|
|
</if>
|
|
|
</select>
|
|
|
<select id="findAppAchievementListByPage" parameterType="String" resultType="com.goafanti.achievement.bo.AchievementListBo">
|
|
|
-
|
|
|
- select
|
|
|
+
|
|
|
+ select
|
|
|
a.id,a.name, a.keyword, a.introduction,a.field_a as fieldA,a.field_b as fieldB,a.data_category as dataCategory,
|
|
|
a.status, a.release_date as releaseDate, a.audit_status as auditStatus,a.maturity,
|
|
|
- f.name as field1,f2.name as field2,ifnull(b.countInterest,0) as interestCount,if(isnull(c.achievement_id),0,1) as interested
|
|
|
+ f.name as field1,f2.name as field2,ifnull(b.countInterest,0) as interestCount,if(isnull(c.achievement_id),0,1) as interested
|
|
|
from achievement a
|
|
|
- left join (select count(0) as countInterest,achievement_id from achievement_interest
|
|
|
+ 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 (select achievement_id from achievement_interest where uid=#{uid,jdbcType=VARCHAR} group by achievement_id)c
|
|
|
on a.id=c.achievement_id
|
|
|
left join industry_category f on a.field_a=f.id
|
|
|
left join industry_category f2 on a.field_b=f2.id
|
|
|
- where a.deleted_sign = 0 and a.audit_status = 2 and a.info_sources=1
|
|
|
+ where a.deleted_sign = 0 and a.audit_status = 2 and a.info_sources=1
|
|
|
<if test="ownerId != null">
|
|
|
and a.owner_id = #{ownerId,jdbcType=VARCHAR}
|
|
|
</if>
|
|
|
@@ -707,12 +707,12 @@
|
|
|
${page_sql}
|
|
|
</if>
|
|
|
</select>
|
|
|
-
|
|
|
+
|
|
|
<select id="findAppAchievementCount" parameterType="String" resultType="java.lang.Integer">
|
|
|
- select
|
|
|
+ select
|
|
|
count(1)
|
|
|
from achievement a
|
|
|
- where a.deleted_sign = 0 and a.audit_status = 2 and a.info_sources=1
|
|
|
+ where a.deleted_sign = 0 and a.audit_status = 2 and a.info_sources=1
|
|
|
<if test="ownerId != null">
|
|
|
and a.owner_id = #{ownerId,jdbcType=VARCHAR}
|
|
|
</if>
|
|
|
@@ -757,27 +757,27 @@
|
|
|
and a.release_status = #{releaseStatus,jdbcType=INTEGER}
|
|
|
</if>
|
|
|
</select>
|
|
|
-
|
|
|
+
|
|
|
<select id="selectUserOwnerDetail" parameterType="java.lang.String" resultType="com.goafanti.achievement.bo.AchievementUserOwnerDetailBo">
|
|
|
- select
|
|
|
- a.id, a.serial_number as serialNumber, a.data_category as dataCategory,
|
|
|
- a.name, a.keyword, a.category,
|
|
|
- a.summary, a.introduction, a.technical_picture_url as technicalPictureUrl,
|
|
|
+ select
|
|
|
+ a.id, a.serial_number as serialNumber, a.data_category as dataCategory,
|
|
|
+ a.name, a.keyword, a.category,
|
|
|
+ a.summary, a.introduction, a.technical_picture_url as technicalPictureUrl,
|
|
|
a.field_a as fieldA, a.field_b as fieldB, a.field_c as fieldC, f.name as field1, f2.name as field2,
|
|
|
- a.maturity, a.maturity_picture_url as maturityPictureUrl, a.maturity_text_file_url as maturityTextFileUrl,
|
|
|
- a.maturity_video_url as maturityVideoUrl, a.innovation, a.owner_id as ownerId,
|
|
|
- a.owner_name as ownerName, a.owner_type as ownerType, a.owner_id_number as ownerIdNumber,
|
|
|
- a.owner_mobile as ownerMobile, a.owner_email as ownerEmail, a.owner_postal_address as ownerPostalAddress,
|
|
|
- a.cooperation_mode as cooperationMode, a.transfer_mode as transferMode, a.bargaining_mode as bargainingMode,
|
|
|
- a.transfer_price as transferPrice, a.technical_scene as technicalScene, a.breakthrough,
|
|
|
- a.patent_case as patentCase, a.awards, a.team_des as teamDes,
|
|
|
- a.parameter, a.tech_plan_url as techPlanUrl, a.business_plan_url as businessPlanUrl,
|
|
|
- a.contacts, a.manager_id as managerId, a.salesman_id as salesmanId,
|
|
|
- a.create_time as createTime, a.release_status as releaseStatus,
|
|
|
+ a.maturity, a.maturity_picture_url as maturityPictureUrl, a.maturity_text_file_url as maturityTextFileUrl,
|
|
|
+ a.maturity_video_url as maturityVideoUrl, a.innovation, a.owner_id as ownerId,
|
|
|
+ a.owner_name as ownerName, a.owner_type as ownerType, a.owner_id_number as ownerIdNumber,
|
|
|
+ a.owner_mobile as ownerMobile, a.owner_email as ownerEmail, a.owner_postal_address as ownerPostalAddress,
|
|
|
+ a.cooperation_mode as cooperationMode, a.transfer_mode as transferMode, a.bargaining_mode as bargainingMode,
|
|
|
+ a.transfer_price as transferPrice, a.technical_scene as technicalScene, a.breakthrough,
|
|
|
+ a.patent_case as patentCase, a.awards, a.team_des as teamDes,
|
|
|
+ a.parameter, a.tech_plan_url as techPlanUrl, a.business_plan_url as businessPlanUrl,
|
|
|
+ a.contacts, a.manager_id as managerId, a.salesman_id as salesmanId,
|
|
|
+ a.create_time as createTime, a.release_status as releaseStatus,
|
|
|
a.release_date as releaseDate, a.audit_status as auditStatus, a.tech_broker_id as techBrokerId,
|
|
|
ui.username as iOwnerName, ui.province, ui.city, ui.area, u.email as iOwnerEmail,
|
|
|
ui.id_number as iOwnerIdNumber, u.mobile as iOwnerMobile,j.easemob_name as easemobName,a.remark,
|
|
|
- ifnull(t2.x,0) as orderCount,a.boutique,a.contacts,a.contact_mobile as contactMobile,
|
|
|
+ ifnull(t2.x,0) as orderCount,a.boutique,a.contacts,a.contact_mobile as contactMobile,
|
|
|
a.international_flag as internationalFlag
|
|
|
from achievement a
|
|
|
left join user_identity ui on a.owner_id = ui.uid
|
|
|
@@ -786,26 +786,26 @@
|
|
|
left join (select count(0) as x,tl.commodity_id from t_order tr
|
|
|
left join t_order_detail tl on tl.order_no=tr.order_no
|
|
|
where tr.order_status != 4 and tr.order_status != 0
|
|
|
- group by tl.commodity_id) t2 on a.id=t2.commodity_id
|
|
|
+ group by tl.commodity_id) t2 on a.id=t2.commodity_id
|
|
|
left join jpush_easemob_account j on a.owner_id=j.uid
|
|
|
left join user u on u.id = a.owner_id
|
|
|
where a.id =#{id,jdbcType=VARCHAR}
|
|
|
</select>
|
|
|
-
|
|
|
+
|
|
|
<select id="selectOrgOwnerDetail" parameterType="java.lang.String" resultType="com.goafanti.achievement.bo.AchievementOrgOwnerDetailBo">
|
|
|
- select
|
|
|
- a.id, a.serial_number as serialNumber, a.data_category as dataCategory,
|
|
|
- a.name, a.keyword, a.category,
|
|
|
- a.summary, a.introduction, a.technical_picture_url as technicalPictureUrl,
|
|
|
- a.field_a as fieldA, a.field_b as fieldB, a.field_c as fieldC,
|
|
|
- a.maturity, a.maturity_picture_url as maturityPictureUrl, a.maturity_text_file_url as maturityTextFileUrl,
|
|
|
- a.maturity_video_url as maturityVideoUrl, a.innovation, a.owner_id as ownerId,
|
|
|
- a.owner_name as ownerName, a.owner_type as ownerType, a.owner_id_number as ownerIdNumber,
|
|
|
- a.owner_mobile as ownerMobile, a.owner_email as ownerEmail, a.owner_postal_address as ownerPostalAddress,
|
|
|
- a.cooperation_mode as cooperationMode, a.transfer_mode as transferMode, a.bargaining_mode as bargainingMode,
|
|
|
- a.transfer_price as transferPrice, a.technical_scene as technicalScene, a.breakthrough,
|
|
|
- a.patent_case as patentCase, a.awards, a.team_des as teamDes,
|
|
|
- a.parameter, a.tech_plan_url as techPlanUrl, a.business_plan_url as businessPlanUrl,
|
|
|
+ select
|
|
|
+ a.id, a.serial_number as serialNumber, a.data_category as dataCategory,
|
|
|
+ a.name, a.keyword, a.category,
|
|
|
+ a.summary, a.introduction, a.technical_picture_url as technicalPictureUrl,
|
|
|
+ a.field_a as fieldA, a.field_b as fieldB, a.field_c as fieldC,
|
|
|
+ a.maturity, a.maturity_picture_url as maturityPictureUrl, a.maturity_text_file_url as maturityTextFileUrl,
|
|
|
+ a.maturity_video_url as maturityVideoUrl, a.innovation, a.owner_id as ownerId,
|
|
|
+ a.owner_name as ownerName, a.owner_type as ownerType, a.owner_id_number as ownerIdNumber,
|
|
|
+ a.owner_mobile as ownerMobile, a.owner_email as ownerEmail, a.owner_postal_address as ownerPostalAddress,
|
|
|
+ a.cooperation_mode as cooperationMode, a.transfer_mode as transferMode, a.bargaining_mode as bargainingMode,
|
|
|
+ a.transfer_price as transferPrice, a.technical_scene as technicalScene, a.breakthrough,
|
|
|
+ a.patent_case as patentCase, a.awards, a.team_des as teamDes,
|
|
|
+ a.parameter, a.tech_plan_url as techPlanUrl, a.business_plan_url as businessPlanUrl,
|
|
|
a.contacts, a.manager_id as managerId, a.salesman_id as salesmanId, a.international_flag as internationalFlag,
|
|
|
a.create_time as createTime, a.release_status as releaseStatus,
|
|
|
a.release_date as releaseDate, a.audit_status as auditStatus, a.tech_broker_id as techBrokerId,
|
|
|
@@ -817,23 +817,23 @@
|
|
|
left join marketing_management mm on a.id = mm.product_id
|
|
|
where a.id = #{id,jdbcType=VARCHAR}
|
|
|
</select>
|
|
|
-
|
|
|
+
|
|
|
<insert id="insertBatch" parameterType="com.goafanti.common.model.Achievement">
|
|
|
insert into achievement
|
|
|
(id, deleted_sign, audit_status,
|
|
|
patent_case,parameter,owner_id,
|
|
|
create_time, release_status, data_category,
|
|
|
- info_sources,name, keyword,
|
|
|
+ info_sources,name, keyword,
|
|
|
category,field_a,field_b,
|
|
|
owner_name, owner_type, owner_id_number,
|
|
|
owner_mobile, owner_email, owner_postal_address,
|
|
|
cooperation_mode, introduction, tech_broker_id,
|
|
|
international_flag,maturity,team_des
|
|
|
)
|
|
|
- values
|
|
|
+ values
|
|
|
<foreach item="item" index="index" collection="list" separator=",">
|
|
|
(
|
|
|
- #{item.id,jdbcType=VARCHAR}, #{item.deletedSign,jdbcType=INTEGER}, #{item.auditStatus,jdbcType=INTEGER},
|
|
|
+ #{item.id,jdbcType=VARCHAR}, #{item.deletedSign,jdbcType=INTEGER}, #{item.auditStatus,jdbcType=INTEGER},
|
|
|
#{item.patentCase,jdbcType=LONGVARCHAR}, #{item.parameter,jdbcType=LONGVARCHAR},#{item.ownerId,jdbcType=VARCHAR},
|
|
|
#{item.createTime,jdbcType=TIMESTAMP}, #{item.releaseStatus,jdbcType=INTEGER}, #{item.dataCategory,jdbcType=INTEGER},
|
|
|
#{item.infoSources,jdbcType=INTEGER},#{item.name,jdbcType=VARCHAR}, #{item.keyword,jdbcType=VARCHAR},
|
|
|
@@ -847,40 +847,40 @@
|
|
|
</insert>
|
|
|
|
|
|
<select id="selectAchievementDetail" resultType="com.goafanti.portal.bo.AchievementDetailBo">
|
|
|
- select
|
|
|
- a.id,
|
|
|
+ select
|
|
|
+ a.id,
|
|
|
a.owner_name as ownerName,
|
|
|
- a.serial_number as serialNumber,
|
|
|
- a.keyword,
|
|
|
- a.name,
|
|
|
- a.data_category as dataCategory,
|
|
|
+ a.serial_number as serialNumber,
|
|
|
+ a.keyword,
|
|
|
+ a.name,
|
|
|
+ a.data_category as dataCategory,
|
|
|
a.category,
|
|
|
- ui.username,
|
|
|
- oi.unit_name as unitName,
|
|
|
+ ui.username,
|
|
|
+ oi.unit_name as unitName,
|
|
|
a.release_date as releaseDate,
|
|
|
- a.owner_type as ownerType,
|
|
|
- a.field_a as fieldA,
|
|
|
+ a.owner_type as ownerType,
|
|
|
+ a.field_a as fieldA,
|
|
|
a.field_b as fieldB,
|
|
|
- a.transfer_price as transferPrice,
|
|
|
- a.maturity,
|
|
|
+ a.transfer_price as transferPrice,
|
|
|
+ a.maturity,
|
|
|
a.transfer_mode as transferMode,
|
|
|
- a.bargaining_mode as bargainingMode,
|
|
|
- a.summary,
|
|
|
+ a.bargaining_mode as bargainingMode,
|
|
|
+ a.summary,
|
|
|
a.introduction,
|
|
|
- a.technical_picture_url as technicalPictureUrl,
|
|
|
- a.maturity_picture_url as maturityPictureUrl,
|
|
|
+ a.technical_picture_url as technicalPictureUrl,
|
|
|
+ a.maturity_picture_url as maturityPictureUrl,
|
|
|
a.maturity_text_file_url as maturityTextFileUrl,
|
|
|
- a.maturity_video_url as maturityVideoUrl,
|
|
|
- a.innovation,
|
|
|
+ a.maturity_video_url as maturityVideoUrl,
|
|
|
+ a.innovation,
|
|
|
a.cooperation_mode as cooperationMode,
|
|
|
- a.bargaining_mode as bargainingMode,
|
|
|
- a.technical_scene as technicalScene,
|
|
|
+ a.bargaining_mode as bargainingMode,
|
|
|
+ a.technical_scene as technicalScene,
|
|
|
a.breakthrough,
|
|
|
- a.patent_case as patentCase,
|
|
|
- a.awards,
|
|
|
- a.team_des as teamDes,
|
|
|
- a.parameter,
|
|
|
- a.tech_plan_url as techPlanUrl,
|
|
|
+ a.patent_case as patentCase,
|
|
|
+ a.awards,
|
|
|
+ a.team_des as teamDes,
|
|
|
+ a.parameter,
|
|
|
+ a.tech_plan_url as techPlanUrl,
|
|
|
a.business_plan_url as businessPlanUrl,
|
|
|
ai.id as achievementInterestId
|
|
|
from achievement a
|
|
|
@@ -889,7 +889,7 @@
|
|
|
left join achievement_interest ai on ai.achievement_id = a.id and ai.uid = #{0}
|
|
|
where a.id = #{1}
|
|
|
</select>
|
|
|
-
|
|
|
+
|
|
|
<select id="findPartnerAchievementListByPage" parameterType="java.lang.String" resultType="com.goafanti.achievement.bo.AchievementPartnerListBo">
|
|
|
SELECT
|
|
|
id,
|
|
|
@@ -914,7 +914,7 @@
|
|
|
AND deleted_sign = 0
|
|
|
AND owner_id = #{ownerId,jdbcType=VARCHAR}
|
|
|
</select>
|
|
|
-
|
|
|
+
|
|
|
<select id="findPartnerAchievementCount" parameterType="java.lang.String" resultType="java.lang.Integer">
|
|
|
SELECT
|
|
|
count(1)
|
|
|
@@ -926,7 +926,7 @@
|
|
|
AND deleted_sign = 0
|
|
|
AND owner_id = #{ownerId,jdbcType=VARCHAR}
|
|
|
</select>
|
|
|
-
|
|
|
+
|
|
|
<select id="findUserPortalAchievementDetail" parameterType="java.lang.String" resultType="com.goafanti.portal.bo.AchievementPortalDetailBo">
|
|
|
SELECT
|
|
|
a.id,
|
|
|
@@ -963,7 +963,7 @@
|
|
|
WHERE
|
|
|
a.id = #{id,jdbcType=VARCHAR}
|
|
|
</select>
|
|
|
-
|
|
|
+
|
|
|
<select id="findOrgPortalAchievementDetail" parameterType="java.lang.String" resultType="com.goafanti.portal.bo.AchievementPortalDetailBo">
|
|
|
SELECT
|
|
|
a.id,
|
|
|
@@ -998,34 +998,34 @@
|
|
|
WHERE
|
|
|
a.id = #{id,jdbcType=VARCHAR}
|
|
|
</select>
|
|
|
-
|
|
|
+
|
|
|
<select id="listAchievement" resultType="com.goafanti.achievement.bo.AchievementListBo">
|
|
|
- select
|
|
|
+ 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.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_a as fieldA,
|
|
|
a.transfer_price as transferPrice,
|
|
|
a.transfer_mode as transfermode,
|
|
|
a.maturity,
|
|
|
a.technical_picture_url as technicalpictureurl
|
|
|
- from achievement a
|
|
|
- where
|
|
|
- a.deleted_sign = 0
|
|
|
+ from achievement a
|
|
|
+ where
|
|
|
+ a.deleted_sign = 0
|
|
|
and a.category = 0
|
|
|
and a.release_status = 1
|
|
|
- and a.audit_status = 3
|
|
|
+ and a.audit_status = 3
|
|
|
order by a.release_date desc limit 0,12
|
|
|
</select>
|
|
|
-
|
|
|
+
|
|
|
<select id="countInterest" resultType="Integer">
|
|
|
select count(0)
|
|
|
- from achievement_interest
|
|
|
+ from achievement_interest
|
|
|
where achievement_id=#{achievementId,jdbcType=VARCHAR}
|
|
|
</select>
|
|
|
-
|
|
|
+
|
|
|
<select id="achievementInterest" resultType="com.goafanti.achievement.bo.AchievementInterestBo">
|
|
|
select
|
|
|
a.id,a.name,a.create_time as createTime
|
|
|
@@ -1033,18 +1033,18 @@
|
|
|
LEFT join achievement a on ai.achievement_id=a.id
|
|
|
where uid=#{uid,jdbcType=VARCHAR}
|
|
|
</select>
|
|
|
-
|
|
|
+
|
|
|
<select id="findMyAchievementListByPage" parameterType="String" resultType="com.goafanti.achievement.bo.AchievementListBo">
|
|
|
- select
|
|
|
+ select
|
|
|
a.id, a.boutique,a.name,a.category, a.audit_status as auditStatus,ifnull(t.x,0) as buyIntention,
|
|
|
a.release_date as releaseDate,a.create_time as createTime,ifnull(i.y,0) as countInterest
|
|
|
- from achievement a
|
|
|
+ from achievement a
|
|
|
left join (select count(0) as x, tl.commodity_id from t_order tr
|
|
|
left join t_order_detail tl on tr.order_no=tl.order_no
|
|
|
where tr.order_status != 4
|
|
|
- group by tl.commodity_id ) t on a.id=t.commodity_id
|
|
|
+ group by tl.commodity_id ) t on a.id=t.commodity_id
|
|
|
left join (select count(0) as y,achievement_id from achievement_interest
|
|
|
- group by achievement_id ) i on a.id=i.achievement_id
|
|
|
+ group by achievement_id ) i on a.id=i.achievement_id
|
|
|
where a.deleted_sign = 0
|
|
|
<if test="ownerId != null">
|
|
|
and a.owner_id = #{ownerId,jdbcType=VARCHAR}
|
|
|
@@ -1054,11 +1054,11 @@
|
|
|
${page_sql}
|
|
|
</if>
|
|
|
</select>
|
|
|
-
|
|
|
+
|
|
|
<select id="findMyAchievementCount" parameterType="String" resultType="java.lang.Integer">
|
|
|
- select
|
|
|
+ select
|
|
|
count(1)
|
|
|
- from achievement a
|
|
|
+ from achievement a
|
|
|
where a.deleted_sign = 0
|
|
|
<if test="ownerId != null">
|
|
|
and a.owner_id = #{ownerId,jdbcType=VARCHAR}
|
|
|
@@ -1066,7 +1066,7 @@
|
|
|
</select>
|
|
|
|
|
|
<select id="getAppHomeAchievement" resultType="com.goafanti.app.bo.HomeAchievemend">
|
|
|
- select ap.achievement_id as id ,a.name as name ,a.technical_picture_url as img,
|
|
|
+ select ap.achievement_id as id ,a.name as name ,a.technical_picture_url as img,
|
|
|
ap.if_top,ap.top_number,ap.show_number
|
|
|
from achievement_publish ap
|
|
|
left join achievement a on ap.achievement_id=a.id
|
|
|
@@ -1078,7 +1078,7 @@
|
|
|
<select id="getAppHomeRecommended" resultType="com.goafanti.achievement.bo.AchievementRecommended">
|
|
|
select ap.achievement_id as id,a.name,a.introduction,a.technical_picture_url as technicalpictureUrl,
|
|
|
a.field_a,a.field_b,f1.name as fieldA,f2.name as fieldB,a.boutique
|
|
|
- from achievement_publish ap
|
|
|
+ from achievement_publish ap
|
|
|
left join achievement a on ap.achievement_id = a.id
|
|
|
left join field_glossory f1 on a.field_a=f1.id
|
|
|
left join field_glossory f2 on a.field_b=f2.id
|
|
|
@@ -1090,7 +1090,7 @@ order by
|
|
|
ap.top_number,
|
|
|
ap.show_number asc limit 0,
|
|
|
6
|
|
|
-</select>
|
|
|
+</select>
|
|
|
|
|
|
<select id="getRecentAchievements" resultType="com.goafanti.portal.bo.AchievementObject">
|
|
|
select
|
|
|
@@ -1125,41 +1125,19 @@ order by
|
|
|
</select>
|
|
|
|
|
|
<select id="getHotAchievements" resultType="com.goafanti.portal.bo.AchievementObject">
|
|
|
-select
|
|
|
-a.name as name ,
|
|
|
-a.id as id,
|
|
|
-a.technical_picture_url as technicalPictureUrl,
|
|
|
-a.picture_url_min as pictureUrlMin,
|
|
|
-b.ct as interestCount,
|
|
|
-a.category,
|
|
|
-a.data_category as dataCategory,
|
|
|
- fg.name as fieldAS,
|
|
|
- fgg.name as fieldBS,
|
|
|
- a.introduction
|
|
|
-from achievement a
|
|
|
-left join branch_information branchInfo
|
|
|
-on INSTR(#{1},branchInfo.domain_name)>0
|
|
|
-left join achievement_publish ap
|
|
|
- on ap.achievement_id=a.id
|
|
|
- left join industry_category fg on
|
|
|
- fg.id = a.field_a
|
|
|
-left join industry_category fgg on
|
|
|
- fgg.id = a.field_b
|
|
|
-left join
|
|
|
-(select
|
|
|
-count(0) as ct,
|
|
|
-achievement_id as interest_aid
|
|
|
-from achievement_interest
|
|
|
-group by
|
|
|
-achievement_id
|
|
|
-) b
|
|
|
-on b.interest_aid=a.id
|
|
|
-where a.audit_status=2
|
|
|
-and ap.achievement_id=a.id
|
|
|
-and branchInfo.id = ap.publish_platform
|
|
|
-and instr(ap.publish_page,#{2})>0
|
|
|
-and info_sources=1
|
|
|
-order by a.release_date desc limit #{0}
|
|
|
+ select
|
|
|
+ a.name as name ,
|
|
|
+ a.id as id,
|
|
|
+ a.technical_picture_url as technicalPictureUrl,
|
|
|
+ a.picture_url_min as pictureUrlMin,
|
|
|
+ a.category
|
|
|
+ from achievement a
|
|
|
+ left join achievement_publish ap
|
|
|
+ on ap.achievement_id=a.id
|
|
|
+ where a.audit_status=2
|
|
|
+ and ap.publish_page= #{2}
|
|
|
+ and info_sources=1
|
|
|
+ order by a.release_date desc limit #{0};
|
|
|
|
|
|
</select>
|
|
|
|
|
|
@@ -1212,7 +1190,7 @@ order by release_date desc limit #{0}
|
|
|
</select>
|
|
|
|
|
|
<select id="getIntellectualProperty" resultType="com.goafanti.common.bo.PolicyEntity" >
|
|
|
-select p.id,p.title,p.title_img as titleImg,p.summary,dg1.name as provinceS,dg2.name as cityS,edit_time as editTime ,create_time as createTime,p.id,p.source,p.source_url as sourceUrl from policy p
|
|
|
+select p.id,p.title,p.title_img as titleImg,p.summary,dg1.name as provinceS,dg2.name as cityS,edit_time as editTime ,create_time as createTime,p.id,p.source,p.source_url as sourceUrl from policy p
|
|
|
left join district_glossory dg1 on dg1.id=p.province
|
|
|
left join district_glossory dg2 on dg2.id=p.city
|
|
|
where audit_status = 2
|
|
|
@@ -1290,14 +1268,14 @@ and info_sources=1
|
|
|
order by release_date limit #{0}
|
|
|
</select>
|
|
|
<select id="listMyAchievementByPage" resultType="com.goafanti.portal.bo.AchievementObject">
|
|
|
- select
|
|
|
- a.id,
|
|
|
+ select
|
|
|
+ a.id,
|
|
|
a.serial_number as serialNumber,
|
|
|
a.category,
|
|
|
a.data_category as dataCategory,
|
|
|
- a.name,
|
|
|
+ a.name,
|
|
|
a.release_date as releaseDate,
|
|
|
- a.create_time as createTime,
|
|
|
+ a.create_time as createTime,
|
|
|
a.audit_status as auditStatus,
|
|
|
a.boutique,
|
|
|
if(isnull(c.interestCount),0,c.interestCount) as interestCount,
|
|
|
@@ -1343,7 +1321,7 @@ order by release_date limit #{0}
|
|
|
</if>
|
|
|
</select>
|
|
|
<select id="listMyAchievementCount" resultType="java.lang.Integer">
|
|
|
- select
|
|
|
+ select
|
|
|
count(0)
|
|
|
from achievement a
|
|
|
left join user b on a.owner_id = b.id left join (select achievement_id,count(*)as interestCount from achievement_interest group by achievement_id) c
|
|
|
@@ -1417,13 +1395,13 @@ where
|
|
|
a.id = #{0}
|
|
|
</select>
|
|
|
<select id="listInterestedAchievement" resultType="com.goafanti.portal.bo.AchievementObject">
|
|
|
- select
|
|
|
- a.id,
|
|
|
+ select
|
|
|
+ a.id,
|
|
|
a.serial_number as serialNumber,
|
|
|
a.category,
|
|
|
a.data_category as dataCategory,
|
|
|
- a.name,
|
|
|
- a.release_date as releaseDate,
|
|
|
+ a.name,
|
|
|
+ a.release_date as releaseDate,
|
|
|
a.audit_status as auditStatus,
|
|
|
a.technical_picture_url as technicalPictureUrl,
|
|
|
a.boutique,
|
|
|
@@ -1437,7 +1415,7 @@ where
|
|
|
</if>
|
|
|
</select>
|
|
|
<select id="listInterestedAchievementCount" resultType="java.lang.Integer">
|
|
|
- select
|
|
|
+ select
|
|
|
count(0)
|
|
|
from achievement a
|
|
|
left join achievement_interest ai on ai.achievement_id=a.id
|
|
|
@@ -1452,15 +1430,15 @@ where
|
|
|
left join industry_category f2 on a.field_b=f2.id
|
|
|
left join industry_category f3 on a.field_c=f3.id
|
|
|
left join (select b.commodity_id as id,count(*) as count from jt_order a left join jt_order_detail b on a.order_no=b.order_no
|
|
|
- GROUP by b.commodity_id) t on a.id=t.id
|
|
|
- left join (select achievement_id,count(*) as count from achievement_interest group by achievement_id ) b
|
|
|
+ GROUP by b.commodity_id) t on a.id=t.id
|
|
|
+ left join (select achievement_id,count(*) as count from achievement_interest group by achievement_id ) b
|
|
|
on a.id=b.achievement_id left join (select achievement_id from achievement_interest where uid= #{uid,jdbcType=VARCHAR} )d on a.id=d.achievement_id
|
|
|
where a.deleted_sign = 0 and a.info_sources=1
|
|
|
AND a.id =#{id,jdbcType=VARCHAR}
|
|
|
</select>
|
|
|
<select id="myCollectionAchievementList" resultType="com.goafanti.common.bo.MyCollection">
|
|
|
- select
|
|
|
- a.id, a.name, a.introduction, b.name as fieidA, ai.uid, a.maturity as textA,ifnull(c.x,0) as interestCount
|
|
|
+ select
|
|
|
+ a.id, a.name, a.introduction, b.name as fieidA, ai.uid, a.maturity as textA,ifnull(c.x,0) as interestCount
|
|
|
from achievement a
|
|
|
left join achievement_interest ai on ai.achievement_id=a.id
|
|
|
left join industry_category b on a.field_a= b.id
|
|
|
@@ -1474,7 +1452,7 @@ where
|
|
|
</if>
|
|
|
</select>
|
|
|
<select id="myCollectionAchievementCount" resultType="java.lang.Integer">
|
|
|
- select
|
|
|
+ select
|
|
|
count(0)
|
|
|
from achievement a
|
|
|
left join achievement_interest ai on ai.achievement_id=a.id
|