码迷,mamicode.com
首页 > 移动开发 > 详细

对象mapper

时间:2016-09-07 01:33:11      阅读:316      评论:0      收藏:0      [点我收藏+]

标签:

<?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.gxa.bj.dao.imp.VoucherMapper">
<insert id="addItem" parameterType="com.gxa.bj.model.Voucher">
insert into voucher (belum,indata,page,jaccount,daccount,debit,credit,digest,manager,staff,state)
values (vouchernext.nextval,#{indata},#{page},#{jaccount},#{daccount},#{debit},#{credit},#{digest},#{manager},#{staff},#{state})
</insert>
<update id="updateItem" parameterType="com.gxa.bj.model.Voucher">
update voucher set manager=#{manager},state=#{state} where belum=#{belum}
</update>
<select id="getList" parameterType="com.gxa.bj.model.Voucher" resultType="com.gxa.bj.model.Voucher">
Select * From voucher
<where>
1=1
<if test="belum>0">
and belum=#{belum}
</if>
<if test="state">
and state like #{state}
</if>
<if test="jaccount">
and jaccount like %#{jaccount}%
</if>
<if test="daccount">
and daccount like %#{daccount}%
</if>
</where>
</select>
</mapper>

对象mapper

标签:

原文地址:http://www.cnblogs.com/tutuwowo/p/5847746.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!