package com.ruoyi.web.controller.bussiness; import com.ruoyi.common.core.domain.BaseResult; import com.ruoyi.common.core.domain.ResponseUtils; import com.ruoyi.system.domain.SysNotice; import com.ruoyi.system.object.response.index.IndexMessageResponse; import com.ruoyi.system.service.ISysNoticeService; import io.swagger.annotations.Api; import io.swagger.annotations.ApiOperation; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.validation.annotation.Validated; import org.springframework.web.bind.annotation.PostMapping; import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RestController; import java.util.List; @Validated @Api(value = "首页",tags = "首页") @RestController @RequestMapping(value = "/index") public class IndexController { @Autowired private ISysNoticeService sysNoticeService; @ApiOperation(value = "首页消息", notes = "首页消息") @PostMapping(value = "/message") public BaseResult alwaysMessage() { IndexMessageResponse response = new IndexMessageResponse(); List sysNotices = sysNoticeService.alwaysMessage(); response.setAlwaysMessages(sysNotices); List payMessage = sysNoticeService.payMessage(); response.setNoticeMessage(payMessage); return ResponseUtils.successResponse(response); } }