SysPaymentConfigMapper.xml 6.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165
  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.SysPaymentConfigDao">
  4. <resultMap id="SysPaymentConfig" type="com.ym.mec.biz.dal.entity.SysPaymentConfig">
  5. <!--@Table sys_payment_config-->
  6. <id column="id_" jdbcType="INTEGER" property="id"/>
  7. <result column="organ_id_" jdbcType="INTEGER" property="organId"/>
  8. <result column="type_" jdbcType="INTEGER" property="type"/>
  9. <result column="organ_name" jdbcType="VARCHAR" property="organName"/>
  10. <result column="per_scale_" jdbcType="INTEGER" property="perScale"/>
  11. <result column="com_scale_" jdbcType="INTEGER" property="comScale"/>
  12. <result column="course_fee_" jdbcType="VARCHAR" property="courseFee"/>
  13. <result column="instrument_fee_" jdbcType="VARCHAR" property="instrumentFee"/>
  14. <result column="accessories_fee_" jdbcType="VARCHAR" property="accessoriesFee"/>
  15. <result column="other_fee_" jdbcType="VARCHAR" property="otherFee"/>
  16. <result column="create_time_" jdbcType="TIMESTAMP" property="createTime"/>
  17. <result column="update_time_" jdbcType="TIMESTAMP" property="updateTime"/>
  18. </resultMap>
  19. <sql id="Base_Column_List">
  20. <!--@mbg.generated-->
  21. id_, organ_id_,type_, per_scale_, com_scale_, course_fee_, instrument_fee_, accessories_fee_,
  22. other_fee_, create_time_, update_time_
  23. </sql>
  24. <select id="get" parameterType="java.lang.Integer" resultMap="SysPaymentConfig">
  25. <!--@mbg.generated-->
  26. select
  27. <include refid="Base_Column_List"/>
  28. from sys_payment_config
  29. where id_ = #{id,jdbcType=INTEGER}
  30. </select>
  31. <delete id="delete" parameterType="java.lang.Integer">
  32. delete from sys_payment_config
  33. where id_ = #{id,jdbcType=INTEGER}
  34. </delete>
  35. <insert id="insert" keyColumn="id_" keyProperty="id" parameterType="com.ym.mec.biz.dal.entity.SysPaymentConfig"
  36. useGeneratedKeys="true">
  37. <!--@mbg.generated-->
  38. insert into sys_payment_config
  39. <trim prefix="(" suffix=")" suffixOverrides=",">
  40. <if test="type != null">
  41. type_,
  42. </if>
  43. <if test="organId != null">
  44. organ_id_,
  45. </if>
  46. <if test="perScale != null">
  47. per_scale_,
  48. </if>
  49. <if test="comScale != null">
  50. com_scale_,
  51. </if>
  52. <if test="courseFee != null">
  53. course_fee_,
  54. </if>
  55. <if test="instrumentFee != null">
  56. instrument_fee_,
  57. </if>
  58. <if test="accessoriesFee != null">
  59. accessories_fee_,
  60. </if>
  61. <if test="otherFee != null">
  62. other_fee_,
  63. </if>
  64. <if test="createTime != null">
  65. create_time_,
  66. </if>
  67. <if test="updateTime != null">
  68. update_time_,
  69. </if>
  70. </trim>
  71. <trim prefix="values (" suffix=")" suffixOverrides=",">
  72. <if test="type != null">
  73. #{type,jdbcType=INTEGER},
  74. </if>
  75. <if test="organId != null">
  76. #{organId,jdbcType=INTEGER},
  77. </if>
  78. <if test="perScale != null">
  79. #{perScale,jdbcType=INTEGER},
  80. </if>
  81. <if test="comScale != null">
  82. #{comScale,jdbcType=INTEGER},
  83. </if>
  84. <if test="courseFee != null">
  85. #{courseFee,jdbcType=VARCHAR},
  86. </if>
  87. <if test="instrumentFee != null">
  88. #{instrumentFee,jdbcType=VARCHAR},
  89. </if>
  90. <if test="accessoriesFee != null">
  91. #{accessoriesFee,jdbcType=VARCHAR},
  92. </if>
  93. <if test="otherFee != null">
  94. #{otherFee,jdbcType=VARCHAR},
  95. </if>
  96. <if test="createTime != null">
  97. #{createTime,jdbcType=TIMESTAMP},
  98. </if>
  99. <if test="updateTime != null">
  100. #{updateTime,jdbcType=TIMESTAMP},
  101. </if>
  102. </trim>
  103. </insert>
  104. <update id="update" parameterType="com.ym.mec.biz.dal.entity.SysPaymentConfig">
  105. <!--@mbg.generated-->
  106. update sys_payment_config
  107. <set>
  108. <if test="type != null">
  109. type_ = #{type,jdbcType=INTEGER},
  110. </if>
  111. <if test="organId != null">
  112. organ_id_ = #{organId,jdbcType=INTEGER},
  113. </if>
  114. <if test="perScale != null">
  115. per_scale_ = #{perScale,jdbcType=INTEGER},
  116. </if>
  117. <if test="comScale != null">
  118. com_scale_ = #{comScale,jdbcType=INTEGER},
  119. </if>
  120. <if test="courseFee != null">
  121. course_fee_ = #{courseFee,jdbcType=VARCHAR},
  122. </if>
  123. <if test="instrumentFee != null">
  124. instrument_fee_ = #{instrumentFee,jdbcType=VARCHAR},
  125. </if>
  126. <if test="accessoriesFee != null">
  127. accessories_fee_ = #{accessoriesFee,jdbcType=VARCHAR},
  128. </if>
  129. <if test="otherFee != null">
  130. other_fee_ = #{otherFee,jdbcType=VARCHAR},
  131. </if>
  132. <if test="createTime != null">
  133. create_time_ = #{createTime,jdbcType=TIMESTAMP},
  134. </if>
  135. <if test="updateTime != null">
  136. update_time_ = #{updateTime,jdbcType=TIMESTAMP},
  137. </if>
  138. </set>
  139. where id_ = #{id,jdbcType=INTEGER}
  140. </update>
  141. <!-- 全查询 -->
  142. <select id="findAll" resultMap="SysPaymentConfig">
  143. SELECT *
  144. FROM sys_payment_config
  145. ORDER BY id_
  146. </select>
  147. <!-- 分页查询 -->
  148. <select id="queryPage" resultMap="SysPaymentConfig" parameterType="map">
  149. SELECT spc.*,o.name_ organ_name FROM sys_payment_config spc LEFT JOIN organization o on spc.organ_id_ = o.id_
  150. <include refid="global.limit"/>
  151. </select>
  152. <!-- 查询当前表的总记录数 -->
  153. <select id="queryCount" resultType="int">
  154. SELECT COUNT(*) FROM sys_payment_config
  155. <include refid="global.limit"/>
  156. </select>
  157. <!-- 按分部编号查配置 -->
  158. <select id="findPaymentConfigByOrganId" resultMap="SysPaymentConfig">
  159. SELECT * FROM sys_payment_config WHERE organ_id_ = #{organId}
  160. </select>
  161. </mapper>