This commit is contained in:
齐天大圣 2024-03-13 16:59:43 +08:00
parent f16f8ff79a
commit 73e22aff6c

View File

@ -660,6 +660,7 @@ public class CardFuelRecordServiceImpl implements CardFuelRecordService {
cardFuelRecord.setOilType(cardFuleOrders.getOilType()+ cardFuleOrders.getOilName());
cardFuelRecord.setOilName(cardFuleOrders.getOilName());
cardFuelRecord.setExpireTime(cardFuleOrders.getExpireTime());
cardFuelRecord.setChainStoreId(cardFuleOrders.getChainStoreId());
cardFuelRecordMapper.insert(cardFuelRecord);
}
@ -672,10 +673,11 @@ public class CardFuelRecordServiceImpl implements CardFuelRecordService {
//余额
List<UserBalance> list = userBalanceService.list();
for (UserBalance userBalance : list) {
String refuelMoney = userBalance.getRefuelMoney();
Double cardBalance = userBalance.getCardBalance();
if (ObjectUtils.isNotEmpty(userBalance.getStoreId()) && ObjectUtils.isNotEmpty(refuelMoney)) {
UserBalance byIdsdsdsdsdsdsdsd = userBalanceService.getById(130);
//for (UserBalance userBalance : list) {
String refuelMoney = byIdsdsdsdsdsdsdsd.getRefuelMoney();
Double cardBalance = byIdsdsdsdsdsdsdsd.getCardBalance();
if (ObjectUtils.isNotEmpty(byIdsdsdsdsdsdsdsd.getChainStoreId()) && ObjectUtils.isNotEmpty(refuelMoney)) {
List<JSONObject> jsonObjectList = JSONArray.parseArray(refuelMoney, JSONObject.class);
for (JSONObject jsonObject : jsonObjectList) {
@ -684,8 +686,8 @@ public class CardFuelRecordServiceImpl implements CardFuelRecordService {
Integer refuelMoney1 = jsonObject.getInteger("refuelMoney");
if (ObjectUtils.isNotEmpty(oilType)) {
LambdaQueryWrapper<CardFuelRecord> queryWrapper = new LambdaQueryWrapper<>();
queryWrapper.eq(CardFuelRecord::getChainStoreId, userBalance.getChainStoreId())
.eq(CardFuelRecord::getMtUserId, userBalance.getMtUserId())
queryWrapper.eq(CardFuelRecord::getChainStoreId, byIdsdsdsdsdsdsdsd.getChainStoreId())
.eq(CardFuelRecord::getMtUserId, byIdsdsdsdsdsdsdsd.getMtUserId())
.eq(CardFuelRecord::getOilType, oilType)
.orderByAsc(CardFuelRecord::getCreateTime);
List<CardFuelRecord> cardFuelRecords = cardFuelRecordMapper.selectList(queryWrapper);
@ -710,9 +712,8 @@ public class CardFuelRecordServiceImpl implements CardFuelRecordService {
jsonObject1.put("refuelMoney", refuelMoney1-restOil);
jsonObjectList.add(jsonObject1);
String userBnlancce = jsonObjectList.toString();
userBalance.setRefuelMoney(userBnlancce);
userBalance.setCardBalance(cardBalance + restMoney);
}
byIdsdsdsdsdsdsdsd.setRefuelMoney(userBnlancce);
byIdsdsdsdsdsdsdsd.setCardBalance(cardBalance + restMoney);
}
}
}
@ -720,6 +721,7 @@ public class CardFuelRecordServiceImpl implements CardFuelRecordService {
}
}
}
// }
}
/**