Showing
5 changed files
with
26 additions
and
4 deletions
@@ -282,7 +282,12 @@ | @@ -282,7 +282,12 @@ | ||
282 | <update id="updateByOrderCode" parameterType="com.yohoufo.dal.order.model.BuyerOrder"> | 282 | <update id="updateByOrderCode" parameterType="com.yohoufo.dal.order.model.BuyerOrder"> |
283 | update buyer_order | 283 | update buyer_order |
284 | set | 284 | set |
285 | + <if test="status != null"> | ||
285 | status = #{status,jdbcType=INTEGER}, | 286 | status = #{status,jdbcType=INTEGER}, |
287 | + </if> | ||
288 | + <if test="payment != null"> | ||
289 | + payment = #{payment,jdbcType=INTEGER}, | ||
290 | + </if> | ||
286 | update_time = #{updateTime,jdbcType=INTEGER} | 291 | update_time = #{updateTime,jdbcType=INTEGER} |
287 | where uid = #{uid,jdbcType=INTEGER} | 292 | where uid = #{uid,jdbcType=INTEGER} |
288 | and order_code = #{orderCode,jdbcType=BIGINT} | 293 | and order_code = #{orderCode,jdbcType=BIGINT} |
@@ -41,6 +41,20 @@ | @@ -41,6 +41,20 @@ | ||
41 | </if> | 41 | </if> |
42 | </select> | 42 | </select> |
43 | 43 | ||
44 | + | ||
45 | + <select id="selectBySkup" parameterType="java.lang.Integer" resultMap="BaseResultMap"> | ||
46 | + select | ||
47 | + <include refid="Base_Column_List" /> | ||
48 | + from seller_order_goods | ||
49 | + where 1=1 | ||
50 | + <if test="list != null"> | ||
51 | + and id in | ||
52 | + <foreach item="item" index="index" collection="list" open="(" separator="," close=")"> | ||
53 | + #{item} | ||
54 | + </foreach> | ||
55 | + </if> | ||
56 | + </select> | ||
57 | + | ||
44 | <sql id="sql_where_4_select_UidStatusList"> | 58 | <sql id="sql_where_4_select_UidStatusList"> |
45 | uid = #{uid,jdbcType=INTEGER} | 59 | uid = #{uid,jdbcType=INTEGER} |
46 | <if test="statusList != null"> | 60 | <if test="statusList != null"> |
@@ -145,7 +145,7 @@ public class BuyerOrderPaymentService extends AbstractOrderPaymentService { | @@ -145,7 +145,7 @@ public class BuyerOrderPaymentService extends AbstractOrderPaymentService { | ||
145 | buyerOrder.setOrderCode(orderInfo.getOrderCode()); | 145 | buyerOrder.setOrderCode(orderInfo.getOrderCode()); |
146 | buyerOrder.setUid(orderInfo.getUid()); | 146 | buyerOrder.setUid(orderInfo.getUid()); |
147 | // 更新预支付方式 | 147 | // 更新预支付方式 |
148 | - buyerOrder.setPayment(orderInfo.getPayment()); | 148 | + buyerOrder.setPayment(payment); |
149 | buyerOrder.setUpdateTime(DateUtil.getCurrentTimeSecond()); | 149 | buyerOrder.setUpdateTime(DateUtil.getCurrentTimeSecond()); |
150 | buyerOrderMapper.updateByOrderCode(buyerOrder); | 150 | buyerOrderMapper.updateByOrderCode(buyerOrder); |
151 | 151 |
@@ -164,6 +164,7 @@ public class SubmitOrderServiceImpl implements ISubmitOrderService { | @@ -164,6 +164,7 @@ public class SubmitOrderServiceImpl implements ISubmitOrderService { | ||
164 | buyerOrder.setUpdateTime(now); | 164 | buyerOrder.setUpdateTime(now); |
165 | buyerOrder.setStatus(OrderStatus.WAITING_PAY.getCode()); | 165 | buyerOrder.setStatus(OrderStatus.WAITING_PAY.getCode()); |
166 | buyerOrder.setBuyerOrderStatus(DelStatus.NOT_DEL.getCode()); | 166 | buyerOrder.setBuyerOrderStatus(DelStatus.NOT_DEL.getCode()); |
167 | + buyerOrder.setSellerOrderStatus(DelStatus.NOT_DEL.getCode()); | ||
167 | buyerOrderMapper.insert(buyerOrder); | 168 | buyerOrderMapper.insert(buyerOrder); |
168 | } | 169 | } |
169 | 170 | ||
@@ -173,7 +174,9 @@ public class SubmitOrderServiceImpl implements ISubmitOrderService { | @@ -173,7 +174,9 @@ public class SubmitOrderServiceImpl implements ISubmitOrderService { | ||
173 | } | 174 | } |
174 | 175 | ||
175 | private SellerOrderGoods updSellerOrderGoods(OrderBuilder orderBuilder) { | 176 | private SellerOrderGoods updSellerOrderGoods(OrderBuilder orderBuilder) { |
176 | - SellerOrderGoods sellerOrderGoods = new SellerOrderGoods(); | 177 | + |
178 | + SellerOrderGoods sellerOrderGoods = sellerOrderGoodsMapper.selectByPrimaryKey(orderBuilder.getSkup()); | ||
179 | + | ||
177 | sellerOrderGoods.setId(orderBuilder.getSkup()); | 180 | sellerOrderGoods.setId(orderBuilder.getSkup()); |
178 | sellerOrderGoods.setStatus(SkupStatus.SELL_OUT.getCode()); | 181 | sellerOrderGoods.setStatus(SkupStatus.SELL_OUT.getCode()); |
179 | sellerOrderGoodsMapper.updateByPrimaryKeySelective(sellerOrderGoods); | 182 | sellerOrderGoodsMapper.updateByPrimaryKeySelective(sellerOrderGoods); |
-
Please register or login to post a comment