|
@@ -862,6 +862,32 @@ public class CommunityArticleController extends BaseController {
|
|
return AjaxResult.success("删除成功!");
|
|
return AjaxResult.success("删除成功!");
|
|
}
|
|
}
|
|
|
|
|
|
|
|
+ /**
|
|
|
|
+ * 更新合集信息
|
|
|
|
+ * @param communityCollection
|
|
|
|
+ * @return
|
|
|
|
+ */
|
|
|
|
+ @ApiOperation("更新合集信息")
|
|
|
|
+ @PostMapping("/updateCollection")
|
|
|
|
+ @Transactional
|
|
|
|
+ public AjaxResult updateCollection(@RequestBody CommunityCollection communityCollection) {
|
|
|
|
+ if (Objects.isNull(communityCollection.getId())) {
|
|
|
|
+ return AjaxResult.error("合集ID不能为空");
|
|
|
|
+ }
|
|
|
|
+ Long userId = SecurityUtils.getLoginUser().getUserId();
|
|
|
|
+ try {
|
|
|
|
+ communityCollection.setUpdateBy(userId);
|
|
|
|
+ communityCollection.setUpdateTime(DateUtils.parseDate(DateUtils.getTime()));
|
|
|
|
+ communityCollectionMapper.updateById(communityCollection);
|
|
|
|
+ } catch (Exception e) {
|
|
|
|
+ System.out.println(e.getMessage());
|
|
|
|
+ throw new ProjectException();
|
|
|
|
+ }
|
|
|
|
+ return AjaxResult.success("文章更新成功!");
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+
|
|
/**
|
|
/**
|
|
* 合集内新增文章
|
|
* 合集内新增文章
|
|
*
|
|
*
|