diff --git a/fuintBackend/fuint-application/src/main/java/com/fuint/business/marketingActivity/cardFule/dto/CardFuelRecordDTO.java b/fuintBackend/fuint-application/src/main/java/com/fuint/business/marketingActivity/cardFule/dto/CardFuelRecordDTO.java index a6374ba15..efa293d13 100644 --- a/fuintBackend/fuint-application/src/main/java/com/fuint/business/marketingActivity/cardFule/dto/CardFuelRecordDTO.java +++ b/fuintBackend/fuint-application/src/main/java/com/fuint/business/marketingActivity/cardFule/dto/CardFuelRecordDTO.java @@ -15,5 +15,6 @@ public class CardFuelRecordDTO extends CardFuelRecord { private Integer cardFavorableId; //卡券领取记录id private Integer cardRecordId; - + //0储存卡1囤油卡 + private String carType; } diff --git a/fuintBackend/fuint-application/src/main/java/com/fuint/business/marketingActivity/cardValue/controller/CardValueRecordController.java b/fuintBackend/fuint-application/src/main/java/com/fuint/business/marketingActivity/cardValue/controller/CardValueRecordController.java index e119fbefb..d5ca070bc 100644 --- a/fuintBackend/fuint-application/src/main/java/com/fuint/business/marketingActivity/cardValue/controller/CardValueRecordController.java +++ b/fuintBackend/fuint-application/src/main/java/com/fuint/business/marketingActivity/cardValue/controller/CardValueRecordController.java @@ -16,6 +16,7 @@ import com.fuint.common.dto.AccountInfo; import com.fuint.common.util.TokenUtil; import com.fuint.framework.web.BaseController; import com.fuint.framework.web.ResponseObject; +import io.swagger.models.auth.In; import org.apache.ibatis.annotations.Param; import org.springframework.web.bind.annotation.*; @@ -242,5 +243,9 @@ public class CardValueRecordController extends BaseController { public ResponseObject getCardValueByCardValueId(@Param("cardValueConditionVo") CardValueConditionVo cardValueConditionVo){ return getSuccessResult(cardValueRecordService.getCardValueByCardValueId(cardValueConditionVo)); } + @GetMapping("/checkTheStatusOfYourPayments") + public ResponseObject checkTheStatusOfYourPayments(Integer id) throws Exception{ + return getSuccessResult(cardValueRecordService.checkTheStatusOfYourPayments(id)); + } } diff --git a/fuintBackend/fuint-application/src/main/java/com/fuint/business/marketingActivity/cardValue/dto/CardValueRecordDTO.java b/fuintBackend/fuint-application/src/main/java/com/fuint/business/marketingActivity/cardValue/dto/CardValueRecordDTO.java index 8a7f1d902..3c6684351 100644 --- a/fuintBackend/fuint-application/src/main/java/com/fuint/business/marketingActivity/cardValue/dto/CardValueRecordDTO.java +++ b/fuintBackend/fuint-application/src/main/java/com/fuint/business/marketingActivity/cardValue/dto/CardValueRecordDTO.java @@ -31,6 +31,9 @@ public class CardValueRecordDTO extends CardValueRecord { @JsonFormat(pattern = "yyyy-MM-dd" , timezone = "GMT+8") private Date expireTime; + //0储存卡1囤油卡 + private String carType; + // /** // * 会员id // */ diff --git a/fuintBackend/fuint-application/src/main/java/com/fuint/business/marketingActivity/cardValue/service/impl/CardValueRecordServiceImpl.java b/fuintBackend/fuint-application/src/main/java/com/fuint/business/marketingActivity/cardValue/service/impl/CardValueRecordServiceImpl.java index 60474fe44..7a0685518 100644 --- a/fuintBackend/fuint-application/src/main/java/com/fuint/business/marketingActivity/cardValue/service/impl/CardValueRecordServiceImpl.java +++ b/fuintBackend/fuint-application/src/main/java/com/fuint/business/marketingActivity/cardValue/service/impl/CardValueRecordServiceImpl.java @@ -532,6 +532,7 @@ public class CardValueRecordServiceImpl extends ServiceImpl { if (response.data != null) { this.loading = true; id = response.data.id + carType = response.data.carType } }); let this_ = this console.log(this.payForm,1054) // - let timer = setInterval(async () => { - let flag = false - await getCheckTheStatusOfYourPaymentApis(id).then(async response => { - if (response.data != null) { - const payStatus = response.data.payStatus - this_.orderNo=response.data.paymentNo - if (payStatus === "unpaid") { - this_.isQuery = true; - } else if (payStatus === "paid") { - // 当支付成功时 - this_.isPaySuccess = true; - this_.isQuery = false; - this_.rechargeBalCard = true - // await this_.printLocally1() - flag = true - // await this_.cardValueReport() - // await this_.getMemberAfter(); - clearInterval(timer); - } else if (payStatus === "payFail") { - this_.isPaySuccess = false; - this_.isQuery = false; - clearInterval(timer); + if(carType==="0"){ + let timer = setInterval(async () => { + let flag = false + await getCheckTheStatusOfYourPaymentApi(id).then(async response => { + if (response.data != null) { + const payStatus = response.data.payStatus + this_.orderNo=response.data.paymentNo + if (payStatus === "unpaid") { + this_.isQuery = true; + } else if (payStatus === "paid") { + // 当支付成功时 + this_.isPaySuccess = true; + this_.isQuery = false; + this_.rechargeBalCard = true + // await this_.printLocally1() + flag = true + // await this_.cardValueReport() + // await this_.getMemberAfter(); + clearInterval(timer); + } else if (payStatus === "payFail") { + this_.isPaySuccess = false; + this_.isQuery = false; + clearInterval(timer); + } } - } - // await this_.getMemberAfter(); - }) - if (flag) await this_.cardValueReport() - }, 1000); + // await this_.getMemberAfter(); + }) + if (flag) await this_.cardValueReport() + }, 1000); + }else if(carType==="1"){ + let timer = setInterval(async () => { + let flag = false + await getCheckTheStatusOfYourPaymentApis(id).then(async response => { + if (response.data != null) { + const payStatus = response.data.payStatus + this_.orderNo=response.data.paymentNo + if (payStatus === "unpaid") { + this_.isQuery = true; + } else if (payStatus === "paid") { + // 当支付成功时 + this_.isPaySuccess = true; + this_.isQuery = false; + this_.rechargeBalCard = true + // await this_.printLocally1() + flag = true + // await this_.cardValueReport() + // await this_.getMemberAfter(); + clearInterval(timer); + } else if (payStatus === "payFail") { + this_.isPaySuccess = false; + this_.isQuery = false; + clearInterval(timer); + } + } + // await this_.getMemberAfter(); + }) + if (flag) await this_.cardValueReport() + }, 1000); + } + let timer2 = setInterval(function () { if (!this_.isQuery || !this_.openConfirm) {