You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

33 lines
1.5 KiB

2 years ago
  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.spring.modules.factory.dao.TblBaseDataDao">
  4. <!-- 可根据自己的需求,是否要使用 -->
  5. <resultMap type="com.spring.modules.factory.entity.TblBaseDataEntity" id="tblBaseDataMap">
  6. <result property="id" column="id"/>
  7. <result property="site" column="site"/>
  8. <result property="type" column="type"/>
  9. <result property="secondType" column="second_type"/>
  10. <result property="baseData" column="base_data"/>
  11. <result property="baseDesc" column="base_desc"/>
  12. <result property="status" column="status"/>
  13. <result property="sortNo" column="sort_no"/>
  14. <result property="remark" column="remark"/>
  15. </resultMap>
  16. <select id="getTblBaseList" resultType="com.spring.modules.factory.entity.TblBaseDataEntity">
  17. select A.id,A.site,A.type,A.second_type,A.base_data,A.base_desc,A.status,A.sort_no,A.remark
  18. from tbl_base_data A
  19. <where>
  20. <if test="site != null and site != ''">
  21. and A.site = #{site,jdbcType=VARCHAR}
  22. </if>
  23. <if test="type != null and type != ''">
  24. and A.type = #{type,jdbcType=VARCHAR}
  25. </if>
  26. <if test="secondType != null and secondType != ''">
  27. and A.second_type = #{secondType,jdbcType=VARCHAR}
  28. </if>
  29. </where>
  30. </select>
  31. </mapper>