...
|
...
|
@@ -9,6 +9,9 @@ import com.yohoufo.order.model.response.OrderDetailInfo; |
|
|
import com.yohoufo.order.model.response.OrderListInfo;
|
|
|
import com.yohoufo.order.service.IBuyerOrderService;
|
|
|
import com.yohoufo.order.service.impl.SellerOrderService;
|
|
|
|
|
|
import org.slf4j.Logger;
|
|
|
import org.slf4j.LoggerFactory;
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
import org.springframework.web.bind.annotation.RequestMapping;
|
|
|
import org.springframework.web.bind.annotation.RequestParam;
|
...
|
...
|
@@ -19,7 +22,7 @@ import java.util.Objects; |
|
|
|
|
|
@RestController
|
|
|
public class BuyerOrderController {
|
|
|
|
|
|
private final Logger LOG = LoggerFactory.getLogger(BuyerOrderController.class);
|
|
|
|
|
|
@Autowired
|
|
|
IBuyerOrderService buyerOrderService;
|
...
|
...
|
@@ -119,12 +122,17 @@ public class BuyerOrderController { |
|
|
@ResponseBody
|
|
|
public ApiResponse cancel(@RequestParam("orderCode") long orderCode,
|
|
|
@RequestParam("uid") int uid) {
|
|
|
LOG.info("method ufo.buyer.cancel in, orderCode is {}, uid is {}", orderCode, uid);
|
|
|
|
|
|
|
|
|
OrderRequest orderRequest = OrderRequest.builder()
|
|
|
.uid(uid)
|
|
|
.orderCode(orderCode)
|
|
|
.build();
|
|
|
buyerOrderService.cancel(orderRequest);
|
|
|
|
|
|
LOG.info("method ufo.buyer.cancel out, orderCode is {}, uid is {}", orderCode, uid);
|
|
|
|
|
|
return new ApiResponse.ApiResponseBuilder().code(200).message("取消成功").build();
|
|
|
}
|
|
|
|
...
|
...
|
@@ -139,12 +147,16 @@ public class BuyerOrderController { |
|
|
@ResponseBody
|
|
|
public ApiResponse confirm(@RequestParam("orderCode") long orderCode,
|
|
|
@RequestParam("uid") int uid) {
|
|
|
LOG.info("method ufo.buyer.confirm in, orderCode is {}, uid is {}", orderCode, uid);
|
|
|
|
|
|
OrderRequest orderRequest = OrderRequest.builder()
|
|
|
.uid(uid)
|
|
|
.orderCode(orderCode)
|
|
|
.build();
|
|
|
buyerOrderService.confirm(orderRequest);
|
|
|
|
|
|
LOG.info("method ufo.buyer.confirm out, orderCode is {}, uid is {}", orderCode, uid);
|
|
|
|
|
|
return new ApiResponse.ApiResponseBuilder().code(200).message("确认收货成功").build();
|
|
|
}
|
|
|
} |
...
|
...
|
|