<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd" >
<mapper namespace="com.cku.dao.CkuMemberBalanMapper" >
  <resultMap id="BaseResultMap" type="com.cku.model.CkuMemberBalance" >
    <result column="money_amount" property="moneyAmount"/>
  </resultMap>
    <select id="getCkuMemberBalance" resultMap="BaseResultMap" parameterType="java.lang.Long" >
     select money_amount from cku_user_money where user_id = #{userId}
  	</select>
  	<update id="updateMemberBalance" parameterType="com.cku.model.CkuMemberBalance">
  	update cku_user_money set money_amount = #{moneyAmount} where user_id = #{ckuId}
  	</update>
</mapper>