充值记录

This commit is contained in:
齐天大圣 2024-01-02 09:18:45 +08:00
parent 53a7cce4dc
commit 7154546662
5 changed files with 50 additions and 11 deletions

View File

@ -218,7 +218,6 @@ public class CardFuelRecordServiceImpl implements CardFuelRecordService {
map.put("privateKey", merchantConfig.getPrivateKey());
map.put("type", "CFR");
map.put("orderId", cardFuelRecordDTO.getId().toString());
map.put("storeId", nowAccountInfo.getStoreId().toString());
// 调用支付接口
try {
fyPayService.pay(map);
@ -483,12 +482,21 @@ public class CardFuelRecordServiceImpl implements CardFuelRecordService {
String refuelMoney = userBalance.getRefuelMoney();
List<JSONObject> jsonObjectList = JSONArray.parseArray(refuelMoney, JSONObject.class);
for (JSONObject jsonObject : jsonObjectList) {
if (cardFuleOrders.getOilType().equals(jsonObject.getString("oilType"))){
double refuelMoney1 = jsonObject.getDouble("refuelMoney");
refuelMoney1 = (cardFuleOrders.getIncomeLitres() + refuelMoney1);
jsonObject.put("refuelMoney", refuelMoney1).toString();
}else {
JSONObject jsonObject1 = new JSONObject();
jsonObject1.put("type",cardFuleOrders.getType());
jsonObject1.put("oilType",cardFuleOrders.getOilType());
jsonObject1.put("incomeLitres",cardFuleOrders.getIncomeLitres());
jsonObjectList.add(jsonObject1);
}
}
//String type = json.getString("type");
//afterLitres = userBalance.getRefuelMoney() + cardFuleOrders.getIncomeLitres();
//userBalance.setCardBalance(afterBalance);
String userBnlancce = jsonObjectList.toString();
userBalance.setRefuelMoney(userBnlancce);
}
userBalanceService.updateUserBalance(userBalance);
}else {

View File

@ -201,11 +201,17 @@
},
onLoad(option) {
this.title = option.name
console.log(option.name);
this.getData(option.name);
},
methods: {
goTopup() {
// pagesMy/invite/invite
if (this.title == '推荐有礼活动') {
uni.navigateTo({
url: '/pagesMy/invite/invite'
})
}
uni.navigateTo({
url: '/pagesHome/oilRecharge/oilRecharge'
})

View File

@ -43,8 +43,8 @@
<!-- 底部 -->
</view>
<view class="bottom-box" @click="addValueCarRecords()">
<view class="anniu">
<view class="bottom-box">
<view class="anniu" @click="addValueCarRecords()">
<text>立即充值</text>
</view>
<view class="dibu" @click="goRechargeRecords()">
@ -124,7 +124,7 @@
<view class="anniu" @click="exchangeGift()">
<text>立即兑换</text>
</view>
<view class="dibu" @click="goRechargeRecords()">
<view class="dibu" @click="golpk()">
<view class="">兑换记录</view>
<uni-icons type="right" color="#1678ff" size="14"></uni-icons>
</view>
@ -393,6 +393,12 @@
console.log("columns", this.columns);
})
},
golpk() {
uni.navigateTo({
url: '/pagesHome/RechargeRecords/RechargeRecords'
})
}
}
}

View File

@ -115,7 +115,6 @@
<script>
import config from '@/config'
import request from '../../utils/request'
import BigNumber from 'bignumber.js';
export default {

View File

@ -29,7 +29,8 @@
</view>
<view class="r-naniu">
<u-icon name="share-fill" color="#E9312F" size="18"></u-icon>
<text>分享给好友</text>
<button class="qiangzhi" open-type="share"><text>分享给好友</text></button>
</view>
</view>
@ -79,12 +80,25 @@
components: {
},
onShareAppMessage() {
return {
title: '来个油惠',
success() {
console.log('分享成功');
},
fail(err) {
console.error('分享失败', err);
}
};
},
onShow() {
this.getAllAmount();
this.getActiveRecommendRecords();
},
methods: {
getAllAmount() {
request({
url: 'business/marketingActivity/activeRecommendRecords/selectAllAmount',
@ -312,4 +326,10 @@
font-weight: 400;
color: #999999;
}
.qiangzhi {
background: transparent;
border: none;
box-shadow: 0px
}
</style>