|
@@ -4,15 +4,16 @@
|
|
|
<resultMap id="SysAccount" type="com.ym.mec.biz.dal.entity.SysAccount">
|
|
|
<!--@Table sys_account-->
|
|
|
<id column="id_" jdbcType="INTEGER" property="id" />
|
|
|
+ <result column="company_" jdbcType="VARCHAR" property="company" />
|
|
|
<result column="mer_no_" jdbcType="VARCHAR" property="merNo" />
|
|
|
<result column="max_receipt_" jdbcType="DECIMAL" property="maxReceipt" />
|
|
|
<result column="has_receipt_" jdbcType="DECIMAL" property="hasReceipt" />
|
|
|
<result column="channel_" jdbcType="VARCHAR" property="channel" />
|
|
|
- <result column="channel_type_" jdbcType="CHAR" property="channelType" />
|
|
|
+ <result column="type_" jdbcType="CHAR" property="type" />
|
|
|
<result column="version" jdbcType="INTEGER" property="version" />
|
|
|
</resultMap>
|
|
|
<sql id="Base_Column_List">
|
|
|
- id_, mer_no_, max_receipt_, has_receipt_, channel_, channel_type_, version
|
|
|
+ id_,company_, mer_no_, max_receipt_, has_receipt_, channel_, type_, version
|
|
|
</sql>
|
|
|
<select id="get" parameterType="java.lang.Integer" resultMap="SysAccount">
|
|
|
<!--@mbg.generated-->
|
|
@@ -30,6 +31,9 @@
|
|
|
<!--@mbg.generated-->
|
|
|
insert into sys_account
|
|
|
<trim prefix="(" suffix=")" suffixOverrides=",">
|
|
|
+ <if test="company != null">
|
|
|
+ company_,
|
|
|
+ </if>
|
|
|
<if test="merNo != null">
|
|
|
mer_no_,
|
|
|
</if>
|
|
@@ -42,14 +46,17 @@
|
|
|
<if test="channel != null">
|
|
|
channel_,
|
|
|
</if>
|
|
|
- <if test="channelType != null">
|
|
|
- channel_type_,
|
|
|
+ <if test="type != null">
|
|
|
+ type_,
|
|
|
</if>
|
|
|
<if test="version != null">
|
|
|
version,
|
|
|
</if>
|
|
|
</trim>
|
|
|
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
|
|
+ <if test="company != null">
|
|
|
+ #{company,jdbcType=VARCHAR},
|
|
|
+ </if>
|
|
|
<if test="merNo != null">
|
|
|
#{merNo,jdbcType=VARCHAR},
|
|
|
</if>
|
|
@@ -62,8 +69,8 @@
|
|
|
<if test="channel != null">
|
|
|
#{channel,jdbcType=VARCHAR},
|
|
|
</if>
|
|
|
- <if test="channelType != null">
|
|
|
- #{channelType,jdbcType=CHAR},
|
|
|
+ <if test="type != null">
|
|
|
+ #{type,jdbcType=CHAR},
|
|
|
</if>
|
|
|
<if test="version != null">
|
|
|
#{version,jdbcType=INTEGER},
|
|
@@ -74,6 +81,9 @@
|
|
|
<!--@mbg.generated-->
|
|
|
update sys_account
|
|
|
<set>
|
|
|
+ <if test="company != null">
|
|
|
+ company_ = #{company,jdbcType=VARCHAR},
|
|
|
+ </if>
|
|
|
<if test="merNo != null">
|
|
|
mer_no_ = #{merNo,jdbcType=VARCHAR},
|
|
|
</if>
|
|
@@ -86,8 +96,8 @@
|
|
|
<if test="channel != null">
|
|
|
channel_ = #{channel,jdbcType=VARCHAR},
|
|
|
</if>
|
|
|
- <if test="channelType != null">
|
|
|
- channel_type_ = #{channelType,jdbcType=CHAR},
|
|
|
+ <if test="type != null">
|
|
|
+ type_ = #{type,jdbcType=CHAR},
|
|
|
</if>
|
|
|
<if test="version != null">
|
|
|
version = version+1,
|
|
@@ -95,28 +105,8 @@
|
|
|
</set>
|
|
|
where id_ = #{id,jdbcType=INTEGER} AND version =#{version}
|
|
|
</update>
|
|
|
- <update id="updateByPrimaryKey" parameterType="com.ym.mec.biz.dal.entity.SysAccount">
|
|
|
- <!--@mbg.generated-->
|
|
|
- update sys_account
|
|
|
- set mer_no_ = #{merNo,jdbcType=VARCHAR},
|
|
|
- max_receipt_ = #{maxReceipt,jdbcType=DECIMAL},
|
|
|
- has_receipt_ = #{hasReceipt,jdbcType=DECIMAL},
|
|
|
- channel_ = #{channel,jdbcType=VARCHAR},
|
|
|
- channel_type_ = #{channelType,jdbcType=CHAR},
|
|
|
- version = #{version,jdbcType=INTEGER}
|
|
|
- where id_ = #{id,jdbcType=INTEGER}
|
|
|
- </update>
|
|
|
- <select id="find"></select>
|
|
|
<!-- 获取一个私户账户 -->
|
|
|
<select id="getPerAccount" resultMap="SysAccount">
|
|
|
- SELECT * FROM sys_account WHERE channel_ = 'YQPAY' AND channel_type_ = 'PER'
|
|
|
+ SELECT * FROM sys_account WHERE channel_ = 'YQPAY' AND type_ = 'PER'
|
|
|
</select>
|
|
|
-
|
|
|
- <insert id="batchInsert" parameterType="java.util.List" useGeneratedKeys="true" keyProperty="id_">
|
|
|
- INSERT INTO sys_account (id_,mer_no_,channel_)
|
|
|
- VALUES
|
|
|
- <foreach collection="sysAccountList" item="data" separator=",">
|
|
|
- (#{data.id},#{data.merNo},#{data.channel})
|
|
|
- </foreach>
|
|
|
- </insert>
|
|
|
</mapper>
|