Authored by chenchao

change place 4 erp method

... ... @@ -10,7 +10,9 @@ import com.yohoufo.common.ApiResponse;
import com.yohoufo.common.annotation.IgnoreSession;
import com.yohoufo.common.annotation.IgnoreSignature;
import com.yohoufo.common.exception.UfoServiceException;
import com.yohoufo.dal.order.model.SellerOrder;
import com.yohoufo.order.event.AuditFailedEvent;
import com.yohoufo.order.service.impl.SellerOrderService;
import com.yohoufo.order.service.seller.SellerOrderCancelService;
import com.yohoufo.order.service.impl.visitor.AuditCancelCase;
import com.yohoufo.order.service.seller.ImportPublishExcutor;
... ... @@ -21,6 +23,7 @@ import org.slf4j.Logger;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;
import org.springframework.web.bind.annotation.RestController;
/**
... ... @@ -41,6 +44,8 @@ public class ErpSellerGoodsController {
@Autowired
private SellerAddressService sellerAddressService;
@Autowired
private SellerOrderService sellerOrderService;
/**
* 批量导入skup
* @param req
... ... @@ -107,4 +112,27 @@ public class ErpSellerGoodsController {
return response.build();
}
}
/**
* 后台下架
* 在遥远的未来或者根本就没有未来
* 那就用"也许"来表达下,未来也许需要MQ方式
* @param sellerOrder
* @return
*/
@RequestMapping(value="/offShelveByErp")
@ResponseBody
@IgnoreSession
@IgnoreSignature
public ApiResponse offShelveByErp(@RequestBody SellerOrder sellerOrder) {
logger.info("in ufo.sellerOrder.cancel, sellerOrder {}", sellerOrder);
boolean result = sellerOrderService.offShelveByErp(sellerOrder.getSkup()) ;
String msg = "后台下架成功";
if(!result){
msg = "后台下架失败";
return new ApiResponse.ApiResponseBuilder().data(result).code(400).message(msg).build();
}
return new ApiResponse.ApiResponseBuilder().data(result).code(200).message(msg).build();
}
}
... ...
... ... @@ -199,28 +199,7 @@ public class SellerOrderController {
return new ApiResponse.ApiResponseBuilder().data(result).code(200).message(msg).build();
}
/**
* 后台下架
* 在遥远的未来或者根本就没有未来
* 那就用"也许"来表达下,未来也许需要MQ方式
* @param sellerOrder
* @return
*/
@RequestMapping(value="/erp/offShelveByErp")
@ResponseBody
@IgnoreSession
@IgnoreSignature
public ApiResponse offShelveByErp(@RequestBody SellerOrder sellerOrder) {
logger.info("in ufo.sellerOrder.cancel, sellerOrder {}", sellerOrder);
boolean result = sellerOrderService.offShelveByErp(sellerOrder.getSkup()) ;
String msg = "后台下架成功";
if(!result){
msg = "后台下架失败";
return new ApiResponse.ApiResponseBuilder().data(result).code(400).message(msg).build();
}
return new ApiResponse.ApiResponseBuilder().data(result).code(200).message(msg).build();
}
... ...