|
|
|
@ -20,6 +20,7 @@ import com.ibeetl.jlw.entity.Teacher;
|
|
|
|
|
import com.ibeetl.jlw.entity.TeacherOpenCourseChatLog;
|
|
|
|
|
import com.ibeetl.jlw.entity.dto.TeacherOpenCourseChatLogStudentDTO;
|
|
|
|
|
import com.ibeetl.jlw.entity.dto.TeacherOpenCourseChatLogTeacherDTO;
|
|
|
|
|
import com.ibeetl.jlw.entity.vo.TeacherOpenCourseChatLogGroupInfoVO;
|
|
|
|
|
import com.ibeetl.jlw.service.TeacherOpenCourseChatLogService;
|
|
|
|
|
import com.ibeetl.jlw.web.query.TeacherOpenCourseChatLogQuery;
|
|
|
|
|
import lombok.SneakyThrows;
|
|
|
|
@ -60,17 +61,18 @@ public class TeacherOpenCourseChatLogController extends BaseController {
|
|
|
|
|
@Autowired
|
|
|
|
|
private TeacherOpenCourseChatLogService teacherOpenCourseChatLogService;
|
|
|
|
|
|
|
|
|
|
@Autowired FileService fileService;
|
|
|
|
|
@Autowired
|
|
|
|
|
FileService fileService;
|
|
|
|
|
@Autowired
|
|
|
|
|
private CoreUserService coreUserService;
|
|
|
|
|
|
|
|
|
|
/* 前端接口 */
|
|
|
|
|
|
|
|
|
|
@PostMapping(API + "/getPageList.do")
|
|
|
|
|
public JsonResult<PageQuery> getPageList(TeacherOpenCourseChatLogQuery condition,@SCoreUser CoreUser coreUser){
|
|
|
|
|
if(null == coreUser){
|
|
|
|
|
public JsonResult<PageQuery> getPageList(TeacherOpenCourseChatLogQuery condition, @SCoreUser CoreUser coreUser) {
|
|
|
|
|
if (null == coreUser) {
|
|
|
|
|
return JsonResult.failMessage("请登录后再操作");
|
|
|
|
|
}else{
|
|
|
|
|
} else {
|
|
|
|
|
PageQuery page = condition.getPageQuery();
|
|
|
|
|
teacherOpenCourseChatLogService.queryByConditionQuery(page);
|
|
|
|
|
return JsonResult.success(page);
|
|
|
|
@ -85,14 +87,14 @@ public class TeacherOpenCourseChatLogController extends BaseController {
|
|
|
|
|
* @return
|
|
|
|
|
*/
|
|
|
|
|
@PostMapping(API + "/getKeywordsList.do")
|
|
|
|
|
public JsonResult<PageQuery> getKeywordsList(TeacherOpenCourseChatLogQuery condition,@SCoreUser CoreUser coreUser){
|
|
|
|
|
if(null == coreUser){
|
|
|
|
|
public JsonResult<PageQuery> getKeywordsList(TeacherOpenCourseChatLogQuery condition, @SCoreUser CoreUser coreUser) {
|
|
|
|
|
if (null == coreUser) {
|
|
|
|
|
return JsonResult.failMessage("请登录后再操作");
|
|
|
|
|
}else{
|
|
|
|
|
} else {
|
|
|
|
|
PageQuery page = condition.getPageQuery();
|
|
|
|
|
teacherOpenCourseChatLogService.queryByConditionQuery(page);
|
|
|
|
|
// 只获取关键字列表
|
|
|
|
|
if(ObjectUtil.isNotEmpty(page.getList())) {
|
|
|
|
|
if (ObjectUtil.isNotEmpty(page.getList())) {
|
|
|
|
|
List<String> resList = ((List<TeacherOpenCourseChatLog>) page.getList()).stream()
|
|
|
|
|
.map(TeacherOpenCourseChatLog::getKeywords).distinct().collect(Collectors.toList());
|
|
|
|
|
page.setList(resList);
|
|
|
|
@ -103,23 +105,23 @@ public class TeacherOpenCourseChatLogController extends BaseController {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@GetMapping(API + "/getInfo.do")
|
|
|
|
|
public JsonResult<TeacherOpenCourseChatLog>getInfo(TeacherOpenCourseChatLogQuery param,@SCoreUser CoreUser coreUser) {
|
|
|
|
|
if(null == coreUser){
|
|
|
|
|
public JsonResult<TeacherOpenCourseChatLog> getInfo(TeacherOpenCourseChatLogQuery param, @SCoreUser CoreUser coreUser) {
|
|
|
|
|
if (null == coreUser) {
|
|
|
|
|
return JsonResult.failMessage("请登录后再操作");
|
|
|
|
|
}else{
|
|
|
|
|
} else {
|
|
|
|
|
TeacherOpenCourseChatLog teacherOpenCourseChatLog = teacherOpenCourseChatLogService.getInfo(param);
|
|
|
|
|
return JsonResult.success(teacherOpenCourseChatLog);
|
|
|
|
|
return JsonResult.success(teacherOpenCourseChatLog);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@GetMapping(API + "/getList.do")
|
|
|
|
|
public JsonResult<List<TeacherOpenCourseChatLog>>getList(TeacherOpenCourseChatLogQuery param,@SCoreUser CoreUser coreUser) {
|
|
|
|
|
if(null == coreUser){
|
|
|
|
|
public JsonResult<List<TeacherOpenCourseChatLog>> getList(TeacherOpenCourseChatLogQuery param, @SCoreUser CoreUser coreUser) {
|
|
|
|
|
if (null == coreUser) {
|
|
|
|
|
return JsonResult.failMessage("请登录后再操作");
|
|
|
|
|
}else{
|
|
|
|
|
List<TeacherOpenCourseChatLog>list = teacherOpenCourseChatLogService.getValuesByQuery(param);
|
|
|
|
|
return JsonResult.success(list);
|
|
|
|
|
} else {
|
|
|
|
|
List<TeacherOpenCourseChatLog> list = teacherOpenCourseChatLogService.getValuesByQuery(param);
|
|
|
|
|
return JsonResult.success(list);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
@ -127,11 +129,11 @@ public class TeacherOpenCourseChatLogController extends BaseController {
|
|
|
|
|
public JsonResult addDo(
|
|
|
|
|
@Validated(ValidateConfig.ADD.class)
|
|
|
|
|
@RequestBody TeacherOpenCourseChatLogQuery teacherOpenCourseChatLogQuery,
|
|
|
|
|
BindingResult result, @SCoreUser CoreUser coreUser, @TTeacher Teacher teacher, @TStudent Student student){
|
|
|
|
|
if(result.hasErrors()){
|
|
|
|
|
BindingResult result, @SCoreUser CoreUser coreUser, @TTeacher Teacher teacher, @TStudent Student student) {
|
|
|
|
|
if (result.hasErrors()) {
|
|
|
|
|
return JsonResult.failMessage(result);
|
|
|
|
|
}else{
|
|
|
|
|
|
|
|
|
|
} else {
|
|
|
|
|
|
|
|
|
|
teacherOpenCourseChatLogQuery.setUserId(coreUser.getId());
|
|
|
|
|
teacherOpenCourseChatLogQuery.setOrgId(coreUser.getOrgId());
|
|
|
|
|
if (ObjectUtil.isNotEmpty(teacher)) {
|
|
|
|
@ -146,6 +148,7 @@ public class TeacherOpenCourseChatLogController extends BaseController {
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* 学生身份发布讨论
|
|
|
|
|
*
|
|
|
|
|
* @param studentDTO
|
|
|
|
|
* @param result
|
|
|
|
|
* @param coreUser
|
|
|
|
@ -156,11 +159,11 @@ public class TeacherOpenCourseChatLogController extends BaseController {
|
|
|
|
|
public JsonResult studentSend(
|
|
|
|
|
@Validated
|
|
|
|
|
@RequestBody TeacherOpenCourseChatLogStudentDTO studentDTO,
|
|
|
|
|
BindingResult result, @SCoreUser CoreUser coreUser, @TStudent Student student){
|
|
|
|
|
if(result.hasErrors()){
|
|
|
|
|
BindingResult result, @SCoreUser CoreUser coreUser, @TStudent Student student) {
|
|
|
|
|
if (result.hasErrors()) {
|
|
|
|
|
return JsonResult.failMessage(result);
|
|
|
|
|
}else{
|
|
|
|
|
|
|
|
|
|
} else {
|
|
|
|
|
|
|
|
|
|
Assert.notNull(student, "该接口仅限学生使用");
|
|
|
|
|
|
|
|
|
|
TeacherOpenCourseChatLogQuery teacherOpenCourseChatLogQuery = new TeacherOpenCourseChatLogQuery();
|
|
|
|
@ -177,6 +180,7 @@ public class TeacherOpenCourseChatLogController extends BaseController {
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* 教师身份发布讨论
|
|
|
|
|
*
|
|
|
|
|
* @param teacherDTO
|
|
|
|
|
* @param result
|
|
|
|
|
* @param coreUser
|
|
|
|
@ -187,11 +191,11 @@ public class TeacherOpenCourseChatLogController extends BaseController {
|
|
|
|
|
public JsonResult teacherSend(
|
|
|
|
|
@Validated
|
|
|
|
|
@RequestBody TeacherOpenCourseChatLogTeacherDTO teacherDTO,
|
|
|
|
|
BindingResult result, @SCoreUser CoreUser coreUser, @TTeacher Teacher teacher){
|
|
|
|
|
if(result.hasErrors()){
|
|
|
|
|
BindingResult result, @SCoreUser CoreUser coreUser, @TTeacher Teacher teacher) {
|
|
|
|
|
if (result.hasErrors()) {
|
|
|
|
|
return JsonResult.failMessage(result);
|
|
|
|
|
}else{
|
|
|
|
|
|
|
|
|
|
} else {
|
|
|
|
|
|
|
|
|
|
Assert.notNull(teacher, "该接口仅限教师使用");
|
|
|
|
|
|
|
|
|
|
TeacherOpenCourseChatLogQuery teacherOpenCourseChatLogQuery = new TeacherOpenCourseChatLogQuery();
|
|
|
|
@ -208,6 +212,7 @@ public class TeacherOpenCourseChatLogController extends BaseController {
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* 教师端-给学生打分
|
|
|
|
|
*
|
|
|
|
|
* @param teacherOpenCourseChatLogId
|
|
|
|
|
* @param studentScore
|
|
|
|
|
* @param result
|
|
|
|
@ -218,11 +223,11 @@ public class TeacherOpenCourseChatLogController extends BaseController {
|
|
|
|
|
@NotNull(message = "互动ID不能为空!")
|
|
|
|
|
Long teacherOpenCourseChatLogId,
|
|
|
|
|
@NotNull(message = "学生分数不能为空!")
|
|
|
|
|
BigDecimal studentScore, BindingResult result){
|
|
|
|
|
BigDecimal studentScore, BindingResult result) {
|
|
|
|
|
|
|
|
|
|
if(result.hasErrors()){
|
|
|
|
|
if (result.hasErrors()) {
|
|
|
|
|
return JsonResult.failMessage(result);
|
|
|
|
|
}else{
|
|
|
|
|
} else {
|
|
|
|
|
TeacherOpenCourseChatLogQuery teacherOpenCourseChatLogQuery = new TeacherOpenCourseChatLogQuery();
|
|
|
|
|
teacherOpenCourseChatLogQuery.setTeacherOpenCourseChatLogId(teacherOpenCourseChatLogId);
|
|
|
|
|
teacherOpenCourseChatLogQuery.setStudentScore(studentScore);
|
|
|
|
@ -230,7 +235,7 @@ public class TeacherOpenCourseChatLogController extends BaseController {
|
|
|
|
|
if (StringUtils.isBlank(msg)) {
|
|
|
|
|
return JsonResult.success();
|
|
|
|
|
} else {
|
|
|
|
|
return JsonResult.failMessage("更新失败,"+msg);
|
|
|
|
|
return JsonResult.failMessage("更新失败," + msg);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
@ -250,7 +255,7 @@ public class TeacherOpenCourseChatLogController extends BaseController {
|
|
|
|
|
@GetMapping(MODEL + "/index.do")
|
|
|
|
|
@Function("teacherOpenCourseChatLog.query")
|
|
|
|
|
public ModelAndView index() {
|
|
|
|
|
ModelAndView view = new ModelAndView("/jlw/teacherOpenCourseChatLog/index.html") ;
|
|
|
|
|
ModelAndView view = new ModelAndView("/jlw/teacherOpenCourseChatLog/index.html");
|
|
|
|
|
view.addObject("search", TeacherOpenCourseChatLogQuery.class.getName());
|
|
|
|
|
return view;
|
|
|
|
|
}
|
|
|
|
@ -268,10 +273,10 @@ public class TeacherOpenCourseChatLogController extends BaseController {
|
|
|
|
|
@Function("teacherOpenCourseChatLog.add")
|
|
|
|
|
public ModelAndView add(Long teacherOpenCourseChatLogId) {
|
|
|
|
|
ModelAndView view = new ModelAndView("/jlw/teacherOpenCourseChatLog/add.html");
|
|
|
|
|
if(null != teacherOpenCourseChatLogId){
|
|
|
|
|
if (null != teacherOpenCourseChatLogId) {
|
|
|
|
|
TeacherOpenCourseChatLog teacherOpenCourseChatLog = teacherOpenCourseChatLogService.queryById(teacherOpenCourseChatLogId);
|
|
|
|
|
view.addObject("teacherOpenCourseChatLog", teacherOpenCourseChatLog);
|
|
|
|
|
}else {
|
|
|
|
|
} else {
|
|
|
|
|
view.addObject("teacherOpenCourseChatLog", new TeacherOpenCourseChatLog());
|
|
|
|
|
}
|
|
|
|
|
return view;
|
|
|
|
@ -289,6 +294,7 @@ public class TeacherOpenCourseChatLogController extends BaseController {
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* 学生端-分页查看评论区详情
|
|
|
|
|
*
|
|
|
|
|
* @param condition
|
|
|
|
|
* @param coreUser
|
|
|
|
|
* @return
|
|
|
|
@ -304,17 +310,17 @@ public class TeacherOpenCourseChatLogController extends BaseController {
|
|
|
|
|
|
|
|
|
|
@PostMapping(MODEL + "/addAll.json")
|
|
|
|
|
@Function("teacherOpenCourseChatLog.add")
|
|
|
|
|
public JsonResult addAll(TeacherOpenCourseChatLogQuery teacherOpenCourseChatLogQuery,@SCoreUser CoreUser coreUser){
|
|
|
|
|
if(null == coreUser){
|
|
|
|
|
public JsonResult addAll(TeacherOpenCourseChatLogQuery teacherOpenCourseChatLogQuery, @SCoreUser CoreUser coreUser) {
|
|
|
|
|
if (null == coreUser) {
|
|
|
|
|
return JsonResult.failMessage("请登录后再操作");
|
|
|
|
|
}else{
|
|
|
|
|
teacherOpenCourseChatLogQuery.setUserId(coreUser.getId());
|
|
|
|
|
teacherOpenCourseChatLogQuery.setOrgId(coreUser.getOrgId());
|
|
|
|
|
} else {
|
|
|
|
|
teacherOpenCourseChatLogQuery.setUserId(coreUser.getId());
|
|
|
|
|
teacherOpenCourseChatLogQuery.setOrgId(coreUser.getOrgId());
|
|
|
|
|
String msg = teacherOpenCourseChatLogService.addAll(teacherOpenCourseChatLogQuery);
|
|
|
|
|
if (StringUtils.isBlank(msg)) {
|
|
|
|
|
return JsonResult.success();
|
|
|
|
|
} else {
|
|
|
|
|
return JsonResult.failMessage("新增失败,"+msg);
|
|
|
|
|
return JsonResult.failMessage("新增失败," + msg);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
@ -323,11 +329,11 @@ public class TeacherOpenCourseChatLogController extends BaseController {
|
|
|
|
|
@Function("teacherOpenCourseChatLog.add")
|
|
|
|
|
public JsonResult add(
|
|
|
|
|
@Validated(ValidateConfig.ADD.class) @RequestBody TeacherOpenCourseChatLogQuery teacherOpenCourseChatLogQuery,
|
|
|
|
|
BindingResult result,@SCoreUser CoreUser coreUser, @TTeacher Teacher teacher, @TStudent Student student){
|
|
|
|
|
if(result.hasErrors()){
|
|
|
|
|
BindingResult result, @SCoreUser CoreUser coreUser, @TTeacher Teacher teacher, @TStudent Student student) {
|
|
|
|
|
if (result.hasErrors()) {
|
|
|
|
|
return JsonResult.failMessage(result);
|
|
|
|
|
}else{
|
|
|
|
|
|
|
|
|
|
} else {
|
|
|
|
|
|
|
|
|
|
teacherOpenCourseChatLogQuery.setUserId(coreUser.getId());
|
|
|
|
|
teacherOpenCourseChatLogQuery.setOrgId(coreUser.getOrgId());
|
|
|
|
|
if (ObjectUtil.isNotEmpty(teacher)) {
|
|
|
|
@ -342,8 +348,9 @@ public class TeacherOpenCourseChatLogController extends BaseController {
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* 教师端-学生端-添加互动消息
|
|
|
|
|
*
|
|
|
|
|
* @param teacherOpenCourseChatLogQuery
|
|
|
|
|
* @param type 1: 教师端, 其他:学生端
|
|
|
|
|
* @param type 1: 教师端, 其他:学生端
|
|
|
|
|
* @param result
|
|
|
|
|
* @param coreUser
|
|
|
|
|
* @return
|
|
|
|
@ -352,14 +359,14 @@ public class TeacherOpenCourseChatLogController extends BaseController {
|
|
|
|
|
public JsonResult addByType(
|
|
|
|
|
@RequestBody TeacherOpenCourseChatLogQuery teacherOpenCourseChatLogQuery,
|
|
|
|
|
Integer type,
|
|
|
|
|
BindingResult result, @SCoreUser CoreUser coreUser, @TTeacher Teacher teacher, @TStudent Student student){
|
|
|
|
|
BindingResult result, @SCoreUser CoreUser coreUser, @TTeacher Teacher teacher, @TStudent Student student) {
|
|
|
|
|
|
|
|
|
|
if(result.hasErrors()){
|
|
|
|
|
if (result.hasErrors()) {
|
|
|
|
|
return JsonResult.failMessage(result);
|
|
|
|
|
}else{
|
|
|
|
|
} else {
|
|
|
|
|
teacherOpenCourseChatLogQuery.setUserId(coreUser.getId());
|
|
|
|
|
teacherOpenCourseChatLogQuery.setOrgId(coreUser.getOrgId());
|
|
|
|
|
if(null == teacherOpenCourseChatLogQuery.getTeacherOpenCourseChatLogStatus()){
|
|
|
|
|
if (null == teacherOpenCourseChatLogQuery.getTeacherOpenCourseChatLogStatus()) {
|
|
|
|
|
teacherOpenCourseChatLogQuery.setTeacherOpenCourseChatLogStatus(1);
|
|
|
|
|
}
|
|
|
|
|
if (ObjectUtil.isNotEmpty(teacher)) {
|
|
|
|
@ -375,16 +382,16 @@ public class TeacherOpenCourseChatLogController extends BaseController {
|
|
|
|
|
@PostMapping(MODEL + "/edit.json")
|
|
|
|
|
@Function("teacherOpenCourseChatLog.edit")
|
|
|
|
|
public JsonResult<String> update(@Validated(ValidateConfig.UPDATE.class) @RequestBody TeacherOpenCourseChatLogQuery teacherOpenCourseChatLogQuery, BindingResult result) {
|
|
|
|
|
if(result.hasErrors()){
|
|
|
|
|
if (result.hasErrors()) {
|
|
|
|
|
return JsonResult.failMessage(result);
|
|
|
|
|
}else {
|
|
|
|
|
teacherOpenCourseChatLogQuery.setUserId(null);
|
|
|
|
|
teacherOpenCourseChatLogQuery.setOrgId(null);
|
|
|
|
|
} else {
|
|
|
|
|
teacherOpenCourseChatLogQuery.setUserId(null);
|
|
|
|
|
teacherOpenCourseChatLogQuery.setOrgId(null);
|
|
|
|
|
String msg = teacherOpenCourseChatLogService.edit(teacherOpenCourseChatLogQuery);
|
|
|
|
|
if (StringUtils.isBlank(msg)) {
|
|
|
|
|
return JsonResult.success();
|
|
|
|
|
} else {
|
|
|
|
|
return JsonResult.failMessage("更新失败,"+msg);
|
|
|
|
|
return JsonResult.failMessage("更新失败," + msg);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
@ -392,16 +399,16 @@ public class TeacherOpenCourseChatLogController extends BaseController {
|
|
|
|
|
|
|
|
|
|
@GetMapping(MODEL + "/view.json")
|
|
|
|
|
@Function("teacherOpenCourseChatLog.query")
|
|
|
|
|
public JsonResult<TeacherOpenCourseChatLog>queryInfo(Long teacherOpenCourseChatLogId) {
|
|
|
|
|
TeacherOpenCourseChatLog teacherOpenCourseChatLog = teacherOpenCourseChatLogService.queryById( teacherOpenCourseChatLogId);
|
|
|
|
|
return JsonResult.success(teacherOpenCourseChatLog);
|
|
|
|
|
public JsonResult<TeacherOpenCourseChatLog> queryInfo(Long teacherOpenCourseChatLogId) {
|
|
|
|
|
TeacherOpenCourseChatLog teacherOpenCourseChatLog = teacherOpenCourseChatLogService.queryById(teacherOpenCourseChatLogId);
|
|
|
|
|
return JsonResult.success(teacherOpenCourseChatLog);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@GetMapping(MODEL + "/getValues.json")
|
|
|
|
|
@Function("teacherOpenCourseChatLog.query")
|
|
|
|
|
public JsonResult<List<TeacherOpenCourseChatLog>>getValues(TeacherOpenCourseChatLogQuery param) {
|
|
|
|
|
List<TeacherOpenCourseChatLog>list = teacherOpenCourseChatLogService.getValuesByQuery(param);
|
|
|
|
|
return JsonResult.success(list);
|
|
|
|
|
public JsonResult<List<TeacherOpenCourseChatLog>> getValues(TeacherOpenCourseChatLogQuery param) {
|
|
|
|
|
List<TeacherOpenCourseChatLog> list = teacherOpenCourseChatLogService.getValuesByQuery(param);
|
|
|
|
|
return JsonResult.success(list);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@ -425,6 +432,7 @@ public class TeacherOpenCourseChatLogController extends BaseController {
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* 学校管理员端-讨论日志-分析 互动存档
|
|
|
|
|
*
|
|
|
|
|
* @param teacherOpenCourseId
|
|
|
|
|
* @return
|
|
|
|
|
*/
|
|
|
|
@ -436,13 +444,15 @@ public class TeacherOpenCourseChatLogController extends BaseController {
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* 学校管理员端-讨论日志-分析 互动存档
|
|
|
|
|
* @param teacherOpenCourseId
|
|
|
|
|
*
|
|
|
|
|
* @param condition
|
|
|
|
|
* @param coreUser
|
|
|
|
|
* @return
|
|
|
|
|
*/
|
|
|
|
|
@SneakyThrows
|
|
|
|
|
@PostMapping(MODEL + "/export.json")
|
|
|
|
|
public void export(TeacherOpenCourseChatLogQuery condition,@SCoreUser CoreUser coreUser) {
|
|
|
|
|
|
|
|
|
|
public void export(TeacherOpenCourseChatLogQuery condition, @SCoreUser CoreUser coreUser) {
|
|
|
|
|
|
|
|
|
|
/** 构建表头 */
|
|
|
|
|
Map<String, String> header = new LinkedHashMap<>(11);
|
|
|
|
|
header.put("teacherOpenCourseChatLogAddTime", "提问时间");
|
|
|
|
@ -460,7 +470,37 @@ public class TeacherOpenCourseChatLogController extends BaseController {
|
|
|
|
|
|
|
|
|
|
List<Map<String, Object>> maps = BeanCopyUtil.baseEntity2MapWithParallel(data.getList());
|
|
|
|
|
|
|
|
|
|
String filename = StrUtil.format("讨论列表导出-{}.xlsx", DateUtil.now());
|
|
|
|
|
write(response, filename,"Sheet1", header.values(), convertData(header.keySet(), maps));
|
|
|
|
|
String filename = StrUtil.format("讨论列表导出{}.xlsx", DateUtil.now());
|
|
|
|
|
write(response, filename, "Sheet1", header.values(), convertData(header.keySet(), maps));
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* 学校管理员端-讨论日志-分析 互动存档
|
|
|
|
|
*
|
|
|
|
|
* @param teacherOpenCourseId
|
|
|
|
|
* @param coreUser
|
|
|
|
|
* @return
|
|
|
|
|
*/
|
|
|
|
|
@SneakyThrows
|
|
|
|
|
@PostMapping(MODEL + "/groupInfo.json")
|
|
|
|
|
public JsonResult groupInfo(Long teacherOpenCourseId, @SCoreUser CoreUser coreUser) {
|
|
|
|
|
return JsonResult.success(teacherOpenCourseChatLogService.groupInfo(teacherOpenCourseId));
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* 学校管理员端-讨论日志-分析 互动存档
|
|
|
|
|
*
|
|
|
|
|
* @param teacherOpenCourseId
|
|
|
|
|
* @param coreUser
|
|
|
|
|
* @return
|
|
|
|
|
*/
|
|
|
|
|
@SneakyThrows
|
|
|
|
|
@PostMapping(MODEL + "/groupInfoExport.json")
|
|
|
|
|
public void groupInfoExport(Long teacherOpenCourseId, @SCoreUser CoreUser coreUser) {
|
|
|
|
|
List<TeacherOpenCourseChatLogGroupInfoVO> list = teacherOpenCourseChatLogService.groupInfo(teacherOpenCourseId);
|
|
|
|
|
|
|
|
|
|
String filename = StrUtil.format("讨论分组-汇总数据导出{}.xlsx", DateUtil.now());
|
|
|
|
|
write(response, filename,"Sheet1", TeacherOpenCourseChatLogGroupInfoVO.class, list);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|