|
@@ -3,7 +3,9 @@ package com.fs.course.controller;
|
|
|
import java.util.List;
|
|
|
|
|
|
import com.fs.common.core.domain.R;
|
|
|
+import com.fs.course.param.FsCourseWatchCommentPageParam;
|
|
|
import com.fs.course.vo.FsCourseWatchCommentListVO;
|
|
|
+import com.fs.qw.service.IQwExternalContactService;
|
|
|
import com.github.pagehelper.PageHelper;
|
|
|
import com.github.pagehelper.PageInfo;
|
|
|
import org.springframework.security.access.prepost.PreAuthorize;
|
|
@@ -38,16 +40,19 @@ public class FsCourseWatchCommentController extends BaseController
|
|
|
@Autowired
|
|
|
private IFsCourseWatchCommentService fsCourseWatchCommentService;
|
|
|
|
|
|
+ @Autowired
|
|
|
+ private IQwExternalContactService qwExternalContactService;
|
|
|
+
|
|
|
/**
|
|
|
* 查询看课评论列表
|
|
|
*/
|
|
|
@PreAuthorize("@ss.hasPermi('course:courseWatchComment:list')")
|
|
|
@GetMapping("/list")
|
|
|
- public R list(FsCourseWatchComment fsCourseWatchComment)
|
|
|
+ public R list(FsCourseWatchCommentPageParam fsCourseWatchCommentPageParam)
|
|
|
{
|
|
|
// startPage();
|
|
|
- PageHelper.startPage(fsCourseWatchComment.getPageNum(), fsCourseWatchComment.getPageSize());
|
|
|
- List<FsCourseWatchCommentListVO> list = fsCourseWatchCommentService.selectFsCourseWatchCommentList(fsCourseWatchComment);
|
|
|
+ PageHelper.startPage(fsCourseWatchCommentPageParam.getPageNum(), fsCourseWatchCommentPageParam.getPageSize());
|
|
|
+ List<FsCourseWatchCommentListVO> list = fsCourseWatchCommentService.selectFsCourseWatchCommentList(fsCourseWatchCommentPageParam);
|
|
|
PageInfo<FsCourseWatchCommentListVO> pageInfo = new PageInfo<>(list);
|
|
|
return R.ok().put("rows", pageInfo);
|
|
|
}
|
|
@@ -58,9 +63,9 @@ public class FsCourseWatchCommentController extends BaseController
|
|
|
@PreAuthorize("@ss.hasPermi('course:courseWatchComment:export')")
|
|
|
@Log(title = "看课评论", businessType = BusinessType.EXPORT)
|
|
|
@GetMapping("/export")
|
|
|
- public AjaxResult export(FsCourseWatchComment fsCourseWatchComment)
|
|
|
+ public AjaxResult export(FsCourseWatchCommentPageParam fsCourseWatchCommentPageParam)
|
|
|
{
|
|
|
- List<FsCourseWatchCommentListVO> list = fsCourseWatchCommentService.selectFsCourseWatchCommentList(fsCourseWatchComment);
|
|
|
+ List<FsCourseWatchCommentListVO> list = fsCourseWatchCommentService.selectFsCourseWatchCommentList(fsCourseWatchCommentPageParam);
|
|
|
ExcelUtil<FsCourseWatchCommentListVO> util = new ExcelUtil<FsCourseWatchCommentListVO>(FsCourseWatchCommentListVO.class);
|
|
|
return util.exportExcel(list, "看课评论数据");
|
|
|
}
|
|
@@ -107,4 +112,17 @@ public class FsCourseWatchCommentController extends BaseController
|
|
|
{
|
|
|
return toAjax(fsCourseWatchCommentService.deleteFsCourseWatchCommentByCommentIds(commentIds));
|
|
|
}
|
|
|
+
|
|
|
+ @Log(title = "手动拉黑外部联系人用户", businessType = BusinessType.UPDATE)
|
|
|
+ @PutMapping("/addBlack")
|
|
|
+ public R addBlack(Integer commentStatus, Long fsUserId)
|
|
|
+ {
|
|
|
+ int i = qwExternalContactService.updateQwExternalContactByFsUserId(commentStatus, fsUserId);
|
|
|
+ if (i > 0){
|
|
|
+ return R.ok();
|
|
|
+ } else {
|
|
|
+ return R.error();
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
}
|