refactor(printer): 优化人脸素材查询逻辑

- 移除不必要的MemberSourceEntity和相关Repository依赖
- 将数据查询逻辑从Repository层迁移到Mapper层
- 添加type参数支持素材类型过滤
- 修复方法注释中的人脸ID描述错误
- 直接返回SourceEntity列表避免额外的转换操作
This commit is contained in:
2026-01-03 23:46:52 +08:00
parent 21d8c56e82
commit 32297dc29c
3 changed files with 26 additions and 13 deletions

View File

@@ -512,4 +512,15 @@
SELECT COUNT(*) FROM member_source
WHERE face_id = #{faceId} AND `type` = #{type} AND is_free = 1
</select>
<select id="listSourceByFaceRelation" resultType="com.ycwl.basic.model.pc.source.entity.SourceEntity">
SELECT s.*
FROM member_source ms
INNER JOIN source s ON ms.source_id = s.id
WHERE ms.face_id = #{faceId}
<if test="type != null">
AND ms.type = #{type}
</if>
ORDER BY s.create_time DESC
</select>
</mapper>