Commit afb80bab authored by machengbo's avatar machengbo

no message

parent e3c8fcdd
<?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.jz.dm.mall.moduls.mapper.FinanceTradeFlowDao">
<resultMap type="com.jz.dm.mall.moduls.entity.FinanceTradeFlow" id="TPlatformTradeFlowInfoMap">
<result property="tradeFlowInfoId" column="trade_flow_info_id" jdbcType="INTEGER"/>
<result property="receiveInfoId" column="receive_info_id" jdbcType="INTEGER"/>
<result property="platformTradeMoney" column="platform_trade_money" jdbcType="NUMERIC"/>
<result property="tradeType" column="trade_type" jdbcType="VARCHAR"/>
<result property="creTime" column="cre_time" jdbcType="TIMESTAMP"/>
<result property="crePerson" column="cre_person" jdbcType="VARCHAR"/>
<result property="uptTime" column="upt_time" jdbcType="TIMESTAMP"/>
<result property="uptPerson" column="upt_person" jdbcType="VARCHAR"/>
<result property="delFlag" column="del_flag" jdbcType="VARCHAR"/>
</resultMap>
<!--查询单个-->
<select id="queryById" resultMap="TPlatformTradeFlowInfoMap">
select
trade_flow_info_id, receive_info_id, platform_trade_money, trade_type, cre_time, cre_person, upt_time, upt_person, del_flag
from t_platform_trade_flow_info
where trade_flow_info_id = #{tradeFlowInfoId}
</select>
<!--查询指定行数据-->
<select id="queryAllByLimit" resultMap="TPlatformTradeFlowInfoMap">
select
trade_flow_info_id, receive_info_id, platform_trade_money, trade_type, cre_time, cre_person, upt_time, upt_person, del_flag
from t_platform_trade_flow_info
limit #{offset}, #{limit}
</select>
<!--通过实体作为筛选条件查询-->
<select id="queryAll" resultMap="TPlatformTradeFlowInfoMap">
select
trade_flow_info_id, receive_info_id, platform_trade_money, trade_type, cre_time, cre_person, upt_time,
upt_person, del_flag
from t_platform_trade_flow_info
<where>
<if test="tradeFlowInfoId != null">
and trade_flow_info_id = #{tradeFlowInfoId}
</if>
<if test="receiveInfoId != null">
and receive_info_id = #{receiveInfoId}
</if>
<if test="platformTradeMoney != null">
and platform_trade_money = #{platformTradeMoney}
</if>
<if test="tradeType != null and tradeType != ''">
and trade_type = #{tradeType}
</if>
<if test="creTime != null">
and cre_time = #{creTime}
</if>
<if test="crePerson != null and crePerson != ''">
and cre_person = #{crePerson}
</if>
<if test="uptTime != null">
and upt_time = #{uptTime}
</if>
<if test="uptPerson != null and uptPerson != ''">
and upt_person = #{uptPerson}
</if>
<if test="delFlag != null and delFlag != ''">
and del_flag = #{delFlag}
</if>
</where>
</select>
<!--新增所有列-->
<insert id="insert" keyProperty="tradeFlowInfoId" useGeneratedKeys="true">
insert into t_platform_trade_flow_info(receive_info_id, platform_trade_money, trade_type, cre_time, cre_person, upt_time, upt_person, del_flag)
values (#{receiveInfoId}, #{platformTradeMoney}, #{tradeType}, #{creTime}, #{crePerson}, #{uptTime}, #{uptPerson}, #{delFlag})
</insert>
<insert id="insertBatch" keyProperty="tradeFlowInfoId" useGeneratedKeys="true">
insert into t_platform_trade_flow_info(receive_info_id, platform_trade_money, trade_type,
cre_time, cre_person, upt_time, upt_person, del_flag)
values
<foreach collection="entities" item="entity" separator=",">
(#{entity.receiveInfoId}, #{entity.platformTradeMoney}, #{entity.tradeType}, #{entity.creTime},
#{entity.crePerson}, #{entity.uptTime}, #{entity.uptPerson}, #{entity.delFlag})
</foreach>
</insert>
<!--通过主键修改数据-->
<update id="update">
update t_platform_trade_flow_info
<set>
<if test="receiveInfoId != null">
receive_info_id = #{receiveInfoId},
</if>
<if test="platformTradeMoney != null">
platform_trade_money = #{platformTradeMoney},
</if>
<if test="tradeType != null and tradeType != ''">
trade_type = #{tradeType},
</if>
<if test="creTime != null">
cre_time = #{creTime},
</if>
<if test="crePerson != null and crePerson != ''">
cre_person = #{crePerson},
</if>
<if test="uptTime != null">
upt_time = #{uptTime},
</if>
<if test="uptPerson != null and uptPerson != ''">
upt_person = #{uptPerson},
</if>
<if test="delFlag != null and delFlag != ''">
del_flag = #{delFlag},
</if>
</set>
where trade_flow_info_id = #{tradeFlowInfoId}
</update>
<!--通过主键删除-->
<delete id="deleteById">
delete from t_platform_trade_flow_info where trade_flow_info_id = #{tradeFlowInfoId}
</delete>
</mapper>
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment