|
@@ -7,13 +7,11 @@ import cn.hutool.json.JSONUtil;
|
|
import com.github.microservice.auth.client.content.ResultContent;
|
|
import com.github.microservice.auth.client.content.ResultContent;
|
|
import com.github.microservice.auth.client.content.ResultState;
|
|
import com.github.microservice.auth.client.content.ResultState;
|
|
import com.github.microservice.auth.security.helper.AuthHelper;
|
|
import com.github.microservice.auth.security.helper.AuthHelper;
|
|
-import com.zhongshu.payment.client.model.order.v2.ApplicantRefundParam2Model;
|
|
|
|
-import com.zhongshu.payment.client.model.order.v2.CreatOrderResultModel;
|
|
|
|
-import com.zhongshu.payment.client.model.order.v2.CreateOrder2Model;
|
|
|
|
-import com.zhongshu.payment.client.model.order.v2.GoodsResultModel;
|
|
|
|
|
|
+import com.zhongshu.payment.client.model.order.v2.*;
|
|
import com.zhongshu.payment.client.service.v2.OrderService2;
|
|
import com.zhongshu.payment.client.service.v2.OrderService2;
|
|
import com.zhongshu.payment.client.service.v2.PaymentService2;
|
|
import com.zhongshu.payment.client.service.v2.PaymentService2;
|
|
import com.zhongshu.payment.client.type.JobFlowMap;
|
|
import com.zhongshu.payment.client.type.JobFlowMap;
|
|
|
|
+import com.zhongshu.payment.client.type.OrderType;
|
|
import com.zhongshu.payment.client.type.TransferOwner;
|
|
import com.zhongshu.payment.client.type.TransferOwner;
|
|
import com.zhongshu.payment.client.type.TransferType;
|
|
import com.zhongshu.payment.client.type.TransferType;
|
|
import com.zswl.cloud.shop.client.dto.life.TripartiteShopDto;
|
|
import com.zswl.cloud.shop.client.dto.life.TripartiteShopDto;
|
|
@@ -190,8 +188,29 @@ public class DfyTicketServiceImpl implements DfyTicketService {
|
|
|
|
|
|
|
|
|
|
public ResultContent<OrderDetailResponse> orderDetail(OrderDetailRequest orderDetailRequest) {
|
|
public ResultContent<OrderDetailResponse> orderDetail(OrderDetailRequest orderDetailRequest) {
|
|
|
|
+ ResultContent<GoodsResultModel> goodsResultModelResultContent = orderService2.dfyTicktOrder(orderDetailRequest.getOrderId());
|
|
|
|
+ GoodsResultModel goodsResultModel = goodsResultModelResultContent.getContent();
|
|
OrderDetailResponse orderDetailResponse = ticketApi.orderDetail(orderDetailRequest);
|
|
OrderDetailResponse orderDetailResponse = ticketApi.orderDetail(orderDetailRequest);
|
|
if (orderDetailResponse.getSuccess()) {
|
|
if (orderDetailResponse.getSuccess()) {
|
|
|
|
+ String orderStatus = orderDetailResponse.getData().getOrderStatus();
|
|
|
|
+
|
|
|
|
+ switch (orderStatus) {
|
|
|
|
+ case "已取消":
|
|
|
|
+ UpdateOrder2Model updateOrder2Model = new UpdateOrder2Model();
|
|
|
|
+ updateOrder2Model.setOrderType(OrderType.CLOSE);
|
|
|
|
+ updateOrder2Model.setOrderNo(goodsResultModel.getOrderNo());
|
|
|
|
+ orderService2.updateOrderType(updateOrder2Model);
|
|
|
|
+ UpdateGoodsModel updateGoodsModel1 = new UpdateGoodsModel();
|
|
|
|
+ updateGoodsModel1.setGoodsState(OrderType.CLOSE);
|
|
|
|
+ orderService2.updateGoods(updateGoodsModel1);
|
|
|
|
+ break;
|
|
|
|
+ case "已完成":
|
|
|
|
+ UpdateGoodsModel updateGoodsModel = new UpdateGoodsModel();
|
|
|
|
+ updateGoodsModel.setGoodsState(OrderType.USED);
|
|
|
|
+ orderService2.updateGoods(updateGoodsModel);
|
|
|
|
+ break;
|
|
|
|
+
|
|
|
|
+ }
|
|
return ResultContent.buildContent(orderDetailResponse);
|
|
return ResultContent.buildContent(orderDetailResponse);
|
|
}
|
|
}
|
|
return ResultContent.build(ResultState.Fail, orderDetailResponse.getMsg());
|
|
return ResultContent.build(ResultState.Fail, orderDetailResponse.getMsg());
|