From 388be9f734f5b80c348bcc956726c206002e832a Mon Sep 17 00:00:00 2001 From: Administrator <Administrator@MS-20170306HGUF> Date: 星期日, 23 二月 2020 12:55:01 +0800 Subject: [PATCH] 保存bug --- fanli/src/main/java/com/yeshi/fanli/service/impl/order/LostOrderServiceImpl.java | 31 ++++++++++++++++++++++--------- 1 files changed, 22 insertions(+), 9 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..baa0a3b 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 @@ -1,5 +1,6 @@ package com.yeshi.fanli.service.impl.order; +import java.math.BigDecimal; import java.util.ArrayList; import java.util.Date; import java.util.List; @@ -16,11 +17,13 @@ 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.entity.system.ConfigKeyEnum; 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 +44,9 @@ @Resource private UserOrderMsgNotificationService userOrderMsgNotificationService; + @Resource + private TaoBaoPunishOrderService taoBaoPunishOrderService; + @Transactional @Override public int addLostOrder(LostOrder lostOrder) { @@ -49,6 +55,14 @@ if (type == null) { // 榛樿涓烘窐瀹濊鍗� lostOrder.setType(1); type = 1; + } + + // 鏄惁澶勪簬杩濊璁㈠崟涓� + if (type == 1) { + int count = taoBaoPunishOrderService.countByTradeParentId(orderId); + if (count > 0) { + return -1001; + } } // 璁㈠崟鏄惁宸茬敵璇� @@ -76,7 +90,7 @@ // 娆℃暟闄愬埗 long count = lostOrderMapper.countTodayAppeal(lostOrder.getUserInfo().getId()); - String countMax = configService.get("order_appeal_count_day"); + String countMax = configService.get(ConfigKeyEnum.orderAppealCountDay.getKey()); if (countMax != null && countMax.trim().length() > 0 && count >= Long.parseLong(countMax)) { return -7; } @@ -291,7 +305,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,15 +316,13 @@ } @Override - public List<Map<String, Object>> countLostNum(Integer dateType, Integer resultCode, String year, String startTime, - String endTime) throws Exception { - return lostOrderMapper.countLostNum(dateType, resultCode, year, startTime, endTime); + public Integer countLostOrderNum(String preDay) { + return lostOrderMapper.countLostOrderNum(preDay); } @Override - public List<Map<String, Object>> countAppealMoney(Integer dateType, String year, String startTime, String endTime) - throws Exception { - return lostOrderMapper.countAppealMoney(dateType, year, startTime, endTime); + public BigDecimal countAppealMoney(String preDay) { + return lostOrderMapper.countAppealMoney(preDay); } @Override -- Gitblit v1.8.0