DuibaOrdersMapper.xml 2.26 KB
<?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="cn.runsa.crmapp.points.mapper.DuibaOrdersMapper">
	<select id="selectcount" resultType="Integer" parameterType="cn.runsa.duiba.orders.entity.Orders">
		select count(1) from duiba_points_order where ordernum=#{ordernum,jdbcType=VARCHAR}
	</select>
	<select id="selectstatus" resultType="String" parameterType="cn.runsa.duiba.orders.entity.Orders">
		select ifnull(max(res_status),'') from duiba_points_order where ordernum=#{ordernum,jdbcType=VARCHAR}
	</select>
	<insert id="insertrow" parameterType="cn.runsa.duiba.orders.entity.Orders">
	    <!--
	      WARNING - @mbggenerated
	      This element is automatically generated by MyBatis Generator, do not modify.
	    -->
	    insert into duiba_points_order 
	    	(`uid`,
			`credits`,
			`appkey`,
			`timestamp`,
			`description`,
			`ordernum`,
			`type`,
			`faceprice`,
			`actualprice`,
			`ip`,
			`waitaudit`,
			`params`,
			`sign`,
			`res_status`,
			`res_bizid`,
			`res_errormessage`,
			`res_balance`,
			`gxrq`,`pointno`)
	    values (
		    #{uid,jdbcType=VARCHAR},
		    #{credits,jdbcType=INTEGER},
		    #{appkey,jdbcType=VARCHAR},
		    #{timestamp,jdbcType=VARCHAR},
		    #{description,jdbcType=VARCHAR},
		    #{ordernum,jdbcType=VARCHAR},
		    #{type,jdbcType=VARCHAR},
		    #{faceprice,jdbcType=INTEGER},
		    #{actualprice,jdbcType=INTEGER},
		    #{ip,jdbcType=VARCHAR},
		    #{waitaudit,jdbcType=INTEGER},
		    #{params,jdbcType=VARCHAR},
		    #{sign,jdbcType=VARCHAR},
		    #{res_status,jdbcType=VARCHAR},
		    #{res_bizid,jdbcType=VARCHAR},
		    #{res_errormessage,jdbcType=VARCHAR},
		    #{res_balance,jdbcType=INTEGER},
		    #{gxrq,jdbcType=VARCHAR},
		    #{pointno,jdbcType=VARCHAR}
	    )
	</insert>
	<update id="updatestatus" parameterType="cn.runsa.duiba.orders.entity.Orders">
		update duiba_points_order
		set res_status=#{res_status},res_balance=#{res_balance},res_errormessage=#{res_errormessage}
		where ordernum=#{ordernum}
	</update>
	
	<select id="selectByNum" resultType="cn.runsa.duiba.orders.entity.Orders" parameterType="String">
	  select uid,credits,res_status,pointno from duiba_points_order where ordernum = #{num}
	</select>
</mapper>