|
|
@ -20,10 +20,10 @@ package com.elink.esua.epdc.controller; |
|
|
|
import com.elink.esua.epdc.commons.tools.constant.Constant; |
|
|
|
import com.elink.esua.epdc.commons.tools.utils.Result; |
|
|
|
import com.elink.esua.epdc.commons.tools.validator.ValidatorUtils; |
|
|
|
import com.elink.esua.epdc.dto.epdc.form.EpdcContentListFormDTO; |
|
|
|
import com.elink.esua.epdc.dto.epdc.form.EpdcNoticeBrowseFormDTO; |
|
|
|
import com.elink.esua.epdc.dto.epdc.form.EpdcNoticeListFormDTO; |
|
|
|
import com.elink.esua.epdc.dto.epdc.result.EpdcNoticeDetailResultDTO; |
|
|
|
import com.elink.esua.epdc.dto.epdc.result.EpdcNoticeListResultDTO; |
|
|
|
import com.elink.esua.epdc.dto.epdc.result.*; |
|
|
|
import com.elink.esua.epdc.service.NoticeService; |
|
|
|
import org.springframework.beans.factory.annotation.Autowired; |
|
|
|
import org.springframework.web.bind.annotation.*; |
|
|
@ -84,4 +84,47 @@ public class EpdcAppNoticeController { |
|
|
|
ValidatorUtils.validateEntity(formDto); |
|
|
|
return this.noticeService.updateReadingAmount(formDto); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
/** |
|
|
|
* 社区资讯-栏目列表 |
|
|
|
* |
|
|
|
* @return com.elink.esua.epdc.commons.tools.utils.Result<java.util.List<com.elink.esua.epdc.dto.epdc.result.EpdcNoticeModuleListResultDTO>> |
|
|
|
* @author lc |
|
|
|
* @since 2021/8/28 21:15 |
|
|
|
*/ |
|
|
|
@GetMapping("contentModuleList") |
|
|
|
public Result<List<EpdcNoticeModuleListResultDTO>> listContentModules() { |
|
|
|
List<EpdcNoticeModuleListResultDTO> data = noticeService.listContentModules(); |
|
|
|
return new Result<List<EpdcNoticeModuleListResultDTO>>().ok(data); |
|
|
|
} |
|
|
|
|
|
|
|
/** |
|
|
|
* 社区资讯-资讯列表 |
|
|
|
* |
|
|
|
* @param formDto |
|
|
|
* @return com.elink.esua.epdc.commons.tools.utils.Result<java.util.List<com.elink.esua.epdc.dto.epdc.result.EpdcContentListResultDTO>> |
|
|
|
* @author lc |
|
|
|
* @since 2021/8/28 21:22 |
|
|
|
*/ |
|
|
|
@GetMapping("contentList") |
|
|
|
public Result<List<EpdcContentListResultDTO>> listContents(@RequestBody EpdcContentListFormDTO formDto) { |
|
|
|
ValidatorUtils.validateEntity(formDto); |
|
|
|
List<EpdcContentListResultDTO> data = noticeService.listContents(formDto); |
|
|
|
return new Result<List<EpdcContentListResultDTO>>().ok(data); |
|
|
|
} |
|
|
|
|
|
|
|
/** |
|
|
|
* 社区资讯-资讯详情 |
|
|
|
* |
|
|
|
* @param id |
|
|
|
* @return com.elink.esua.epdc.commons.tools.utils.Result<com.elink.esua.epdc.dto.epdc.result.EpdcContentDetailResultDTO> |
|
|
|
* @author lc |
|
|
|
* @since 2021/8/28 21:24 |
|
|
|
*/ |
|
|
|
@GetMapping("contentDetail/{id}") |
|
|
|
public Result<EpdcContentDetailResultDTO> getContentDetailById(@PathVariable("id") String id) { |
|
|
|
EpdcContentDetailResultDTO data = noticeService.getContentDetailById(id); |
|
|
|
return new Result<EpdcContentDetailResultDTO>().ok(data); |
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|