1234567891011121314151617181920212223242526272829303132 |
- <?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.backendsys.modules.material.dao.MaterialLoraDao">
- <sql id="includeMaterialLora">
- id,
- id lora_id,
- lora_name,
- sort
- </sql>
- <!-- COALESCE(content_type, '') content_type, -->
- <resultMap id="resultMapMaterialLora" type="com.backendsys.modules.material.entity.MaterialLora">
- <id property="id" column="id" jdbcType="BIGINT" />
- <result property="lora_id" column="id" javaType="java.lang.Long" />
- <result property="lora_name" column="lora_name" />
- <result property="sort" column="sort" javaType="java.lang.Integer" />
- </resultMap>
- <select id="selectMaterialLoraList" resultMap="resultMapMaterialLora">
- SELECT
- <include refid="includeMaterialLora" />
- FROM ai_material_lora
- <where>
- <if test="lora_name != null and lora_name != ''">
- AND lora_name = #{lora_name}
- </if>
- </where>
- ORDER BY sort DESC
- </select>
- </mapper>
|