Authored by tanling

订单支付

... ... @@ -282,7 +282,12 @@
<update id="updateByOrderCode" parameterType="com.yohoufo.dal.order.model.BuyerOrder">
update buyer_order
set
<if test="status != null">
status = #{status,jdbcType=INTEGER},
</if>
<if test="payment != null">
payment = #{payment,jdbcType=INTEGER},
</if>
update_time = #{updateTime,jdbcType=INTEGER}
where uid = #{uid,jdbcType=INTEGER}
and order_code = #{orderCode,jdbcType=BIGINT}
... ...
... ... @@ -41,6 +41,20 @@
</if>
</select>
<select id="selectBySkup" parameterType="java.lang.Integer" resultMap="BaseResultMap">
select
<include refid="Base_Column_List" />
from seller_order_goods
where 1=1
<if test="list != null">
and id in
<foreach item="item" index="index" collection="list" open="(" separator="," close=")">
#{item}
</foreach>
</if>
</select>
<sql id="sql_where_4_select_UidStatusList">
uid = #{uid,jdbcType=INTEGER}
<if test="statusList != null">
... ...
... ... @@ -5,9 +5,9 @@ package com.yohoufo.order.common;
*/
public enum DelStatus {
NOT_DEL(0),
NOT_DEL(1),
IS_DEL(1);
IS_DEL(0);
private int code;
... ...
... ... @@ -145,7 +145,7 @@ public class BuyerOrderPaymentService extends AbstractOrderPaymentService {
buyerOrder.setOrderCode(orderInfo.getOrderCode());
buyerOrder.setUid(orderInfo.getUid());
// 更新预支付方式
buyerOrder.setPayment(orderInfo.getPayment());
buyerOrder.setPayment(payment);
buyerOrder.setUpdateTime(DateUtil.getCurrentTimeSecond());
buyerOrderMapper.updateByOrderCode(buyerOrder);
... ...
... ... @@ -164,6 +164,7 @@ public class SubmitOrderServiceImpl implements ISubmitOrderService {
buyerOrder.setUpdateTime(now);
buyerOrder.setStatus(OrderStatus.WAITING_PAY.getCode());
buyerOrder.setBuyerOrderStatus(DelStatus.NOT_DEL.getCode());
buyerOrder.setSellerOrderStatus(DelStatus.NOT_DEL.getCode());
buyerOrderMapper.insert(buyerOrder);
}
... ... @@ -173,7 +174,9 @@ public class SubmitOrderServiceImpl implements ISubmitOrderService {
}
private SellerOrderGoods updSellerOrderGoods(OrderBuilder orderBuilder) {
SellerOrderGoods sellerOrderGoods = new SellerOrderGoods();
SellerOrderGoods sellerOrderGoods = sellerOrderGoodsMapper.selectByPrimaryKey(orderBuilder.getSkup());
sellerOrderGoods.setId(orderBuilder.getSkup());
sellerOrderGoods.setStatus(SkupStatus.SELL_OUT.getCode());
sellerOrderGoodsMapper.updateByPrimaryKeySelective(sellerOrderGoods);
... ...