Authored by chenchao

Merge branch 'dev_普通卖家变价' into test6.8.9

... ... @@ -13,6 +13,7 @@ import com.yohoufo.order.model.request.SellerGoodsListRequest;
import com.yohoufo.order.model.response.OrderSubmitResp;
import com.yohoufo.order.service.impl.SellerOrderService;
import com.yohoufo.order.service.impl.SkupListService;
import com.yohoufo.order.service.seller.changePrice.NotEntrySellerChangePriceService;
import com.yohoufo.order.utils.LoggerUtils;
import org.slf4j.Logger;
import org.springframework.beans.factory.annotation.Autowired;
... ... @@ -37,6 +38,9 @@ public class SellerGoodsController {
@Autowired
private SellerOrderService sellerOrderService;
@Autowired
private NotEntrySellerChangePriceService notEntrySellerChangePriceService;
@RequestMapping(params = "method=ufo.seller.entryPrdList")
@ResponseBody
public ApiResponse getEntryGoodsList(@RequestParam("type") int type,
... ... @@ -122,7 +126,7 @@ public class SellerGoodsController {
.price(price).build();
logger.info("in ufo.notEntrySeller.computeChangePricece, req {}", req);
try {
SoldPrdComputeBo computeBo = sellerOrderService.computeChangePrice4NES(req);
SoldPrdComputeBo computeBo = notEntrySellerChangePriceService.computeChangePrice(req);
return new ApiResponse.ApiResponseBuilder().code(200).data(computeBo).message("算费成功").build();
} catch (Exception ex) {
logger.error("exception happened in ufo.notEntrySeller.computeChangePrice, req {}", req, ex);
... ... @@ -140,7 +144,7 @@ public class SellerGoodsController {
.uid(uid).skup(skup).price(price).build();
logger.info("in ufo.notEntrySeller.changePrice, req {}", req);
try {
OrderSubmitResp result = sellerOrderService.changePrice4NES(req);
OrderSubmitResp result = notEntrySellerChangePriceService.changePrice(req);
return new ApiResponse.ApiResponseBuilder()
.data(result).code(200)
.message(result.getTips()).build();
... ...
... ... @@ -167,8 +167,7 @@ public class SellerOrderService implements IOrderListService, IOrderDetailServic
@Autowired
private SellerBatchCancelPrepareProcessor sellerBatchCancelPrepareProcessor;
@Autowired
private NESChangePricePrepareProcessor nesChangePricePrepareProcessor;
private static final int MAX_DEAL = 10;
... ... @@ -915,24 +914,6 @@ public class SellerOrderService implements IOrderListService, IOrderDetailServic
/**
* compute Change Price4 NES(Not Entry Seller)
* @param req
* @return
*/
public SoldPrdComputeBo computeChangePrice4NES(NESChangePriceReq req){
log.info("in computeChangePrice4NES, req {}", req);
ChangePricePrepareDTO cppDto = nesChangePricePrepareProcessor.checkAndAcquire(req);
SoldPrdComputeBo computeBo = SellerOrderConvertor.computeResult2SoldPrdComputeBo(cppDto.getComputeResult());
return computeBo;
}
/**
* change Price 4 Not Entry Seller
* @param req
* @return
*/
public OrderSubmitResp changePrice4NES(NESChangePriceReq req){
return null;
}
}
... ...
package com.yohoufo.order.service.seller.changePrice;
import com.yohobuy.ufo.model.order.bo.SoldPrdComputeBo;
import com.yohobuy.ufo.model.order.req.NESChangePriceReq;
import com.yohoufo.order.convert.SellerOrderConvertor;
import com.yohoufo.order.model.dto.ChangePricePrepareDTO;
import com.yohoufo.order.model.response.OrderSubmitResp;
import com.yohoufo.order.service.impl.processor.NESChangePricePrepareProcessor;
import com.yohoufo.order.utils.LoggerUtils;
import org.slf4j.Logger;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
/**
* Created by chao.chen on 2019/3/21.
*/
@Service
public class NotEntrySellerChangePriceService {
private final Logger logger = LoggerUtils.getSellerOrderLogger();
@Autowired
private NESChangePricePrepareProcessor nesChangePricePrepareProcessor;
/**
* compute Change Price4 NES(Not Entry Seller)
* @param req
* @return
*/
public SoldPrdComputeBo computeChangePrice(NESChangePriceReq req){
logger.info("in computeChangePrice4NES, req {}", req);
ChangePricePrepareDTO cppDto = nesChangePricePrepareProcessor.checkAndAcquire(req);
SoldPrdComputeBo computeBo = SellerOrderConvertor.computeResult2SoldPrdComputeBo(cppDto.getComputeResult());
return computeBo;
}
/**
* change Price 4 Not Entry Seller
* @param req
* @return
*/
public OrderSubmitResp changePrice(NESChangePriceReq req){
//TODO
/*1. 屏蔽待变价skup
* 1.1 何时恢复
*
* 生成待支付订单,将订单号返回给客户端
*/
return null;
}
/**
*
*/
public void processAfterChangePriceOrderPaid(long orderCode){
//TODO
//1. 待支付订单 待上架商品
//2. 待变价skup进行下架
}
}
... ...