|
|
@@ -882,9 +882,9 @@
|
|
|
<if test="ownerType != null">
|
|
|
and a.owner_type = #{ownerType,jdbcType=VARCHAR}
|
|
|
</if>
|
|
|
- <if test="techBrokerId != null">
|
|
|
+ <!-- <if test="techBrokerId != null">
|
|
|
and a.tech_broker_id = #{techBrokerId,jdbcType=VARCHAR}
|
|
|
- </if>
|
|
|
+ </if> -->
|
|
|
<if test="ownerName != null">
|
|
|
and a.owner_name like CONCAT('%',#{ownerName,jdbcType=VARCHAR},'%')
|
|
|
</if>
|
|
|
@@ -962,9 +962,9 @@
|
|
|
<if test="ownerType != null">
|
|
|
and a.owner_type = #{ownerType,jdbcType=VARCHAR}
|
|
|
</if>
|
|
|
- <if test="techBrokerId != null">
|
|
|
+ <!-- <if test="techBrokerId != null">
|
|
|
and a.tech_broker_id = #{techBrokerId,jdbcType=VARCHAR}
|
|
|
- </if>
|
|
|
+ </if> -->
|
|
|
<if test="ownerName != null">
|
|
|
and a.owner_name like CONCAT('%',#{ownerName,jdbcType=VARCHAR},'%')
|
|
|
</if>
|
|
|
@@ -1804,6 +1804,171 @@
|
|
|
</if>
|
|
|
</select>
|
|
|
|
|
|
+ <select id="findMyyAchievementListByPage" parameterType="String" resultType="com.goafanti.achievement.bo.AchievementListBo">
|
|
|
+ select
|
|
|
+ a.id, a.serial_number as serialNumber, a.data_category as dataCategory,
|
|
|
+ a.name, a.keyword, a.category, a.owner_name as ownerName, a.owner_type as ownerType,
|
|
|
+ <!-- oi.unit_name as username, -->a.owner_id as ownerId, a.org_id as orgId, a.contacts,a.create_time as createTime,
|
|
|
+ a.release_date as releaseDate, a.audit_status as auditStatus, ad.name as techBrokerId,a.boutique
|
|
|
+ <if test="hot != null and hot == 1"><!-- 在首页 -->
|
|
|
+ ,1 as hot
|
|
|
+ </if>
|
|
|
+ <if test="hot != null and hot == 0"><!-- 无首页参数 -->
|
|
|
+ ,0 as hot
|
|
|
+ </if>
|
|
|
+ <if test="hot==null"><!-- 在首页 -->
|
|
|
+ ,ifnull(mm.effective,0) as hot
|
|
|
+ </if>
|
|
|
+ from achievement a
|
|
|
+ LEFT JOIN admin ad on ad.id = a.tech_broker_id
|
|
|
+ <!-- LEFT JOIN organization_identity oi on a.owner_id = oi.uid -->
|
|
|
+ <if test="adminId != null">
|
|
|
+ LEFT JOIN user u on a.owner_id = u.id
|
|
|
+ </if>
|
|
|
+ <if test="hot != null and hot == 1"> <!-- 在首页 -->
|
|
|
+ inner join marketing_management mm on a.id = mm.product_id
|
|
|
+ </if>
|
|
|
+ <if test="hot == null"> <!-- 无首页参数 -->
|
|
|
+ left join marketing_management mm on a.id = mm.product_id
|
|
|
+ </if>
|
|
|
+ where a.deleted_sign = 0
|
|
|
+ <if test="ownerType != null">
|
|
|
+ and a.owner_type = #{ownerType,jdbcType=VARCHAR}
|
|
|
+ </if>
|
|
|
+ <if test="techBrokerId != null">
|
|
|
+ and a.tech_broker_id = #{techBrokerId,jdbcType=VARCHAR}
|
|
|
+ </if>
|
|
|
+ <if test="ownerName != null">
|
|
|
+ and a.owner_name like CONCAT('%',#{ownerName,jdbcType=VARCHAR},'%')
|
|
|
+ </if>
|
|
|
+ <!-- <if test="unitName != null">
|
|
|
+ and oi.unit_name like CONCAT('%',#{unitName,jdbcType=VARCHAR},'%')
|
|
|
+ </if> -->
|
|
|
+ <if test="ownerId != null">
|
|
|
+ and a.owner_id = #{ownerId,jdbcType=VARCHAR}
|
|
|
+ </if>
|
|
|
+ <if test="serialNumber != null">
|
|
|
+ and a.serial_number = #{serialNumber,jdbcType=INTEGER}
|
|
|
+ </if>
|
|
|
+ <if test="auditStatus != null">
|
|
|
+ and a.audit_status = #{auditStatus,jdbcType=INTEGER}
|
|
|
+ </if>
|
|
|
+ <if test="name != null">
|
|
|
+ and a.name like CONCAT('%',#{name,jdbcType=VARCHAR},'%')
|
|
|
+ </if>
|
|
|
+ <if test="keyword != null">
|
|
|
+ and a.keyword like "%"#{keyword,jdbcType=VARCHAR}"%"
|
|
|
+ </if>
|
|
|
+ <if test="category != null">
|
|
|
+ and a.category = #{category,jdbcType=INTEGER}
|
|
|
+ </if>
|
|
|
+ <if test="status != null">
|
|
|
+ and a.status = #{status,jdbcType=INTEGER}
|
|
|
+ </if>
|
|
|
+ <if test="rStart != null">
|
|
|
+ and a.release_date <![CDATA[ >= ]]> #{rStart,jdbcType=TIMESTAMP}
|
|
|
+ </if>
|
|
|
+ <if test="rEnd != null">
|
|
|
+ and a.release_date <![CDATA[ < ]]> #{rEnd,jdbcType=TIMESTAMP}
|
|
|
+ </if>
|
|
|
+ <if test="cStart != null">
|
|
|
+ and a.create_time <![CDATA[ >= ]]> #{cStart,jdbcType=TIMESTAMP}
|
|
|
+ </if>
|
|
|
+ <if test="cEnd != null">
|
|
|
+ and a.create_time <![CDATA[ < ]]> #{cEnd,jdbcType=TIMESTAMP}
|
|
|
+ </if>
|
|
|
+ <if test="releaseStatus != null">
|
|
|
+ and a.release_status = #{releaseStatus,jdbcType=INTEGER}
|
|
|
+ </if>
|
|
|
+
|
|
|
+ <if test="boutique != null">
|
|
|
+ and a.boutique = #{boutique,jdbcType=INTEGER}
|
|
|
+ </if>
|
|
|
+ <if test="hot != null and hot == 0"><!-- 不在首页 -->
|
|
|
+ and a.id not in(select mm.product_id from marketing_management mm where mm.effective = 1)
|
|
|
+ </if>
|
|
|
+ <if test="hot != null and hot == 1"><!-- 在首页 -->
|
|
|
+ and mm.effective = 1
|
|
|
+ </if>
|
|
|
+ order by serial_number desc
|
|
|
+ <if test="page_sql!=null">
|
|
|
+ ${page_sql}
|
|
|
+ </if>
|
|
|
+ </select>
|
|
|
+
|
|
|
+ <select id="findMyyAchievementCount" parameterType="String" resultType="java.lang.Integer">
|
|
|
+ select
|
|
|
+ count(1)
|
|
|
+ from achievement a
|
|
|
+ LEFT JOIN admin ad on ad.id = a.tech_broker_id
|
|
|
+ <!-- LEFT JOIN organization_identity oi on a.owner_id = oi.uid -->
|
|
|
+ <if test="adminId != null">
|
|
|
+ LEFT JOIN user u on a.owner_id = u.id
|
|
|
+ </if>
|
|
|
+ <if test="hot != null and hot == 1"><!-- 在首页 -->
|
|
|
+ inner join marketing_management mm on a.id = mm.product_id
|
|
|
+ </if>
|
|
|
+ <if test="hot == null"> <!-- 无首页参数 -->
|
|
|
+ left join marketing_management mm on a.id = mm.product_id
|
|
|
+ </if>
|
|
|
+ where a.deleted_sign = 0
|
|
|
+ <if test="ownerType != null">
|
|
|
+ and a.owner_type = #{ownerType,jdbcType=VARCHAR}
|
|
|
+ </if>
|
|
|
+ <if test="techBrokerId != null">
|
|
|
+ and a.tech_broker_id = #{techBrokerId,jdbcType=VARCHAR}
|
|
|
+ </if>
|
|
|
+ <if test="ownerName != null">
|
|
|
+ and a.owner_name like CONCAT('%',#{ownerName,jdbcType=VARCHAR},'%')
|
|
|
+ </if>
|
|
|
+ <!-- <if test="unitName != null">
|
|
|
+ and oi.unit_name like CONCAT('%',#{unitName,jdbcType=VARCHAR},'%')
|
|
|
+ </if> -->
|
|
|
+ <if test="ownerId != null">
|
|
|
+ and a.owner_id = #{ownerId,jdbcType=VARCHAR}
|
|
|
+ </if>
|
|
|
+ <if test="serialNumber != null">
|
|
|
+ and a.serial_number = #{serialNumber,jdbcType=INTEGER}
|
|
|
+ </if>
|
|
|
+ <if test="auditStatus != null">
|
|
|
+ and a.audit_status = #{auditStatus,jdbcType=INTEGER}
|
|
|
+ </if>
|
|
|
+ <if test="name != null">
|
|
|
+ and a.name like CONCAT('%',#{name,jdbcType=VARCHAR},'%')
|
|
|
+ </if>
|
|
|
+ <if test="keyword != null">
|
|
|
+ and a.keyword like "%"#{keyword,jdbcType=VARCHAR}"%"
|
|
|
+ </if>
|
|
|
+ <if test="category != null">
|
|
|
+ and a.category = #{category,jdbcType=INTEGER}
|
|
|
+ </if>
|
|
|
+ <if test="status != null">
|
|
|
+ and a.status = #{status,jdbcType=INTEGER}
|
|
|
+ </if>
|
|
|
+ <if test="rStart != null">
|
|
|
+ and a.release_date <![CDATA[ >= ]]> #{rStart,jdbcType=TIMESTAMP}
|
|
|
+ </if>
|
|
|
+ <if test="rEnd != null">
|
|
|
+ and a.release_date <![CDATA[ < ]]> #{rEnd,jdbcType=TIMESTAMP}
|
|
|
+ </if>
|
|
|
+ <if test="cStart != null">
|
|
|
+ and a.create_time <![CDATA[ >= ]]> #{cStart,jdbcType=TIMESTAMP}
|
|
|
+ </if>
|
|
|
+ <if test="cEnd != null">
|
|
|
+ and a.create_time <![CDATA[ < ]]> #{cEnd,jdbcType=TIMESTAMP}
|
|
|
+ </if>
|
|
|
+ <if test="releaseStatus != null">
|
|
|
+ and a.release_status = #{releaseStatus,jdbcType=INTEGER}
|
|
|
+ </if>
|
|
|
+
|
|
|
+ <if test="hot != null and hot == 0"><!-- 不在首页 -->
|
|
|
+ and a.id not in(select mm.product_id from marketing_management mm where mm.effective = 1)
|
|
|
+ </if>
|
|
|
+ <if test="hot != null and hot == 1"><!-- 在首页 -->
|
|
|
+ and mm.effective = 1
|
|
|
+ </if>
|
|
|
+ </select>
|
|
|
+
|
|
|
<select id="findManageAchievementListByPage" parameterType="String" resultType="com.goafanti.achievement.bo.AchievementListBo">
|
|
|
select
|
|
|
a.id, a.serial_number as serialNumber, a.data_category as dataCategory,
|