MaterialLoraDao.xml 1.1 KB

1234567891011121314151617181920212223242526272829303132
  1. <?xml version="1.0" encoding="utf-8" ?>
  2. <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd" >
  3. <mapper namespace="com.backendsys.modules.material.dao.MaterialLoraDao">
  4. <sql id="includeMaterialLora">
  5. id,
  6. id lora_id,
  7. lora_name,
  8. sort
  9. </sql>
  10. <!-- COALESCE(content_type, '') content_type, -->
  11. <resultMap id="resultMapMaterialLora" type="com.backendsys.modules.material.entity.MaterialLora">
  12. <id property="id" column="id" jdbcType="BIGINT" />
  13. <result property="lora_id" column="id" javaType="java.lang.Long" />
  14. <result property="lora_name" column="lora_name" />
  15. <result property="sort" column="sort" javaType="java.lang.Integer" />
  16. </resultMap>
  17. <select id="selectMaterialLoraList" resultMap="resultMapMaterialLora">
  18. SELECT
  19. <include refid="includeMaterialLora" />
  20. FROM ai_material_lora
  21. <where>
  22. <if test="lora_name != null and lora_name != ''">
  23. AND lora_name = #{lora_name}
  24. </if>
  25. </where>
  26. ORDER BY sort DESC
  27. </select>
  28. </mapper>