充值记录

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("privateKey", merchantConfig.getPrivateKey());
map.put("type", "CFR"); map.put("type", "CFR");
map.put("orderId", cardFuelRecordDTO.getId().toString()); map.put("orderId", cardFuelRecordDTO.getId().toString());
map.put("storeId", nowAccountInfo.getStoreId().toString());
// 调用支付接口 // 调用支付接口
try { try {
fyPayService.pay(map); fyPayService.pay(map);
@ -483,12 +482,21 @@ public class CardFuelRecordServiceImpl implements CardFuelRecordService {
String refuelMoney = userBalance.getRefuelMoney(); String refuelMoney = userBalance.getRefuelMoney();
List<JSONObject> jsonObjectList = JSONArray.parseArray(refuelMoney, JSONObject.class); List<JSONObject> jsonObjectList = JSONArray.parseArray(refuelMoney, JSONObject.class);
for (JSONObject jsonObject : jsonObjectList) { 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"); }
String userBnlancce = jsonObjectList.toString();
//afterLitres = userBalance.getRefuelMoney() + cardFuleOrders.getIncomeLitres(); userBalance.setRefuelMoney(userBnlancce);
//userBalance.setCardBalance(afterBalance);
} }
userBalanceService.updateUserBalance(userBalance); userBalanceService.updateUserBalance(userBalance);
}else { }else {

View File

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

View File

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

View File

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

View File

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