修复Salon订单审核Mapper重复映射
This commit is contained in:
+1
-1
@@ -35,7 +35,7 @@ public interface OrderArtistReviewMapper extends BaseMapper<OrderArtistReviewDO>
|
||||
+ "AND p.is_delete = 0 AND p.front_visible = 1 AND p.moderation_status = 'APPROVED' "
|
||||
+ "AND s.is_delete = 0 AND s.status = 1 AND s.moderation_status = 'APPROVED' "
|
||||
+ "AND FIND_IN_SET(#{fileId}, REPLACE(COALESCE(r.image_file_ids, ''), ' ', '')) > 0")
|
||||
Long countPublicImageReference(@Param("reviewId") Long reviewId, @Param("fileId") Long fileId);
|
||||
Long countPublicImageReferenceByReviewId(@Param("reviewId") Long reviewId, @Param("fileId") Long fileId);
|
||||
|
||||
@Select("SELECT COUNT(1) FROM t_order_artist_review r "
|
||||
+ "LEFT JOIN t_product p ON p.id = r.product_id "
|
||||
|
||||
+18
@@ -0,0 +1,18 @@
|
||||
package com.xiaowang.jayucloud.salon.core.modules.order.mapper;
|
||||
|
||||
import com.baomidou.mybatisplus.core.MybatisConfiguration;
|
||||
import org.junit.jupiter.api.Test;
|
||||
|
||||
import static org.junit.jupiter.api.Assertions.assertTrue;
|
||||
|
||||
class OrderArtistReviewMapperMappingTest {
|
||||
@Test
|
||||
void registersReviewScopedAndGlobalImageReferenceStatementsSeparately() {
|
||||
MybatisConfiguration configuration = new MybatisConfiguration();
|
||||
configuration.addMapper(OrderArtistReviewMapper.class);
|
||||
|
||||
String mapperName = OrderArtistReviewMapper.class.getName();
|
||||
assertTrue(configuration.hasStatement(mapperName + ".countPublicImageReferenceByReviewId"));
|
||||
assertTrue(configuration.hasStatement(mapperName + ".countPublicImageReference"));
|
||||
}
|
||||
}
|
||||
@@ -1,5 +1,12 @@
|
||||
# 项目变更记录
|
||||
|
||||
## 2026-11-02 Salon SIT Core 启动故障与 Mapper 映射修复
|
||||
|
||||
- 检查 Gitea Actions 部署运行 #245:MyBatis-Plus 的 `OrderArtistReviewMapper.countPublicImageReference` 重复映射提示来自 Java Mapper 中两个同名重载方法;将按审核 ID 查询的方法改为独立名称,并新增 Mapper statement 注册测试,避免全局文件引用查询被忽略。
|
||||
- 部署真正阻塞点是 Core 启动时 Flyway 校验发现数据库中已存在失败的 V1 初始化迁移记录,健康检查因此端口拒绝连接并以退出码 43 失败;该 Flyway 状态不是上述 MyBatis 日志触发的。
|
||||
- 当前本机 SSH 凭据无法登录 SIT Core/数据库主机,本次没有修改 SIT 数据库。修复 V1 前必须先读取失败记录的 `error_message` 并核对 V1 部分执行的表、索引和种子数据;确认后再按项目 Flyway 规则处理,禁止直接清库、baseline 或自动 repair。
|
||||
- 本次无 SQL 变更;Mapper 改名不影响 `FrontendFileController` 使用的单参数全局查询。
|
||||
|
||||
# 2026-11-02 Gitea 工作流仓库域名统一
|
||||
|
||||
- 将所有部署、Nacos 发布/回退工作流中的 Gitea API 与仓库检出地址统一为 `http://wcsrv.top:3000`。
|
||||
|
||||
Reference in New Issue
Block a user