StudentVipGroupPaymentMapper.xml 2.7 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576
  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. <!--
  4. 这个文件是自动生成的。
  5. 不要修改此文件。所有改动将在下次重新自动生成时丢失。
  6. -->
  7. <mapper namespace="com.ym.mec.biz.dal.dao.StudentVipGroupPaymentDao">
  8. <resultMap type="com.ym.mec.biz.dal.entity.StudentVipGroupPayment" id="StudentVipGroupPayment">
  9. <result column="id_" property="id" />
  10. <result column="user_id_" property="userId" />
  11. <result column="vip_group_id_" property="vipGroupId" />
  12. <result column="class_group_id_" property="classGroupId" />
  13. <result column="create_time_" property="createTime" />
  14. <result column="student_payment_order_id_" property="studentPaymentOrderId" />
  15. </resultMap>
  16. <!-- 根据主键查询一条记录 -->
  17. <select id="get" resultMap="StudentVipGroupPayment" >
  18. SELECT * FROM student_vip_group_payment WHERE id_ = #{id}
  19. </select>
  20. <!-- 全查询 -->
  21. <select id="findAll" resultMap="StudentVipGroupPayment">
  22. SELECT * FROM student_vip_group_payment ORDER BY id_
  23. </select>
  24. <!-- 向数据库增加一条记录 -->
  25. <insert id="insert" parameterType="com.ym.mec.biz.dal.entity.StudentVipGroupPayment" useGeneratedKeys="true" keyColumn="id" keyProperty="id">
  26. <!--
  27. <selectKey resultClass="int" keyProperty="id" >
  28. SELECT SEQ_WSDEFINITION_ID.nextval AS ID FROM DUAL
  29. </selectKey>
  30. -->
  31. INSERT INTO student_vip_group_payment (id_,user_id_,vip_group_id_,class_group_id_,create_time_,student_payment_order_id_) VALUES(#{id},#{userId},#{vipGroupId},#{classGroupId},#{createTime},#{studentPaymentOrderId})
  32. </insert>
  33. <!-- 根据主键查询一条记录 -->
  34. <update id="update" parameterType="com.ym.mec.biz.dal.entity.StudentVipGroupPayment">
  35. UPDATE student_vip_group_payment <set>
  36. <if test="userId != null">
  37. user_id_ = #{userId},
  38. </if>
  39. <if test="vipGroupId != null">
  40. vip_group_id_ = #{vipGroupId},
  41. </if>
  42. <if test="id != null">
  43. id_ = #{id},
  44. </if>
  45. <if test="classGroupId != null">
  46. class_group_id_ = #{classGroupId},
  47. </if>
  48. <if test="studentPaymentOrderId != null">
  49. student_payment_order_id_ = #{studentPaymentOrderId},
  50. </if>
  51. <if test="createTime != null">
  52. create_time_ = #{createTime},
  53. </if>
  54. </set> WHERE id_ = #{id}
  55. </update>
  56. <!-- 根据主键删除一条记录 -->
  57. <delete id="delete" >
  58. DELETE FROM student_vip_group_payment WHERE id_ = #{id}
  59. </delete>
  60. <!-- 分页查询 -->
  61. <select id="queryPage" resultMap="StudentVipGroupPayment" parameterType="map">
  62. SELECT * FROM student_vip_group_payment ORDER BY id_ <include refid="global.limit"/>
  63. </select>
  64. <!-- 查询当前表的总记录数 -->
  65. <select id="queryCount" resultType="int">
  66. SELECT COUNT(*) FROM student_vip_group_payment
  67. </select>
  68. </mapper>