1、swagger接口文档

beetlsql3-dev
陈沅
parent 45c7e8f2e4
commit 6c8ef7e1a6

@ -29,4 +29,6 @@ public interface StudentAccountAssetAllocationDao extends BaseMapper<StudentAcco
List<StudentAccountAssetAllocation> getByIds(String ids);
List<StudentAccountAssetAllocation> getValuesByQuery(StudentAccountAssetAllocationQuery studentAccountAssetAllocationQuery);
List<StudentAccountAssetAllocation> getValuesByQueryNotWithPermission(StudentAccountAssetAllocationQuery studentAccountAssetAllocationQuery);
StudentAccountAssetAllocation getByApplicationIdAndStudentId(Long applicationId,Long studentId);
}

@ -22,4 +22,8 @@ public interface StudentAccountP2pSystemDao extends BaseMapper<StudentAccountP2p
List<StudentAccountP2pSystem> getValuesByQueryNotWithPermission(StudentAccountP2pSystemQuery studentAccountP2pSystemQuery);
void updateByTransfer(BigDecimal availableFunds, BigDecimal initialCapital, BigDecimal initialInvestmentCapital,Long studentId);
List<StudentAccountP2pSystem> getValuesByQuery(StudentAccountP2pSystemQuery studentAccountP2pSystemQuery);
StudentAccountP2pSystem getValuesByStudentId(Long studentId);
}

