Showing
4 changed files
with
29 additions
and
1 deletions
@@ -40,6 +40,7 @@ | @@ -40,6 +40,7 @@ | ||
40 | <select id="selectCntByOrderType" resultType="java.lang.Integer"> | 40 | <select id="selectCntByOrderType" resultType="java.lang.Integer"> |
41 | select count(*) from appraise_order | 41 | select count(*) from appraise_order |
42 | where uid = #{uid,jdbcType=INTEGER} and attributes = #{attributes,jdbcType=INTEGER} | 42 | where uid = #{uid,jdbcType=INTEGER} and attributes = #{attributes,jdbcType=INTEGER} |
43 | + and is_del = 1 | ||
43 | and status in | 44 | and status in |
44 | <foreach collection="statusList" item="status" open="(" close=")" separator=","> | 45 | <foreach collection="statusList" item="status" open="(" close=")" separator=","> |
45 | #{status,jdbcType=TINYINT} | 46 | #{status,jdbcType=TINYINT} |
@@ -51,6 +52,7 @@ | @@ -51,6 +52,7 @@ | ||
51 | <include refid="Base_Column_List" /> | 52 | <include refid="Base_Column_List" /> |
52 | from appraise_order | 53 | from appraise_order |
53 | where uid = #{uid,jdbcType=INTEGER} and attributes = #{attributes,jdbcType=INTEGER} | 54 | where uid = #{uid,jdbcType=INTEGER} and attributes = #{attributes,jdbcType=INTEGER} |
55 | + and is_del = 1 | ||
54 | and status in | 56 | and status in |
55 | <foreach collection="statusList" item="status" open="(" close=")" separator=","> | 57 | <foreach collection="statusList" item="status" open="(" close=")" separator=","> |
56 | #{status,jdbcType=TINYINT} | 58 | #{status,jdbcType=TINYINT} |
@@ -234,5 +234,16 @@ public class SellerDepositOrderController { | @@ -234,5 +234,16 @@ public class SellerDepositOrderController { | ||
234 | } | 234 | } |
235 | 235 | ||
236 | 236 | ||
237 | + @RequestMapping(params = "method=ufo.depositOrder.delete") | ||
238 | + public ApiResponse deleteVisuable(@RequestParam(name = "uid")int uid, | ||
239 | + @RequestParam(name = "orderCode")long orderCode | ||
240 | + ){ | ||
237 | 241 | ||
242 | + logger.info("in method=ufo.depositOrder.addOrModifyAddress orderCode {} uid {}", orderCode, uid); | ||
243 | + sellerDepositOrderService.deleteVisuable(uid, orderCode); | ||
244 | + return new ApiResponse.ApiResponseBuilder() | ||
245 | + .code(200) | ||
246 | + .message("成功") | ||
247 | + .build(); | ||
248 | + } | ||
238 | } | 249 | } |
@@ -26,6 +26,7 @@ import com.yohoufo.dal.order.model.AppraiseOrderGoods; | @@ -26,6 +26,7 @@ import com.yohoufo.dal.order.model.AppraiseOrderGoods; | ||
26 | import com.yohoufo.dal.order.model.AppraiseOrderMeta; | 26 | import com.yohoufo.dal.order.model.AppraiseOrderMeta; |
27 | import com.yohoufo.dal.order.model.AppraiseOrderStorage; | 27 | import com.yohoufo.dal.order.model.AppraiseOrderStorage; |
28 | import com.yohoufo.order.common.ClientType; | 28 | import com.yohoufo.order.common.ClientType; |
29 | +import com.yohoufo.order.common.DelStatus; | ||
29 | import com.yohoufo.order.model.dto.SellerDepositOrderContext; | 30 | import com.yohoufo.order.model.dto.SellerDepositOrderContext; |
30 | import com.yohoufo.order.model.dto.SellerDepositSubOrderContext; | 31 | import com.yohoufo.order.model.dto.SellerDepositSubOrderContext; |
31 | import com.yohoufo.order.model.dto.SellerOrderComputeResult; | 32 | import com.yohoufo.order.model.dto.SellerOrderComputeResult; |
@@ -43,7 +44,6 @@ import org.springframework.stereotype.Service; | @@ -43,7 +44,6 @@ import org.springframework.stereotype.Service; | ||
43 | import java.math.BigDecimal; | 44 | import java.math.BigDecimal; |
44 | import java.util.List; | 45 | import java.util.List; |
45 | import java.util.Map; | 46 | import java.util.Map; |
46 | -import java.util.Objects; | ||
47 | 47 | ||
48 | @Service | 48 | @Service |
49 | public class SellerDepositOrderService extends AbsGoodsServiceOrderService implements IGoodsService { | 49 | public class SellerDepositOrderService extends AbsGoodsServiceOrderService implements IGoodsService { |
@@ -373,6 +373,15 @@ public class SellerDepositOrderService extends AbsGoodsServiceOrderService imple | @@ -373,6 +373,15 @@ public class SellerDepositOrderService extends AbsGoodsServiceOrderService imple | ||
373 | 373 | ||
374 | } | 374 | } |
375 | 375 | ||
376 | + public int deleteVisuable(int uid, long orderCode){ | ||
377 | + logger.info("in delete deposit order Visuable uid {} orderCode {}", uid, orderCode); | ||
378 | + AppraiseOrder condition = new AppraiseOrder(); | ||
379 | + condition.setOrderCode(orderCode); | ||
380 | + condition.setIsDel(DelStatus.IS_DEL.getCode()); | ||
381 | + int rows = appraiseOrderMapper.updateByOrderCode(condition); | ||
382 | + logger.info("in delete deposit order Visuable uid {} orderCode {} rows {}", uid, orderCode, rows); | ||
383 | + return rows; | ||
384 | + } | ||
376 | 385 | ||
377 | 386 | ||
378 | } | 387 | } |
@@ -55,6 +55,12 @@ public class QuickDeliverPublishProcessor implements PublishProcessor<QuickDeliv | @@ -55,6 +55,12 @@ public class QuickDeliverPublishProcessor implements PublishProcessor<QuickDeliv | ||
55 | .num(num=qdosr.getNum()) | 55 | .num(num=qdosr.getNum()) |
56 | .price(qdosr.getPrice()).skupType(qdosr.getSkupTypeCode()).build(); | 56 | .price(qdosr.getPrice()).skupType(qdosr.getSkupTypeCode()).build(); |
57 | PriceComputePrepareProcessor.PriceComputeNode icpNode = priceComputePrepareProcessor.checkAndAcquire(socr); | 57 | PriceComputePrepareProcessor.PriceComputeNode icpNode = priceComputePrepareProcessor.checkAndAcquire(socr); |
58 | + if (num>10){ | ||
59 | + logger.warn("in buildSellerOrderContext storageId num over limit , qdosr {}", qdosr); | ||
60 | + throw new UfoServiceException(400, "上架数目不能超过10个"); | ||
61 | + } | ||
62 | + | ||
63 | + | ||
58 | BigDecimal salePrice = icpNode.getSalePrice(); | 64 | BigDecimal salePrice = icpNode.getSalePrice(); |
59 | SkupType skupType = icpNode.getSkupType(); | 65 | SkupType skupType = icpNode.getSkupType(); |
60 | //step 1: rpc get product detail by storage id | 66 | //step 1: rpc get product detail by storage id |
-
Please register or login to post a comment