Authored by unknown

Merge branch 'master' into dev_order

... ... @@ -120,6 +120,9 @@
<if test="dealUid != null" >
deal_uid = #{dealUid,jdbcType=INTEGER},
</if>
<if test="dealUserName != null" >
deal_user_name = #{dealUserName,jdbcType=VARCHAR},
</if>
<if test="dealStatus != null" >
deal_status = #{dealStatus,jdbcType=INTEGER},
</if>
... ...
... ... @@ -23,13 +23,13 @@ public final class SellerOrderConvertor {
BigDecimal income = computeResult.getIncome();
//
String payPersent = computeResult.getServiceFeeRate() != null ? computeResult.getServiceFeeRate().getPayChannelPersent() : "";
String payPersent = computeResult.getServiceFeeRate() != null ? computeResult.getServiceFeeRate().getPayChannelPercent() : "";
PlatformFee platformFeeWrapper = PlatformFee.builder()
.amount(buildSubtractFee(formatFee(platformFeeDto.getTotal())))
.appraiseFee(formatFee(platformFeeDto.getAppraiseFee()))
.packageFee(formatFee(platformFeeDto.getPackageFee()))
.serviceFee(formatFee(platformFeeDto.getServiceFee()))
.payChannelPersent(payPersent)
.payChannelPercentage(payPersent)
.build();
//
String incomeStr = formatFee(income);
... ...
... ... @@ -9,7 +9,7 @@ import java.math.BigDecimal;
*/
@Data
public class ServiceFeeRate {
public String getPayChannelPersent(){
public String getPayChannelPercent(){
BigDecimal rate = payChannelRate;
return rate.multiply(new BigDecimal(100)).setScale(2, BigDecimal.ROUND_HALF_UP) + "%";
}
... ...
... ... @@ -22,13 +22,11 @@ import com.yohoufo.order.constants.AlarmConfig;
import com.yohoufo.order.event.BillLogEvent;
import com.yohoufo.order.event.ErpCancelSellerOrderEvent;
import com.yohoufo.order.event.OrderCancelEvent;
import com.yohoufo.order.model.AddressInfo;
import com.yohoufo.order.model.PayRefundBo;
import com.yohoufo.order.model.request.PaymentRequest;
import com.yohoufo.order.model.request.TransferMoneyRequest;
import com.yohoufo.order.mq.TopicConstants;
import com.yohoufo.order.mq.producer.TradeMqSender;
import com.yohoufo.order.service.IPaymentService;
import com.yohoufo.order.service.cache.CacheCleaner;
import com.yohoufo.order.service.cache.CacheKeyBuilder;
import com.yohoufo.order.service.impl.visitor.AutoCancelCase;
... ... @@ -39,7 +37,6 @@ import com.yohoufo.order.service.proxy.ProductProxyService;
import com.yohoufo.order.service.support.codegenerator.OrderCodeGenerator;
import com.yohoufo.order.service.support.codegenerator.bean.CodeMeta;
import com.yohoufo.order.utils.LoggerUtils;
import com.yohoufo.order.utils.SmsHelper;
import lombok.experimental.Builder;
import org.slf4j.Logger;
import org.springframework.beans.factory.annotation.Autowired;
... ... @@ -69,9 +66,6 @@ public class SellerOrderCancelService {
private TradeMqSender tradeMqSender;
@Autowired
private IPaymentService paymentService;
@Autowired
private SellerOrderGoodsMapper sellerOrderGoodsMapper;
@Autowired
... ... @@ -83,7 +77,6 @@ public class SellerOrderCancelService {
@Autowired
private OrderCodeGenerator orderCodeGenerator;
@Autowired
private InBoxFacade inBoxFacade;
... ... @@ -91,7 +84,7 @@ public class SellerOrderCancelService {
private TransferService transferService;
@Autowired
private SellerAddressService sellerAddressService;
private PayRefundService payRefundService;
/**
* TODO 如何控制好并发,必须控制不能重复转账 退款
... ... @@ -247,10 +240,6 @@ public class SellerOrderCancelService {
logger.warn("in seller cancel before Buy Action syncSkup fail, uid {}, skup {}", uid, skup, ex);
}
//TODO 1. cache goods 2. async execute msg
SellerOrderGoods psog = sellerOrderGoodsMapper.selectByPrimaryKey(skup);
inBoxFacade.sellerPlaySelf(uid,psog.getProductName());
cacheCleaner.cleanList(uid, TabType.SELL.getValue());
cacheCleaner.cleanDetail(uid, orderCode, TabType.SELL);
}
... ... @@ -288,6 +277,9 @@ public class SellerOrderCancelService {
.sellerUid(sellerUid).orderCode(orderCode)
.payType(sellerOrder.getPayment()).refundCase(RefundCase.SELLER_EARNEST_MONEY)
.skup(skup);
//TODO 1. cache goods 2. async execute msg
SellerOrderGoods psog = sellerOrderGoodsMapper.selectByPrimaryKey(skup);
inBoxFacade.sellerPlaySelf(sellerUid, psog.getProductName());
try {
payRefundService.refund(refundReq, bleb);
logger.info("in cancelAfterPayButNotBuyAction, refund earnestMoney finish, seller {}, order code {}, skup {}, earnestMoney {}",
... ... @@ -306,8 +298,7 @@ public class SellerOrderCancelService {
return result;
}
@Autowired
private PayRefundService payRefundService;
private int cancelAfterPayExistBuyAction(SellerOrder sellerOrder, BuyerOrder buyerOrder){
/**
... ...
... ... @@ -142,7 +142,7 @@ public class SellerOrderListService extends AbsOrderListService implements IOrde
orderListInfo.setButtons(skupStatus.getListButtons());
// 当订单状态是待付款, 显示leftTime
if (orderListInfo.getStatus() == SellerOrderStatus.WAITING_PAY.getCode()){
if (sellerOrderGoods.getStatus() == SkupStatus.CAN_NOT_SELL.getCode()){
orderListInfo.setLeftTime(calLeftTime(sellerOrder.getCreateTime()));
}
orderListInfo.setSkup(sellerOrderGoods.getId());
... ...
... ... @@ -2,6 +2,7 @@ package com.yohoufo.resource.controller;
import com.yoho.tools.docs.ApiOperation;
import com.yohoufo.common.ApiResponse;
import com.yohoufo.common.annotation.IgnoreSession;
import com.yohoufo.resource.service.IConfigTypeService;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
... ... @@ -27,6 +28,7 @@ public class ConfigTypeController {
@ApiOperation(name = "ufo.resource.configTypeList", desc="获取配置列表")
@RequestMapping(params = "method=ufo.resource.configTypeList")
@ResponseBody
@IgnoreSession
public ApiResponse configTypeList() {
logger.info("getConfigType begin.");
Map<String,String> data = configTypeService.configTypeList();
... ...