|
|
@ -32,10 +32,6 @@ import com.epmet.commons.tools.validator.group.UpdateGroup; |
|
|
|
import com.epmet.dto.ArticleDTO; |
|
|
|
import com.epmet.dto.form.*; |
|
|
|
import com.epmet.dto.result.*; |
|
|
|
import com.epmet.dto.result.ArticleGridResultDTO; |
|
|
|
import com.epmet.dto.result.ArticleOperationResultDTO; |
|
|
|
import com.epmet.dto.result.GovArticleDetailResultDTO; |
|
|
|
import com.epmet.dto.result.PublishAgencyListResultDTO; |
|
|
|
import com.epmet.excel.ArticleExcel; |
|
|
|
import com.epmet.service.ArticleOperateRecordService; |
|
|
|
import com.epmet.service.ArticleService; |
|
|
@ -124,6 +120,7 @@ public class ArticleController { |
|
|
|
* @throws Exception |
|
|
|
*/ |
|
|
|
@GetMapping("savecontent") |
|
|
|
@RequirePermission(requirePermission = RequirePermissionEnum.WORK_PARTY_VOICE_PUBLISH) |
|
|
|
public Result<String> saveOrUpdateContent(@LoginUser TokenDto tokenDto,@RequestBody DraftContentFromDTO fromDTO) throws Exception { |
|
|
|
String draftId = articleService.saveOrUpdateContent(tokenDto, fromDTO); |
|
|
|
return new Result<String>().ok(draftId); |
|
|
@ -221,9 +218,13 @@ public class ArticleController { |
|
|
|
* @throws Exception |
|
|
|
*/ |
|
|
|
@GetMapping("saveattr") |
|
|
|
@RequirePermission(requirePermission = RequirePermissionEnum.WORK_PARTY_VOICE_PUBLISH) |
|
|
|
public Result<Boolean> saveDraftAttr(@LoginUser TokenDto tokenDto,@RequestBody DraftAttrFromDTO fromDTO) throws Exception { |
|
|
|
ValidatorUtils.validateEntity(fromDTO, DefaultGroup.class); |
|
|
|
Boolean isSuccess = articleService.saveDraftAttr(tokenDto, fromDTO); |
|
|
|
if (isSuccess){ |
|
|
|
//TODO 异步校验内容
|
|
|
|
} |
|
|
|
return new Result<Boolean>().ok(isSuccess); |
|
|
|
} |
|
|
|
|
|
|
@ -233,12 +234,25 @@ public class ArticleController { |
|
|
|
* @throws Exception |
|
|
|
*/ |
|
|
|
@GetMapping("previewsaveattr") |
|
|
|
@RequirePermission(requirePermission = RequirePermissionEnum.WORK_PARTY_VOICE_PUBLISH) |
|
|
|
public Result<Boolean> previewSaveDraftAttr(@LoginUser TokenDto tokenDto,@RequestBody DraftAttrFromDTO fromDTO) throws Exception { |
|
|
|
ValidatorUtils.validateEntity(fromDTO, DefaultGroup.class); |
|
|
|
Boolean isSuccess = articleService.previewSaveDraftAttr(tokenDto, fromDTO); |
|
|
|
return new Result<Boolean>().ok(isSuccess); |
|
|
|
} |
|
|
|
|
|
|
|
/** |
|
|
|
* desc:发布文章 |
|
|
|
* @param draftId |
|
|
|
* @throws Exception |
|
|
|
*/ |
|
|
|
@GetMapping("publish") |
|
|
|
@RequirePermission(requirePermission = RequirePermissionEnum.WORK_PARTY_VOICE_PUBLISH) |
|
|
|
public Result<Boolean> publishArticle(@LoginUser TokenDto tokenDto, String draftId) throws Exception { |
|
|
|
Boolean isSuccess = articleService.publish(tokenDto, draftId); |
|
|
|
return new Result<Boolean>().ok(isSuccess); |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
* 已发布文章列表 |
|
|
|