修复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"));
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user