活跃度信息

beetlsql3-dev
malx 2 years ago
parent e349b6f250
commit 70fcf56fb3

@ -4,6 +4,7 @@ import cn.hutool.core.util.ObjectUtil;
import com.ibeetl.jlw.entity.CourseInfo;
import com.ibeetl.jlw.entity.Student;
import com.ibeetl.jlw.entity.StudentExtendSchoolInfo;
import com.ibeetl.jlw.entity.api.student.StudentActiveInfo;
import com.ibeetl.jlw.entity.dto.StudentEditPasswordDTO;
import com.ibeetl.jlw.web.query.StudentQuery;
import org.beetl.sql.core.engine.PageQuery;
@ -71,4 +72,6 @@ public interface StudentDao extends BaseMapper<Student>{
* @return
*/
Student getStudentByStudentEditPasswordDTO(StudentEditPasswordDTO dto);
StudentActiveInfo studentActiveInfo(Long studentId);
}

@ -0,0 +1,31 @@
package com.ibeetl.jlw.entity.api.student;
import com.ibeetl.admin.core.entity.BaseEntity;
import lombok.Data;
import lombok.EqualsAndHashCode;
/**
* -
*/
@Data
@EqualsAndHashCode(callSuper = false)
public class StudentActiveInfo extends BaseEntity {
/**
*
*/
private String studyDuration;
/**
*
*/
private String platformRankNo;
/**
*
*/
private String classRankNo;
/**
*
*/
private String loginDays;
}

@ -8,6 +8,7 @@ import com.ibeetl.jlw.dao.StudentDao;
import com.ibeetl.jlw.dao.TeacherOpenCourseMergeStudentDao;
import com.ibeetl.jlw.entity.*;
import com.ibeetl.jlw.entity.api.CurrentUserInfo;
import com.ibeetl.jlw.entity.api.student.StudentActiveInfo;
import com.ibeetl.jlw.entity.api.student.StudentIndexData;
import com.ibeetl.jlw.entity.dto.StudentEditPasswordDTO;
import com.ibeetl.jlw.entity.dto.StudentRegisterDTO;
@ -25,6 +26,8 @@ import org.springframework.validation.annotation.Validated;
import javax.validation.constraints.NotNull;
import java.util.List;
import static cn.jlw.util.CacheUserUtil.getStudent;
/**
* <p>
* -API
@ -138,4 +141,14 @@ public class ApiStudentService {
Boolean updateSuccess = coreUserService.editPwdByOld(dto.getOldPwd(), dto.getNewPwd(), studentInfo.getUserId());
Assert.isTrue(updateSuccess, "密码修改失败!");
}
/**
*
* @return
*/
public StudentActiveInfo studentActiveInfo() {
Student student = getStudent();
Assert.notNull(student, "该接口只能学生查看!");
return studentDao.studentActiveInfo(student.getStudentId());
}
}

@ -58,4 +58,8 @@ public class ApiStudentController {
return JsonResult.success();
}
@PostMapping("studentActiveInfo.do")
public JsonResult studentActiveInfo() {
return JsonResult.success(apiStudentService.studentActiveInfo());
}
}

@ -1449,4 +1449,14 @@ getStudentByStudentEditPasswordDTO
AND t.student_name = #studentName#
AND t.student_sn = #studentSn#
AND ta.PASSWORD = #oldPwd#
studentActiveInfo
===
* 学生端-活跃度信息
select
'0天10小时2分钟' as study_duration,
230 as platform_rank_no,
10 as class_rank_no,
20 as login_days,
'该数据仅用于测试' as data_type
Loading…
Cancel
Save