|
@@ -4,6 +4,7 @@ import cn.hutool.json.JSONObject;
|
|
|
import cn.hutool.json.JSONUtil;
|
|
|
import com.github.microservice.auth.client.content.ResultContent;
|
|
|
import com.github.microservice.auth.client.content.ResultState;
|
|
|
+import com.zhongshu.payment.client.model.order.v2.ApplicantRefundParam2Model;
|
|
|
import com.zhongshu.payment.client.model.order.v2.GoodsResultModel;
|
|
|
import com.zhongshu.payment.client.model.order.v2.UpdateGoodsModel;
|
|
|
import com.zhongshu.payment.client.model.order.v2.VerificationModel;
|
|
@@ -64,7 +65,6 @@ public class VideoDeliveryJob {
|
|
|
String account = String.valueOf(entries.get("account"));
|
|
|
|
|
|
|
|
|
-
|
|
|
// 调用三方充值
|
|
|
YqdCreateRequestModel createRequestModel = new YqdCreateRequestModel();
|
|
|
createRequestModel.setBuyCount(1);
|
|
@@ -77,13 +77,18 @@ public class VideoDeliveryJob {
|
|
|
log.info("视频会员响应结果:{}", yqdServiceImpl2.getContent());
|
|
|
if (!yqdServiceImpl2.getState().equals(ResultState.Success)) {
|
|
|
getResultContent().set(ResultContent.build(ResultState.Fail));
|
|
|
+ ApplicantRefundParam2Model applicantRefundParam2Model = new ApplicantRefundParam2Model();
|
|
|
+ applicantRefundParam2Model.setRemark("会员充值失败");
|
|
|
+ applicantRefundParam2Model.setUserId(goodsResultModel.getUserId());
|
|
|
+ applicantRefundParam2Model.setId(goodsResultModel.getId());
|
|
|
+ paymentService2.refund(applicantRefundParam2Model);
|
|
|
return RepeatStatus.FINISHED;
|
|
|
}
|
|
|
|
|
|
// 分账
|
|
|
ResultContent<SubOrdersConfirmResponseModel> subOrdersConfirmResponseModelResultContent = paymentService2.subOrdersConfirm(goodsResultModel.getId(), goodsResultModel.getShopId());
|
|
|
- if (!subOrdersConfirmResponseModelResultContent.getState().equals(ResultState.Success)){
|
|
|
- log.info("分账失败:{}",JSONUtil.toJsonStr(goodsResultModel));
|
|
|
+ if (!subOrdersConfirmResponseModelResultContent.getState().equals(ResultState.Success)) {
|
|
|
+ log.info("分账失败:{}", JSONUtil.toJsonStr(goodsResultModel));
|
|
|
getResultContent().set(ResultContent.build(ResultState.Fail));
|
|
|
return RepeatStatus.FINISHED;
|
|
|
}
|
|
@@ -100,7 +105,7 @@ public class VideoDeliveryJob {
|
|
|
verificationModel.setGoodsName(String.valueOf(goodsName));
|
|
|
|
|
|
|
|
|
- JSONObject entries1 =goodsResultModel.getExtend();
|
|
|
+ JSONObject entries1 = goodsResultModel.getExtend();
|
|
|
entries1.set("create", yqdServiceImpl2.getContent());
|
|
|
|
|
|
UpdateGoodsModel updateGoodsModel = new UpdateGoodsModel();
|