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