LexiconMapper.xml 1.1 KB

1234567891011121314151617181920212223242526272829
  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.diagbot.mapper.LexiconMapper">
  4. <!-- 通用查询映射结果 -->
  5. <resultMap id="BaseResultMap" type="com.diagbot.entity.Lexicon">
  6. <id column="id" property="id" />
  7. <result column="is_deleted" property="isDeleted" />
  8. <result column="gmt_create" property="gmtCreate" />
  9. <result column="gmt_modified" property="gmtModified" />
  10. <result column="creator" property="creator" />
  11. <result column="modifier" property="modifier" />
  12. <result column="name" property="name" />
  13. <result column="is_has_common" property="isHasCommon" />
  14. </resultMap>
  15. <select id="getLexiconList" resultType="com.diagbot.dto.GetLexiconListDTO">
  16. SELECT
  17. gmt_modified,modifier,name
  18. FROM `lexicon`
  19. WHERE is_deleted="N"
  20. <if test="name!=null and name!=''">
  21. and name like concat('%',#{name},'%')
  22. </if>
  23. order by gmt_modified desc
  24. </select>
  25. </mapper>