Authored by unknown

Merge branch 'master' into dev_order

@@ -120,6 +120,9 @@ @@ -120,6 +120,9 @@
120 <if test="dealUid != null" > 120 <if test="dealUid != null" >
121 deal_uid = #{dealUid,jdbcType=INTEGER}, 121 deal_uid = #{dealUid,jdbcType=INTEGER},
122 </if> 122 </if>
  123 + <if test="dealUserName != null" >
  124 + deal_user_name = #{dealUserName,jdbcType=VARCHAR},
  125 + </if>
123 <if test="dealStatus != null" > 126 <if test="dealStatus != null" >
124 deal_status = #{dealStatus,jdbcType=INTEGER}, 127 deal_status = #{dealStatus,jdbcType=INTEGER},
125 </if> 128 </if>
@@ -23,13 +23,13 @@ public final class SellerOrderConvertor { @@ -23,13 +23,13 @@ public final class SellerOrderConvertor {
23 BigDecimal income = computeResult.getIncome(); 23 BigDecimal income = computeResult.getIncome();
24 24
25 // 25 //
26 - String payPersent = computeResult.getServiceFeeRate() != null ? computeResult.getServiceFeeRate().getPayChannelPersent() : ""; 26 + String payPersent = computeResult.getServiceFeeRate() != null ? computeResult.getServiceFeeRate().getPayChannelPercent() : "";
27 PlatformFee platformFeeWrapper = PlatformFee.builder() 27 PlatformFee platformFeeWrapper = PlatformFee.builder()
28 .amount(buildSubtractFee(formatFee(platformFeeDto.getTotal()))) 28 .amount(buildSubtractFee(formatFee(platformFeeDto.getTotal())))
29 .appraiseFee(formatFee(platformFeeDto.getAppraiseFee())) 29 .appraiseFee(formatFee(platformFeeDto.getAppraiseFee()))
30 .packageFee(formatFee(platformFeeDto.getPackageFee())) 30 .packageFee(formatFee(platformFeeDto.getPackageFee()))
31 .serviceFee(formatFee(platformFeeDto.getServiceFee())) 31 .serviceFee(formatFee(platformFeeDto.getServiceFee()))
32 - .payChannelPersent(payPersent) 32 + .payChannelPercentage(payPersent)
33 .build(); 33 .build();
34 // 34 //
35 String incomeStr = formatFee(income); 35 String incomeStr = formatFee(income);
@@ -9,7 +9,7 @@ import java.math.BigDecimal; @@ -9,7 +9,7 @@ import java.math.BigDecimal;
9 */ 9 */
10 @Data 10 @Data
11 public class ServiceFeeRate { 11 public class ServiceFeeRate {
12 - public String getPayChannelPersent(){ 12 + public String getPayChannelPercent(){
13 BigDecimal rate = payChannelRate; 13 BigDecimal rate = payChannelRate;
14 return rate.multiply(new BigDecimal(100)).setScale(2, BigDecimal.ROUND_HALF_UP) + "%"; 14 return rate.multiply(new BigDecimal(100)).setScale(2, BigDecimal.ROUND_HALF_UP) + "%";
15 } 15 }
@@ -22,13 +22,11 @@ import com.yohoufo.order.constants.AlarmConfig; @@ -22,13 +22,11 @@ import com.yohoufo.order.constants.AlarmConfig;
22 import com.yohoufo.order.event.BillLogEvent; 22 import com.yohoufo.order.event.BillLogEvent;
23 import com.yohoufo.order.event.ErpCancelSellerOrderEvent; 23 import com.yohoufo.order.event.ErpCancelSellerOrderEvent;
24 import com.yohoufo.order.event.OrderCancelEvent; 24 import com.yohoufo.order.event.OrderCancelEvent;
25 -import com.yohoufo.order.model.AddressInfo;  
26 import com.yohoufo.order.model.PayRefundBo; 25 import com.yohoufo.order.model.PayRefundBo;
27 import com.yohoufo.order.model.request.PaymentRequest; 26 import com.yohoufo.order.model.request.PaymentRequest;
28 import com.yohoufo.order.model.request.TransferMoneyRequest; 27 import com.yohoufo.order.model.request.TransferMoneyRequest;
29 import com.yohoufo.order.mq.TopicConstants; 28 import com.yohoufo.order.mq.TopicConstants;
30 import com.yohoufo.order.mq.producer.TradeMqSender; 29 import com.yohoufo.order.mq.producer.TradeMqSender;
31 -import com.yohoufo.order.service.IPaymentService;  
32 import com.yohoufo.order.service.cache.CacheCleaner; 30 import com.yohoufo.order.service.cache.CacheCleaner;
33 import com.yohoufo.order.service.cache.CacheKeyBuilder; 31 import com.yohoufo.order.service.cache.CacheKeyBuilder;
34 import com.yohoufo.order.service.impl.visitor.AutoCancelCase; 32 import com.yohoufo.order.service.impl.visitor.AutoCancelCase;
@@ -39,7 +37,6 @@ import com.yohoufo.order.service.proxy.ProductProxyService; @@ -39,7 +37,6 @@ import com.yohoufo.order.service.proxy.ProductProxyService;
39 import com.yohoufo.order.service.support.codegenerator.OrderCodeGenerator; 37 import com.yohoufo.order.service.support.codegenerator.OrderCodeGenerator;
40 import com.yohoufo.order.service.support.codegenerator.bean.CodeMeta; 38 import com.yohoufo.order.service.support.codegenerator.bean.CodeMeta;
41 import com.yohoufo.order.utils.LoggerUtils; 39 import com.yohoufo.order.utils.LoggerUtils;
42 -import com.yohoufo.order.utils.SmsHelper;  
43 import lombok.experimental.Builder; 40 import lombok.experimental.Builder;
44 import org.slf4j.Logger; 41 import org.slf4j.Logger;
45 import org.springframework.beans.factory.annotation.Autowired; 42 import org.springframework.beans.factory.annotation.Autowired;
@@ -69,9 +66,6 @@ public class SellerOrderCancelService { @@ -69,9 +66,6 @@ public class SellerOrderCancelService {
69 private TradeMqSender tradeMqSender; 66 private TradeMqSender tradeMqSender;
70 67
71 @Autowired 68 @Autowired
72 - private IPaymentService paymentService;  
73 -  
74 - @Autowired  
75 private SellerOrderGoodsMapper sellerOrderGoodsMapper; 69 private SellerOrderGoodsMapper sellerOrderGoodsMapper;
76 70
77 @Autowired 71 @Autowired
@@ -83,7 +77,6 @@ public class SellerOrderCancelService { @@ -83,7 +77,6 @@ public class SellerOrderCancelService {
83 @Autowired 77 @Autowired
84 private OrderCodeGenerator orderCodeGenerator; 78 private OrderCodeGenerator orderCodeGenerator;
85 79
86 -  
87 @Autowired 80 @Autowired
88 private InBoxFacade inBoxFacade; 81 private InBoxFacade inBoxFacade;
89 82
@@ -91,7 +84,7 @@ public class SellerOrderCancelService { @@ -91,7 +84,7 @@ public class SellerOrderCancelService {
91 private TransferService transferService; 84 private TransferService transferService;
92 85
93 @Autowired 86 @Autowired
94 - private SellerAddressService sellerAddressService; 87 + private PayRefundService payRefundService;
95 88
96 /** 89 /**
97 * TODO 如何控制好并发,必须控制不能重复转账 退款 90 * TODO 如何控制好并发,必须控制不能重复转账 退款
@@ -247,10 +240,6 @@ public class SellerOrderCancelService { @@ -247,10 +240,6 @@ public class SellerOrderCancelService {
247 logger.warn("in seller cancel before Buy Action syncSkup fail, uid {}, skup {}", uid, skup, ex); 240 logger.warn("in seller cancel before Buy Action syncSkup fail, uid {}, skup {}", uid, skup, ex);
248 } 241 }
249 242
250 - //TODO 1. cache goods 2. async execute msg  
251 - SellerOrderGoods psog = sellerOrderGoodsMapper.selectByPrimaryKey(skup);  
252 - inBoxFacade.sellerPlaySelf(uid,psog.getProductName());  
253 -  
254 cacheCleaner.cleanList(uid, TabType.SELL.getValue()); 243 cacheCleaner.cleanList(uid, TabType.SELL.getValue());
255 cacheCleaner.cleanDetail(uid, orderCode, TabType.SELL); 244 cacheCleaner.cleanDetail(uid, orderCode, TabType.SELL);
256 } 245 }
@@ -288,6 +277,9 @@ public class SellerOrderCancelService { @@ -288,6 +277,9 @@ public class SellerOrderCancelService {
288 .sellerUid(sellerUid).orderCode(orderCode) 277 .sellerUid(sellerUid).orderCode(orderCode)
289 .payType(sellerOrder.getPayment()).refundCase(RefundCase.SELLER_EARNEST_MONEY) 278 .payType(sellerOrder.getPayment()).refundCase(RefundCase.SELLER_EARNEST_MONEY)
290 .skup(skup); 279 .skup(skup);
  280 + //TODO 1. cache goods 2. async execute msg
  281 + SellerOrderGoods psog = sellerOrderGoodsMapper.selectByPrimaryKey(skup);
  282 + inBoxFacade.sellerPlaySelf(sellerUid, psog.getProductName());
291 try { 283 try {
292 payRefundService.refund(refundReq, bleb); 284 payRefundService.refund(refundReq, bleb);
293 logger.info("in cancelAfterPayButNotBuyAction, refund earnestMoney finish, seller {}, order code {}, skup {}, earnestMoney {}", 285 logger.info("in cancelAfterPayButNotBuyAction, refund earnestMoney finish, seller {}, order code {}, skup {}, earnestMoney {}",
@@ -306,8 +298,7 @@ public class SellerOrderCancelService { @@ -306,8 +298,7 @@ public class SellerOrderCancelService {
306 return result; 298 return result;
307 } 299 }
308 300
309 - @Autowired  
310 - private PayRefundService payRefundService; 301 +
311 302
312 private int cancelAfterPayExistBuyAction(SellerOrder sellerOrder, BuyerOrder buyerOrder){ 303 private int cancelAfterPayExistBuyAction(SellerOrder sellerOrder, BuyerOrder buyerOrder){
313 /** 304 /**
@@ -142,7 +142,7 @@ public class SellerOrderListService extends AbsOrderListService implements IOrde @@ -142,7 +142,7 @@ public class SellerOrderListService extends AbsOrderListService implements IOrde
142 orderListInfo.setButtons(skupStatus.getListButtons()); 142 orderListInfo.setButtons(skupStatus.getListButtons());
143 143
144 // 当订单状态是待付款, 显示leftTime 144 // 当订单状态是待付款, 显示leftTime
145 - if (orderListInfo.getStatus() == SellerOrderStatus.WAITING_PAY.getCode()){ 145 + if (sellerOrderGoods.getStatus() == SkupStatus.CAN_NOT_SELL.getCode()){
146 orderListInfo.setLeftTime(calLeftTime(sellerOrder.getCreateTime())); 146 orderListInfo.setLeftTime(calLeftTime(sellerOrder.getCreateTime()));
147 } 147 }
148 orderListInfo.setSkup(sellerOrderGoods.getId()); 148 orderListInfo.setSkup(sellerOrderGoods.getId());
@@ -2,6 +2,7 @@ package com.yohoufo.resource.controller; @@ -2,6 +2,7 @@ package com.yohoufo.resource.controller;
2 2
3 import com.yoho.tools.docs.ApiOperation; 3 import com.yoho.tools.docs.ApiOperation;
4 import com.yohoufo.common.ApiResponse; 4 import com.yohoufo.common.ApiResponse;
  5 +import com.yohoufo.common.annotation.IgnoreSession;
5 import com.yohoufo.resource.service.IConfigTypeService; 6 import com.yohoufo.resource.service.IConfigTypeService;
6 import org.slf4j.Logger; 7 import org.slf4j.Logger;
7 import org.slf4j.LoggerFactory; 8 import org.slf4j.LoggerFactory;
@@ -27,6 +28,7 @@ public class ConfigTypeController { @@ -27,6 +28,7 @@ public class ConfigTypeController {
27 @ApiOperation(name = "ufo.resource.configTypeList", desc="获取配置列表") 28 @ApiOperation(name = "ufo.resource.configTypeList", desc="获取配置列表")
28 @RequestMapping(params = "method=ufo.resource.configTypeList") 29 @RequestMapping(params = "method=ufo.resource.configTypeList")
29 @ResponseBody 30 @ResponseBody
  31 + @IgnoreSession
30 public ApiResponse configTypeList() { 32 public ApiResponse configTypeList() {
31 logger.info("getConfigType begin."); 33 logger.info("getConfigType begin.");
32 Map<String,String> data = configTypeService.configTypeList(); 34 Map<String,String> data = configTypeService.configTypeList();