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.

36 lines
1.2 KiB

2 years ago
1 year ago
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.gaotao.modules.factory.dao.SiteMapper">
  4. <select id="getMaxSiteId" resultType="com.gaotao.modules.factory.entity.Site">
  5. select siteId from site order by CONVERT(INT, siteId) desc
  6. </select>
  7. <select id="selectSiteList" resultType="com.gaotao.modules.factory.entity.Site">
  8. select siteId,
  9. siteName,
  10. address,
  11. contact,
  12. email,
  13. phoneNo,
  14. active,
  15. createTime,
  16. createBy,
  17. default_country,
  18. auto_serial_number,
  19. site_code
  20. from site
  21. <where>
  22. <if test="siteId != null and siteId != ''">
  23. and siteId like #{siteId}
  24. </if>
  25. <if test="siteName != null and siteName != ''">
  26. and siteName like #{siteName}
  27. </if>
  28. <if test="active != null and active != ''">
  29. and active = #{active}
  30. </if>
  31. </where>
  32. order by createTime desc
  33. </select>
  34. </mapper>