1、swagger接口文档

beetlsql3-dev
陈沅 1 year ago
parent af5dbc9271
commit 4c9de9a1fd

@ -56,4 +56,5 @@ public interface CoreUserDao extends BaseMapper<CoreUser> {
void updateUserId(Long newId, Long oldId);
List<CoreUser> getCoreUserListAndOldIdIsNull();
CoreUser getCoreUserByOldId(Long oldId);
}

@ -160,6 +160,10 @@ public class CoreUserService extends CoreBaseService<CoreUser> {
return coreUserDao.getCoreUserListAndOldIdIsNull();
}
public CoreUser findByOldId(Long oldId){
return coreUserDao.getCoreUserByOldId(oldId);
}
/**
*
* @return

@ -155,4 +155,9 @@ JOIN core_role ON core_user_role.ROLE_ID = core_role.ID where core_user.CODE = #
getCoreUserListAndOldIdIsNull
===
select * from core_user where old_id is null
select * from core_user where old_id is null
getCoreUserByOldId
===
select * from core_user where old_id = #oldId#

@ -952,5 +952,80 @@ public class AccountController {
return null;
}
@ApiOperation("智云2.0接口修改PEVC资金")
@PostMapping("updatePEVCAssetAllocations.json")
public JsonResult updatePEVCAssetAllocations(Integer userId, Double amount, Double totalAsset) {
if (userId != null) {
CoreUser user = userService.findByOldId(Long.valueOf(userId));
if (user != null) {
Student student = studentService.getByUserId(user.getId());
StudentAccountAssetAllocation allocation = studentAccountAssetAllocationService.getByApplicationIdAndStudentId(18L, student.getStudentId());
if (allocation != null) {
allocation.setAvailableFunds(BigDecimal.valueOf(amount));
allocation.setTotalAssetsOfSubAccounts(BigDecimal.valueOf(totalAsset));
studentAccountAssetAllocationService.updateTemplate(allocation);
}
}
}
return JsonResult.success();
}
@ApiOperation("智云2.0接口UpdatePevcInvestAmount")
@PostMapping("updatePevcInvestAmount.json")
public JsonResult updatePevcInvestAmount(Integer userId,
Double amount,
Double TotalAsset,
Double zyInvestAmount,
Double yxInvestAmount,
Double lhInvestAmount,
Double bankInvestAmount) {
if (userId != null) {
CoreUser user = userService.findByOldId(Long.valueOf(userId));
if (user != null) {
Student student = studentService.getByUserId(user.getId());
List<StudentAccountEquityInvestmentSystem> info = studentAccountEquityInvestmentSystemService.getInfo(student.getStudentId());
StudentAccountEquityInvestmentSystem system = info.get(0);
system.setTotalCollectAssets(BigDecimal.valueOf(amount));
system.setOwnInvestmentAssets(BigDecimal.valueOf(zyInvestAmount));
system.setLpInvestmentAssets(BigDecimal.valueOf(yxInvestAmount));
system.setGlInvestmentAssets(BigDecimal.valueOf(lhInvestAmount));
system.setBankLoanInvestment(BigDecimal.valueOf(bankInvestAmount));
studentAccountEquityInvestmentSystemService.updateTemplate(system);
StudentAccountAssetAllocation allocation = studentAccountAssetAllocationService.getByApplicationIdAndStudentId(18L, student.getStudentId());
if (allocation != null) {
allocation.setAvailableFunds(BigDecimal.valueOf(amount));
allocation.setTotalAssetsOfSubAccounts(BigDecimal.valueOf(TotalAsset));
double investAmount = zyInvestAmount + yxInvestAmount + lhInvestAmount + bankInvestAmount;
allocation.setInvestmentFunds(BigDecimal.valueOf(investAmount));
studentAccountAssetAllocationService.updateTemplate(allocation);
}
}
}
return JsonResult.success();
}
@ApiOperation("智云2.0接口:GetUserNameByUserId")
@GetMapping("getUserNameByUserId")
public JsonResult getUserNameByUserId(Integer userId) {
if (userId != null) {
CoreUser user = userService.findByOldId(Long.valueOf(userId));
if (user != null) {
return JsonResult.success(user.getName());
}
}
return JsonResult.success();
}
@ApiOperation("智云2.0接口:GetClassNameByClassId")
@GetMapping("getClassNameByClassId")
public JsonResult getClassNameByClassId(Integer classId) {
if (classId != null) {
SchoolClass schoolClass = schoolClassService.getByOldId(Long.valueOf(classId));
if (schoolClass != null) {
return JsonResult.success(schoolClass.getClassName());
}
}
return JsonResult.success();
}
}

Loading…
Cancel
Save