SysVersionDao.xml 1.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142
  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.sckw.system.dao.SysVersionDao">
  4. <select id="findList" resultType="com.sckw.system.model.SysVersion">
  5. select *
  6. from sys_version
  7. where del_flag = 0
  8. and status = 0
  9. <if test="systemType != null">
  10. and system_type = #{systemType}
  11. </if>
  12. <if test="clientType != null and clientType != ''">
  13. and client_type = #{clientType}
  14. </if>
  15. <if test="versionName != null and versionName != ''">
  16. and version_name like concat('%', #{versionName}, '%')
  17. </if>
  18. <if test="versionCode != null and versionCode != ''">
  19. and version_code like concat('%', #{versionCode}, '%')
  20. </if>
  21. <if test="startTime != null">
  22. and update_time >= #{startTime}
  23. </if>
  24. <if test="endTime != null">
  25. and update_time &lt;= #{endTime}
  26. </if>
  27. </select>
  28. <select id="findLatestVersion" resultType="com.sckw.system.model.SysVersion">
  29. select *
  30. from sys_version
  31. where del_flag = 0
  32. and status = 0
  33. and client_type = #{clientType}
  34. and system_type = #{systemType}
  35. order by update_time desc
  36. limit 1
  37. </select>
  38. </mapper>