11.19
This commit is contained in:
parent
2e2a71c064
commit
3914945210
@ -15,5 +15,6 @@ public class CardFuelRecordDTO extends CardFuelRecord {
|
||||
private Integer cardFavorableId;
|
||||
//卡券领取记录id
|
||||
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.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));
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -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
|
||||
// */
|
||||
|
@ -532,6 +532,7 @@ public class CardValueRecordServiceImpl extends ServiceImpl<CardValueRecordMappe
|
||||
cardValueRecordDTO.setGiftBalance(Optional.of(selectCard.getGiftBalance().doubleValue()).orElse(0d));
|
||||
//赠送积分
|
||||
cardValueRecordDTO.setPoints(Optional.ofNullable(selectCard.getPoints()).orElse(0));
|
||||
cardValueRecordDTO.setCarType("0");
|
||||
//赠送优惠卷
|
||||
if (CollectionUtil.isNotEmpty(selectCard.getCardCouponList())){
|
||||
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.setPaymentType(selectCard.getPaymentType());
|
||||
cardFuelRecordDTO.setPayChannel(selectCard.getPayChannel());
|
||||
cardFuelRecordDTO.setCarType("1");
|
||||
if (ObjectUtils.isEmpty(selectCard.getChooseStaff()) || selectCard.getChooseStaff() == 0) {
|
||||
cardFuelRecordDTO.setMtStaffId(nowAccountInfo.getStaffId());
|
||||
cardFuelRecordDTO.setRealName(nowAccountInfo.getRealName());
|
||||
|
@ -556,6 +556,7 @@ import {userListByPhone} from "@/api/cashier/user";
|
||||
import {VueClipboard} from 'vue-clipboard2';
|
||||
import {getDicts} from "@/api/dict/data";
|
||||
import {
|
||||
getCheckTheStatusOfYourPaymentApi,
|
||||
getCheckTheStatusOfYourPaymentApis,
|
||||
rechargeCard
|
||||
} from "@/api/cashier/cardSet";
|
||||
@ -1041,15 +1042,47 @@ export default {
|
||||
this.payForm.seekZero = makeChange
|
||||
this.payForm.payChannel = 'cashier'
|
||||
let id;
|
||||
let carType;
|
||||
await rechargeCard(this.payForm).then(response => {
|
||||
if (response.data != null) {
|
||||
this.loading = true;
|
||||
id = response.data.id
|
||||
carType = response.data.carType
|
||||
}
|
||||
});
|
||||
let this_ = this
|
||||
console.log(this.payForm,1054)
|
||||
//
|
||||
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);
|
||||
}else if(carType==="1"){
|
||||
let timer = setInterval(async () => {
|
||||
let flag = false
|
||||
await getCheckTheStatusOfYourPaymentApis(id).then(async response => {
|
||||
@ -1078,6 +1111,8 @@ export default {
|
||||
})
|
||||
if (flag) await this_.cardValueReport()
|
||||
}, 1000);
|
||||
}
|
||||
|
||||
|
||||
let timer2 = setInterval(function () {
|
||||
if (!this_.isQuery || !this_.openConfirm) {
|
||||
|
Loading…
Reference in New Issue
Block a user