|
|
@@ -1026,50 +1026,52 @@
|
|
|
|
|
|
<select id="findAchievementListByPage" parameterType="String" resultType="com.goafanti.achievement.bo.AchievementListBo">
|
|
|
select
|
|
|
- id, serial_number as serialNumber, data_category as dataCategory,
|
|
|
- name, keyword, category, introduction,owner_postal_address as ownerPostalAddress,
|
|
|
- owner_name as ownerName, owner_type as ownerType, owner_mobile as ownerMobile,field_a as fieldA,field_b as fieldB,field_c as fieldC,
|
|
|
- status, release_date as releaseDate, audit_status as auditStatus
|
|
|
- from achievement
|
|
|
+ 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
|
|
|
+ from achievement a
|
|
|
+ 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 owner_id = #{ownerId,jdbcType=VARCHAR}
|
|
|
+ and a.owner_id = #{ownerId,jdbcType=VARCHAR}
|
|
|
</if>
|
|
|
<if test="serialNumber != null">
|
|
|
- and serial_number = #{serialNumber,jdbcType=INTEGER}
|
|
|
+ and a.serial_number = #{serialNumber,jdbcType=INTEGER}
|
|
|
</if>
|
|
|
<if test="auditStatus != null">
|
|
|
- and audit_status = #{auditStatus,jdbcType=INTEGER}
|
|
|
+ and a.audit_status = #{auditStatus,jdbcType=INTEGER}
|
|
|
</if>
|
|
|
<if test="name != null">
|
|
|
- and name = #{name,jdbcType=VARCHAR}
|
|
|
+ and a.name = #{name,jdbcType=VARCHAR}
|
|
|
</if>
|
|
|
<if test="keyword != null">
|
|
|
- and keyword like "%"#{keyword,jdbcType=VARCHAR}"%"
|
|
|
+ and a.keyword like "%"#{keyword,jdbcType=VARCHAR}"%"
|
|
|
</if>
|
|
|
<if test="dataCategory != null and dataCategory != ''">
|
|
|
- and data_category = #{dataCategory,jdbcType=INTEGER}
|
|
|
+ and a.data_category = #{dataCategory,jdbcType=INTEGER}
|
|
|
</if>
|
|
|
<if test="category != null">
|
|
|
- and category = #{category,jdbcType=INTEGER}
|
|
|
+ and a.category = #{category,jdbcType=INTEGER}
|
|
|
</if>
|
|
|
<if test="ownerType != null">
|
|
|
- and owner_type = #{ownerType,jdbcType=INTEGER}
|
|
|
+ and a.owner_type = #{ownerType,jdbcType=INTEGER}
|
|
|
</if>
|
|
|
<if test="fieldA != null">
|
|
|
- and field_a = #{fieldA,jdbcType=VARCHAR}
|
|
|
+ and a.field_a = #{fieldA,jdbcType=VARCHAR}
|
|
|
</if>
|
|
|
<if test="status != null">
|
|
|
- and status = #{status,jdbcType=INTEGER}
|
|
|
+ and a.status = #{status,jdbcType=INTEGER}
|
|
|
</if>
|
|
|
<if test="rStart != null">
|
|
|
- and release_date <![CDATA[ >= ]]> #{rStart,jdbcType=TIMESTAMP}
|
|
|
+ and a.release_date <![CDATA[ >= ]]> #{rStart,jdbcType=TIMESTAMP}
|
|
|
</if>
|
|
|
<if test="rEnd != null">
|
|
|
- and release_date <![CDATA[ < ]]> #{rEnd,jdbcType=TIMESTAMP}
|
|
|
+ and a.release_date <![CDATA[ < ]]> #{rEnd,jdbcType=TIMESTAMP}
|
|
|
</if>
|
|
|
<if test="releaseStatus != null">
|
|
|
- and release_status = #{releaseStatus,jdbcType=INTEGER}
|
|
|
+ and a.release_status = #{releaseStatus,jdbcType=INTEGER}
|
|
|
</if>
|
|
|
|
|
|
order by serial_number desc
|
|
|
@@ -1081,46 +1083,48 @@
|
|
|
<select id="findAchievementCount" parameterType="String" resultType="java.lang.Integer">
|
|
|
select
|
|
|
count(1)
|
|
|
- from achievement
|
|
|
+ from achievement a
|
|
|
+ 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 owner_id = #{ownerId,jdbcType=VARCHAR}
|
|
|
+ <if test="ownerId != null">
|
|
|
+ and a.owner_id = #{ownerId,jdbcType=VARCHAR}
|
|
|
</if>
|
|
|
- <if test="fieldA != null">
|
|
|
- and field_a = #{fieldA,jdbcType=VARCHAR}
|
|
|
- </if>
|
|
|
<if test="serialNumber != null">
|
|
|
- and serial_number = #{serialNumber,jdbcType=INTEGER}
|
|
|
+ and a.serial_number = #{serialNumber,jdbcType=INTEGER}
|
|
|
</if>
|
|
|
<if test="auditStatus != null">
|
|
|
- and audit_status = #{auditStatus,jdbcType=INTEGER}
|
|
|
+ and a.audit_status = #{auditStatus,jdbcType=INTEGER}
|
|
|
</if>
|
|
|
<if test="name != null">
|
|
|
- and name = #{name,jdbcType=VARCHAR}
|
|
|
+ and a.name = #{name,jdbcType=VARCHAR}
|
|
|
</if>
|
|
|
<if test="keyword != null">
|
|
|
- and keyword like "%"#{keyword,jdbcType=VARCHAR}"%"
|
|
|
+ and a.keyword like "%"#{keyword,jdbcType=VARCHAR}"%"
|
|
|
</if>
|
|
|
<if test="dataCategory != null and dataCategory != ''">
|
|
|
- and data_category = #{dataCategory,jdbcType=INTEGER}
|
|
|
+ and a.data_category = #{dataCategory,jdbcType=INTEGER}
|
|
|
</if>
|
|
|
<if test="category != null">
|
|
|
- and category = #{category,jdbcType=INTEGER}
|
|
|
+ and a.category = #{category,jdbcType=INTEGER}
|
|
|
</if>
|
|
|
<if test="ownerType != null">
|
|
|
- and owner_type = #{ownerType,jdbcType=INTEGER}
|
|
|
+ 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 status = #{status,jdbcType=INTEGER}
|
|
|
+ and a.status = #{status,jdbcType=INTEGER}
|
|
|
</if>
|
|
|
<if test="rStart != null">
|
|
|
- and release_date <![CDATA[ >= ]]> #{rStart,jdbcType=TIMESTAMP}
|
|
|
+ and a.release_date <![CDATA[ >= ]]> #{rStart,jdbcType=TIMESTAMP}
|
|
|
</if>
|
|
|
<if test="rEnd != null">
|
|
|
- and release_date <![CDATA[ < ]]> #{rEnd,jdbcType=TIMESTAMP}
|
|
|
+ and a.release_date <![CDATA[ < ]]> #{rEnd,jdbcType=TIMESTAMP}
|
|
|
</if>
|
|
|
<if test="releaseStatus != null">
|
|
|
- and release_status = #{releaseStatus,jdbcType=INTEGER}
|
|
|
+ and a.release_status = #{releaseStatus,jdbcType=INTEGER}
|
|
|
</if>
|
|
|
</select>
|
|
|
|
|
|
@@ -1138,12 +1142,14 @@
|
|
|
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.international_flag as internationalFlag,
|
|
|
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.contacts, a.manager_id as managerId, a.salesman_id as salesmanId, f.name as field1,f2.name as field2,
|
|
|
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,a.boutique,ifnull(mm.effective,0) as hot,mm.cover_img as coverImg
|
|
|
from achievement a
|
|
|
+ left join field_glossory f on a.field_a=f.id
|
|
|
+ left join field_glossory f2 on a.field_b=f2.id
|
|
|
left join user_identity ui on a.owner_id = ui.uid
|
|
|
left join user u on u.id = a.owner_id
|
|
|
left join marketing_management mm on a.id = mm.product_id
|