DuibaNotifyMapper.xml 1.54 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.DuibaNotifyMapper">
	<select id="selectstatus" resultType="String" parameterType="String">
		select ifnull(max(res_status),'') from duiba_points_order where ordernum=#{ordernum,jdbcType=VARCHAR}
	</select>
	<insert id="insert" parameterType="cn.runsa.duiba.orders.entity.Notify">
	    
	    insert into duiba_points_order_result 
	    	(`appkey`,
			`timestamp`,
			`errormessage`,
			`ordernum`,
			`success`,
			`bizid`,
			`sign`,
			`res_status`,
			`res_message`,
			`gxrq`
			)
	    values (
		    #{appKey,jdbcType=VARCHAR},
		    #{timestamp},
		    #{errorMessage,jdbcType=VARCHAR},
		    #{orderNum,jdbcType=VARCHAR},
		    #{success,jdbcType=INTEGER},
		    #{bizId,jdbcType=VARCHAR},
		    #{sign,jdbcType=VARCHAR},
		    #{res_status,jdbcType=VARCHAR},
		    #{res_Message,jdbcType=VARCHAR},
		    now()
		   
	    )
	</insert>
	<delete id="deleteByNum" parameterType="String" >
	   delete from  duiba_points_order_result where ordernum =#{orderNum}
	</delete>
	<update id="updateStatus" parameterType="cn.runsa.duiba.orders.entity.Notify">
	   update duiba_points_order_result set `res_status` = #{res_status}
	   where ordernum = #{orderNum}
	</update>
	<select id="selectByNum" resultType="cn.runsa.duiba.orders.entity.Notify" parameterType="String">
	  select ordernum,success,res_status from duiba_points_order_result where ordernum = #{num}
	</select>
	
</mapper>