Files
aida_back/src/main/resources/mapper/primary/CollocationMapper.xml

31 lines
1.2 KiB
XML
Raw Normal View History

2024-02-20 10:12:44 +08:00
<?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.ai.da.mapper.primary.CollocationMapper">
<!-- 通用查询映射结果 -->
<resultMap id="BaseResultMap" type="com.ai.da.mapper.primary.entity.Collocation">
<id column="id" property="id" />
<result column="name" property="name" />
<result column="is_system" property="isSystem" />
<result column="user_id" property="userId" />
<result column="create_date" property="createDate" />
<result column="update_date" property="updateDate" />
<result column="is_deleted" property="isDeleted" />
</resultMap>
<select id="getCollocationListBySketch" resultMap="BaseResultMap">
SELECT
*
FROM
collocation
WHERE
id IN (
SELECT
collocation_id
FROM
collocation_rel_dressing
WHERE
dressing_id = ( SELECT id FROM dressing WHERE apparel = #{apparel} AND style_category = #{styleCategory} ))
</select>
</mapper>