|
|
@@ -72,4 +72,28 @@
|
|
|
LIMIT 1
|
|
|
</select>
|
|
|
|
|
|
+ <!-- 数仓同步:批量插入规则(物理全量替换,del_flag 恒为 0) -->
|
|
|
+ <insert id="batchInsert">
|
|
|
+ INSERT INTO t_rating_recommend_rule
|
|
|
+ (player, year, series, card_set, recommend_efficiency, effective_time,
|
|
|
+ card_id, card_no, current_value, value_change_pct, value_min, value_max, batch_no,
|
|
|
+ create_time, update_time, del_flag)
|
|
|
+ VALUES
|
|
|
+ <foreach collection="list" item="it" separator=",">
|
|
|
+ (#{it.player}, #{it.year}, #{it.series}, #{it.cardSet}, #{it.recommendEfficiency}, #{it.effectiveTime},
|
|
|
+ #{it.cardId}, #{it.cardNo}, #{it.currentValue}, #{it.valueChangePct}, #{it.valueMin}, #{it.valueMax}, #{it.batchNo},
|
|
|
+ now(), now(), 0)
|
|
|
+ </foreach>
|
|
|
+ </insert>
|
|
|
+
|
|
|
+ <!-- 数仓同步:按批次号物理删除规则(配合全量替换) -->
|
|
|
+ <delete id="deleteByBatchNo">
|
|
|
+ DELETE FROM t_rating_recommend_rule WHERE batch_no = #{batchNo}
|
|
|
+ </delete>
|
|
|
+
|
|
|
+ <!-- 数仓同步:查询所有去重批次号 -->
|
|
|
+ <select id="selectDistinctBatchNos" resultType="java.lang.String">
|
|
|
+ SELECT DISTINCT batch_no FROM t_rating_recommend_rule WHERE batch_no IS NOT NULL
|
|
|
+ </select>
|
|
|
+
|
|
|
</mapper>
|