|
|
@@ -0,0 +1,351 @@
|
|
|
+<?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.usoftchina.saas.money.mapper.BankinformationMapper" >
|
|
|
+ <resultMap id="BaseResultMap" type="com.usoftchina.saas.money.po.Bankinformation" >
|
|
|
+ <id column="bk_id" property="id" jdbcType="INTEGER" />
|
|
|
+ <result column="bk_bankcode" property="bk_bankcode" jdbcType="VARCHAR" />
|
|
|
+ <result column="bk_bankname" property="bk_bankname" jdbcType="VARCHAR" />
|
|
|
+ <result column="bk_date" property="bk_date" jdbcType="TIMESTAMP" />
|
|
|
+ <result column="bk_type" property="bk_type" jdbcType="VARCHAR" />
|
|
|
+ <result column="bk_beginamount" property="bk_beginamount" jdbcType="DOUBLE" />
|
|
|
+ <result column="bk_thisamount" property="bk_thisamount" jdbcType="DOUBLE" />
|
|
|
+ <result column="bk_status" property="bk_status" jdbcType="VARCHAR" />
|
|
|
+ <result column="bk_statuscode" property="bk_statuscode" jdbcType="VARCHAR" />
|
|
|
+ <result column="bk_recorderid" property="bk_recorderid" jdbcType="INTEGER" />
|
|
|
+ <result column="bk_recorder" property="bk_recorder" jdbcType="VARCHAR" />
|
|
|
+ <result column="bk_recorddate" property="bk_recorddate" jdbcType="TIMESTAMP" />
|
|
|
+ <result column="bk_ym" property="bk_ym" jdbcType="INTEGER" />
|
|
|
+ <result column="companyid" property="companyId" jdbcType="INTEGER" />
|
|
|
+ <result column="updaterId" property="updaterId" jdbcType="INTEGER" />
|
|
|
+ <result column="updateTime" property="updateTime" jdbcType="TIMESTAMP" />
|
|
|
+ <result column="bk_text1" property="bk_text1" jdbcType="VARCHAR" />
|
|
|
+ <result column="bk_text2" property="bk_text2" jdbcType="VARCHAR" />
|
|
|
+ <result column="bk_text3" property="bk_text3" jdbcType="VARCHAR" />
|
|
|
+ <result column="bk_text4" property="bk_text4" jdbcType="VARCHAR" />
|
|
|
+ <result column="bk_text5" property="bk_text5" jdbcType="VARCHAR" />
|
|
|
+ <result column="bk_remark" property="bk_remark" jdbcType="VARCHAR" />
|
|
|
+ <result column="bk_spending" property="bk_spending" jdbcType="DOUBLE" />
|
|
|
+ <result column="bk_income" property="bk_income" jdbcType="DOUBLE" />
|
|
|
+ </resultMap>
|
|
|
+ <resultMap id="ResultMapWithBLOBs" type="com.usoftchina.saas.money.po.Bankinformation" extends="BaseResultMap" >
|
|
|
+ <result column="bk_remark" property="bk_remark" jdbcType="LONGVARCHAR" />
|
|
|
+ </resultMap>
|
|
|
+ <sql id="Base_Column_List" >
|
|
|
+ bk_id, bk_bankcode, bk_bankname, bk_date, bk_type, bk_beginamount, bk_thisamount,
|
|
|
+ bk_status, bk_statuscode, bk_recorderid, bk_recorder, bk_recorddate, bk_ym, companyid,
|
|
|
+ updaterId, updateTime, bk_text1, bk_text2, bk_text3, bk_text4, bk_text5, bk_remark
|
|
|
+ </sql>
|
|
|
+ <sql id="Blob_Column_List" >
|
|
|
+ bk_remark
|
|
|
+ </sql>
|
|
|
+ <select id="selectByPrimaryKey" resultMap="ResultMapWithBLOBs" parameterType="java.lang.Integer" >
|
|
|
+ select
|
|
|
+ <include refid="Base_Column_List" />
|
|
|
+ ,
|
|
|
+ <include refid="Blob_Column_List" />
|
|
|
+ from bankinformation
|
|
|
+ where bk_id = #{id,jdbcType=INTEGER}
|
|
|
+ </select>
|
|
|
+ <delete id="deleteByPrimaryKey" parameterType="java.lang.Integer" >
|
|
|
+ delete from bankinformation
|
|
|
+ where bk_id = #{id,jdbcType=INTEGER}
|
|
|
+ </delete>
|
|
|
+ <insert id="insert" parameterType="com.usoftchina.saas.money.po.Bankinformation" >
|
|
|
+ insert into bankinformation (bk_id, bk_bankcode, bk_bankname,
|
|
|
+ bk_date, bk_type, bk_beginamount,
|
|
|
+ bk_thisamount, bk_status, bk_statuscode,
|
|
|
+ bk_recorderid, bk_recorder, bk_recorddate,
|
|
|
+ bk_ym, companyid, updaterId,
|
|
|
+ updateTime, bk_text1, bk_text2,
|
|
|
+ bk_text3, bk_text4, bk_text5,
|
|
|
+ bk_remark)
|
|
|
+ values (#{bk_bankcode,jdbcType=VARCHAR}, #{bk_bankname,jdbcType=VARCHAR},
|
|
|
+ #{bk_date,jdbcType=TIMESTAMP}, #{bk_type,jdbcType=VARCHAR}, #{bk_beginamount,jdbcType=DOUBLE},
|
|
|
+ #{bk_thisamount,jdbcType=DOUBLE}, #{bk_status,jdbcType=VARCHAR}, #{bk_statuscode,jdbcType=VARCHAR},
|
|
|
+ #{bk_recorderid,jdbcType=INTEGER}, #{bk_recorder,jdbcType=VARCHAR}, #{bk_recorddate,jdbcType=TIMESTAMP},
|
|
|
+ #{bk_ym,jdbcType=INTEGER}, #{companyId,jdbcType=INTEGER}, #{updaterId,jdbcType=INTEGER},
|
|
|
+ #{updateTime,jdbcType=TIMESTAMP}, #{bk_text1,jdbcType=VARCHAR}, #{bk_text2,jdbcType=VARCHAR},
|
|
|
+ #{bk_text3,jdbcType=VARCHAR}, #{bk_text4,jdbcType=VARCHAR}, #{bk_text5,jdbcType=VARCHAR},
|
|
|
+ #{bk_remark,jdbcType=LONGVARCHAR})
|
|
|
+ </insert>
|
|
|
+ <insert id="insertSelective" parameterType="com.usoftchina.saas.document.entities.Bankinformation" >
|
|
|
+ insert into bankinformation
|
|
|
+ <trim prefix="(" suffix=")" suffixOverrides="," >
|
|
|
+ <if test="bk_bankcode != null" >
|
|
|
+ bk_bankcode,
|
|
|
+ </if>
|
|
|
+ <if test="bk_bankname != null" >
|
|
|
+ bk_bankname,
|
|
|
+ </if>
|
|
|
+ <if test="bk_date != null" >
|
|
|
+ bk_date,
|
|
|
+ </if>
|
|
|
+ <if test="bk_type != null" >
|
|
|
+ bk_type,
|
|
|
+ </if>
|
|
|
+ <if test="bk_beginamount != null" >
|
|
|
+ bk_beginamount,
|
|
|
+ </if>
|
|
|
+ <if test="bk_thisamount != null" >
|
|
|
+ bk_thisamount,
|
|
|
+ </if>
|
|
|
+ <if test="bk_status != null" >
|
|
|
+ bk_status,
|
|
|
+ </if>
|
|
|
+ <if test="bk_statuscode != null" >
|
|
|
+ bk_statuscode,
|
|
|
+ </if>
|
|
|
+ <if test="bk_recorderid != null" >
|
|
|
+ bk_recorderid,
|
|
|
+ </if>
|
|
|
+ <if test="bk_recorder != null" >
|
|
|
+ bk_recorder,
|
|
|
+ </if>
|
|
|
+ <if test="bk_recorddate != null" >
|
|
|
+ bk_recorddate,
|
|
|
+ </if>
|
|
|
+ <if test="bk_ym != null" >
|
|
|
+ bk_ym,
|
|
|
+ </if>
|
|
|
+ <if test="companyId != null" >
|
|
|
+ companyid,
|
|
|
+ </if>
|
|
|
+ <if test="updaterId != null" >
|
|
|
+ updaterId,
|
|
|
+ </if>
|
|
|
+ <if test="updateTime != null" >
|
|
|
+ updateTime,
|
|
|
+ </if>
|
|
|
+ <if test="bk_text1 != null" >
|
|
|
+ bk_text1,
|
|
|
+ </if>
|
|
|
+ <if test="bk_text2 != null" >
|
|
|
+ bk_text2,
|
|
|
+ </if>
|
|
|
+ <if test="bk_text3 != null" >
|
|
|
+ bk_text3,
|
|
|
+ </if>
|
|
|
+ <if test="bk_text4 != null" >
|
|
|
+ bk_text4,
|
|
|
+ </if>
|
|
|
+ <if test="bk_text5 != null" >
|
|
|
+ bk_text5,
|
|
|
+ </if>
|
|
|
+ <if test="bk_remark != null" >
|
|
|
+ bk_remark,
|
|
|
+ </if>
|
|
|
+ <if test="bk_spending != null" >
|
|
|
+ bk_spending,
|
|
|
+ </if>
|
|
|
+ <if test="bk_income != null" >
|
|
|
+ bk_income,
|
|
|
+ </if>
|
|
|
+ </trim>
|
|
|
+ <trim prefix="values (" suffix=")" suffixOverrides="," >
|
|
|
+ <if test="bk_bankcode != null" >
|
|
|
+ #{bk_bankcode,jdbcType=VARCHAR},
|
|
|
+ </if>
|
|
|
+ <if test="bk_bankname != null" >
|
|
|
+ #{bk_bankname,jdbcType=VARCHAR},
|
|
|
+ </if>
|
|
|
+ <if test="bk_date != null" >
|
|
|
+ #{bk_date,jdbcType=TIMESTAMP},
|
|
|
+ </if>
|
|
|
+ <if test="bk_type != null" >
|
|
|
+ #{bk_type,jdbcType=VARCHAR},
|
|
|
+ </if>
|
|
|
+ <if test="bk_beginamount != null" >
|
|
|
+ #{bk_beginamount,jdbcType=DOUBLE},
|
|
|
+ </if>
|
|
|
+ <if test="bk_thisamount != null" >
|
|
|
+ #{bk_thisamount,jdbcType=DOUBLE},
|
|
|
+ </if>
|
|
|
+ <if test="bk_status != null" >
|
|
|
+ #{bk_status,jdbcType=VARCHAR},
|
|
|
+ </if>
|
|
|
+ <if test="bk_statuscode != null" >
|
|
|
+ #{bk_statuscode,jdbcType=VARCHAR},
|
|
|
+ </if>
|
|
|
+ <if test="bk_recorderid != null" >
|
|
|
+ #{bk_recorderid,jdbcType=INTEGER},
|
|
|
+ </if>
|
|
|
+ <if test="bk_recorder != null" >
|
|
|
+ #{bk_recorder,jdbcType=VARCHAR},
|
|
|
+ </if>
|
|
|
+ <if test="bk_recorddate != null" >
|
|
|
+ #{bk_recorddate,jdbcType=TIMESTAMP},
|
|
|
+ </if>
|
|
|
+ <if test="bk_ym != null" >
|
|
|
+ #{bk_ym,jdbcType=INTEGER},
|
|
|
+ </if>
|
|
|
+ <if test="companyId != null" >
|
|
|
+ #{companyId,jdbcType=INTEGER},
|
|
|
+ </if>
|
|
|
+ <if test="updaterId != null" >
|
|
|
+ #{updaterId,jdbcType=INTEGER},
|
|
|
+ </if>
|
|
|
+ <if test="updateTime != null" >
|
|
|
+ #{updateTime,jdbcType=TIMESTAMP},
|
|
|
+ </if>
|
|
|
+ <if test="bk_text1 != null" >
|
|
|
+ #{bk_text1,jdbcType=VARCHAR},
|
|
|
+ </if>
|
|
|
+ <if test="bk_text2 != null" >
|
|
|
+ #{bk_text2,jdbcType=VARCHAR},
|
|
|
+ </if>
|
|
|
+ <if test="bk_text3 != null" >
|
|
|
+ #{bk_text3,jdbcType=VARCHAR},
|
|
|
+ </if>
|
|
|
+ <if test="bk_text4 != null" >
|
|
|
+ #{bk_text4,jdbcType=VARCHAR},
|
|
|
+ </if>
|
|
|
+ <if test="bk_text5 != null" >
|
|
|
+ #{bk_text5,jdbcType=VARCHAR},
|
|
|
+ </if>
|
|
|
+ <if test="bk_remark != null" >
|
|
|
+ #{bk_remark,jdbcType=LONGVARCHAR},
|
|
|
+ </if>
|
|
|
+ <if test="bk_spending != null" >
|
|
|
+ #{bk_spending,jdbcType=DOUBLE},
|
|
|
+ </if>
|
|
|
+ <if test="bk_income != null" >
|
|
|
+ #{bk_income,jdbcType=DOUBLE},
|
|
|
+ </if>
|
|
|
+ </trim>
|
|
|
+ </insert>
|
|
|
+ <update id="updateByPrimaryKeySelective" parameterType="com.usoftchina.saas.document.entities.Bankinformation" >
|
|
|
+ update bankinformation
|
|
|
+ <set >
|
|
|
+ <if test="bk_bankcode != null" >
|
|
|
+ bk_bankcode = #{bk_bankcode,jdbcType=VARCHAR},
|
|
|
+ </if>
|
|
|
+ <if test="bk_bankname != null" >
|
|
|
+ bk_bankname = #{bk_bankname,jdbcType=VARCHAR},
|
|
|
+ </if>
|
|
|
+ <if test="bk_date != null" >
|
|
|
+ bk_date = #{bk_date,jdbcType=TIMESTAMP},
|
|
|
+ </if>
|
|
|
+ <if test="bk_type != null" >
|
|
|
+ bk_type = #{bk_type,jdbcType=VARCHAR},
|
|
|
+ </if>
|
|
|
+ <if test="bk_beginamount != null" >
|
|
|
+ bk_beginamount = #{bk_beginamount,jdbcType=DOUBLE},
|
|
|
+ </if>
|
|
|
+ <if test="bk_thisamount != null" >
|
|
|
+ bk_thisamount = #{bk_thisamount,jdbcType=DOUBLE},
|
|
|
+ </if>
|
|
|
+ <if test="bk_status != null" >
|
|
|
+ bk_status = #{bk_status,jdbcType=VARCHAR},
|
|
|
+ </if>
|
|
|
+ <if test="bk_statuscode != null" >
|
|
|
+ bk_statuscode = #{bk_statuscode,jdbcType=VARCHAR},
|
|
|
+ </if>
|
|
|
+ <if test="bk_recorderid != null" >
|
|
|
+ bk_recorderid = #{bk_recorderid,jdbcType=INTEGER},
|
|
|
+ </if>
|
|
|
+ <if test="bk_recorder != null" >
|
|
|
+ bk_recorder = #{bk_recorder,jdbcType=VARCHAR},
|
|
|
+ </if>
|
|
|
+ <if test="bk_recorddate != null" >
|
|
|
+ bk_recorddate = #{bk_recorddate,jdbcType=TIMESTAMP},
|
|
|
+ </if>
|
|
|
+ <if test="bk_ym != null" >
|
|
|
+ bk_ym = #{bk_ym,jdbcType=INTEGER},
|
|
|
+ </if>
|
|
|
+ <if test="companyId != null" >
|
|
|
+ companyid = #{companyId,jdbcType=INTEGER},
|
|
|
+ </if>
|
|
|
+ <if test="updaterId != null" >
|
|
|
+ updaterId = #{updaterId,jdbcType=INTEGER},
|
|
|
+ </if>
|
|
|
+ <if test="updateTime != null" >
|
|
|
+ updateTime = #{updateTime,jdbcType=TIMESTAMP},
|
|
|
+ </if>
|
|
|
+ <if test="bk_text1 != null" >
|
|
|
+ bk_text1 = #{bk_text1,jdbcType=VARCHAR},
|
|
|
+ </if>
|
|
|
+ <if test="bk_text2 != null" >
|
|
|
+ bk_text2 = #{bk_text2,jdbcType=VARCHAR},
|
|
|
+ </if>
|
|
|
+ <if test="bk_text3 != null" >
|
|
|
+ bk_text3 = #{bk_text3,jdbcType=VARCHAR},
|
|
|
+ </if>
|
|
|
+ <if test="bk_text4 != null" >
|
|
|
+ bk_text4 = #{bk_text4,jdbcType=VARCHAR},
|
|
|
+ </if>
|
|
|
+ <if test="bk_text5 != null" >
|
|
|
+ bk_text5 = #{bk_text5,jdbcType=VARCHAR},
|
|
|
+ </if>
|
|
|
+ <if test="bk_remark != null" >
|
|
|
+ bk_remark = #{bk_remark,jdbcType=LONGVARCHAR},
|
|
|
+ </if>
|
|
|
+ <if test="bk_income != null" >
|
|
|
+ bk_income = #{bk_income,jdbcType=DOUBLE},
|
|
|
+ </if>
|
|
|
+ <if test="bk_spending != null" >
|
|
|
+ bk_spending = #{bk_spending,jdbcType=DOUBLE},
|
|
|
+ </if>
|
|
|
+ </set>
|
|
|
+ where bk_id = #{id,jdbcType=INTEGER}
|
|
|
+ </update>
|
|
|
+ <update id="updateByPrimaryKeyWithBLOBs" parameterType="com.usoftchina.saas.money.po.Bankinformation" >
|
|
|
+ update bankinformation
|
|
|
+ set bk_bankcode = #{bkBankcode,jdbcType=VARCHAR},
|
|
|
+ bk_bankname = #{bkBankname,jdbcType=VARCHAR},
|
|
|
+ bk_date = #{bkDate,jdbcType=TIMESTAMP},
|
|
|
+ bk_type = #{bkType,jdbcType=VARCHAR},
|
|
|
+ bk_beginamount = #{bkBeginamount,jdbcType=DOUBLE},
|
|
|
+ bk_thisamount = #{bkThisamount,jdbcType=DOUBLE},
|
|
|
+ bk_status = #{bkStatus,jdbcType=VARCHAR},
|
|
|
+ bk_statuscode = #{bkStatuscode,jdbcType=VARCHAR},
|
|
|
+ bk_recorderid = #{bkRecorderid,jdbcType=INTEGER},
|
|
|
+ bk_recorder = #{bkRecorder,jdbcType=VARCHAR},
|
|
|
+ bk_recorddate = #{bkRecorddate,jdbcType=TIMESTAMP},
|
|
|
+ bk_ym = #{bkYm,jdbcType=INTEGER},
|
|
|
+ companyid = #{companyId,jdbcType=INTEGER},
|
|
|
+ updaterId = #{updaterId,jdbcType=INTEGER},
|
|
|
+ updateTime = #{updateTime,jdbcType=TIMESTAMP},
|
|
|
+ bk_text1 = #{bkText1,jdbcType=VARCHAR},
|
|
|
+ bk_text2 = #{bkText2,jdbcType=VARCHAR},
|
|
|
+ bk_text3 = #{bkText3,jdbcType=VARCHAR},
|
|
|
+ bk_text4 = #{bkText4,jdbcType=VARCHAR},
|
|
|
+ bk_text5 = #{bkText5,jdbcType=VARCHAR},
|
|
|
+ bk_remark = #{bkRemark,jdbcType=LONGVARCHAR}
|
|
|
+ where bk_id = #{bkId,jdbcType=INTEGER}
|
|
|
+ </update>
|
|
|
+
|
|
|
+ <select id="selectAll" resultMap="BaseResultMap">
|
|
|
+ SELECT * FROM bankinformation
|
|
|
+ </select>
|
|
|
+
|
|
|
+ <select id="selectBankinformationBycondition" resultMap="BaseResultMap">
|
|
|
+ select
|
|
|
+ <include refid="Base_Column_List" />
|
|
|
+ from bankinformation
|
|
|
+ <where>
|
|
|
+ <if test="con != null">
|
|
|
+ ${con}
|
|
|
+ </if>
|
|
|
+ <if test="companyId != null">
|
|
|
+ and bankinformation.companyId = #{companyId}
|
|
|
+ </if>
|
|
|
+ </where> order by bk_id
|
|
|
+ </select>
|
|
|
+ <select id="getCombo" resultType="com.usoftchina.saas.commons.dto.ComboDTO">
|
|
|
+ SELECT CONCAT(bk_bankcode,' ',bk_bankname) display,bk_bankname value FROM bankinformation WHERE COMPANYID=#{companyId}
|
|
|
+ </select>
|
|
|
+
|
|
|
+
|
|
|
+ <select id="selectBankcode" parameterType="java.lang.String" resultType="java.lang.String">
|
|
|
+ select bk_bankcode from bankinformation where bk_bankcode = #{bk_bankcode,jdbcType=VARCHAR}
|
|
|
+ </select>
|
|
|
+
|
|
|
+ <update id="updateBankAmount" >
|
|
|
+ update bankinformation set bk_thisamount = #{bk_thisamount,jdbcType=DOUBLE}
|
|
|
+ where bk_id = #{id,jdbcType=INTEGER}
|
|
|
+ </update>
|
|
|
+
|
|
|
+ <select id="selectThisamount" parameterType="java.lang.Integer" resultType="java.lang.Double">
|
|
|
+ select bk_beginamount from bankinformation where bk_id = #{id,jdbcType=INTEGER}
|
|
|
+</select>
|
|
|
+</mapper>
|