|
|
@@ -609,318 +609,7 @@
|
|
|
boutique = #{boutique,jdbcType=INTEGER}
|
|
|
where id = #{id,jdbcType=VARCHAR}
|
|
|
</update>
|
|
|
-
|
|
|
- <select id="findUserOwnerAchievementListByPage" 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,
|
|
|
- ui.username as username, a.owner_id as ownerId, a.org_id as orgId, a.contacts,
|
|
|
- a.release_date as releaseDate, a.audit_status as auditStatus, ad.name as techBrokerId,a.boutique,a.create_time as createTime
|
|
|
- <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 user_identity ui on a.owner_id = ui.uid
|
|
|
- <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 and a.owner_type = 0
|
|
|
- <if test="ownerName != null">
|
|
|
- and a.owner_name like CONCAT('%',#{ownerName,jdbcType=VARCHAR},'%')
|
|
|
- and (a.owner_id is null or a.owner_id = '')
|
|
|
- </if>
|
|
|
- <if test="username != null">
|
|
|
- and ui.username like CONCAT('%',#{username,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="techBrokerId != null">
|
|
|
- and a.tech_broker_id = #{techBrokerId,jdbcType=VARCHAR}
|
|
|
- </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 a.serial_number desc
|
|
|
- <if test="page_sql!=null">
|
|
|
- ${page_sql}
|
|
|
- </if>
|
|
|
- </select>
|
|
|
-
|
|
|
- <select id="findUserOwnerAchievementCount" parameterType="String" resultType="java.lang.Integer">
|
|
|
- select
|
|
|
- count(1)
|
|
|
- from achievement a
|
|
|
- <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 deleted_sign = 0 and owner_type = 0
|
|
|
- <if test="ownerName != null">
|
|
|
- and a.owner_name like CONCAT('%',#{ownerName,jdbcType=VARCHAR},'%')
|
|
|
- and (a.owner_id is null or a.owner_id = '')
|
|
|
- </if>
|
|
|
- <if test="username != null">
|
|
|
- and ui.username like CONCAT('%',#{username,jdbcType=VARCHAR},'%')
|
|
|
- </if>
|
|
|
- <if test="ownerId != null">
|
|
|
- and owner_id = #{ownerId,jdbcType=VARCHAR}
|
|
|
- </if>
|
|
|
- <if test="serialNumber != null">
|
|
|
- and serial_number = #{serialNumber,jdbcType=INTEGER}
|
|
|
- </if>
|
|
|
- <if test="auditStatus != null">
|
|
|
- and audit_status = #{auditStatus,jdbcType=INTEGER}
|
|
|
- </if>
|
|
|
- <if test="name != null">
|
|
|
- and name like CONCAT('%',#{name,jdbcType=VARCHAR},'%')
|
|
|
- </if>
|
|
|
- <if test="keyword != null">
|
|
|
- and keyword like "%"#{keyword,jdbcType=VARCHAR}"%"
|
|
|
- </if>
|
|
|
- <if test="category != null">
|
|
|
- and category = #{category,jdbcType=INTEGER}
|
|
|
- </if>
|
|
|
- <if test="status != null">
|
|
|
- and status = #{status,jdbcType=INTEGER}
|
|
|
- </if>
|
|
|
- <if test="rStart != null">
|
|
|
- and release_date <![CDATA[ > ]]> #{rStart,jdbcType=TIMESTAMP}
|
|
|
- </if>
|
|
|
- <if test="rEnd != null">
|
|
|
- and 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 release_status = #{releaseStatus,jdbcType=INTEGER}
|
|
|
- </if>
|
|
|
- <if test="techBrokerId != null">
|
|
|
- and a.tech_broker_id = #{techBrokerId,jdbcType=VARCHAR}
|
|
|
- </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>
|
|
|
- </select>
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
- <select id="findOrgOwnerAchievementListByPage" 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,
|
|
|
- a.owner_id as ownerId, a.org_id as orgId,a.create_time as createTime,
|
|
|
- a.release_date as releaseDate, a.audit_status as auditStatus, ad.name as techBrokerId,a.boutique,ad.id techBrokerIdd,
|
|
|
- a.release_status as releaseStatus
|
|
|
- <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
|
|
|
- <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="recordPerson != null">
|
|
|
- and ad.name = #{recordPerson,jdbcType=VARCHAR}
|
|
|
- </if>
|
|
|
- <if test="ownerType != null">
|
|
|
- and a.owner_type = #{ownerType,jdbcType=VARCHAR}
|
|
|
- </if>
|
|
|
- <if test="ownerName != null">
|
|
|
- and a.owner_name like CONCAT(#{ownerName,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="findOrgOwnerAchievementCount" parameterType="String" resultType="java.lang.Integer">
|
|
|
- select
|
|
|
- count(1)
|
|
|
- from achievement a
|
|
|
- LEFT JOIN admin ad on ad.id = a.tech_broker_id
|
|
|
- <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="recordPerson != null">
|
|
|
- and ad.name = #{recordPerson,jdbcType=VARCHAR}
|
|
|
- </if>
|
|
|
- <if test="ownerType != null">
|
|
|
- and a.owner_type = #{ownerType,jdbcType=VARCHAR}
|
|
|
- </if>
|
|
|
- <if test="ownerName != null">
|
|
|
- and a.owner_name like CONCAT('%',#{ownerName,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>
|
|
|
- </select>
|
|
|
-
|
|
|
-
|
|
|
+
|
|
|
<update id="updateReleaseDate" parameterType="java.lang.String">
|
|
|
update achievement set release_date = null
|
|
|
where id = #{id,jdbcType=VARCHAR}
|
|
|
@@ -1602,9 +1291,8 @@
|
|
|
where uid=#{uid,jdbcType=VARCHAR}
|
|
|
</select>
|
|
|
|
|
|
- <select id="findMyAchievementListByPage" parameterType="String" resultType="com.goafanti.achievement.bo.AchievementListBo">
|
|
|
-
|
|
|
- select
|
|
|
+ <select id="findMyAchievementListByPage" parameterType="String" resultType="com.goafanti.achievement.bo.AchievementListBo">
|
|
|
+ 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
|
|
|
@@ -1632,349 +1320,8 @@
|
|
|
<if test="ownerId != null">
|
|
|
and a.owner_id = #{ownerId,jdbcType=VARCHAR}
|
|
|
</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.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="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>
|
|
|
- </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,
|
|
|
- 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.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 department_management dm on dm.id = ad.department_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="recordPerson != null">
|
|
|
- and ad.name = #{recordPerson,jdbcType=VARCHAR}
|
|
|
- </if>
|
|
|
- <if test="ownerType != null">
|
|
|
- and a.owner_type = #{ownerType,jdbcType=VARCHAR}
|
|
|
- </if>
|
|
|
- <if test="techBrokerId != null">
|
|
|
- and (a.tech_broker_id = #{techBrokerId,jdbcType=VARCHAR} or ad.department_id=(select department_id from admin where 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="findManageAchievementCount" 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 department_management dm on dm.id = ad.department_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="recordPerson != null">
|
|
|
- and ad.name = #{recordPerson,jdbcType=VARCHAR}
|
|
|
- </if>
|
|
|
- <if test="ownerType != null">
|
|
|
- and a.owner_type = #{ownerType,jdbcType=VARCHAR}
|
|
|
- </if>
|
|
|
- <if test="techBrokerId != null">
|
|
|
- and (a.tech_broker_id = #{techBrokerId,jdbcType=VARCHAR} or ad.department_id=(select department_id from admin where 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>
|
|
|
</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,
|
|
|
ap.if_top,ap.top_number,ap.show_number
|