bug
This commit is contained in:
parent
8e893ae4d4
commit
cadb4ce475
@ -27,4 +27,10 @@ public class PaymentActiveVO implements Serializable {
|
||||
private BigDecimal cardFavorableAmount;
|
||||
//等级会员优惠金额
|
||||
private BigDecimal memberFavorableAmount;
|
||||
//订单金额
|
||||
private BigDecimal orderAmount;
|
||||
//可用油品Id
|
||||
private Integer oilId;
|
||||
//会员等级
|
||||
private Integer mtUserLevel;
|
||||
}
|
||||
|
@ -8,6 +8,8 @@ import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import com.fuint.business.marketingActivity.activeDiscountRecords.entity.ActiveDiscountRecords;
|
||||
import com.fuint.business.marketingActivity.activeDiscountRecords.mapper.ActiveDiscountRecordsMapper;
|
||||
import com.fuint.business.marketingActivity.activeDiscountRecords.service.ActiveDiscountRecordsService;
|
||||
import com.fuint.business.marketingActivity.activeExchange.dto.PaymentActiveDTO;
|
||||
import com.fuint.business.marketingActivity.activeExchange.service.ActiveExchangeService;
|
||||
import com.fuint.business.marketingActivity.activeExchange.vo.PaymentActiveVO;
|
||||
import com.fuint.business.marketingActivity.activeFullminusRecords.entity.ActiveFullminusRecords;
|
||||
import com.fuint.business.marketingActivity.activeFullminusRecords.mapper.ActiveFullminusRecordsMapper;
|
||||
@ -27,6 +29,7 @@ import com.fuint.common.dto.AccountInfo;
|
||||
import com.fuint.common.util.TokenUtil;
|
||||
import org.apache.commons.lang3.ObjectUtils;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import org.springframework.context.annotation.Lazy;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
|
||||
@ -57,6 +60,9 @@ public class CardFavorableRecordServiceImpl extends ServiceImpl<CardFavorableRec
|
||||
private ActiveFullminusRecordsService activeFullminusRecordsService;
|
||||
@Resource
|
||||
private ActiveDiscountRecordsService activeDiscountRecordsService;
|
||||
@Resource
|
||||
@Lazy
|
||||
private ActiveExchangeService activeExchangeService;
|
||||
/**
|
||||
* 分页查询所有数据
|
||||
* @param page
|
||||
@ -264,6 +270,13 @@ public class CardFavorableRecordServiceImpl extends ServiceImpl<CardFavorableRec
|
||||
activeDiscountRecords.setStoreId(paymentActiveVO.getStoreId());
|
||||
flag = activeDiscountRecordsService.save(activeDiscountRecords);
|
||||
}
|
||||
PaymentActiveDTO paymentActiveDTO = new PaymentActiveDTO();
|
||||
paymentActiveDTO.setUserId(userId);
|
||||
paymentActiveDTO.setAmount(paymentActiveVO.getOrderAmount());
|
||||
paymentActiveDTO.setStoreId(paymentActiveVO.getStoreId());
|
||||
paymentActiveDTO.setOilId(paymentActiveVO.getOilId());
|
||||
paymentActiveDTO.setMtUserLevel(paymentActiveVO.getMtUserLevel());
|
||||
activeExchangeService.activeConsumption(paymentActiveDTO);
|
||||
return flag;
|
||||
}
|
||||
}
|
||||
|
@ -42,6 +42,36 @@
|
||||
uni.setStorageSync("appltType","ALIPAY")
|
||||
console.log("支付宝")
|
||||
my.canIUse('button.open-type.getAuthorize')
|
||||
//获取关联普通二维码的码值,放到全局变量qrCode中
|
||||
if (e.query && e.query.qrCode) {
|
||||
console.log(JSON.stringify(e)+"1.0")
|
||||
let q = e.query.qrCode;
|
||||
if (e.query.qrCode) {
|
||||
let str = q.split("?")[1];
|
||||
let storeId = "";
|
||||
|
||||
let staffId = "";
|
||||
if (str.includes("&")){
|
||||
let arr = str.split("&");
|
||||
arr.forEach(item => {
|
||||
if (item.includes("storeId")) {
|
||||
storeId = item.split("=")[1]
|
||||
}else {
|
||||
staffId = item.split("=")[1]
|
||||
}
|
||||
})
|
||||
}else{
|
||||
if (str.includes("storeId")) {
|
||||
storeId = str.split("=")[1]
|
||||
}
|
||||
}
|
||||
uni.setStorageSync("storeId", storeId)
|
||||
uni.setStorageSync("inviteStaffId", staffId)
|
||||
uni.showLoading({
|
||||
title:uni.getStorageSync("storeId") + "staffId" + uni.getStorageSync("inviteStaffId")
|
||||
})
|
||||
}
|
||||
}
|
||||
// #endif
|
||||
},
|
||||
onShow: function() {
|
||||
|
@ -175,33 +175,40 @@
|
||||
tabbar
|
||||
},
|
||||
onLoad(query) {
|
||||
const q = decodeURIComponent(query.q) // 获取到二维码原始链接内容
|
||||
if (query.q) {
|
||||
let str = q.split("?")[1];
|
||||
let storeId = "19";
|
||||
|
||||
let staffId = "";
|
||||
if (str.includes("&")){
|
||||
let arr = str.split("&");
|
||||
arr.forEach(item => {
|
||||
if (item.includes("storeId")) {
|
||||
storeId = item.split("=")[1]
|
||||
} else {
|
||||
staffId = item.split("=")[1]
|
||||
}
|
||||
})
|
||||
}else{
|
||||
storeId = str.split("=")[1]
|
||||
if (uni.getStorageSync("appltType") == "WECHAT"){
|
||||
const q = decodeURIComponent(query.q) // 获取到二维码原始链接内容
|
||||
if (query.q) {
|
||||
let str = q.split("?")[1];
|
||||
let storeId = "19";
|
||||
|
||||
let staffId = "";
|
||||
if (str.includes("&")){
|
||||
let arr = str.split("&");
|
||||
arr.forEach(item => {
|
||||
if (item.includes("storeId")) {
|
||||
storeId = item.split("=")[1]
|
||||
} else {
|
||||
staffId = item.split("=")[1]
|
||||
}
|
||||
})
|
||||
}else{
|
||||
storeId = str.split("=")[1]
|
||||
}
|
||||
uni.setStorageSync("storeId", storeId)
|
||||
uni.setStorageSync("inviteStaffId", staffId)
|
||||
this.storeId = uni.getStorageSync("storeId")
|
||||
this.staffId = uni.getStorageSync("inviteStaffId")
|
||||
this.getStore(uni.getStorageSync("storeId"));
|
||||
}
|
||||
}else{
|
||||
if (uni.getStorageSync("storeId")){
|
||||
this.getStore(uni.getStorageSync("storeId"));
|
||||
}
|
||||
|
||||
|
||||
uni.setStorageSync("storeId", storeId)
|
||||
uni.setStorageSync("inviteStaffId", staffId)
|
||||
this.storeId = uni.getStorageSync("storeId")
|
||||
this.staffId = uni.getStorageSync("inviteStaffId")
|
||||
this.getStore(uni.getStorageSync("storeId"));
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
},
|
||||
onShow() {
|
||||
// this.isExistStoreId();
|
||||
@ -333,7 +340,22 @@
|
||||
// 跳转订单详情页,并支付
|
||||
getSIndex(index,id) {
|
||||
this.sindex = index
|
||||
this.toPayment(id)
|
||||
// 校验油罐内油量是否足够
|
||||
request({
|
||||
url: "business/petrolStationManagement/oilTank/" + uni.getStorageSync('tankId'),
|
||||
method: 'get',
|
||||
}).then((res)=>{
|
||||
if (res.data.storedQuantity-this.liters<0){
|
||||
uni.showToast({
|
||||
title:"所加油的升数大于油罐内的升数,请重新选择加油升数",
|
||||
icon:"none"
|
||||
})
|
||||
return;
|
||||
}else {
|
||||
this.toPayment(id)
|
||||
}
|
||||
|
||||
})
|
||||
},
|
||||
toPayment(id){
|
||||
this.oilOrder.orderAmount = this.value
|
||||
|
@ -324,6 +324,9 @@
|
||||
}
|
||||
if(res.data.success == "ok"){
|
||||
_this.preferentialData.storeId = _this.oilOrder.storeId
|
||||
_this.preferentialData.orderAmount = _this.oilOrder.orderAmount
|
||||
_this.preferentialData.oilId = _this.oilOrder.oils
|
||||
_this.preferentialData.mtUserLevel = _this.user.gradeId
|
||||
request({
|
||||
url: "business/marketingActivity/cardFavorableRecord/updateCardAndActiveById",
|
||||
method: 'post',
|
||||
@ -361,6 +364,9 @@
|
||||
console.log('success');
|
||||
// 支付成功后调用修改使用后的优惠券情况
|
||||
_this.preferentialData.storeId = _this.oilOrder.storeId
|
||||
_this.preferentialData.orderAmount = _this.oilOrder.orderAmount
|
||||
_this.preferentialData.oilId = _this.oilOrder.oils
|
||||
_this.preferentialData.mtUserLevel = _this.user.gradeId
|
||||
request({
|
||||
url: "business/marketingActivity/cardFavorableRecord/updateCardAndActiveById",
|
||||
method: 'post',
|
||||
@ -393,6 +399,9 @@
|
||||
console.log("支付成功")
|
||||
// 支付成功后调用修改使用后的优惠券情况
|
||||
_this.preferentialData.storeId = _this.oilOrder.storeId
|
||||
_this.preferentialData.orderAmount = _this.oilOrder.orderAmount
|
||||
_this.preferentialData.oilId = _this.oilOrder.oils
|
||||
_this.preferentialData.mtUserLevel = _this.user.gradeId
|
||||
request({
|
||||
url: "business/marketingActivity/cardFavorableRecord/updateCardAndActiveById",
|
||||
method: 'post',
|
||||
|
Loading…
Reference in New Issue
Block a user