11.19
This commit is contained in:
parent
2e2a71c064
commit
3914945210
@ -15,5 +15,6 @@ public class CardFuelRecordDTO extends CardFuelRecord {
|
|||||||
private Integer cardFavorableId;
|
private Integer cardFavorableId;
|
||||||
//卡券领取记录id
|
//卡券领取记录id
|
||||||
private Integer cardRecordId;
|
private Integer cardRecordId;
|
||||||
|
//0储存卡1囤油卡
|
||||||
|
private String carType;
|
||||||
}
|
}
|
||||||
|
@ -16,6 +16,7 @@ import com.fuint.common.dto.AccountInfo;
|
|||||||
import com.fuint.common.util.TokenUtil;
|
import com.fuint.common.util.TokenUtil;
|
||||||
import com.fuint.framework.web.BaseController;
|
import com.fuint.framework.web.BaseController;
|
||||||
import com.fuint.framework.web.ResponseObject;
|
import com.fuint.framework.web.ResponseObject;
|
||||||
|
import io.swagger.models.auth.In;
|
||||||
import org.apache.ibatis.annotations.Param;
|
import org.apache.ibatis.annotations.Param;
|
||||||
import org.springframework.web.bind.annotation.*;
|
import org.springframework.web.bind.annotation.*;
|
||||||
|
|
||||||
@ -242,5 +243,9 @@ public class CardValueRecordController extends BaseController {
|
|||||||
public ResponseObject getCardValueByCardValueId(@Param("cardValueConditionVo") CardValueConditionVo cardValueConditionVo){
|
public ResponseObject getCardValueByCardValueId(@Param("cardValueConditionVo") CardValueConditionVo cardValueConditionVo){
|
||||||
return getSuccessResult(cardValueRecordService.getCardValueByCardValueId(cardValueConditionVo));
|
return getSuccessResult(cardValueRecordService.getCardValueByCardValueId(cardValueConditionVo));
|
||||||
}
|
}
|
||||||
|
@GetMapping("/checkTheStatusOfYourPayments")
|
||||||
|
public ResponseObject checkTheStatusOfYourPayments(Integer id) throws Exception{
|
||||||
|
return getSuccessResult(cardValueRecordService.checkTheStatusOfYourPayments(id));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -31,6 +31,9 @@ public class CardValueRecordDTO extends CardValueRecord {
|
|||||||
@JsonFormat(pattern = "yyyy-MM-dd" , timezone = "GMT+8")
|
@JsonFormat(pattern = "yyyy-MM-dd" , timezone = "GMT+8")
|
||||||
private Date expireTime;
|
private Date expireTime;
|
||||||
|
|
||||||
|
//0储存卡1囤油卡
|
||||||
|
private String carType;
|
||||||
|
|
||||||
// /**
|
// /**
|
||||||
// * 会员id
|
// * 会员id
|
||||||
// */
|
// */
|
||||||
|
@ -532,6 +532,7 @@ public class CardValueRecordServiceImpl extends ServiceImpl<CardValueRecordMappe
|
|||||||
cardValueRecordDTO.setGiftBalance(Optional.of(selectCard.getGiftBalance().doubleValue()).orElse(0d));
|
cardValueRecordDTO.setGiftBalance(Optional.of(selectCard.getGiftBalance().doubleValue()).orElse(0d));
|
||||||
//赠送积分
|
//赠送积分
|
||||||
cardValueRecordDTO.setPoints(Optional.ofNullable(selectCard.getPoints()).orElse(0));
|
cardValueRecordDTO.setPoints(Optional.ofNullable(selectCard.getPoints()).orElse(0));
|
||||||
|
cardValueRecordDTO.setCarType("0");
|
||||||
//赠送优惠卷
|
//赠送优惠卷
|
||||||
if (CollectionUtil.isNotEmpty(selectCard.getCardCouponList())){
|
if (CollectionUtil.isNotEmpty(selectCard.getCardCouponList())){
|
||||||
cardValueRecordDTO.setCouponIds(selectCard.getCardCouponList().stream().map(CardCoupon::getId).collect(Collectors.toList()).toString());
|
cardValueRecordDTO.setCouponIds(selectCard.getCardCouponList().stream().map(CardCoupon::getId).collect(Collectors.toList()).toString());
|
||||||
@ -615,6 +616,7 @@ public class CardValueRecordServiceImpl extends ServiceImpl<CardValueRecordMappe
|
|||||||
cardFuelRecordDTO.setPoints(Optional.ofNullable(selectCard.getPoints()).orElse(0));
|
cardFuelRecordDTO.setPoints(Optional.ofNullable(selectCard.getPoints()).orElse(0));
|
||||||
cardFuelRecordDTO.setPaymentType(selectCard.getPaymentType());
|
cardFuelRecordDTO.setPaymentType(selectCard.getPaymentType());
|
||||||
cardFuelRecordDTO.setPayChannel(selectCard.getPayChannel());
|
cardFuelRecordDTO.setPayChannel(selectCard.getPayChannel());
|
||||||
|
cardFuelRecordDTO.setCarType("1");
|
||||||
if (ObjectUtils.isEmpty(selectCard.getChooseStaff()) || selectCard.getChooseStaff() == 0) {
|
if (ObjectUtils.isEmpty(selectCard.getChooseStaff()) || selectCard.getChooseStaff() == 0) {
|
||||||
cardFuelRecordDTO.setMtStaffId(nowAccountInfo.getStaffId());
|
cardFuelRecordDTO.setMtStaffId(nowAccountInfo.getStaffId());
|
||||||
cardFuelRecordDTO.setRealName(nowAccountInfo.getRealName());
|
cardFuelRecordDTO.setRealName(nowAccountInfo.getRealName());
|
||||||
|
@ -556,6 +556,7 @@ import {userListByPhone} from "@/api/cashier/user";
|
|||||||
import {VueClipboard} from 'vue-clipboard2';
|
import {VueClipboard} from 'vue-clipboard2';
|
||||||
import {getDicts} from "@/api/dict/data";
|
import {getDicts} from "@/api/dict/data";
|
||||||
import {
|
import {
|
||||||
|
getCheckTheStatusOfYourPaymentApi,
|
||||||
getCheckTheStatusOfYourPaymentApis,
|
getCheckTheStatusOfYourPaymentApis,
|
||||||
rechargeCard
|
rechargeCard
|
||||||
} from "@/api/cashier/cardSet";
|
} from "@/api/cashier/cardSet";
|
||||||
@ -1041,43 +1042,77 @@ export default {
|
|||||||
this.payForm.seekZero = makeChange
|
this.payForm.seekZero = makeChange
|
||||||
this.payForm.payChannel = 'cashier'
|
this.payForm.payChannel = 'cashier'
|
||||||
let id;
|
let id;
|
||||||
|
let carType;
|
||||||
await rechargeCard(this.payForm).then(response => {
|
await rechargeCard(this.payForm).then(response => {
|
||||||
if (response.data != null) {
|
if (response.data != null) {
|
||||||
this.loading = true;
|
this.loading = true;
|
||||||
id = response.data.id
|
id = response.data.id
|
||||||
|
carType = response.data.carType
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
let this_ = this
|
let this_ = this
|
||||||
console.log(this.payForm,1054)
|
console.log(this.payForm,1054)
|
||||||
//
|
//
|
||||||
let timer = setInterval(async () => {
|
if(carType==="0"){
|
||||||
let flag = false
|
let timer = setInterval(async () => {
|
||||||
await getCheckTheStatusOfYourPaymentApis(id).then(async response => {
|
let flag = false
|
||||||
if (response.data != null) {
|
await getCheckTheStatusOfYourPaymentApi(id).then(async response => {
|
||||||
const payStatus = response.data.payStatus
|
if (response.data != null) {
|
||||||
this_.orderNo=response.data.paymentNo
|
const payStatus = response.data.payStatus
|
||||||
if (payStatus === "unpaid") {
|
this_.orderNo=response.data.paymentNo
|
||||||
this_.isQuery = true;
|
if (payStatus === "unpaid") {
|
||||||
} else if (payStatus === "paid") {
|
this_.isQuery = true;
|
||||||
// 当支付成功时
|
} else if (payStatus === "paid") {
|
||||||
this_.isPaySuccess = true;
|
// 当支付成功时
|
||||||
this_.isQuery = false;
|
this_.isPaySuccess = true;
|
||||||
this_.rechargeBalCard = true
|
this_.isQuery = false;
|
||||||
// await this_.printLocally1()
|
this_.rechargeBalCard = true
|
||||||
flag = true
|
// await this_.printLocally1()
|
||||||
// await this_.cardValueReport()
|
flag = true
|
||||||
// await this_.getMemberAfter();
|
// await this_.cardValueReport()
|
||||||
clearInterval(timer);
|
// await this_.getMemberAfter();
|
||||||
} else if (payStatus === "payFail") {
|
clearInterval(timer);
|
||||||
this_.isPaySuccess = false;
|
} else if (payStatus === "payFail") {
|
||||||
this_.isQuery = false;
|
this_.isPaySuccess = false;
|
||||||
clearInterval(timer);
|
this_.isQuery = false;
|
||||||
|
clearInterval(timer);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
// await this_.getMemberAfter();
|
||||||
// await this_.getMemberAfter();
|
})
|
||||||
})
|
if (flag) await this_.cardValueReport()
|
||||||
if (flag) await this_.cardValueReport()
|
}, 1000);
|
||||||
}, 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 () {
|
let timer2 = setInterval(function () {
|
||||||
if (!this_.isQuery || !this_.openConfirm) {
|
if (!this_.isQuery || !this_.openConfirm) {
|
||||||
|
Loading…
Reference in New Issue
Block a user