15 changed files with 234 additions and 28 deletions
@ -0,0 +1,46 @@ |
|||||
|
package com.elink.esua.epdc.dto.epdc.result; |
||||
|
|
||||
|
import com.fasterxml.jackson.annotation.JsonFormat; |
||||
|
import lombok.Data; |
||||
|
|
||||
|
import java.io.Serializable; |
||||
|
import java.util.Date; |
||||
|
|
||||
|
/** |
||||
|
* 通知详情 |
||||
|
* |
||||
|
* @author yujintao |
||||
|
* @email yujintao@elink-cn.com |
||||
|
* @date 2019/9/6 14:34 |
||||
|
*/ |
||||
|
@Data |
||||
|
public class EpdcNoticeDetailResultDTO implements Serializable { |
||||
|
|
||||
|
private static final long serialVersionUID = -3010031928679964025L; |
||||
|
|
||||
|
/** |
||||
|
* id |
||||
|
*/ |
||||
|
private String id; |
||||
|
/** |
||||
|
* 通知标题 |
||||
|
*/ |
||||
|
private String noticeTitle; |
||||
|
/** |
||||
|
* 通知发布时间 |
||||
|
*/ |
||||
|
@JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8") |
||||
|
private Date noticeTime; |
||||
|
/** |
||||
|
* 通知所属部门 |
||||
|
*/ |
||||
|
private String deptName; |
||||
|
/** |
||||
|
* 内容 |
||||
|
*/ |
||||
|
private String noticeContent; |
||||
|
/** |
||||
|
* 阅读量 |
||||
|
*/ |
||||
|
private Integer readingAmount; |
||||
|
} |
@ -0,0 +1,72 @@ |
|||||
|
/** |
||||
|
* Copyright 2018 人人开源 https://www.renren.io
|
||||
|
* <p> |
||||
|
* This program is free software: you can redistribute it and/or modify |
||||
|
* it under the terms of the GNU General Public License as published by |
||||
|
* the Free Software Foundation, either version 3 of the License, or |
||||
|
* (at your option) any later version. |
||||
|
* <p> |
||||
|
* This program is distributed in the hope that it will be useful, |
||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of |
||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
||||
|
* GNU General Public License for more details. |
||||
|
* <p> |
||||
|
* You should have received a copy of the GNU General Public License |
||||
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
*/ |
||||
|
|
||||
|
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.EpdcNoticeFormDTO; |
||||
|
import com.elink.esua.epdc.dto.epdc.result.EpdcNoticeDetailResultDTO; |
||||
|
import com.elink.esua.epdc.dto.epdc.result.EpdcNoticeResultDTO; |
||||
|
import com.elink.esua.epdc.service.NoticeService; |
||||
|
import org.springframework.beans.factory.annotation.Autowired; |
||||
|
import org.springframework.web.bind.annotation.*; |
||||
|
|
||||
|
import java.util.List; |
||||
|
|
||||
|
|
||||
|
/** |
||||
|
* 通知表 |
||||
|
* |
||||
|
* @author yujintao yujintao@elink-cn.com |
||||
|
* @since v1.0.0 2019-09-04 |
||||
|
*/ |
||||
|
@RestController |
||||
|
@RequestMapping(Constant.EPDC_APP + "notice") |
||||
|
public class EpdcAppNoticeController { |
||||
|
|
||||
|
@Autowired |
||||
|
private NoticeService noticeService; |
||||
|
|
||||
|
/** |
||||
|
* 移动端通知列表 |
||||
|
* |
||||
|
* @param formDto |
||||
|
* @return com.elink.esua.epdc.commons.tools.utils.Result<java.util.List < com.elink.esua.epdc.dto.epdc.result.EpdcNoticeResultDTO>> |
||||
|
* @author yujintao |
||||
|
* @date 2019/9/5 19:43 |
||||
|
*/ |
||||
|
@GetMapping("listNotice") |
||||
|
public Result<List<EpdcNoticeResultDTO>> listNotice(@RequestBody EpdcNoticeFormDTO formDto) { |
||||
|
ValidatorUtils.validateEntity(formDto); |
||||
|
return this.noticeService.listNotice(formDto); |
||||
|
} |
||||
|
|
||||
|
/** |
||||
|
* 获取通知详情 |
||||
|
* |
||||
|
* @param noticeId |
||||
|
* @return com.elink.esua.epdc.commons.tools.utils.Result<java.util.List < com.elink.esua.epdc.dto.epdc.result.EpdcNoticeResultDTO>> |
||||
|
* @author yujintao |
||||
|
* @date 2019/9/6 14:33 |
||||
|
*/ |
||||
|
@GetMapping("getDetail/{noticeId}") |
||||
|
public Result<EpdcNoticeDetailResultDTO> getDetail(@PathVariable String noticeId) { |
||||
|
return this.noticeService.getNoticeDetailById(noticeId); |
||||
|
} |
||||
|
} |
Loading…
Reference in new issue