mirror of
https://codeup.aliyun.com/67762337eccfc218f6110e0e/per-boe/java-servers.git
synced 2025-12-08 10:26:48 +08:00
在线管理资源完成情况修改,添加日志,先暂时注释
This commit is contained in:
@@ -1,10 +1,13 @@
|
||||
package com.xboe.module.course.dao;
|
||||
|
||||
import org.springframework.data.jpa.repository.Query;
|
||||
import org.springframework.stereotype.Repository;
|
||||
|
||||
import com.xboe.core.orm.BaseDao;
|
||||
import com.xboe.module.course.entity.CourseContent;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@Repository
|
||||
public class CourseContentDao extends BaseDao<CourseContent> {
|
||||
|
||||
@@ -20,4 +23,9 @@ public class CourseContentDao extends BaseDao<CourseContent> {
|
||||
int count=count(hql, courseId);
|
||||
return count;
|
||||
}
|
||||
|
||||
public List<CourseContent> findContentList(String courseId) {
|
||||
String sql = "select * from CourseContent c where c.courseId = ?1";
|
||||
return findList(sql, courseId);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -137,9 +137,9 @@ public class StudySignupServiceImpl implements IStudySignupService{
|
||||
|
||||
@Override
|
||||
public StudyCourseItem addStudyCourseItem(StudySignup signup) {
|
||||
List<CourseContent> courseContents = contentDao.sqlFindList("SELECT * from boe_course_content where course_id = "+ signup.getCourseId());
|
||||
List<CourseContent> courseContents = contentDao.findContentList(signup.getCourseId());
|
||||
if (!courseContents.isEmpty()) {
|
||||
log.info("查看在线课集合内容数据(共 {} 条记录)", courseContents.toString());
|
||||
log.info("查看在线课集合内容数据(共 {} 条记录)", courseContents.size());
|
||||
for (CourseContent c : courseContents){
|
||||
log.info("查看在线课内容数据: {}", c);
|
||||
// 使用toString()或自定义格式化字符串
|
||||
|
||||
Reference in New Issue
Block a user