From 73e22aff6c25a1c3c0efc7ea61184af28a9af34d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=BD=90=E5=A4=A9=E5=A4=A7=E5=9C=A3?= <17615834396@163.com> Date: Wed, 13 Mar 2024 16:59:43 +0800 Subject: [PATCH] bug --- .../impl/CardFuelRecordServiceImpl.java | 20 ++++++++++--------- 1 file changed, 11 insertions(+), 9 deletions(-) diff --git a/fuintBackend/fuint-application/src/main/java/com/fuint/business/marketingActivity/cardFule/service/impl/CardFuelRecordServiceImpl.java b/fuintBackend/fuint-application/src/main/java/com/fuint/business/marketingActivity/cardFule/service/impl/CardFuelRecordServiceImpl.java index a35fbc4d2..74e009da6 100644 --- a/fuintBackend/fuint-application/src/main/java/com/fuint/business/marketingActivity/cardFule/service/impl/CardFuelRecordServiceImpl.java +++ b/fuintBackend/fuint-application/src/main/java/com/fuint/business/marketingActivity/cardFule/service/impl/CardFuelRecordServiceImpl.java @@ -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 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 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 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 cardFuelRecords = cardFuelRecordMapper.selectList(queryWrapper); @@ -710,8 +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); } } } @@ -719,7 +721,7 @@ public class CardFuelRecordServiceImpl implements CardFuelRecordService { } } } - } + // } } /**