123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100 |
- <?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.ym.mec.web.dal.dao.StudentWithdrawDao">
- <resultMap type="com.ym.mec.web.dal.entity.StudentWithdraw" id="StudentWithdraw">
- <result column="id_" property="id"/>
- <result column="user_id_" property="userId"/>
- <result column="bank_card_no_" property="bankCardNo"/>
- <result column="trans_no_" property="transNo"/>
- <result column="status_" property="status" typeHandler="com.ym.mec.common.dal.CustomEnumTypeHandler"/>
- <result column="amount_" property="amount"/>
- <result column="fee_user_" property="feeUser"/>
- <result column="fee_platform_" property="feePlatform"/>
- <result column="description_" property="description"/>
- <result column="comment_" property="comment"/>
- <result column="create_time_" property="createTime"/>
- <result column="modify_time_" property="modifyTime"/>
- </resultMap>
- <!-- 根据主键查询一条记录 -->
- <select id="get" resultMap="StudentWithdraw">
- SELECT * FROM student_withdraw WHERE id_ = #{id}
- </select>
- <!-- 全查询 -->
- <select id="findAll" resultMap="StudentWithdraw">
- SELECT * FROM student_withdraw ORDER BY id_
- </select>
- <!-- 向数据库增加一条记录 -->
- <insert id="insert" parameterType="com.ym.mec.web.dal.entity.StudentWithdraw" useGeneratedKeys="true" keyColumn="id"
- keyProperty="id">
- <!--
- <selectKey resultClass="int" keyProperty="id" >
- SELECT SEQ_WSDEFINITION_ID.nextval AS ID FROM DUAL
- </selectKey>
- -->
- INSERT INTO student_withdraw
- (id_,user_id_,bank_card_no_,trans_no_,status_,amount_,fee_user_,fee_platform_,description_,comment_,create_time_,modify_time_)
- VALUES(#{id},#{userId},#{bankCardNo},#{transNo},#{status,typeHandler=com.ym.mec.common.dal.CustomEnumTypeHandler},#{amount},#{feeUser},#{feePlatform},#{description},#{comment},now(),now())
- </insert>
- <!-- 根据主键查询一条记录 -->
- <update id="update" parameterType="com.ym.mec.web.dal.entity.StudentWithdraw">
- UPDATE student_withdraw
- <set>
- <if test="status != null">
- status_ = #{status,typeHandler=com.ym.mec.common.dal.CustomEnumTypeHandler},
- </if>
- <if test="userId != null">
- user_id_ = #{userId},
- </if>
- <if test="modifyTime != null">
- modify_time_ = #{modifyTime},
- </if>
- <if test="feePlatform != null">
- fee_platform_ = #{feePlatform},
- </if>
- <if test="comment != null">
- comment_ = #{comment},
- </if>
- <if test="amount != null">
- amount_ = #{amount},
- </if>
- <if test="feeUser != null">
- fee_user_ = #{feeUser},
- </if>
- <if test="bankCardNo != null">
- bank_card_no_ = #{bankCardNo},
- </if>
- <if test="description != null">
- description_ = #{description},
- </if>
- <if test="transNo != null">
- trans_no_ = #{transNo},
- </if>
- </set>
- WHERE id_ = #{id}
- </update>
- <!-- 根据主键删除一条记录 -->
- <delete id="delete">
- DELETE FROM student_withdraw WHERE id_ = #{id}
- </delete>
- <!-- 分页查询 -->
- <select id="queryPage" resultMap="StudentWithdraw" parameterType="map">
- SELECT * FROM student_withdraw ORDER BY id_
- <include refid="global.limit"/>
- </select>
- <!-- 查询当前表的总记录数 -->
- <select id="queryCount" resultType="int">
- SELECT COUNT(*) FROM student_withdraw
- </select>
- </mapper>
|