Digital Office Automation System Backend
Vous ne pouvez pas sélectionner plus de 25 sujets Les noms de sujets doivent commencer par une lettre ou un nombre, peuvent contenir des tirets ('-') et peuvent comporter jusqu'à 35 caractères.

XxlJobGroupMapper.xml 3.4KB

il y a 2 jours
12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091
  1. <?xml version="1.0" encoding="UTF-8"?>
  2. <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
  3. "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
  4. <mapper namespace="com.xxl.job.admin.dao.XxlJobGroupDao">
  5. <resultMap id="XxlJobGroup" type="com.xxl.job.admin.core.model.XxlJobGroup" >
  6. <result column="id" property="id" />
  7. <result column="app_name" property="appname" />
  8. <result column="title" property="title" />
  9. <result column="address_type" property="addressType" />
  10. <result column="address_list" property="addressList" />
  11. <result column="update_time" property="updateTime" />
  12. </resultMap>
  13. <sql id="Base_Column_List">
  14. t.id,
  15. t.app_name,
  16. t.title,
  17. t.address_type,
  18. t.address_list,
  19. t.update_time
  20. </sql>
  21. <select id="findAll" resultMap="XxlJobGroup">
  22. SELECT <include refid="Base_Column_List" />
  23. FROM xxl_job_group AS t
  24. ORDER BY t.app_name, t.title, t.id ASC
  25. </select>
  26. <select id="findByAddressType" parameterType="java.lang.Integer" resultMap="XxlJobGroup">
  27. SELECT <include refid="Base_Column_List" />
  28. FROM xxl_job_group AS t
  29. WHERE t.address_type = #{addressType}
  30. ORDER BY t.app_name, t.title, t.id ASC
  31. </select>
  32. <insert id="save" parameterType="com.xxl.job.admin.core.model.XxlJobGroup" useGeneratedKeys="true" keyProperty="id" >
  33. INSERT INTO xxl_job_group ( `app_name`, `title`, `address_type`, `address_list`, `update_time`)
  34. values ( #{appname}, #{title}, #{addressType}, #{addressList}, #{updateTime} );
  35. </insert>
  36. <update id="update" parameterType="com.xxl.job.admin.core.model.XxlJobGroup" >
  37. UPDATE xxl_job_group
  38. SET `app_name` = #{appname},
  39. `title` = #{title},
  40. `address_type` = #{addressType},
  41. `address_list` = #{addressList},
  42. `update_time` = #{updateTime}
  43. WHERE id = #{id}
  44. </update>
  45. <delete id="remove" parameterType="java.lang.Integer" >
  46. DELETE FROM xxl_job_group
  47. WHERE id = #{id}
  48. </delete>
  49. <select id="load" parameterType="java.lang.Integer" resultMap="XxlJobGroup">
  50. SELECT <include refid="Base_Column_List" />
  51. FROM xxl_job_group AS t
  52. WHERE t.id = #{id}
  53. </select>
  54. <select id="pageList" parameterType="java.util.HashMap" resultMap="XxlJobGroup">
  55. SELECT <include refid="Base_Column_List" />
  56. FROM xxl_job_group AS t
  57. <trim prefix="WHERE" prefixOverrides="AND | OR" >
  58. <if test="appname != null and appname != ''">
  59. AND t.app_name like CONCAT(CONCAT('%', #{appname}), '%')
  60. </if>
  61. <if test="title != null and title != ''">
  62. AND t.title like CONCAT(CONCAT('%', #{title}), '%')
  63. </if>
  64. </trim>
  65. ORDER BY t.app_name, t.title, t.id ASC
  66. LIMIT #{offset}, #{pagesize}
  67. </select>
  68. <select id="pageListCount" parameterType="java.util.HashMap" resultType="int">
  69. SELECT count(1)
  70. FROM xxl_job_group AS t
  71. <trim prefix="WHERE" prefixOverrides="AND | OR" >
  72. <if test="appname != null and appname != ''">
  73. AND t.app_name like CONCAT(CONCAT('%', #{appname}), '%')
  74. </if>
  75. <if test="title != null and title != ''">
  76. AND t.title like CONCAT(CONCAT('%', #{title}), '%')
  77. </if>
  78. </trim>
  79. </select>
  80. </mapper>