|
@@ -979,28 +979,6 @@ public class CommunityArticleController extends BaseController {
|
|
|
return AjaxResult.success(communityCollection);
|
|
|
}
|
|
|
|
|
|
- /**
|
|
|
- * 用户删除合集
|
|
|
- *
|
|
|
- * @param collectionId 合集id
|
|
|
- * @return 是否成功
|
|
|
- */
|
|
|
- @ApiOperation("用户删除合集")
|
|
|
- @DeleteMapping("/deleteCollection")
|
|
|
- @Transactional
|
|
|
- public AjaxResult deleteCollection(Long collectionId) {
|
|
|
- if (Objects.isNull(collectionId)) {
|
|
|
- return AjaxResult.error("参数异常!");
|
|
|
- }
|
|
|
- try {
|
|
|
- communityCollectionService.deleteCollectionById(collectionId);
|
|
|
- } catch (Exception e) {
|
|
|
- System.out.println(e.getMessage());
|
|
|
- throw new ProjectException();
|
|
|
- }
|
|
|
- return AjaxResult.success("删除成功!");
|
|
|
- }
|
|
|
-
|
|
|
/**
|
|
|
* 更新合集信息
|
|
|
*
|
|
@@ -1027,6 +1005,29 @@ public class CommunityArticleController extends BaseController {
|
|
|
}
|
|
|
|
|
|
|
|
|
+ /**
|
|
|
+ * 用户删除合集
|
|
|
+ *
|
|
|
+ * @param collectionId 合集id
|
|
|
+ * @return 是否成功
|
|
|
+ */
|
|
|
+ @ApiOperation("用户删除合集")
|
|
|
+ @DeleteMapping("/deleteCollection")
|
|
|
+ @Transactional
|
|
|
+ public AjaxResult deleteCollection(Long collectionId) {
|
|
|
+ if (Objects.isNull(collectionId)) {
|
|
|
+ return AjaxResult.error("参数异常!");
|
|
|
+ }
|
|
|
+ try {
|
|
|
+ communityCollectionService.deleteCollectionById(collectionId);
|
|
|
+ } catch (Exception e) {
|
|
|
+ System.out.println(e.getMessage());
|
|
|
+ throw new ProjectException();
|
|
|
+ }
|
|
|
+ return AjaxResult.success("删除成功!");
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
/**
|
|
|
* 合集内新增文章
|
|
|
*
|
|
@@ -1234,6 +1235,25 @@ public class CommunityArticleController extends BaseController {
|
|
|
}
|
|
|
return AjaxResult.success(communityUserPromptVo);
|
|
|
}
|
|
|
+ @ApiOperation("个人未加入集合文章")
|
|
|
+ @GetMapping("/userNoCo")
|
|
|
+ @Anonymous
|
|
|
+ public AjaxResult userNoCo(@RequestParam(required = false) Long userId) {
|
|
|
+ int pageNum = Convert.toInt(ServletUtils.getParameter("pageNum"), 1);
|
|
|
+ int pageSize = Convert.toInt(ServletUtils.getParameter("pageSize"), 10);
|
|
|
+ int searchType = Convert.toInt(ServletUtils.getParameter("searchType"), 0);
|
|
|
+ List<CommunityArticleVo> communityArticleVos = null;
|
|
|
+ if (userId == null) {
|
|
|
+ userId = SecurityUtils.getUserId();
|
|
|
+ }
|
|
|
+ try {
|
|
|
+ communityArticleVos = communityArticleService.selectUserNoCo(userId, pageNum, pageSize, searchType);
|
|
|
+ } catch (Exception e) {
|
|
|
+ System.out.println(e.getMessage());
|
|
|
+ throw new ProjectException();
|
|
|
+ }
|
|
|
+ return AjaxResult.success(communityArticleVos);
|
|
|
+ }
|
|
|
|
|
|
@ApiOperation("个人喜欢文章")
|
|
|
@GetMapping("/userLike")
|