|
|
@@ -45,7 +45,7 @@
|
|
|
ON t.activity_status = tdk.kind_code
|
|
|
WHERE t.flg_valid
|
|
|
AND now() >= t.begin_date
|
|
|
- AND (t.end_date IS NULL OR t.end_date >= now())
|
|
|
+ AND (t.end_date IS NULL OR t.end_date + '1 day'::INTERVAL >= now())
|
|
|
AND (t.cp_ids IS NULL OR #{cpId} = ANY(t.cp_ids))
|
|
|
<if test="appCode != null and appCode != ''">
|
|
|
And t.app_code = #{appCode}
|
|
|
@@ -56,7 +56,50 @@
|
|
|
<if test="flgBanner != null ">
|
|
|
And t.flg_banner = #{flgBanner}
|
|
|
</if>
|
|
|
+ <if test="activityTypeList != null ">
|
|
|
+ AND t.activity_type = ANY(#{activityTypeList,typeHandler=StringListTypeHandler})
|
|
|
+ </if>
|
|
|
ORDER BY t.display_no
|
|
|
</select>
|
|
|
+
|
|
|
+ <!--查询活动明细-->
|
|
|
+ <select id="selectActivityItems" resultType="java.util.Map">
|
|
|
+ SELECT
|
|
|
+ ti.item_id AS "itemId",
|
|
|
+ ti.activity_id AS "activityId",
|
|
|
+ ti.activity_item_name AS "activityItemName",
|
|
|
+ ti.activity_item_describe AS "activityItemDescribe",
|
|
|
+ ti.std_price AS "stdPrice",
|
|
|
+ ti.sale_price AS "salePrice",
|
|
|
+ ti.valid_long AS "validLong",
|
|
|
+ ti.extra_long AS "extraLong"
|
|
|
+ FROM
|
|
|
+ dkic_a.t_mst_activity_item ti
|
|
|
+ INNER JOIN dkic_a.t_mst_activity T ON ti.activity_id = T.activity_id
|
|
|
+ WHERE
|
|
|
+ T.flg_valid
|
|
|
+ AND ti.flg_valid
|
|
|
+ AND now( ) >= T.begin_date
|
|
|
+ AND ( T.end_date IS NULL OR T.end_date + '1 day' :: INTERVAL >= now( ) )
|
|
|
+ AND ( T.cp_ids IS NULL OR 1 = ANY ( T.cp_ids ) )
|
|
|
+ <if test="appCode != null and appCode != ''">
|
|
|
+ And t.app_code = #{appCode}
|
|
|
+ </if>
|
|
|
+ <if test="activityStatus != null and activityStatus != ''">
|
|
|
+ And t.activity_status = #{activityStatus}
|
|
|
+ </if>
|
|
|
+ <if test="flgBanner != null ">
|
|
|
+ And t.flg_banner = #{flgBanner}
|
|
|
+ </if>
|
|
|
+ <if test="flgBanner != null ">
|
|
|
+ And t.flg_banner = #{flgBanner}
|
|
|
+ </if>
|
|
|
+ <if test="activityTypeList != null ">
|
|
|
+ AND t.activity_type = ANY(#{activityTypeList,typeHandler=StringListTypeHandler})
|
|
|
+ </if>
|
|
|
+ ORDER BY
|
|
|
+ T.display_no,
|
|
|
+ ti.item_id
|
|
|
+ </select>
|
|
|
</mapper>
|
|
|
|