AppUserLiveDividedMapper.xml 4.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586
  1. <?xml version="1.0" encoding="UTF-8" ?>
  2. <!DOCTYPE mapper
  3. PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
  4. "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
  5. <mapper namespace="com.game.business.mapper.AppUserLiveDividedMapper">
  6. <resultMap type="com.game.business.domain.AppUserLiveDivided" id="AppUserLiveDividedResult">
  7. <result property="id" column="id" />
  8. <result property="userId" column="user_id" />
  9. <result property="money" column="money" />
  10. <result property="currencyType" column="currency_type" />
  11. <result property="otherId" column="other_id" />
  12. <result property="status" column="status" />
  13. <result property="createTime" column="create_time" />
  14. <result property="updateTime" column="update_time" />
  15. </resultMap>
  16. <sql id="selectAppUserLiveDividedVo">
  17. select id, user_id, money, currency_type, other_id, status, create_time, update_time from app_user_live_divided
  18. </sql>
  19. <select id="selectAppUserLiveDividedList" parameterType="com.game.business.domain.AppUserLiveDivided" resultMap="AppUserLiveDividedResult">
  20. <include refid="selectAppUserLiveDividedVo"/>
  21. <where>
  22. <if test="userId != null "> and user_id = #{userId}</if>
  23. <if test="money != null "> and money = #{money}</if>
  24. <if test="currencyType != null "> and currency_type = #{currencyType}</if>
  25. <if test="otherId != null "> and other_id = #{otherId}</if>
  26. <if test="status != null "> and status = #{status}</if>
  27. </where>
  28. </select>
  29. <select id="selectAppUserLiveDividedById" parameterType="Long" resultMap="AppUserLiveDividedResult">
  30. <include refid="selectAppUserLiveDividedVo"/>
  31. where id = #{id}
  32. </select>
  33. <insert id="insertAppUserLiveDivided" parameterType="com.game.business.domain.AppUserLiveDivided">
  34. insert into app_user_live_divided
  35. <trim prefix="(" suffix=")" suffixOverrides=",">
  36. <if test="id != null">id,</if>
  37. <if test="userId != null">user_id,</if>
  38. <if test="money != null">money,</if>
  39. <if test="currencyType != null">currency_type,</if>
  40. <if test="otherId != null">other_id,</if>
  41. <if test="status != null">status,</if>
  42. <if test="createTime != null">create_time,</if>
  43. <if test="updateTime != null">update_time,</if>
  44. </trim>
  45. <trim prefix="values (" suffix=")" suffixOverrides=",">
  46. <if test="id != null">#{id},</if>
  47. <if test="userId != null">#{userId},</if>
  48. <if test="money != null">#{money},</if>
  49. <if test="currencyType != null">#{currencyType},</if>
  50. <if test="otherId != null">#{otherId},</if>
  51. <if test="status != null">#{status},</if>
  52. <if test="createTime != null">#{createTime},</if>
  53. <if test="updateTime != null">#{updateTime},</if>
  54. </trim>
  55. </insert>
  56. <update id="updateAppUserLiveDivided" parameterType="com.game.business.domain.AppUserLiveDivided">
  57. update app_user_live_divided
  58. <trim prefix="SET" suffixOverrides=",">
  59. <if test="userId != null">user_id = #{userId},</if>
  60. <if test="money != null">money = #{money},</if>
  61. <if test="currencyType != null">currency_type = #{currencyType},</if>
  62. <if test="otherId != null">other_id = #{otherId},</if>
  63. <if test="status != null">status = #{status},</if>
  64. <if test="createTime != null">create_time = #{createTime},</if>
  65. <if test="updateTime != null">update_time = #{updateTime},</if>
  66. </trim>
  67. where id = #{id}
  68. </update>
  69. <delete id="deleteAppUserLiveDividedById" parameterType="Long">
  70. delete from app_user_live_divided where id = #{id}
  71. </delete>
  72. <delete id="deleteAppUserLiveDividedByIds" parameterType="String">
  73. delete from app_user_live_divided where id in
  74. <foreach item="id" collection="array" open="(" separator="," close=")">
  75. #{id}
  76. </foreach>
  77. </delete>
  78. </mapper>