AppMapper.xml 3.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758
  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.tofly.base.mapper.AppMapper">
  4. <resultMap id="appMap" type="com.tofly.base.entity.App">
  5. <id property="id" column="ID"/>
  6. <result property="version" column="VERSION"/>
  7. <result property="filename" column="FILENAME"/>
  8. <result property="othername" column="OTHERNAME"/>
  9. <result property="appPath" column="APP_PATH"/>
  10. <result property="versionstate" column="VERSIONSTATE"/>
  11. <result property="sort" column="SORT"/>
  12. <result property="createTime" column="CREATE_TIME"/>
  13. <result property="createUser" column="CREATE_USER"/>
  14. <result property="releasetime" column="RELEASETIME"/>
  15. <result property="releaser" column="RELEASER"/>
  16. <result property="releasestatus" column="RELEASESTATUS"/>
  17. <result property="appType" column="APP_TYPE"/>
  18. <result property="appSize" column="APP_SIZE"/>
  19. <result property="versionsub" column="VERSIONSUB"/>
  20. <!-- <result property="createUserName" column="CREATE_USER_NAME"/>-->
  21. <association property="releaserName" column="releaser" select="com.tofly.baseapi.mapper.ToflyCodeCommonMapper.getUserName" />
  22. <association property="createUserName" column="CREATE_USER" select="com.tofly.baseapi.mapper.ToflyCodeCommonMapper.getUserName" />
  23. </resultMap>
  24. <select id="listAppPage" resultMap="appMap" databaseId="oracle">
  25. select *
  26. from TF_SMPN_APP_X
  27. where
  28. 1=1
  29. <if test="map.type != null and map.type.trim() != ''">
  30. and APP_TYPE = #{map.type}
  31. </if>
  32. <if test="map.releaseStatus != null and map.releaseStatus.trim() != ''">
  33. and RELEASESTATUS = #{map.releaseStatus}
  34. </if>
  35. <if test="map.startDate != null and map.startDate.trim() != ''">
  36. and to_char(CREATE_TIME,'yyyy-MM-dd hh:mm:ss') >= #{map.startDate}
  37. </if>
  38. <if test="map.endDate != null and map.endDate.trim() != ''">
  39. <![CDATA[ and to_char(CREATE_TIME,'yyyy-MM-dd hh:mm:ss') <= #{map.endDate}]]>
  40. </if>
  41. order by CREATE_TIME desc
  42. </select>
  43. <select id="selectOldApp" resultType="com.tofly.base.entity.App" databaseId="oracle">
  44. select *
  45. from TF_SMPN_APP_X t
  46. where t.CREATE_TIME =(select max(CREATE_TIME) from TF_SMPN_APP_X where APP_TYPE = #{type} and RELEASESTATUS = '2')
  47. </select>
  48. <select id="getNewVersionInformation" resultType="com.tofly.base.entity.App" databaseId="oracle">
  49. select *
  50. from TF_SMPN_APP_X t
  51. where t.CREATE_TIME =(select max(CREATE_TIME) from TF_SMPN_APP_X where APP_TYPE = #{type} and RELEASESTATUS = '2')
  52. </select>
  53. </mapper>