fix: 跨租户授权联调修复 + 新增分区自建模块
- CrossTenantServiceImpl: 有效期判断改用 apply("start_at <= now()"),规避
OffsetDateTime 绑定 timestamptz 比较异常(见实施记录 6.5)
- CallbackServiceImpl: 集成 C2C 跨租户授权检查(额外分发+审计+is_cross_tenant),
提取 enqueueIfConfigured
- 新增 PartitionService/Task: im_message 按月 RANGE 分区滚动建表
(当月+下月,@Init 启动自检 + 每日 0:10)
- 新增 CrossTenantService: 正反向授权匹配 + 跨租户审计
Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
@@ -0,0 +1,25 @@
|
||||
package com.imutil.mapper;
|
||||
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
import org.apache.ibatis.annotations.Update;
|
||||
|
||||
/**
|
||||
* 分区表 DDL 执行 Mapper
|
||||
* <p>
|
||||
* im_message 按月 RANGE 分区,分区名含动态年月(im_message_yyyyMM),无法用静态 SQL,
|
||||
* 故提供 ${sql} 占位的通用执行入口。
|
||||
* <p>
|
||||
* SQL 由 {@link com.imutil.service.PartitionService} 按年月在服务端拼装,无外部输入,不存在注入风险。
|
||||
*
|
||||
* @author imutil
|
||||
*/
|
||||
public interface PartitionMapper {
|
||||
|
||||
/**
|
||||
* 执行任意 DDL(建分区表)
|
||||
*
|
||||
* @param sql 形如 CREATE TABLE IF NOT EXISTS im_message_yyyyMM PARTITION OF im_message FOR VALUES FROM (...) TO (...)
|
||||
*/
|
||||
@Update("${sql}")
|
||||
void execute(@Param("sql") String sql);
|
||||
}
|
||||
Reference in New Issue
Block a user