diff --git a/web/src/main/java/com/ibeetl/jlw/web/AccountController.java b/web/src/main/java/com/ibeetl/jlw/web/AccountController.java index ad48d118..c4fe8bde 100644 --- a/web/src/main/java/com/ibeetl/jlw/web/AccountController.java +++ b/web/src/main/java/com/ibeetl/jlw/web/AccountController.java @@ -711,6 +711,39 @@ public class AccountController { } + + @ApiOperation(value = "修改p2p账户资金-3") + @PostMapping("/updateP2pAccount3.json") + public JsonResult updateP2pAccount3(Long userId, + BigDecimal totalAssets, + BigDecimal availableFunds, + BigDecimal investmentfunds, + BigDecimal cumulativeofReturn, + BigDecimal freezeFunds) { + CoreUser coreUser = userService.findByOldId(userId); + StudentQuery query = new StudentQuery(); + query.setUserId(coreUser.getId()); + List valuesByQuery = studentService.getValuesByQuery(query); + + if (valuesByQuery != null && valuesByQuery.size() > 0) { + Student student = valuesByQuery.get(0); + StudentAccountAssetAllocation info = studentAccountAssetAllocationService.getByApplicationIdAndStudentId(Long.valueOf(4), student.getStudentId()); + StudentAccountP2pSystem p2pSystem = studentAccountP2pSystemService.getValuesByStudentId(student.getStudentId()); + info.setAvailableFunds(availableFunds); + info.setTotalAssetsOfSubAccounts(totalAssets); + info.setInvestmentFunds(investmentfunds); + info.setAmountFrozen(freezeFunds); + studentAccountAssetAllocationService.updateTemplate(info); + p2pSystem.setAvailableBalance(availableFunds); + p2pSystem.setTotalAssets(totalAssets); + p2pSystem.setTotalInvestment(investmentfunds); + p2pSystem.setCumulativeIncome(cumulativeofReturn); + p2pSystem.setFrozenFunds(freezeFunds); + studentAccountP2pSystemService.updateTemplate(p2pSystem); + } + return JsonResult.success(); + } + @ApiOperation(value = "修改众筹账户资金") @PostMapping("/updateCrowdAccount.json") public JsonResult updateCrowdAccount(String username, BigDecimal money, Integer method) {