BisInspTaskSchedulerDao.xml 6.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146
  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="cn.com.goldenwater.dcproj.dao.BisInspTaskSchedulerDao">
  4. <resultMap type="cn.com.goldenwater.dcproj.model.BisInspTaskScheduler" id="bisInspTaskSchedulerResultMap">
  5. <result property="id" column="ID"/>
  6. <result property="taskCode" column="TASK_CODE"/>
  7. <result property="taskName" column="TASK_NAME"/>
  8. <result property="taskClass" column="TASK_CLASS"/>
  9. <result property="taskSchedule" column="TASK_SCHEDULE"/>
  10. <result property="taskStatus" column="TASK_STATUS"/>
  11. <result property="taskDesc" column="TASK_DESC"/>
  12. <result property="taskParams" column="TASK_PARAMS"/>
  13. <result property="bzcode" column="BZCODE"/>
  14. <result property="intm" column="INTM"/>
  15. <result property="uptm" column="UPTM"/>
  16. <result property="dataStat" column="DATA_STAT"/>
  17. </resultMap>
  18. <sql id="table_columns">
  19. ID,
  20. TASK_CODE,
  21. TASK_NAME,
  22. TASK_CLASS,
  23. TASK_SCHEDULE,
  24. TASK_STATUS,
  25. TASK_DESC,
  26. TASK_PARAMS,
  27. BZCODE,
  28. INTM,
  29. UPTM,
  30. DATA_STAT
  31. </sql>
  32. <sql id="entity_properties">
  33. #{id},
  34. #{taskCode},
  35. #{taskName},
  36. #{taskClass},
  37. #{taskSchedule},
  38. #{taskStatus},
  39. #{taskDesc},
  40. #{taskParams},
  41. #{bzcode},
  42. #{intm},
  43. #{uptm},
  44. #{dataStat}
  45. </sql>
  46. <!-- 使用like用法:columnName like concat('%',#columnName#,'%') -->
  47. <sql id="page_where">
  48. <trim prefix="where" prefixOverrides="and | or ">
  49. <if test="taskCode != null and taskCode != ''">and TASK_CODE = #{taskCode}</if>
  50. <if test="taskName != null and taskName != ''">and TASK_NAME = #{taskName}</if>
  51. <if test="taskClass != null and taskClass != ''">and TASK_CLASS = #{taskClass}</if>
  52. <if test="taskSchedule != null and taskSchedule != ''">and TASK_SCHEDULE = #{taskSchedule}</if>
  53. <if test="taskStatus != null and taskStatus != ''">and TASK_STATUS = #{taskStatus}</if>
  54. <if test="taskDesc != null and taskDesc != ''">and TASK_DESC = #{taskDesc}</if>
  55. <if test="taskParams != null and taskParams != ''">and TASK_PARAMS = #{taskParams}</if>
  56. <if test="bzcode != null and bzcode != ''">and BZCODE = #{bzcode}</if>
  57. <if test="intm != null">and INTM = #{intm}</if>
  58. <if test="uptm != null">and UPTM = #{uptm}</if>
  59. <if test="dataStat != null and dataStat != ''">and DATA_STAT = #{dataStat}</if>
  60. and DATA_STAT='0'
  61. </trim>
  62. </sql>
  63. <select id="get" resultMap="bisInspTaskSchedulerResultMap" parameterType="String" >
  64. select <include refid="table_columns" /> from BIS_INSP_TASK_SCHEDULER where ID = #{id}
  65. </select>
  66. <select id="getBy" resultMap="bisInspTaskSchedulerResultMap">
  67. select <include refid="table_columns" /> from BIS_INSP_TASK_SCHEDULER <include refid="page_where" />
  68. </select>
  69. <select id="findAll" resultMap="bisInspTaskSchedulerResultMap">
  70. select <include refid="table_columns" /> from BIS_INSP_TASK_SCHEDULER
  71. </select>
  72. <select id="findList" resultMap="bisInspTaskSchedulerResultMap">
  73. select <include refid="table_columns" /> from BIS_INSP_TASK_SCHEDULER <include refid="page_where" />
  74. </select>
  75. <select id="selectCount" resultType="int" >
  76. select count(ID) from BIS_INSP_TASK_SCHEDULER <include refid="page_where" />
  77. </select>
  78. <insert id="insert" parameterType="cn.com.goldenwater.dcproj.model.BisInspTaskScheduler">
  79. insert into BIS_INSP_TASK_SCHEDULER( <include refid="table_columns" /> )
  80. values ( <include refid="entity_properties" /> )
  81. </insert>
  82. <delete id="delete" parameterType="java.lang.String">
  83. update BIS_INSP_TASK_SCHEDULER set DATA_STAT='9' where ID = #{id}
  84. </delete>
  85. <delete id="deleteBy" parameterType="cn.com.goldenwater.dcproj.model.BisInspTaskScheduler">
  86. update BIS_INSP_TASK_SCHEDULER set DATA_STAT='9' <include refid="page_where" />
  87. </delete>
  88. <update id="deleteInFlag" parameterType="java.lang.String">
  89. update BIS_INSP_TASK_SCHEDULER set DATA_STAT = '9' where ID = #{id}
  90. </update>
  91. <update id="update" parameterType="cn.com.goldenwater.dcproj.model.BisInspTaskScheduler">
  92. update BIS_INSP_TASK_SCHEDULER
  93. <trim prefix="set" suffixOverrides=",">
  94. <if test="taskCode != null and taskCode != ''">TASK_CODE = #{taskCode},</if>
  95. <if test="taskName != null and taskName != ''">TASK_NAME = #{taskName},</if>
  96. <if test="taskClass != null and taskClass != ''">TASK_CLASS = #{taskClass},</if>
  97. <if test="taskSchedule != null and taskSchedule != ''">TASK_SCHEDULE = #{taskSchedule},</if>
  98. <if test="taskStatus != null and taskStatus != ''">TASK_STATUS = #{taskStatus},</if>
  99. <if test="taskDesc != null and taskDesc != ''">TASK_DESC = #{taskDesc},</if>
  100. <if test="taskParams != null and taskParams != ''">TASK_PARAMS = #{taskParams},</if>
  101. <if test="bzcode != null and bzcode != ''">BZCODE = #{bzcode},</if>
  102. <if test="intm != null">INTM = #{intm},</if>
  103. <if test="uptm != null">UPTM = #{uptm},</if>
  104. <if test="dataStat != null and dataStat != ''">DATA_STAT = #{dataStat},</if>
  105. </trim>
  106. <where>ID = #{id}</where>
  107. </update>
  108. <update id="updateBy" parameterType="cn.com.goldenwater.dcproj.model.BisInspTaskScheduler">
  109. update BIS_INSP_TASK_SCHEDULER
  110. <trim prefix="set" suffixOverrides=",">
  111. <if test="taskCode != null and taskCode != ''">TASK_CODE = #{taskCode},</if>
  112. <if test="taskName != null and taskName != ''">TASK_NAME = #{taskName},</if>
  113. <if test="taskClass != null and taskClass != ''">TASK_CLASS = #{taskClass},</if>
  114. <if test="taskSchedule != null and taskSchedule != ''">TASK_SCHEDULE = #{taskSchedule},</if>
  115. <if test="taskStatus != null and taskStatus != ''">TASK_STATUS = #{taskStatus},</if>
  116. <if test="taskDesc != null and taskDesc != ''">TASK_DESC = #{taskDesc},</if>
  117. <if test="taskParams != null and taskParams != ''">TASK_PARAMS = #{taskParams},</if>
  118. <if test="bzcode != null and bzcode != ''">BZCODE = #{bzcode},</if>
  119. <if test="intm != null">INTM = #{intm},</if>
  120. <if test="uptm != null">UPTM = #{uptm},</if>
  121. <if test="dataStat != null and dataStat != ''">DATA_STAT = #{dataStat},</if>
  122. </trim>
  123. <include refid="page_where" />
  124. </update>
  125. <!-- 其他自定义SQL -->
  126. </mapper>