...
|
...
|
@@ -21,9 +21,7 @@ |
|
|
<result column="deal_user_name" jdbcType="VARCHAR" property="dealUserName" />
|
|
|
</resultMap>
|
|
|
<sql id="Base_Column_List">
|
|
|
id,uid, order_code, user_type,pay_type,trade_type,
|
|
|
income_outcome,amount,system_amount,trade_status,create_time
|
|
|
,deal_uid,deal_status,deal_time,deal_relate_id,deal_user_name
|
|
|
id,uid, order_code, user_type,pay_type,trade_type,income_outcome,amount,system_amount,trade_status,create_time,deal_uid,deal_status,deal_time,deal_relate_id,deal_user_name
|
|
|
</sql>
|
|
|
|
|
|
<select id="selectByPrimaryKey" parameterType="java.lang.Integer" resultMap="BaseResultMap">
|
...
|
...
|
@@ -80,12 +78,7 @@ |
|
|
group by trade_type
|
|
|
</select>
|
|
|
|
|
|
<!--
|
|
|
<select id="selectSpendAmountByUid" resultType="java.util.HashMap">
|
|
|
select trade_type as tradeType,sum(amount) as allAmount from trade_bills
|
|
|
where uid = #{uid} and income_outcome = 2 and ( trade_type = 2 or trade_type = 3 ) and (trade_status = 100 or (trade_status != 100 and deal_status !=1 )) group by trade_type
|
|
|
</select>
|
|
|
-->
|
|
|
|
|
|
|
|
|
<update id="updateToOkByPrimaryKey" parameterType="com.yohoufo.dal.order.model.TradeBills" >
|
|
|
update trade_bills
|
...
|
...
|
@@ -145,99 +138,16 @@ |
|
|
</update>
|
|
|
|
|
|
|
|
|
<!--
|
|
|
|
|
|
<delete id="deleteByPrimaryKey" parameterType="java.lang.Integer" >
|
|
|
delete from trade_bills
|
|
|
where id = #{id,jdbcType=INTEGER}
|
|
|
</delete>
|
|
|
<insert id="insertSelective" parameterType="com.yohoufo.dal.order.model.TradeBills" >
|
|
|
insert into trade_bills
|
|
|
<trim prefix="(" suffix=")" suffixOverrides="," >
|
|
|
<if test="id != null" >
|
|
|
id,
|
|
|
</if>
|
|
|
<if test="uid != null" >
|
|
|
uid,
|
|
|
</if>
|
|
|
<if test="orderCode != null" >
|
|
|
order_code,
|
|
|
</if>
|
|
|
<if test="userType != null" >
|
|
|
user_type,
|
|
|
</if>
|
|
|
<if test="payType != null" >
|
|
|
pay_type,
|
|
|
</if>
|
|
|
<if test="tradeType != null" >
|
|
|
trade_type,
|
|
|
</if>
|
|
|
<if test="incomeOutcome != null" >
|
|
|
income_outcome,
|
|
|
</if>
|
|
|
<if test="amount != null" >
|
|
|
amount,
|
|
|
</if>
|
|
|
<if test="systemAmount != null" >
|
|
|
system_amount,
|
|
|
</if>
|
|
|
<if test="tradeStatus != null" >
|
|
|
trade_status,
|
|
|
</if>
|
|
|
<if test="createTime != null" >
|
|
|
create_time,
|
|
|
</if>
|
|
|
</trim>
|
|
|
<trim prefix="values (" suffix=")" suffixOverrides="," >
|
|
|
<if test="id != null" >
|
|
|
#{id,jdbcType=INTEGER},
|
|
|
</if>
|
|
|
<if test="uid != null" >
|
|
|
#{uid,jdbcType=INTEGER},
|
|
|
</if>
|
|
|
<if test="orderCode != null" >
|
|
|
#{orderCode,jdbcType=BIGINT},
|
|
|
</if>
|
|
|
<if test="userType != null" >
|
|
|
#{userType,jdbcType=INTEGER},
|
|
|
</if>
|
|
|
<if test="payType != null" >
|
|
|
#{payType,jdbcType=INTEGER},
|
|
|
</if>
|
|
|
<if test="tradeType != null" >
|
|
|
#{tradeType,jdbcType=INTEGER},
|
|
|
</if>
|
|
|
<if test="incomeOutcome != null" >
|
|
|
#{incomeOutcome,jdbcType=INTEGER},
|
|
|
</if>
|
|
|
<if test="amount != null" >
|
|
|
#{amount,jdbcType=DECIMAL},
|
|
|
</if>
|
|
|
<if test="systemAmount != null" >
|
|
|
#{systemAmount,jdbcType=DECIMAL},
|
|
|
</if>
|
|
|
<if test="tradeStatus != null" >
|
|
|
#{tradeStatus,jdbcType=INTEGER},
|
|
|
</if>
|
|
|
<if test="createTime != null" >
|
|
|
#{createTime,jdbcType=INTEGER},
|
|
|
</if>
|
|
|
</trim>
|
|
|
</insert>
|
|
|
<update id="updateByPrimaryKey" parameterType="com.yohoufo.dal.order.model.TradeBills" >
|
|
|
update trade_bills
|
|
|
set uid = #{uid,jdbcType=INTEGER},
|
|
|
order_code = #{orderCode,jdbcType=BIGINT},
|
|
|
user_type = #{userType,jdbcType=INTEGER},
|
|
|
pay_type = #{payType,jdbcType=INTEGER},
|
|
|
trade_type = #{tradeType,jdbcType=INTEGER},
|
|
|
income_outcome = #{incomeOutcome,jdbcType=INTEGER},
|
|
|
amount = #{amount,jdbcType=DECIMAL},
|
|
|
system_amount = #{systemAmount,jdbcType=DECIMAL},
|
|
|
trade_status = #{tradeStatus,jdbcType=INTEGER},
|
|
|
create_time = #{createTime,jdbcType=INTEGER}
|
|
|
where id = #{id,jdbcType=INTEGER}
|
|
|
</update>
|
|
|
|
|
|
-->
|
|
|
<select id="selectByKeyProps" parameterType="com.yohoufo.dal.order.model.TradeBills" resultMap="BaseResultMap">
|
|
|
select
|
|
|
<include refid="Base_Column_List" />
|
|
|
from trade_bills
|
|
|
where 1=1
|
|
|
<if test="orderCode != null" >
|
|
|
and order_code = #{orderCode,jdbcType=BIGINT}
|
|
|
</if>
|
|
|
<if test="tradeType != null" >
|
|
|
and trade_type = #{tradeType,jdbcType=INTEGER}
|
|
|
</if>
|
|
|
</select>
|
|
|
</mapper> |
|
|
\ No newline at end of file |
...
|
...
|
|