|
|
@@ -59,6 +59,7 @@
|
|
|
<result column="boutique" jdbcType="INTEGER" property="boutique" />
|
|
|
<result column="contacts" jdbcType="VARCHAR" property="contacts" />
|
|
|
<result column="contact_mobile" jdbcType="VARCHAR" property="contactMobile" />
|
|
|
+ <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,
|
|
|
@@ -69,7 +70,7 @@
|
|
|
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
|
|
|
+ country_name_zh,international_flag,jmrh_flag,boutique,picture_url_min
|
|
|
</sql>
|
|
|
<select id="selectByPrimaryKey" parameterType="java.lang.String" resultMap="BaseResultMap">
|
|
|
select
|
|
|
@@ -90,7 +91,7 @@
|
|
|
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)
|
|
|
+ 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},
|
|
|
@@ -103,7 +104,7 @@
|
|
|
#{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})
|
|
|
+ #{internationalFlag,jdbcType=INTEGER},#{boutique,jdbcType=INTEGER},#{isHot,jdbcType=INTEGER},#{infoSources,jdbcType=INTEGER},#{pictureUrlMin,jdbcType=VARCHAR})
|
|
|
</insert>
|
|
|
<insert id="insertSelective" parameterType="com.goafanti.common.model.Achievement">
|
|
|
insert into achievement
|
|
|
@@ -276,6 +277,9 @@
|
|
|
<if test="boutique !=null">
|
|
|
boutique,
|
|
|
</if>
|
|
|
+ <if test="pictureUrlMin !=null">
|
|
|
+ picture_url_min,
|
|
|
+ </if>
|
|
|
</trim>
|
|
|
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
|
|
<if test="id != null">
|
|
|
@@ -446,6 +450,9 @@
|
|
|
<if test="boutique != null">
|
|
|
#{boutique,jdbcType=INTEGER}
|
|
|
</if>
|
|
|
+ <if test="pictureUrlMin !=null">
|
|
|
+ #{pictureUrlMin,jdbcType=VARCHAR},
|
|
|
+ </if>
|
|
|
</trim>
|
|
|
</insert>
|
|
|
<update id="updateByPrimaryKeySelective" parameterType="com.goafanti.common.model.Achievement">
|
|
|
@@ -553,6 +560,9 @@
|
|
|
<if test="auditInfo != null">
|
|
|
audit_info = #{auditInfo,jdbcType=VARCHAR},
|
|
|
</if>
|
|
|
+ <if test="pictureUrlMin !=null">
|
|
|
+ picture_url_min = #{pictureUrlMin,jdbcType=VARCHAR},
|
|
|
+ </if>
|
|
|
</set>
|
|
|
where id = #{id,jdbcType=VARCHAR}
|
|
|
</update>
|
|
|
@@ -585,7 +595,8 @@
|
|
|
audit_status = #{auditStatus,jdbcType=INTEGER},
|
|
|
country_name_zh = #{countryNameZh,jdbcType=VARCHAR},
|
|
|
international_flag = #{internationalFlag,jdbcType=INTEGER},
|
|
|
- boutique = #{boutique,jdbcType=INTEGER}
|
|
|
+ boutique = #{boutique,jdbcType=INTEGER},
|
|
|
+ picture_url_min=#{pictureUrlMin,jdbcType=VARCHAR},
|
|
|
where id = #{id,jdbcType=VARCHAR}
|
|
|
</update>
|
|
|
|
|
|
@@ -1348,7 +1359,7 @@ order by release_date limit #{0}
|
|
|
and a.release_date <![CDATA[ >= ]]> #{startDate,jdbcType=TIMESTAMP}
|
|
|
</if>
|
|
|
<if test="endDate != null">
|
|
|
- and a.release_date <![CDATA[ =< ]]> #{endDate,jdbcType=TIMESTAMP}
|
|
|
+ and a.release_date <![CDATA[ <= ]]> #{endDate,jdbcType=TIMESTAMP}
|
|
|
</if>
|
|
|
</select>
|
|
|
<select id="getAchievementDetailById" resultType="com.goafanti.portal.bo.AchievementResultObject" >
|
|
|
@@ -1376,7 +1387,8 @@ a.id,
|
|
|
a.boutique,
|
|
|
a.is_hot as isHot,
|
|
|
a.audit_status as auditStatus,
|
|
|
- a.audit_info as auditInfo
|
|
|
+ a.audit_info as auditInfo,
|
|
|
+ a.picture_url_min as pictureUrlMin
|
|
|
from
|
|
|
achievement a
|
|
|
left join industry_category fg on
|
|
|
@@ -1414,9 +1426,9 @@ where
|
|
|
where ai.uid=#{uid,jdbcType=VARCHAR}
|
|
|
</select>
|
|
|
<select id="selectAppAchuevementDetail" resultType="com.goafanti.achievement.bo.AchievementEntity">
|
|
|
- select a.id,a.name,a.keyword,a.data_category as dataCategory,a.summary,a.introduction,a.transfer_mode as transferMode,a.status,a.transfer_price as transferPrice ,a.innovation,a.maturity,a.audit_status,a.technical_picture_url as technicalPictureUrl,
|
|
|
+ select a.id,a.name,a.keyword,a.data_category as dataCategory,a.category,a.summary,a.introduction,a.transfer_mode as transferMode,a.status,a.transfer_price as transferPrice ,a.innovation,a.maturity,a.audit_status,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,f3.name as field3,a.release_status as releaseStatus,a.audit_status as auditStatus,a.boutique,a.field_a as fieldA,a.is_hot as isHot,a.release_date as releaseDate,if(isnull(b.count),0,b.count) as interestCount,
|
|
|
- if(isnull(d.achievement_id),0,1) interest,ifnull(t.count,0) as orderCount
|
|
|
+ if(isnull(d.achievement_id),0,1) interest,ifnull(t.count,0) as orderCount,a.picture_url_min as pictureUrlMin
|
|
|
from achievement a left join industry_category f on a.field_a=f.id
|
|
|
left join industry_category f2 on a.field_b=f2.id
|
|
|
left join industry_category f3 on a.field_c=f3.id
|
|
|
@@ -1429,10 +1441,12 @@ where
|
|
|
</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
|
|
|
+ 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
|
|
|
+ left join (select achievement_id,count(*) as x from achievement_interest GROUP by achievement_id) c
|
|
|
+ on c.achievement_id=a.id
|
|
|
where a.deleted_sign=0
|
|
|
and ai.uid= #{uid,jdbcType=VARCHAR}
|
|
|
order by ai.create_time desc
|