1、swagger接口文档

beetlsql3-dev
陈沅 1 year ago
parent 1b58653476
commit 1950343e20

@ -33,4 +33,6 @@ public interface StudentAccountAssetAllocationDao extends BaseMapper<StudentAcco
StudentAccountAssetAllocation getByApplicationIdAndStudentId(Long applicationId,Long studentId);
List<StudentAccountAssetAllocation> getInfo(Long studentId);
List<StudentAccountAssetAllocation> getInfoByStudentIdAnIsInstitution(Long studentId);
}

@ -44,7 +44,7 @@ public enum AccountTypeEnum {
/**银行账户*/
BANK_ACCOUNT("银行账户"),
/**P2P账户*/
P2P_ACCOUNT("P2P账户"),
P2P_ACCOUNT("网络融资账户"),
/**众筹账户*/
CROWDFUNDING_ACCOUNT("众筹账户"),
/**股票基金投资账户*/

@ -305,6 +305,7 @@ public class StudentAccountAssetAllocationService extends CoreBaseService<Studen
for (int j = 1; j < 3; j++) {
for (int i = 0; i < values.length; i++) {
if(values[i].getText().equals("现金账户"))continue;
StudentAccountAssetAllocation allocation = new StudentAccountAssetAllocation();
allocation.setStudentId(studentId);
//先默认不开通,条件符合就开通
@ -328,7 +329,7 @@ public class StudentAccountAssetAllocationService extends CoreBaseService<Studen
} else if (ObjectUtil.equals(values[i].getText(), AccountTypeEnum.EQUITY_INVESTMENT_ACCOUNT.getText())) {
query.setApplicationSecondLevelRelation("PE/VC");
query.setApplicationSecondLevelRelation("投资银行");
} else if (ObjectUtil.equals(values[i].getText(), AccountTypeEnum.EQUITY_FUND_QUANTITATIVE_TRADING_ACCOUNT.getText())) {
@ -356,6 +357,8 @@ public class StudentAccountAssetAllocationService extends CoreBaseService<Studen
}else if(ObjectUtil.equals(values[i].getText(),AccountTypeEnum.FINANCIAL_ACCOUNT.getText())){
query.setApplicationSecondLevelRelation("智能理财");
}else if(ObjectUtil.equals(values[i].getText(),AccountTypeEnum.FOREX_INVESTMENT_ACCOUNT.getText())){
query.setApplicationSecondLevelRelation("外汇");
}
if (ObjectUtil.equals(values[i].getText(), AccountTypeEnum.BANK_ACCOUNT.getText())) {
@ -408,6 +411,8 @@ public class StudentAccountAssetAllocationService extends CoreBaseService<Studen
new BigDecimal(money) : BigDecimal.ZERO);
allocation.setInitialInvestmentCapital(CollectionUtil.isNotEmpty(experimentalSystems) ?
new BigDecimal(money) : BigDecimal.ZERO);
allocation.setTotalAssetsOfSubAccounts(CollectionUtil.isNotEmpty(experimentalSystems) ?
new BigDecimal(money) : BigDecimal.ZERO);
}
}
}
@ -699,6 +704,12 @@ public class StudentAccountAssetAllocationService extends CoreBaseService<Studen
return studentAccountAssetAllocationDao.getInfo(studentId);
}
//获取个人投资账户
public List<StudentAccountAssetAllocation> getInfoByStudentIdAnIsInstitution(Long studentId) {
return studentAccountAssetAllocationDao.getInfoByStudentIdAnIsInstitution(studentId);
}
public static String sendPostRequest(String url, String postData) {
try {
URL apiUrl = new URL(url);

@ -109,7 +109,7 @@ public class ApiStudentService {
//饼状图数据
//todo 查询数据库
List<StudentAccountAssetAllocation> studentAccountAssetAllocations = studentAccountAssetAllocationService.getInfoByStudentId(studentId);
List<StudentAccountAssetAllocation> studentAccountAssetAllocations = studentAccountAssetAllocationService.getInfoByStudentIdAnIsInstitution(studentId);
List<Map<String, Object>> pieMaps = new ArrayList<>();
for (StudentAccountAssetAllocation allocation : studentAccountAssetAllocations) {
if (allocation.getName().getText().equals("现金账户")) {
@ -118,14 +118,14 @@ public class ApiStudentService {
Map<String, Object> map = new HashMap<>();
if (allocation.getName().getText().equals("银行账户")) {
map.put("name", allocation.getName().getText());
map.put("value", allocation.getAvailableFunds());
map.put("value", allocation.getAvailableFunds()==null?0:allocation.getAvailableFunds());
} else {
if (allocation.getName().getText().equals("P2P账户")) {
map.put("name", "网络融资账户");
map.put("value", allocation.getTotalAssetsOfSubAccounts());
map.put("value", allocation.getTotalAssetsOfSubAccounts()==null?0:allocation.getTotalAssetsOfSubAccounts());
} else {
map.put("name", allocation.getName().getText());
map.put("value", allocation.getTotalAssetsOfSubAccounts());
map.put("value", allocation.getTotalAssetsOfSubAccounts()==null?0:allocation.getTotalAssetsOfSubAccounts());
}
}
pieMaps.add(map);

@ -657,6 +657,9 @@ getValuesByQuery
@if(!isEmpty(orgId)){
and t.org_id =#orgId#
@}
@if(!isEmpty(isInstitution)){
and t.is_institution = #isInstitution#
@}
@if(!isEmpty(orgIdPlural)){
and find_in_set(t.org_id,#orgIdPlural#)
@}
@ -780,4 +783,8 @@ application_id =#applicationId# and student_id=#studentId#
getInfo
===
select * from student_account_asset_allocation where student_id=#studentId#
select * from student_account_asset_allocation where student_id=#studentId#
getInfoByStudentIdAnIsInstitution
===
select * from student_account_asset_allocation where student_id=#studentId# and is_institution =1
Loading…
Cancel
Save