<?xml version="1.0" encoding="UTF-8"?>  
<!DOCTYPE sqlMap   
    PUBLIC "-//ibatis.apache.org//DTD SQL Map 2.0//EN"   
    "http://ibatis.apache.org/dtd/sql-map-2.dtd">  
<sqlMap namespace="com.hst.tmService.dao.WxGzzListAppMapper">
	<select id="selectWxZhgxLogBykey"  parameterClass="java.util.Map" resultClass="com.hst.taxService.domain.WxZhgxLogDomain">
	select log_xh,
      appid,
      kssj,
      jssj,
      backcode,
      errormess,
      total,
      bc_count,
      next_openid
	 from $databaseUsername$.wx_zhgx_log a
  	where a.log_xh=#log_xh#
	</select>
	<insert id="insertWxZhgxLog"  parameterClass="com.hst.taxService.domain.WxZhgxLogDomain">
		<selectKey keyProperty="log_xh"  resultClass="string" type="pre">
			select $databaseUsername$.seq_wx_sjqhxh.nextval log_xh from dual
		</selectKey>
		
		insert into $databaseUsername$.wx_zhgx_log
		  (log_xh,
		   appid,
		   kssj,
		   jssj,
		   backcode,
		   errormess,
		   total,
		   bc_count,
		   next_openid)
		values
		  (#log_xh:VARCHAR#,
		   #appid:VARCHAR#,
		   TO_DATE(#kssj:DATE#, 'YYYY-MM-DD HH24:MI:SS'),
		   TO_DATE(#jssj:DATE#, 'YYYY-MM-DD HH24:MI:SS'),   
		   #backcode:VARCHAR#,
		   #errormess:VARCHAR#,
		   #total:VARCHAR#,
		   #bc_count:VARCHAR#,
		   #next_openid:VARCHAR#)
	</insert>
</sqlMap>