From b9f8ef2c4737b6e6be4b12fc8f7bafb033bfcfe5 Mon Sep 17 00:00:00 2001 From: admin <2780501319@qq.com> Date: 星期日, 22 九月 2019 16:47:33 +0800 Subject: [PATCH] 金币BUG修改 --- fanli/src/main/java/com/yeshi/fanli/service/impl/order/LostOrderServiceImpl.java | 33 +++++++++++++++++++++++++-------- 1 files changed, 25 insertions(+), 8 deletions(-) diff --git a/fanli/src/main/java/com/yeshi/fanli/service/impl/order/LostOrderServiceImpl.java b/fanli/src/main/java/com/yeshi/fanli/service/impl/order/LostOrderServiceImpl.java index d2a9893..7847416 100644 --- a/fanli/src/main/java/com/yeshi/fanli/service/impl/order/LostOrderServiceImpl.java +++ b/fanli/src/main/java/com/yeshi/fanli/service/impl/order/LostOrderServiceImpl.java @@ -17,11 +17,11 @@ import com.yeshi.fanli.entity.bus.user.LostOrder; import com.yeshi.fanli.entity.bus.user.Order; import com.yeshi.fanli.service.inter.config.ConfigService; -import com.yeshi.fanli.service.inter.msg.UserOrderMsgNotificationService; import com.yeshi.fanli.service.inter.order.HongBaoOrderService; import com.yeshi.fanli.service.inter.order.LostOrderService; import com.yeshi.fanli.service.inter.order.OrderService; -import com.yeshi.fanli.util.Constant; +import com.yeshi.fanli.service.inter.order.msg.UserOrderMsgNotificationService; +import com.yeshi.fanli.service.inter.order.tb.TaoBaoPunishOrderService; import com.yeshi.fanli.util.Utils; @Service @@ -42,6 +42,9 @@ @Resource private UserOrderMsgNotificationService userOrderMsgNotificationService; + @Resource + private TaoBaoPunishOrderService taoBaoPunishOrderService; + @Transactional @Override public int addLostOrder(LostOrder lostOrder) { @@ -50,6 +53,14 @@ if (type == null) { // 榛樿涓烘窐瀹濊鍗� lostOrder.setType(1); type = 1; + } + + // 鏄惁澶勪簬杩濊璁㈠崟涓� + if (type == 1) { + int count = taoBaoPunishOrderService.countByTradeParentId(orderId); + if (count > 0) { + return -1001; + } } // 璁㈠崟鏄惁宸茬敵璇� @@ -72,7 +83,7 @@ } // 鏄惁涓哄垎浜禋璁㈠崟 - if (hongBaoOrderService.countByOrderNoAndHongBaoType(orderId, HongBaoV2.TYPE_SHARE_GOODS) > 0) + if (hongBaoOrderService.countByOrderNoAndHongBaoType(orderId, HongBaoV2.TYPE_SHARE_GOODS, type) > 0) return -5; // 娆℃暟闄愬埗 @@ -105,7 +116,7 @@ lostOrderwriteLock.unlock(); } - Order or = orderService.getSystemOrderByUid(Constant.TAOBAO, lostOrder.getUserInfo().getId()); + Order or = orderService.getSystemOrderByUid(type, lostOrder.getUserInfo().getId()); if (or != null) { boolean b = Utils.isUserOrder(or.getOrderId(), lostOrder.getOrderId()); if (b) { @@ -292,13 +303,14 @@ * @return */ @Override - public List<LostOrder> listQuery(long start, int count, String key, Integer state, Integer handleType) { - return lostOrderMapper.listQuery(start, count, key, state, handleType); + public List<LostOrder> listQuery(long start, int count, String key, Integer state, Integer handleType, + Integer type) { + return lostOrderMapper.listQuery(start, count, key, state, handleType, type); } @Override - public long countQuery(String key, Integer state, Integer handleType) { - return lostOrderMapper.countQuery(key, state, handleType); + public long countQuery(String key, Integer state, Integer handleType, Integer type) { + return lostOrderMapper.countQuery(key, state, handleType, type); } @Override @@ -318,4 +330,9 @@ return lostOrderMapper.listByStateAndResultCode(state, resultCode, (page - 1) * pageSize, pageSize); } + @Override + public void saveLostOrder(LostOrder lostOrder) { + lostOrderMapper.insertSelective(lostOrder); + } + } -- Gitblit v1.8.0