| ¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.doumee.cloud.web; |
| | | |
| | | import com.doumee.api.BaseController; |
| | | import com.doumee.core.annotation.trace.Trace; |
| | | import com.doumee.service.business.third.model.ApiResponse; |
| | | import com.doumee.service.business.third.model.LoginUserInfo; |
| | | import com.doumee.service.business.third.model.PageData; |
| | | import com.doumee.service.business.third.model.PageWrap; |
| | | import com.doumee.core.utils.Constants; |
| | | import com.doumee.dao.system.model.Notices; |
| | | import com.doumee.service.system.NoticesService; |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | @Api(tags = "æ¶æ¯éç¥ä¿¡ä¸å¡") |
| | | @Trace(exclude = true) |
| | | @RestController |
| | | @RequestMapping(Constants.CLOUD_SERVICE_URL_INDEX+"/web/notice") |
| | | @Slf4j |
| | | public class NoticeApi extends BaseController { |
| | | |
| | | @Autowired |
| | | private NoticesService noticeService; |
| | | |
| | | |
| | | /** |
| | | * æ¥è¯¢ç¨æ·éç¥ |
| | | * @param pageWrap |
| | | * @return |
| | | */ |
| | | @ApiOperation(value = "æ¥è¯¢ç¨æ·éç¥", notes = "å°ç¨åºç«¯") |
| | | @PostMapping("/findNoticePage") |
| | | public ApiResponse<PageData<Notices>> findNoticePage(@RequestBody PageWrap<Notices> pageWrap |
| | | ,@RequestHeader(Constants.HEADER_USER_TOKEN) String token){ |
| | | LoginUserInfo user = getLoginUser(token); |
| | | pageWrap.getModel().setUserId(user.getId()); |
| | | return ApiResponse.success("æ¥è¯¢æå",noticeService.findPage(pageWrap)); |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * ç¨æ·æ´æ°é
è¯»ç¶æ |
| | | * @param id |
| | | * @return |
| | | */ |
| | | @ApiOperation(value = "ç¨æ·æ´æ°é
è¯»ç¶æ", notes = "å°ç¨åºç«¯") |
| | | @GetMapping("/getMemberDTO") |
| | | public ApiResponse hasRead(@RequestParam Integer id){ |
| | | Notices notice = new Notices(); |
| | | notice.setId(id); |
| | | notice.setStatus(Constants.ONE); |
| | | noticeService.updateById(notice); |
| | | return ApiResponse.success(null); |
| | | } |
| | | |
| | | |
| | | @ApiOperation(value = "æ¥è¯¢éç¥è¯¦æ
", notes = "å°ç¨åºç«¯") |
| | | @GetMapping("/getNoticeDetail") |
| | | public ApiResponse<Notices> getNoticeDetail(@RequestParam Integer id){ |
| | | return ApiResponse.success("æ¥è¯¢æå",noticeService.findById(id)); |
| | | } |
| | | |
| | | } |