|
|
@ -47,20 +47,32 @@ import static com.ibeetl.admin.core.util.user.CacheUserUtil.getUser;
|
|
|
|
@Validated
|
|
|
|
@Validated
|
|
|
|
public class ApiStudentService {
|
|
|
|
public class ApiStudentService {
|
|
|
|
|
|
|
|
|
|
|
|
@Autowired private ApiIndexBaseService apiIndexBaseService;
|
|
|
|
@Autowired
|
|
|
|
@Autowired private TeacherOpenCourseNoticeService teacherOpenCourseNoticeService;
|
|
|
|
private ApiIndexBaseService apiIndexBaseService;
|
|
|
|
@Autowired private StudentService studentService;
|
|
|
|
@Autowired
|
|
|
|
@Autowired private StudentDao studentDao;
|
|
|
|
private TeacherOpenCourseNoticeService teacherOpenCourseNoticeService;
|
|
|
|
@Autowired private ResourcesApplicationService resourcesApplicationService;
|
|
|
|
@Autowired
|
|
|
|
@Autowired private TeacherOpenCourseMergeStudentDao teacherOpenCourseMergeStudentDao;
|
|
|
|
private StudentService studentService;
|
|
|
|
@Autowired private UniversitiesCollegesService universitiesCollegesService;
|
|
|
|
@Autowired
|
|
|
|
@Autowired private PasswordConfig.PasswordEncryptService passwordEncryptService;
|
|
|
|
private StudentDao studentDao;
|
|
|
|
@Autowired private CoreUserService coreUserService;
|
|
|
|
@Autowired
|
|
|
|
|
|
|
|
private StudentAccountAssetAllocationService studentAccountAssetAllocationService;
|
|
|
|
|
|
|
|
@Autowired
|
|
|
|
|
|
|
|
private ResourcesApplicationService resourcesApplicationService;
|
|
|
|
|
|
|
|
@Autowired
|
|
|
|
|
|
|
|
private TeacherOpenCourseMergeStudentDao teacherOpenCourseMergeStudentDao;
|
|
|
|
|
|
|
|
@Autowired
|
|
|
|
|
|
|
|
private UniversitiesCollegesService universitiesCollegesService;
|
|
|
|
|
|
|
|
@Autowired
|
|
|
|
|
|
|
|
private PasswordConfig.PasswordEncryptService passwordEncryptService;
|
|
|
|
|
|
|
|
@Autowired
|
|
|
|
|
|
|
|
private CoreUserService coreUserService;
|
|
|
|
@Autowired
|
|
|
|
@Autowired
|
|
|
|
private SysLogService sysLogService;
|
|
|
|
private SysLogService sysLogService;
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
/**
|
|
|
|
* 教师端-首页数据
|
|
|
|
* 学生端-首页数据
|
|
|
|
|
|
|
|
*
|
|
|
|
* @return
|
|
|
|
* @return
|
|
|
|
*/
|
|
|
|
*/
|
|
|
|
public StudentIndexData index() {
|
|
|
|
public StudentIndexData index() {
|
|
|
@ -97,36 +109,52 @@ public class ApiStudentService {
|
|
|
|
|
|
|
|
|
|
|
|
//饼状图数据
|
|
|
|
//饼状图数据
|
|
|
|
//todo 查询数据库
|
|
|
|
//todo 查询数据库
|
|
|
|
//
|
|
|
|
List<StudentAccountAssetAllocation> studentAccountAssetAllocations = studentAccountAssetAllocationService.getInfoByStudentId(studentId);
|
|
|
|
List<Map<String, Object>> pieMaps = new ArrayList<>();
|
|
|
|
List<Map<String, Object>> pieMaps = new ArrayList<>();
|
|
|
|
Map<String, Object> map1 = new HashMap<>();
|
|
|
|
for (StudentAccountAssetAllocation allocation : studentAccountAssetAllocations) {
|
|
|
|
map1.put("name", "现金账户");
|
|
|
|
if (allocation.getName().getText().equals("现金账户")) {
|
|
|
|
map1.put("value", 835000);
|
|
|
|
continue;
|
|
|
|
Map<String, Object> map2 = new HashMap<>();
|
|
|
|
}
|
|
|
|
map2.put("name", "银行账户");
|
|
|
|
Map<String, Object> map = new HashMap<>();
|
|
|
|
map2.put("value", 572924);
|
|
|
|
if (allocation.getName().getText().equals("银行账户")) {
|
|
|
|
Map<String, Object> map3 = new HashMap<>();
|
|
|
|
map.put("name", allocation.getName().getText());
|
|
|
|
map3.put("name", "P2P账户");
|
|
|
|
map.put("value", allocation.getAvailableFunds());
|
|
|
|
map3.put("value", 150370);
|
|
|
|
} else {
|
|
|
|
Map<String, Object> map4 = new HashMap<>();
|
|
|
|
if (allocation.getName().getText().equals("P2P账户")) {
|
|
|
|
map4.put("name", "众筹账户");
|
|
|
|
map.put("name", "网络融资账户");
|
|
|
|
map4.put("value", 558499);
|
|
|
|
map.put("value", allocation.getTotalAssetsOfSubAccounts());
|
|
|
|
Map<String, Object> map5 = new HashMap<>();
|
|
|
|
} else {
|
|
|
|
map5.put("name", "股票基金投资账户");
|
|
|
|
map.put("name", allocation.getName().getText());
|
|
|
|
map5.put("value", 1118689);
|
|
|
|
map.put("value", allocation.getTotalAssetsOfSubAccounts());
|
|
|
|
Map<String, Object> map6 = new HashMap<>();
|
|
|
|
}
|
|
|
|
map6.put("name", "期货投资账户");
|
|
|
|
}
|
|
|
|
map6.put("value", 247149);
|
|
|
|
pieMaps.add(map);
|
|
|
|
Map<String, Object> map7 = new HashMap<>();
|
|
|
|
}
|
|
|
|
map7.put("name", "期权投资账户");
|
|
|
|
|
|
|
|
map7.put("value", 5038001);
|
|
|
|
// Map<String, Object> map2 = new HashMap<>();
|
|
|
|
pieMaps.add(map1);
|
|
|
|
// map2.put("name", "银行账户");
|
|
|
|
pieMaps.add(map2);
|
|
|
|
// map2.put("value", 572924);
|
|
|
|
pieMaps.add(map3);
|
|
|
|
// Map<String, Object> map3 = new HashMap<>();
|
|
|
|
pieMaps.add(map4);
|
|
|
|
// map3.put("name", "P2P账户");
|
|
|
|
pieMaps.add(map5);
|
|
|
|
// map3.put("value", 150370);
|
|
|
|
pieMaps.add(map6);
|
|
|
|
// Map<String, Object> map4 = new HashMap<>();
|
|
|
|
pieMaps.add(map7);
|
|
|
|
// map4.put("name", "众筹账户");
|
|
|
|
|
|
|
|
// map4.put("value", 558499);
|
|
|
|
|
|
|
|
// Map<String, Object> map5 = new HashMap<>();
|
|
|
|
|
|
|
|
// map5.put("name", "股票基金投资账户");
|
|
|
|
|
|
|
|
// map5.put("value", 1118689);
|
|
|
|
|
|
|
|
// Map<String, Object> map6 = new HashMap<>();
|
|
|
|
|
|
|
|
// map6.put("name", "期货投资账户");
|
|
|
|
|
|
|
|
// map6.put("value", 247149);
|
|
|
|
|
|
|
|
// Map<String, Object> map7 = new HashMap<>();
|
|
|
|
|
|
|
|
// map7.put("name", "期权投资账户");
|
|
|
|
|
|
|
|
// map7.put("value", 5038001);
|
|
|
|
|
|
|
|
// pieMaps.add(map2);
|
|
|
|
|
|
|
|
// pieMaps.add(map3);
|
|
|
|
|
|
|
|
// pieMaps.add(map4);
|
|
|
|
|
|
|
|
// pieMaps.add(map5);
|
|
|
|
|
|
|
|
// pieMaps.add(map6);
|
|
|
|
|
|
|
|
// pieMaps.add(map7);
|
|
|
|
//我的收益率
|
|
|
|
//我的收益率
|
|
|
|
Map<String, Object> lineMap = new HashMap<>();
|
|
|
|
Map<String, Object> lineMap = new HashMap<>();
|
|
|
|
List<String> xList = new ArrayList<>();
|
|
|
|
List<String> xList = new ArrayList<>();
|
|
|
@ -170,6 +198,7 @@ public class ApiStudentService {
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
/**
|
|
|
|
* 学生端-注册
|
|
|
|
* 学生端-注册
|
|
|
|
|
|
|
|
*
|
|
|
|
* @param dto
|
|
|
|
* @param dto
|
|
|
|
* @return
|
|
|
|
* @return
|
|
|
|
*/
|
|
|
|
*/
|
|
|
@ -187,6 +216,7 @@ public class ApiStudentService {
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
/**
|
|
|
|
* 学生端-独有的修改密码
|
|
|
|
* 学生端-独有的修改密码
|
|
|
|
|
|
|
|
*
|
|
|
|
* @param dto
|
|
|
|
* @param dto
|
|
|
|
*/
|
|
|
|
*/
|
|
|
|
public void editPwd(@NotNull(message = "修改密码信息不能为空!") StudentEditPasswordDTO dto) {
|
|
|
|
public void editPwd(@NotNull(message = "修改密码信息不能为空!") StudentEditPasswordDTO dto) {
|
|
|
@ -226,6 +256,7 @@ public class ApiStudentService {
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
/**
|
|
|
|
* 学生活跃度信息
|
|
|
|
* 学生活跃度信息
|
|
|
|
|
|
|
|
*
|
|
|
|
* @return
|
|
|
|
* @return
|
|
|
|
*/
|
|
|
|
*/
|
|
|
|
public StudentActiveInfo studentActiveInfo() {
|
|
|
|
public StudentActiveInfo studentActiveInfo() {
|
|
|
|