PtReportMapper.xml 3.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182
  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.ruoyi.interfaces.mapper.PtReportDAO">
  4. <resultMap id="BaseResultMap" type="com.ruoyi.interfaces.domain.PtReport">
  5. <id column="CODE" jdbcType="VARCHAR" property="code"/>
  6. <result column="TITLE" jdbcType="VARCHAR" property="title"/>
  7. <result column="CATE" jdbcType="VARCHAR" property="cate"/>
  8. <result column="URL" jdbcType="VARCHAR" property="url"/>
  9. <result column="NOTE" jdbcType="VARCHAR" property="note"/>
  10. <result column="STATUS" jdbcType="VARCHAR" property="status"/>
  11. <result column="SUPPLY" jdbcType="VARCHAR" property="supply"/>
  12. <result column="PUB_USER" jdbcType="VARCHAR" property="pubUser"/>
  13. <result column="PUB_TIME" jdbcType="TIMESTAMP" property="pubTime"/>
  14. <result column="TYPE" jdbcType="VARCHAR" property="type"/>
  15. <result column="DATABASE" jdbcType="VARCHAR" property="database"/>
  16. <result column="SQL" jdbcType="VARCHAR" property="sql"/>
  17. <result column="LIST_SQL" jdbcType="TIMESTAMP" property="listSql"/>
  18. <result column="STYLE" jdbcType="TIMESTAMP" property="style"/>
  19. <result column="FILE_ID" property="fileId"/>
  20. <result column="FILE_PATH" property="filePath"/>
  21. <result column="FILE_VIEWNAME" property="fileViewname"/>
  22. <!-- private String fileId;
  23. private String filePath;
  24. private String fileSavename;-->
  25. </resultMap>
  26. <sql id="Base_Column_List">
  27. CODE
  28. , TITLE, CATE, URL, NOTE, STATUS, SUPPLY, PUB_USER, PUB_TIME , TYPE , DATABASE , SQL , LIST_SQL , STYLE
  29. </sql>
  30. <insert id="insert" parameterType="com.ruoyi.interfaces.domain.PtReport">
  31. INSERT INTO PT_REPORT(CODE, TITLE, CATE, URL, NOTE, STATUS, SUPPLY, PUB_USER, PUB_TIME, TYPE, DATABASE, SQL,
  32. LIST_SQL, STYLE)
  33. VALUES (#{code}, #{title}, #{cate}, #{url}, #{note}, #{status}, #{supply}, #{pubUser}, #{pubTime},
  34. #{type}, #{database}, #{sql}, #{listSql}, #{style})
  35. </insert>
  36. <select id="selectAll" parameterType="com.ruoyi.interfaces.domain.PtReport" resultMap="BaseResultMap">
  37. select
  38. r.CODE, r.TITLE, r.CATE, r.URL, r.NOTE, r.STATUS, r.SUPPLY, r.PUB_USER, r.PUB_TIME,
  39. f.FILE_ID , f.FILE_PATH , f.FILE_VIEWNAME , r.TYPE , r.DATABASE , r.SQL , r.LIST_SQL , r.STYLE
  40. from PT_REPORT r left join PT_REPORT_FILE f on r.CODE = f.CODE
  41. <where>
  42. <if test="code != null and code != ''">
  43. and r.CODE = #{code}
  44. </if>
  45. <if test="cate != null and cate != ''">
  46. and r.CATE = #{cate}
  47. </if>
  48. </where>
  49. </select>
  50. <update id="update" parameterType="com.ruoyi.interfaces.domain.PtReport">
  51. update PT_REPORT
  52. set TITLE =#{title},
  53. CATE = #{cate},
  54. URL = #{url},
  55. NOTE = #{note},
  56. STATUS = #{status},
  57. SUPPLY = #{supply},
  58. PUB_USER = #{pubUser},
  59. PUB_TIME = #{pubTime},
  60. TYPE = #{type},
  61. DATABASE = #{database},
  62. SQL = #{sql},
  63. LIST_SQL = #{listSql},
  64. STYLE = #{style}
  65. where CODE = #{code}
  66. </update>
  67. <delete id="delete" parameterType="com.ruoyi.interfaces.domain.PtReport">
  68. delete
  69. from PT_REPORT
  70. where code = #{code}
  71. </delete>
  72. </mapper>