@ -208,6 +208,10 @@ public class StudentAccountAssetAllocationService extends CoreBaseService<Studen
}
}
public StudentAccountAssetAllocation getByApplicationIdAndStudentId(Long applicationId,Long studentId){
return studentAccountAssetAllocationDao.getByApplicationIdAndStudentId(applicationId,studentId);
}
/**
* : <br>
* tokenupdateVersion

@ -3,6 +3,7 @@ package com.ibeetl.jlw.service;
import com.ibeetl.admin.core.service.CoreBaseService;
import com.ibeetl.admin.core.web.JsonResult;
import com.ibeetl.jlw.dao.StudentAccountP2pSystemDao;
import com.ibeetl.jlw.entity.StudentAccountAssetAllocation;
import com.ibeetl.jlw.entity.StudentAccountP2pSystem;
import com.ibeetl.jlw.web.query.StudentAccountP2pSystemQuery;
import org.springframework.beans.factory.annotation.Autowired;
@ -54,4 +55,9 @@ public class StudentAccountP2pSystemService extends CoreBaseService<StudentAccou
}
public StudentAccountP2pSystem getValuesByStudentId(Long studentId){
return studentAccountP2pSystemDao.getValuesByStudentId(studentId);
}
}

@ -7,9 +7,7 @@ import com.ibeetl.admin.core.web.JsonResult;
import com.ibeetl.jlw.entity.*;
import com.ibeetl.jlw.enums.AccountTypeEnum;
import com.ibeetl.jlw.service.*;
import com.ibeetl.jlw.web.query.ResourcesApplicationQuery;
import com.ibeetl.jlw.web.query.StudentAccountAssetAllocationQuery;
import com.ibeetl.jlw.web.query.StudentAccountEquityInvestmentSystemQuery;
import com.ibeetl.jlw.web.query.*;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import javafx.beans.binding.DoubleExpression;
@ -575,4 +573,65 @@ public class AccountController {
}
}
}
@ApiOperation(value = "修改p2p账户资金")
@PostMapping("/updateP2pAccount")
public JsonResult updateP2pAccount(String username, BigDecimal money, Integer method) {
StudentQuery query = new StudentQuery();
query.setStudentSn(username);
List<Student> 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());
if (method == 1) {
info.setAvailableFunds(info.getAvailableFunds().add(money));
info.setTotalAssetsOfSubAccounts(info.getTotalAssetsOfSubAccounts().add(money));
studentAccountAssetAllocationService.updateTemplate(info);
p2pSystem.setAvailableBalance(p2pSystem.getAvailableBalance().add(money));
p2pSystem.setTotalAssets(p2pSystem.getTotalAssets().add(money));
studentAccountP2pSystemService.updateTemplate(p2pSystem);
} else {
info.setAvailableFunds(info.getAvailableFunds().subtract(money));
info.setTotalAssetsOfSubAccounts(info.getTotalAssetsOfSubAccounts().subtract(money));
studentAccountAssetAllocationService.updateTemplate(info);
p2pSystem.setAvailableBalance(p2pSystem.getAvailableBalance().subtract(money));
p2pSystem.setTotalAssets(p2pSystem.getTotalAssets().subtract(money));
studentAccountP2pSystemService.updateTemplate(p2pSystem);
}
}
return JsonResult.success();
}
@ApiOperation(value = "修改p2p账户资金")
@PostMapping("/updateP2pAccount2")
public JsonResult updateP2pAccount2(String username,
BigDecimal totalAssets,
BigDecimal availableFunds,
BigDecimal investmentfunds,
BigDecimal cumulativeofReturn,
BigDecimal freezeFunds) {
StudentQuery query = new StudentQuery();
query.setStudentSn(username);
List<Student> 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();
}
}

@ -0,0 +1,526 @@
//package com.ibeetl.jlw.web;
//
//import cn.hutool.core.util.StrUtil;
//import cn.jlw.Interceptor.SCoreUser;
//import cn.jlw.oldAliPay.pc.util.Stringutils;
//import com.google.gson.Gson;
//import com.google.gson.JsonArray;
//import com.google.gson.JsonObject;
//import com.ibeetl.admin.core.entity.CoreUser;
//import com.ibeetl.admin.core.service.CoreUserService;
//import com.ibeetl.jlw.entity.*;
//import com.ibeetl.jlw.entity.dto.CreateUserDTO;
//import com.ibeetl.jlw.enums.GenderEnum;
//import com.ibeetl.jlw.service.*;
//import com.ibeetl.jlw.web.query.UniversitiesCollegesJurisdictionExperimentalSystemQuery;
//import com.ibeetl.jlw.web.query.UniversityFacultyQuery;
//import com.ibeetl.jlw.web.query.UniversitySystemQuery;
//import io.swagger.annotations.Api;
//import io.swagger.annotations.ApiOperation;
//import org.apache.regexp.RE;
//import org.springframework.beans.factory.annotation.Autowired;
//import org.springframework.web.bind.annotation.PostMapping;
//import org.springframework.web.bind.annotation.RequestMapping;
//import org.springframework.web.bind.annotation.RestController;
//
//import java.sql.*;
//import java.text.SimpleDateFormat;
//import java.util.ArrayList;
//import java.util.Collections;
//import java.util.Date;
//import java.util.List;
//
//@Api(tags = "数据迁移")
//@RestController
//@RequestMapping("test")
//public class TestController {
//
// @Autowired
// private UniversitiesCollegesService universitiesCollegesService;
// @Autowired
// private UniversityFacultyService universityFacultyService;
// @Autowired
// private CoreUserService coreUserService;
// @Autowired
// private UniversitySystemService universitySystemService;
// @Autowired
// private SchoolClassService schoolClassService;
// @Autowired
// private TeacherService teacherService;
// @Autowired
// private StudentService studentService;
// @Autowired
// private ResourcesApplicationService resourcesApplicationService;
// @Autowired
// private UniversitiesCollegesJurisdictionExperimentalSystemService universitiesCollegesJurisdictionExperimentalSystemService;
//
// private final static String URL = "jdbc:sqlserver://120.79.161.177:1433;databaseName=Test.Zhiyun_v2.0;trustServerCertificate=true;encrypt=true";
// private final static String USER = "sa";
// private final static String PASSWORD = "sztzjy@2017";
//
// // 打开数据库连接
// public static Connection openConn() throws SQLException {
// try {
// Connection connection = DriverManager.getConnection(URL, USER, PASSWORD);
// if (connection != null) {
// System.out.println("成功建立数据库连接");
// return connection;
// } else {
// throw new SQLException("无法建立数据库连接");
// }
// } catch (SQLException e) {
// throw new SQLException("无法建立数据库连接: " + e.getMessage(), e);
// }
// }
//
// // 关闭数据库连接
// public static void closeConn(Connection connection) {
// if (connection != null) {
// try {
// connection.close();
// System.out.println("数据库连接已关闭");
// } catch (SQLException e) {
// System.err.println("无法关闭数据库连接: " + e.getMessage());
// }
// }
// }
//
// @ApiOperation("迁移学校及学校管理员数据")
// @PostMapping("/school")
// public void school() throws SQLException {
// Connection conn = null;
// PreparedStatement ps = null;
// try {
// conn = openConn();
//
// String sql = "select EduSchools.Name,EduLevel.LevelName,EduUsers.EmailAddress, " +
// "EduUsers.UserName,EduSchools.IsDeleted from EduSchools " +
// "join EduUsers on EduSchools.Id=EduUsers.SchoolId " +
// "join EduUserRoles on EduUsers.Id = EduUserRoles.UserId " +
// "join EduLevel on EduSchools.LevelId=EduLevel.Id where " +
// "EduUserRoles.RoleId=2";
// ps = conn.prepareStatement(sql);
// ResultSet resultSet = ps.executeQuery();
// while (resultSet.next()) {
// UniversitiesColleges universitiesColleges = new UniversitiesColleges();
// CreateUserDTO createUserDTO = new CreateUserDTO();
// universitiesColleges.setUniversitiesCollegesName(resultSet.getString(1));
// universitiesColleges.setUniversitiesCollegesGrade(resultSet.getString(2));
// universitiesColleges.setUniversitiesCollegesProvince("广东省");
// universitiesColleges.setUniversitiesCollegesCity("深圳市");
// universitiesColleges.setUniversitiesCollegesContacts(resultSet.getString(4));
// universitiesColleges.setUniversitiesCollegesContactsEmail(resultSet.getString(3));
// universitiesColleges.setUniversitiesCollegesStatus(resultSet.getInt(5) + 1);
// universitiesColleges.setAddTime(new Date());
// universitiesColleges.setUniversitiesCollegesStatus(1);
// createUserDTO.setUserCode(resultSet.getString(4));
// createUserDTO.setPassword("123qwe");
// universitiesCollegesService.addAndCreateCoreUser(universitiesColleges, createUserDTO);
// }
// } catch (Exception e) {
// e.printStackTrace();
// } finally {
// ps.close();
// closeConn(conn);
// }
// }
//
//
// @ApiOperation("迁移院系数据")
// @PostMapping("updateCollage")
// public void updateCollage() throws SQLException {
//
// Connection conn = null;
// PreparedStatement ps = null;
// try {
// conn = openConn();
//
// String sql = "SELECT" +
// " col.Name AS collegeName," +
// " sch.Name AS schoolName," +
// " col.Contacts," +
// " col.PhoneNo," +
// " col.Address," +
// " col.IsDeleted" +
// " " +
// "FROM " +
// " EduColleges col" +
// " JOIN EduSchools sch " +
// "ON" +
// " col.SchoolId = sch.id";
// ps = conn.prepareStatement(sql);
// ResultSet resultSet = ps.executeQuery();
// while (resultSet.next()) {
// UniversityFacultyQuery universityFacultyQuery = new UniversityFacultyQuery();
// CoreUser coreUser = new CoreUser();
// universityFacultyQuery.setUniversityFacultyName(resultSet.getString(1));
// universityFacultyQuery.setUniversityFacultyContact(resultSet.getString(3));
// universityFacultyQuery.setUniversityFacultyContactTel(resultSet.getString(4));
// universityFacultyQuery.setUniversityFacultyContactAddress(resultSet.getString(5));
//
// UniversitiesColleges universitiesColleges = universitiesCollegesService.getByName(resultSet.getString(2));
// if (universitiesColleges == null) {
// continue;
// }
// universityFacultyQuery.setUniversitiesCollegesId(universitiesColleges.getUniversitiesCollegesId());
// universityFacultyQuery.setUniversityFacultyStatus(resultSet.getInt(6) + 1);
// universityFacultyQuery.setUniversityFacultyAddTime(new Date());
// CoreUser userByCode = coreUserService.getUserByCode(universitiesColleges.getUniversitiesCollegesContacts());
// if (userByCode != null) {
// universityFacultyQuery.setUserId(userByCode.getId());
// } else {
// universityFacultyQuery.setUserId(Long.valueOf(100));
// }
// universityFacultyQuery.setOrgId(universitiesColleges.getOrgId());
// universityFacultyService.add(universityFacultyQuery);
// }
// } catch (Exception e) {
// e.printStackTrace();
// } finally {
// ps.close();
// closeConn(conn);
// }
//
//
// }
//
//
// @ApiOperation("迁移专业数据")
// @PostMapping("updateMajor")
// public void updateMajor() throws SQLException {
// Connection conn = null;
// PreparedStatement ps = null;
// try {
// conn = openConn();
//// UniversitySystemQuery universitySystemQuery;
//
// String sql = "SELECT " +
// " ma.Name AS majorName, " +
// " ma.Contacts, " +
// " ma.PhoneNo, " +
// " ma.IsDeleted, " +
// " col.Name AS colName, " +
// " sch.Name AS schName " +
// "FROM " +
// " EduMajors ma " +
// " JOIN EduColleges col ON ma.CollegeId = col.Id " +
// " JOIN EduSchools sch ON col.schoolId = sch.id";
// ps = conn.prepareStatement(sql);
// ResultSet resultSet = ps.executeQuery();
// while (resultSet.next()) {
// UniversitySystemQuery universitySystemQuery = new UniversitySystemQuery();
// universitySystemQuery.setUniversitySystemName(resultSet.getString(1));
// universitySystemQuery.setUniversitySystemContact(resultSet.getString(2));
// universitySystemQuery.setUniversitySystemContactTel(resultSet.getString(3));
// universitySystemQuery.setUniversitySystemAddTime(new Date());
// universitySystemQuery.setUniversitySystemStatus(resultSet.getInt(4) + 1);
// UniversitiesColleges universitiesColleges = universitiesCollegesService.getByName(resultSet.getString(6));
// if (universitiesColleges == null) {
// continue;
// }
// UniversityFaculty universityFaculty = universityFacultyService.getByNameAndSchoolId(resultSet.getString(5), universitiesColleges.getUniversitiesCollegesId());
// if (universityFaculty == null) {
// continue;
// }
// universitySystemQuery.setUniversityFacultyId(universityFaculty.getUniversityFacultyId());
//
// universitySystemQuery.setOrgId(universitiesColleges.getOrgId());
// universitySystemQuery.setUserId(universitiesColleges.getUserId());
// universitySystemService.add(universitySystemQuery);
// }
//
// } catch (Exception e) {
// e.printStackTrace();
// } finally {
// ps.close();
// closeConn(conn);
// }
// }
//
//
// @ApiOperation("迁移班级数据")
// @PostMapping("updateClasses")
// public void updateClasses() throws SQLException {
// Connection conn = null;
// PreparedStatement ps = null;
// try {
// conn = openConn();
//// UniversitySystemQuery universitySystemQuery;
//
// String sql = "SELECT " +
// " sch.Name as schName, " +
// " col.Name as colName, " +
// " maj.Name as majName, " +
// " cla.Name as claName, " +
// " cla.IsDeleted " +
// "FROM " +
// " EduClasses cla " +
// " JOIN EduMajors maj ON cla.MajorId = maj.Id " +
// " JOIN EduColleges col ON maj.CollegeId = col.Id " +
// " JOIN EduSchools sch ON col.schoolId = sch.id";
// ps = conn.prepareStatement(sql);
// ResultSet resultSet = ps.executeQuery();
// while (resultSet.next()) {
//
//
// String claName = resultSet.getString(4);
//
// SchoolClass serviceByName = schoolClassService.getByName(claName);
// if (serviceByName != null) {
// continue;
// }
// SchoolClass schoolClass = new SchoolClass();
// schoolClass.setClassName(resultSet.getString(4));
// UniversitiesColleges universitiesColleges = universitiesCollegesService.getByName(resultSet.getString(1));
// if (universitiesColleges == null) {
// continue;
// }
// schoolClass.setUniversitiesCollegesId(universitiesColleges.getUniversitiesCollegesId());
// String uniqueClassSn = schoolClassService.buildClassSnEnsureUnique(universitiesColleges, schoolClass.getClassName());
// schoolClass.setClassSn(uniqueClassSn);
// schoolClass.setOrgId(universitiesColleges.getOrgId());
// UniversityFaculty universityFaculty = universityFacultyService.getByNameAndSchoolId(resultSet.getString(2), universitiesColleges.getUniversitiesCollegesId());
// if (universityFaculty == null) {
// continue;
// }
// schoolClass.setUniversityFacultyId(universityFaculty.getUniversityFacultyId());
// UniversitySystem universitySystem = universitySystemService.getByNameAndSchoolIdAndCollegeId(resultSet.getString(3), universityFaculty.getUniversityFacultyId());
// if (universitySystem == null) {
// continue;
// }
// schoolClass.setUniversitySystemId(universitySystem.getUniversitySystemId());
// schoolClass.setOrgId(universitiesColleges.getOrgId());
// schoolClass.setUserId(Long.valueOf(100));
// schoolClass.setClassStatus(resultSet.getInt(5) + 1);
// schoolClassService.save(schoolClass);
// }
//
// } catch (Exception e) {
// e.printStackTrace();
// } finally {
// ps.close();
// closeConn(conn);
// }
// }
//
// @ApiOperation("迁移教师数据")
// @PostMapping("updateTeacher")
// public void updateTeacher() throws SQLException {
// Connection conn = null;
// PreparedStatement ps = null;
// try {
// conn = openConn();
//
// String sql = "SELECT " +
// " sch.Name AS schName, " +
// " col.Name AS colName, " +
// " maj.Name AS majName, " +
// " tea.Name AS teacherName, " +
// " tea.TeacherNo AS teacherNo, " +
// " tea.PhoneNo, " +
// " tea.Sex, " +
// " tea.IsDeleted " +
// "FROM " +
// " EduTeachers tea " +
// " JOIN EduColleges col ON tea.CollegeId = col.Id " +
// " JOIN EduMajors maj ON tea.MajorId = maj.Id " +
// " JOIN EduSchools sch ON tea.SchoolId = sch.Id";
// ps = conn.prepareStatement(sql);
// ResultSet resultSet = ps.executeQuery();
// while (resultSet.next()) {
// Teacher teacher = new Teacher();
// UniversitiesColleges universitiesColleges = universitiesCollegesService.getByName(resultSet.getString(1));
// if (universitiesColleges == null) {
// continue;
// }
// UniversityFaculty universityFaculty = universityFacultyService.getByNameAndSchoolId(resultSet.getString(2), universitiesColleges.getUniversitiesCollegesId());
// if (universityFaculty == null) {
// continue;
// }
// UniversitySystem universitySystem = universitySystemService.getByNameAndSchoolIdAndCollegeId(resultSet.getString(3), universityFaculty.getUniversityFacultyId());
// if (universitySystem == null) {
// continue;
// }
// teacher.setTeacherName(resultSet.getString(4));
// teacher.setUniversitiesCollegesId(universitiesColleges.getUniversitiesCollegesId());
// teacher.setUniversityFacultyId(universityFaculty.getUniversityFacultyId());
// teacher.setUniversitySystemId(universitySystem.getUniversitySystemId());
// teacher.setTeacherMobile(resultSet.getString(6));
// teacher.setTeacherJobNumber(resultSet.getString(5));
// teacher.setTeacherStatus(resultSet.getInt(8) + 1);
// int anInt = resultSet.getInt(7);
// GenderEnum genderEnum;
// if (anInt == 1) {
// genderEnum = GenderEnum.MAN;
// } else {
// genderEnum = GenderEnum.WOMAN;
// }
// teacher.setTeacherGender(genderEnum);
// teacher.setAddTime(new Date());
// teacherService.add(teacher);
// }
//
// } catch (Exception e) {
// e.printStackTrace();
// } finally {
// ps.close();
// closeConn(conn);
// }
// }
//
//
// @ApiOperation("迁移学生数据")
// @PostMapping("updateStudent")
// public void updateStudent() throws SQLException {
// Connection conn = null;
// PreparedStatement ps = null;
// try {
// conn = openConn();
// String sql = "SELECT " +
// " sch.Name AS schName, " +
// " col.Name AS colName, " +
// " maj.Name AS majName, " +
// " stu.Name AS studentName, " +
// " stu.StudentNo AS StudentNo, " +
// " stu.PhoneNo, " +
// " stu.Sex, " +
// " stu.IsDeleted, " +
// " cla.Name " +
// "FROM " +
// " EduStudents stu " +
// " JOIN EduColleges col ON stu.CollegeId = col.Id " +
// " JOIN EduMajors maj ON stu.MajorId = maj.Id " +
// " JOIN EduSchools sch ON stu.SchoolId = sch.Id " +
// " JOIN EduClasses cla ON stu.ClassId = cla.Id";
// ps = conn.prepareStatement(sql);
// ResultSet resultSet = ps.executeQuery();
// while (resultSet.next()) {
// Student student = new Student();
// student.setStudentName(resultSet.getString(4));
// student.setStudentSn(resultSet.getString(5));
// student.setStudentMobile(resultSet.getString(6));
// int anInt = resultSet.getInt(7);
// GenderEnum genderEnum;
// if (anInt == 1) {
// genderEnum = GenderEnum.MAN;
// } else {
// genderEnum = GenderEnum.WOMAN;
// }
// student.setStudentGender(genderEnum);
// student.setAddTime(new Date());
// UniversitiesColleges universitiesColleges = universitiesCollegesService.getByName(resultSet.getString(1));
// if (universitiesColleges == null) {
// continue;
// }
// UniversityFaculty universityFaculty = universityFacultyService.getByNameAndSchoolId(resultSet.getString(2), universitiesColleges.getUniversitiesCollegesId());
// if (universityFaculty == null) {
// continue;
// }
// UniversitySystem universitySystem = universitySystemService.getByNameAndSchoolIdAndCollegeId(resultSet.getString(3), universityFaculty.getUniversityFacultyId());
// if (universitySystem == null) {
// continue;
// }
// SchoolClass schoolClass = schoolClassService.getByNameAndMajorId(resultSet.getString(9),
// universitySystem.getUniversitySystemId(),
// universitiesColleges.getUniversitiesCollegesId(),
// universityFaculty.getUniversityFacultyId()
// );
// if (universitiesColleges == null || universityFaculty == null || universitySystem == null || schoolClass == null) {
// continue;
// }
// student.setClassId(schoolClass.getClassId());
// studentService.add(student);
// }
// } catch (Exception ex) {
// ex.printStackTrace();
// } finally {
// ps.close();
// closeConn(conn);
// }
// }
//
//
// @ApiOperation("迁移应用系统")
// @PostMapping("copyApplications")
// public void copyApplications() {
// Connection conn;
// PreparedStatement ps;
// Gson gson = new Gson();
// List<UniversitiesColleges> colleges = universitiesCollegesService.getAll();
// try {
// for (UniversitiesColleges colleges1 : colleges) {
// String sql = "select top 1 imp.* from ImpowerRecords imp join" +
// " EduSchools sch on imp.SchoolId = sch.id where " +
// "sch.Name like '" + colleges1.getUniversitiesCollegesName() + "%' and imp.IsDeleted = 0 and sch.IsDeleted =0 ORDER BY imp.CreationTime desc ";
// conn = openConn();
// ps = conn.prepareStatement(sql);
// ResultSet resultSet = ps.executeQuery();
// String applications = "";
// Integer isBought = 0;
// Date startTime = null;
// Date endTime = null;
// while (resultSet.next()) {
// applications = resultSet.getString("impowerApplication");
// isBought = resultSet.getInt("isBought");
// startTime = resultSet.getDate("startTime");
// endTime = resultSet.getDate("endTime");
// }
// closeConn(conn);
// ps.close();
// if (applications == null)
// continue;
// String[] applicationArrays = applications.split(",");
// JsonArray jsonArray = new JsonArray();
// for (String app : applicationArrays) {
// if(Stringutils.isEmpty(app)){
// int a = 0;
// continue;
// }
// String sql1 = "select * from EduApplications where id=" + Integer.valueOf(app);
// conn = openConn();
// ps = conn.prepareStatement(sql1);
// ResultSet resultSet1 = ps.executeQuery();
// String appName = null;
// while (resultSet1.next()) {
// appName = resultSet1.getString("name");
// }
// ps.close();
// closeConn(conn);
// if (!Stringutils.isEmpty(appName)) {
// List<ResourcesApplication> resourcesApplications = resourcesApplicationService.getByName(appName);
// if (resourcesApplications == null || resourcesApplications.size() == 0) continue;
// ResourcesApplication resourcesApplication = resourcesApplications.get(0);
// UniversitiesCollegesJurisdictionExperimentalSystemQuery query = new UniversitiesCollegesJurisdictionExperimentalSystemQuery();
// query.setUniversitiesCollegesId(colleges1.getUniversitiesCollegesId());
// query.setType(1);
// query.setTypeId(resourcesApplication.getResourcesApplicationId());
// query.setUseType(isBought);
// SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
// query.setUseStartTime(sdf.format(startTime));
// query.setUseEndTime(sdf.format(endTime));
// String applicationName = resourcesApplication.getApplicationName();
// JsonObject jsonObject = new JsonObject();
// jsonObject.addProperty("universitiesCollegesJurisdictionExperimentalSystemId", query.getUniversitiesCollegesJurisdictionExperimentalSystemId());
// jsonObject.addProperty("universitiesCollegesId", query.getUniversitiesCollegesId());
// jsonObject.addProperty("type", query.getType());
// jsonObject.addProperty("typeId", query.getTypeId());
// jsonObject.addProperty("useType", query.getUseType());
// jsonObject.addProperty("useStartTime", query.getUseStartTime());
// jsonObject.addProperty("useEndTime", query.getUseEndTime());
// jsonObject.addProperty("applicationName", applicationName);
// jsonArray.add(jsonObject);
// }
// }
// String jsonArrayString = gson.toJson(jsonArray);
// UniversitiesCollegesJurisdictionExperimentalSystemQuery query = new UniversitiesCollegesJurisdictionExperimentalSystemQuery();
// query.setUniversitiesCollegesId(colleges1.getUniversitiesCollegesId());
// query.setUniversitiesCollegesJurisdictionExperimentalSystemListJson(jsonArrayString);
// universitiesCollegesJurisdictionExperimentalSystemService.addAll(query);
// }
//
//
// } catch (Exception e) {
// e.printStackTrace();
// }
// }
//}

@ -773,5 +773,8 @@ getValuesByQueryNotWithPermission
and find_in_set(t.org_id,#orgIdPlural#)
@}
getByApplicationIdAndStudentId
===
select * from student_account_asset_allocation where
application_id =#applicationId# and student_id=#studentId#

@ -2,4 +2,9 @@ updateByTransfer
=======
update student_account_p2p_system set available_balance = #availableFunds#,
initial_capital =#initialCapital# ,initial_investment_capital=#initialInvestmentCapital# ,
total_assets = #availableFunds# where student_id = #studentId#
total_assets = #availableFunds# where student_id = #studentId#
getValuesByStudentId
===
select * from student_account_p2p_system where student_id=#studentId#

Loading…
Cancel
Save