diff --git a/ruoyi-system/src/main/java/com/ruoyi/business/service/impl/BusAgentInfoServiceImpl.java b/ruoyi-system/src/main/java/com/ruoyi/business/service/impl/BusAgentInfoServiceImpl.java index 0ac06d7..2d0ccc2 100644 --- a/ruoyi-system/src/main/java/com/ruoyi/business/service/impl/BusAgentInfoServiceImpl.java +++ b/ruoyi-system/src/main/java/com/ruoyi/business/service/impl/BusAgentInfoServiceImpl.java @@ -143,7 +143,7 @@ public class BusAgentInfoServiceImpl implements IBusAgentInfoService public int updateAgentInfo(BusAgentInfo busAgentInfo) { BusIntegralRecord record = new BusIntegralRecord(); record.setAccount(busAgentInfo.getAgentAccount()); - record.setUpdateType("ai入账"); + record.setUpdateType("入账"); record.setIntegralUpdateNum(busAgentInfo.getAiDurationBalance1()); BusAgentInfo temp = busAgentInfoMapper.selectBusAgentInfoById(busAgentInfo.getId()); @@ -154,6 +154,20 @@ public class BusAgentInfoServiceImpl implements IBusAgentInfoService record.setCreateTime(new Date()); recordService.insertBusIntegralRecord(record); - return busAgentInfoMapper.updateBusAgentInfo(busAgentInfo); + busAgentInfoMapper.updateBusAgentInfo(busAgentInfo); + + BusIntegralRecord record1 = new BusIntegralRecord(); + record1.setAccount(busAgentInfo.getSuperiorAgentAccount()); + record1.setUpdateType("出账"); + record1.setIntegralUpdateNum(busAgentInfo.getAiDurationBalance1()); + BusAgentInfo temp1 = busAgentInfoMapper.selectBusAgentInfoById(busAgentInfo.getSuperiorAgentCode()); + int oldValue1 = temp1.getAiDurationBalance(); + record1.setIntegralBalance(oldValue1 - newValue); + record1.setCreateTime(new Date()); + recordService.insertBusIntegralRecord(record1); + temp1.setAiDurationBalance(oldValue1 - newValue); + + busAgentInfoMapper.updateBusAgentInfo(temp1); + return 1; } } diff --git a/ruoyi-ui/src/views/point/detail/index.vue b/ruoyi-ui/src/views/point/detail/index.vue index a260974..d29c535 100644 --- a/ruoyi-ui/src/views/point/detail/index.vue +++ b/ruoyi-ui/src/views/point/detail/index.vue @@ -1,10 +1,10 @@