|
|
@@ -136,19 +136,22 @@ public class AdminNewsApiController extends BaseApiController {
|
|
|
}
|
|
|
|
|
|
/**
|
|
|
- * 新闻图片上传
|
|
|
+ * 新闻题图图片上传
|
|
|
*/
|
|
|
@RequestMapping(value = "/upload", method = RequestMethod.POST)
|
|
|
public Result upload(HttpServletRequest req, String sign) {
|
|
|
Result res = new Result();
|
|
|
AttachmentType attachmentType = AttachmentType.getField(sign);
|
|
|
- if (attachmentType == AttachmentType.NEWS_PIC) {
|
|
|
+ if (attachmentType == AttachmentType.NEWS_TITLE_PICTURE ||
|
|
|
+ attachmentType == AttachmentType.NEWS_CONTENT_PICTURE) {
|
|
|
res.setData(handleFiles(res, "/news/", false, req, sign, TokenManager.getAdminId()));
|
|
|
} else {
|
|
|
res.getError().add(buildError(ErrorConstants.PARAM_ERROR, "", "附件标示"));
|
|
|
}
|
|
|
return res;
|
|
|
}
|
|
|
+
|
|
|
+
|
|
|
|
|
|
private Result disposeInputNews(Result res, InputNews news, String createTimeFormattedDate) {
|
|
|
if (StringUtils.isBlank(news.getTitle())) {
|