From f1a5552760f90050a876383b8b692767ef219ef6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=99=88=E6=B2=85?= <907037276@qq.com> Date: Sat, 25 Nov 2023 11:07:44 +0800 Subject: [PATCH] =?UTF-8?q?1=E3=80=81swagger=E6=8E=A5=E5=8F=A3=E6=96=87?= =?UTF-8?q?=E6=A1=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../dao/StudentAccountAssetAllocationDao.java | 2 ++ ...udentAccountEquityInvestmentSystemDao.java | 3 +- .../StudentAccountAssetAllocationService.java | 4 +++ ...tAccountEquityInvestmentSystemService.java | 4 +++ .../com/ibeetl/jlw/web/AccountController.java | 30 +++++++++++++++---- web/src/main/resources/sql/jlw/student.md | 2 +- .../sql/jlw/studentAccountAssetAllocation.md | 3 ++ .../studentAccountEquityInvestmentSystem.md | 7 ++++- 8 files changed, 47 insertions(+), 8 deletions(-) diff --git a/web/src/main/java/com/ibeetl/jlw/dao/StudentAccountAssetAllocationDao.java b/web/src/main/java/com/ibeetl/jlw/dao/StudentAccountAssetAllocationDao.java index c242d259..74ab2103 100644 --- a/web/src/main/java/com/ibeetl/jlw/dao/StudentAccountAssetAllocationDao.java +++ b/web/src/main/java/com/ibeetl/jlw/dao/StudentAccountAssetAllocationDao.java @@ -31,4 +31,6 @@ public interface StudentAccountAssetAllocationDao extends BaseMapper getValuesByQueryNotWithPermission(StudentAccountAssetAllocationQuery studentAccountAssetAllocationQuery); StudentAccountAssetAllocation getByApplicationIdAndStudentId(Long applicationId,Long studentId); + + List getInfo(Long studentId); } diff --git a/web/src/main/java/com/ibeetl/jlw/dao/StudentAccountEquityInvestmentSystemDao.java b/web/src/main/java/com/ibeetl/jlw/dao/StudentAccountEquityInvestmentSystemDao.java index 9c2c0fe2..ba2a7ac0 100644 --- a/web/src/main/java/com/ibeetl/jlw/dao/StudentAccountEquityInvestmentSystemDao.java +++ b/web/src/main/java/com/ibeetl/jlw/dao/StudentAccountEquityInvestmentSystemDao.java @@ -26,6 +26,7 @@ public interface StudentAccountEquityInvestmentSystemDao extends BaseMapper getValuesByQuery(StudentAccountEquityInvestmentSystemQuery studentAccountEquityInvestmentSystemQuery); + List getInfo(Long studentId); - void updateByTransfer(BigDecimal initialCapital,BigDecimal initialInvestmentCapital,BigDecimal totalAssets,BigDecimal freeMoney,Long studentId); + void updateByTransfer(BigDecimal initialCapital, BigDecimal initialInvestmentCapital, BigDecimal totalAssets, BigDecimal freeMoney, Long studentId); } diff --git a/web/src/main/java/com/ibeetl/jlw/service/StudentAccountAssetAllocationService.java b/web/src/main/java/com/ibeetl/jlw/service/StudentAccountAssetAllocationService.java index c56c5e7c..354f5949 100644 --- a/web/src/main/java/com/ibeetl/jlw/service/StudentAccountAssetAllocationService.java +++ b/web/src/main/java/com/ibeetl/jlw/service/StudentAccountAssetAllocationService.java @@ -666,6 +666,10 @@ public class StudentAccountAssetAllocationService extends CoreBaseService getInfoByStudentId(Long studentId){ + return studentAccountAssetAllocationDao.getInfo(studentId); + } + public static String sendPostRequest(String url, String postData) { try { URL apiUrl = new URL(url); diff --git a/web/src/main/java/com/ibeetl/jlw/service/StudentAccountEquityInvestmentSystemService.java b/web/src/main/java/com/ibeetl/jlw/service/StudentAccountEquityInvestmentSystemService.java index 424451c3..0d930885 100644 --- a/web/src/main/java/com/ibeetl/jlw/service/StudentAccountEquityInvestmentSystemService.java +++ b/web/src/main/java/com/ibeetl/jlw/service/StudentAccountEquityInvestmentSystemService.java @@ -54,6 +54,10 @@ public class StudentAccountEquityInvestmentSystemService extends CoreBaseService return studentAccountEquityInvestmentSystemDao.getValuesByQuery(query); } + public List getInfo(Long studentId){ + return studentAccountEquityInvestmentSystemDao.getInfo(studentId); + } + public void updateByTransfer(BigDecimal initialCapital, BigDecimal initialInvestmentCapital, BigDecimal totalAssets, BigDecimal freeMoney, Long studentId){ studentAccountEquityInvestmentSystemDao.updateByTransfer(initialCapital,initialInvestmentCapital,totalAssets,freeMoney,studentId); } 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 68785827..befb8619 100644 --- a/web/src/main/java/com/ibeetl/jlw/web/AccountController.java +++ b/web/src/main/java/com/ibeetl/jlw/web/AccountController.java @@ -144,16 +144,19 @@ public class AccountController { public void createFund() throws SQLException { List students = studentService.getValues(null); + int i =0; if (students != null && students.size() > 0) { for (Student student : students) { - Connection connection = openConn(); - String username = student.getStudentSn(); - StudentAccountAssetAllocationQuery query = new StudentAccountAssetAllocationQuery(); - query.setStudentId(student.getStudentId()); -// List studentAccountAssetAllocations = studentAccountAssetAllocationService.getValuesByQuery(query); +// List studentAccountAssetAllocations = studentAccountAssetAllocationService.getInfoByStudentId(student.getStudentId()); // if (studentAccountAssetAllocations != null && studentAccountAssetAllocations.size() > 0) { // continue; // } + System.out.println("已处理------------->"+i++); + Connection connection = openConn(); + String username = student.getStudentSn(); + StudentAccountAssetAllocationQuery query = new StudentAccountAssetAllocationQuery(); +// query.setStudentId(); + String sql = "SELECT\n" + " EduUsers.UserName,\n" + " EduAssetAllocation.ApplicationId,\n" + @@ -203,6 +206,10 @@ public class AccountController { } else if (applicationId == 4) { allocationQuery.setApplicationId(Long.valueOf(4)); allocationQuery.setName(AccountTypeEnum.P2P_ACCOUNT); + StudentAccountCrowdfundingSystem info = studentAccountCrowdfundingSystemService.getInfo(student.getStudentId()); + if(info!=null){ + continue; + } Connection connection1 = openConn(); String sql1 = "SELECT\n" + " ExaP2PAssetAllocation.Id,\n" + @@ -234,6 +241,8 @@ public class AccountController { PreparedStatement preparedStatement1 = connection1.prepareStatement(sql1); ResultSet resultSet1 = preparedStatement1.executeQuery(); while (resultSet1.next()) { + + StudentAccountP2pSystem studentAccountP2pSystem = new StudentAccountP2pSystem(); BigDecimal InitialCapital1 = resultSet1.getBigDecimal("InitialCapital"); BigDecimal InitialInvestmentCapital1 = resultSet1.getBigDecimal("InitialInvestmentCapital"); @@ -276,6 +285,10 @@ public class AccountController { } else if (applicationId == 5) { allocationQuery.setApplicationId(Long.valueOf(5)); allocationQuery.setName(AccountTypeEnum.CROWDFUNDING_ACCOUNT); + + StudentAccountCrowdfundingSystem info = studentAccountCrowdfundingSystemService.getInfo(student.getStudentId()); + if(info!=null)continue; + Connection connection1 = openConn(); String sql1 = "SELECT\n" + " ExaTheRaiseAssetAllocation.Id,\n" + @@ -341,6 +354,9 @@ public class AccountController { } else if (applicationId == 16) { allocationQuery.setApplicationId(Long.valueOf(16)); allocationQuery.setName(AccountTypeEnum.EQUITY_FUND_INVESTMENT_ACCOUNT); + +// List byStudentId = studentAccountMockTradingSystemService.getByStudentId(student.getStudentId()); +// if(byStudentId!=null&&byStudentId.size()>0)continue; Connection connection1 = openConn(); String sql1 = "SELECT\n" + " ExaMNJYAssetAllocation.Id,\n" + @@ -419,6 +435,10 @@ public class AccountController { allocationQuery.setApplicationId(Long.valueOf(18)); allocationQuery.setName(AccountTypeEnum.EQUITY_INVESTMENT_ACCOUNT); + StudentAccountEquityInvestmentSystemQuery query1 = new StudentAccountEquityInvestmentSystemQuery(); + query1.setStudentId(student.getStudentId()); +// List valuesByQuery = studentAccountEquityInvestmentSystemService.getInfo(student.getStudentId()); +// if (valuesByQuery != null && valuesByQuery.size() > 0) continue; Connection connection1 = openConn(); String sql1 = "SELECT\n" + " ExaPEVCAssetAllocation.Id,\n" + diff --git a/web/src/main/resources/sql/jlw/student.md b/web/src/main/resources/sql/jlw/student.md index b3c988c9..66be6c35 100644 --- a/web/src/main/resources/sql/jlw/student.md +++ b/web/src/main/resources/sql/jlw/student.md @@ -2218,4 +2218,4 @@ select student.student_sn as studentNo,student.student_name as name,school_class getStudentByStudentNoAndOrgId === -select * from student where student_sn = #studentNo# and org_id = #orgId# \ No newline at end of file +select * from student where student_sn = #studentNo# and org_id = #orgId# diff --git a/web/src/main/resources/sql/jlw/studentAccountAssetAllocation.md b/web/src/main/resources/sql/jlw/studentAccountAssetAllocation.md index 88bab83f..cbdb1c4e 100644 --- a/web/src/main/resources/sql/jlw/studentAccountAssetAllocation.md +++ b/web/src/main/resources/sql/jlw/studentAccountAssetAllocation.md @@ -778,3 +778,6 @@ getByApplicationIdAndStudentId select * from student_account_asset_allocation where application_id =#applicationId# and student_id=#studentId# +getInfo +=== + select * from student_account_asset_allocation where student_id=#studentId# \ No newline at end of file diff --git a/web/src/main/resources/sql/jlw/studentAccountEquityInvestmentSystem.md b/web/src/main/resources/sql/jlw/studentAccountEquityInvestmentSystem.md index 4c0566dd..076504d5 100644 --- a/web/src/main/resources/sql/jlw/studentAccountEquityInvestmentSystem.md +++ b/web/src/main/resources/sql/jlw/studentAccountEquityInvestmentSystem.md @@ -206,4 +206,9 @@ getValuesByQueryNotWithPermission updateByTransfer ==== -update student_account_equity_investment_system set initial_capital =#initialCapital# ,initial_investment_capital =#initialInvestmentCapital# ,total_assets=#initialInvestmentCapital# , own_funds = #initialInvestmentCapital# where student_id = #studentId# \ No newline at end of file +update student_account_equity_investment_system set initial_capital =#initialCapital# ,initial_investment_capital =#initialInvestmentCapital# ,total_assets=#initialInvestmentCapital# , own_funds = #initialInvestmentCapital# where student_id = #studentId# + + +getInfo +=== + select * from student_account_equity_investment_system where student_id = #studentId# \ No newline at end of file