Initial project

This commit is contained in:
Timi
2025-07-08 16:31:30 +08:00
parent 1c6a45c8c2
commit ae0f56a6dc
356 changed files with 21123 additions and 109 deletions
@@ -0,0 +1,35 @@
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd" >
<mapper namespace="com.imyeyu.server.modules.common.mapper.IconMapper">
<sql id="table">icon</sql>
<!-- 根据标签获取部分 -->
<sql id="byLabel">
FROM (
SELECT
id
FROM
icon_labels
WHERE
${lang} LIKE CONCAT('%', #{label}, '%')
AND icon_labels.deleted_at IS NULL
) AS labels
LEFT JOIN
icon_label
ON
icon_label.icon_label_id = labels.id
AND labels.id IS NOT NULL
LEFT JOIN
<include refid="table" />
ON
icon.id = icon_label.icon_id
WHERE
icon.id IS NOT NULL
AND icon.deleted_at IS NULL
</sql>
<select id="countByLabel" resultType="long">
SELECT COUNT(1) <include refid="byLabel" />
</select>
<select id="listByLabel" resultType="com.imyeyu.server.modules.common.entity.Icon">
SELECT icon.* <include refid="byLabel" /> LIMIT #{offset}, #{limit}
</select>
</mapper>