CloudRoomFlowConfigMapper.xml 6.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166
  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.ym.mec.biz.dal.dao.CloudRoomFlowConfigDao">
  4. <resultMap id="BaseResultMap" type="com.ym.mec.biz.dal.entity.CloudRoomFlowConfig">
  5. <id column="id_" jdbcType="INTEGER" property="id"/>
  6. <result column="minute_up_limit_" jdbcType="INTEGER" property="minuteUpLimit"/>
  7. <result column="price_" jdbcType="DECIMAL" property="price"/>
  8. <result column="remark_" jdbcType="VARCHAR" property="remark"/>
  9. <result column="deleted_" jdbcType="INTEGER" property="deleted"/>
  10. <result column="created_by_" jdbcType="INTEGER" property="createdBy"/>
  11. <result column="created_time_" jdbcType="TIMESTAMP" property="createdTime"/>
  12. <result column="updated_by_" jdbcType="INTEGER" property="updatedBy"/>
  13. <result column="updated_time_" jdbcType="TIMESTAMP" property="updatedTime"/>
  14. </resultMap>
  15. <sql id="Base_Column_List">
  16. id_
  17. , minute_up_limit_, price_, remark_, deleted_, created_by_, created_time_, updated_by_,
  18. updated_time_
  19. </sql>
  20. <select id="selectByPrimaryKey" parameterType="java.lang.Integer" resultMap="BaseResultMap">
  21. select
  22. <include refid="Base_Column_List"/>
  23. from cloud_room_flow_config
  24. where id_ = #{id,jdbcType=INTEGER}
  25. </select>
  26. <select id="queryPage" resultMap="BaseResultMap">
  27. select
  28. <include refid="Base_Column_List"/>
  29. from cloud_room_flow_config
  30. <where>
  31. deleted_ = 0
  32. <if test="minuteUp != null">
  33. and minute_up_limit_ = #{minuteUp}
  34. </if>
  35. </where>
  36. </select>
  37. <select id="getGroupMinuteUp" resultType="integer">
  38. select
  39. minute_up_limit_
  40. from cloud_room_flow_config
  41. where deleted_ = 0
  42. group by minute_up_limit_
  43. </select>
  44. <delete id="deleteByPrimaryKey" parameterType="java.lang.Integer">
  45. delete
  46. from cloud_room_flow_config
  47. where id_ = #{id,jdbcType=INTEGER}
  48. </delete>
  49. <insert id="insert" keyColumn="id_" keyProperty="id" parameterType="com.ym.mec.biz.dal.entity.CloudRoomFlowConfig"
  50. useGeneratedKeys="true">
  51. insert into cloud_room_flow_config (minute_up_limit_, price_, remark_,
  52. deleted_, created_by_, created_time_,
  53. updated_by_, updated_time_)
  54. values (#{minuteUpLimit,jdbcType=INTEGER}, #{price,jdbcType=DECIMAL}, #{remark,jdbcType=VARCHAR},
  55. #{deleted,jdbcType=INTEGER}, #{createdBy,jdbcType=VARCHAR}, #{createdTime,jdbcType=TIMESTAMP},
  56. #{updatedBy,jdbcType=VARCHAR}, #{updatedTime,jdbcType=TIMESTAMP})
  57. </insert>
  58. <insert id="insertSelective" keyColumn="id_" keyProperty="id"
  59. parameterType="com.ym.mec.biz.dal.entity.CloudRoomFlowConfig" useGeneratedKeys="true">
  60. insert into cloud_room_flow_config
  61. <trim prefix="(" suffix=")" suffixOverrides=",">
  62. <if test="minuteUpLimit != null">
  63. minute_up_limit_,
  64. </if>
  65. <if test="price != null">
  66. price_,
  67. </if>
  68. <if test="remark != null">
  69. remark_,
  70. </if>
  71. <if test="deleted != null">
  72. deleted_,
  73. </if>
  74. <if test="createdBy != null">
  75. created_by_,
  76. </if>
  77. <if test="createdTime != null">
  78. created_time_,
  79. </if>
  80. <if test="updatedBy != null">
  81. updated_by_,
  82. </if>
  83. <if test="updatedTime != null">
  84. updated_time_,
  85. </if>
  86. </trim>
  87. <trim prefix="values (" suffix=")" suffixOverrides=",">
  88. <if test="minuteUpLimit != null">
  89. #{minuteUpLimit,jdbcType=INTEGER},
  90. </if>
  91. <if test="price != null">
  92. #{price,jdbcType=DECIMAL},
  93. </if>
  94. <if test="remark != null">
  95. #{remark,jdbcType=VARCHAR},
  96. </if>
  97. <if test="deleted != null">
  98. #{deleted,jdbcType=INTEGER},
  99. </if>
  100. <if test="createdBy != null">
  101. #{createdBy,jdbcType=VARCHAR},
  102. </if>
  103. <if test="createdTime != null">
  104. #{createdTime,jdbcType=TIMESTAMP},
  105. </if>
  106. <if test="updatedBy != null">
  107. #{updatedBy,jdbcType=VARCHAR},
  108. </if>
  109. <if test="updatedTime != null">
  110. #{updatedTime,jdbcType=TIMESTAMP},
  111. </if>
  112. </trim>
  113. </insert>
  114. <update id="updateByPrimaryKeySelective" parameterType="com.ym.mec.biz.dal.entity.CloudRoomFlowConfig">
  115. update cloud_room_flow_config
  116. <set>
  117. <if test="minuteUpLimit != null">
  118. minute_up_limit_ = #{minuteUpLimit,jdbcType=INTEGER},
  119. </if>
  120. <if test="price != null">
  121. price_ = #{price,jdbcType=DECIMAL},
  122. </if>
  123. <if test="remark != null">
  124. remark_ = #{remark,jdbcType=VARCHAR},
  125. </if>
  126. <if test="deleted != null">
  127. deleted_ = #{deleted,jdbcType=INTEGER},
  128. </if>
  129. <if test="createdBy != null">
  130. created_by_ = #{createdBy,jdbcType=VARCHAR},
  131. </if>
  132. <if test="createdTime != null">
  133. created_time_ = #{createdTime,jdbcType=TIMESTAMP},
  134. </if>
  135. <if test="updatedBy != null">
  136. updated_by_ = #{updatedBy,jdbcType=VARCHAR},
  137. </if>
  138. <if test="updatedTime != null">
  139. updated_time_ = #{updatedTime,jdbcType=TIMESTAMP},
  140. </if>
  141. </set>
  142. where id_ = #{id,jdbcType=INTEGER}
  143. </update>
  144. <update id="updateByPrimaryKey" parameterType="com.ym.mec.biz.dal.entity.CloudRoomFlowConfig">
  145. update cloud_room_flow_config
  146. set minute_up_limit_ = #{minuteUpLimit,jdbcType=INTEGER},
  147. price_ = #{price,jdbcType=DECIMAL},
  148. remark_ = #{remark,jdbcType=VARCHAR},
  149. deleted_ = #{deleted,jdbcType=INTEGER},
  150. created_by_ = #{createdBy,jdbcType=VARCHAR},
  151. created_time_ = #{createdTime,jdbcType=TIMESTAMP},
  152. updated_by_ = #{updatedBy,jdbcType=VARCHAR},
  153. updated_time_ = #{updatedTime,jdbcType=TIMESTAMP}
  154. where id_ = #{id,jdbcType=INTEGER}
  155. </update>
  156. </mapper>