From 8b2191df2f7d94aa299bd43dcbe97c94e5a61bbd Mon Sep 17 00:00:00 2001 From: admin <weikou2014> Date: 星期三, 20 十一月 2019 14:53:34 +0800 Subject: [PATCH] RocketMQ的消息整改 --- fanli/src/main/java/com/yeshi/fanli/service/impl/order/LostOrderServiceImpl.java | 22 ++++++++++++++++++---- 1 files changed, 18 insertions(+), 4 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 b01e542..15c4e98 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 @@ -13,14 +13,16 @@ import org.springframework.transaction.annotation.Transactional; import com.yeshi.fanli.dao.mybatis.order.LostOrderMapper; +import com.yeshi.fanli.dto.ChartTDO; import com.yeshi.fanli.entity.bus.user.HongBaoV2; 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.service.inter.order.msg.UserOrderMsgNotificationService; +import com.yeshi.fanli.service.inter.order.tb.TaoBaoPunishOrderService; import com.yeshi.fanli.util.Utils; @Service @@ -41,6 +43,9 @@ @Resource private UserOrderMsgNotificationService userOrderMsgNotificationService; + @Resource + private TaoBaoPunishOrderService taoBaoPunishOrderService; + @Transactional @Override public int addLostOrder(LostOrder lostOrder) { @@ -49,6 +54,14 @@ if (type == null) { // 榛樿涓烘窐瀹濊鍗� lostOrder.setType(1); type = 1; + } + + // 鏄惁澶勪簬杩濊璁㈠崟涓� + if (type == 1) { + int count = taoBaoPunishOrderService.countByTradeParentId(orderId); + if (count > 0) { + return -1001; + } } // 璁㈠崟鏄惁宸茬敵璇� @@ -291,7 +304,8 @@ * @return */ @Override - public List<LostOrder> listQuery(long start, int count, String key, Integer state, Integer handleType, Integer type) { + 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); } @@ -301,13 +315,13 @@ } @Override - public List<Map<String, Object>> countLostNum(Integer dateType, Integer resultCode, String year, String startTime, + public List<ChartTDO> countLostNum(Integer dateType, Integer resultCode, String year, String startTime, String endTime) throws Exception { return lostOrderMapper.countLostNum(dateType, resultCode, year, startTime, endTime); } @Override - public List<Map<String, Object>> countAppealMoney(Integer dateType, String year, String startTime, String endTime) + public List<ChartTDO> countAppealMoney(Integer dateType, String year, String startTime, String endTime) throws Exception { return lostOrderMapper.countAppealMoney(dateType, year, startTime, endTime); } -- Gitblit v1.8.0