| | |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import lombok.RequiredArgsConstructor; |
| | | import org.springframework.context.annotation.Lazy; |
| | | import org.springframework.web.bind.annotation.GetMapping; |
| | | import org.springframework.web.bind.annotation.PostMapping; |
| | | import org.springframework.web.bind.annotation.RequestBody; |
| | |
| | | */ |
| | | @RestController |
| | | @RequestMapping("/applet/home") |
| | | @RequiredArgsConstructor |
| | | @RequiredArgsConstructor(onConstructor_=@Lazy) |
| | | @Api(tags = "首页相关接口") |
| | | public class HomeController extends BaseController { |
| | | private final IBannerService bannerService; |
| | |
| | | public R<SystemUser> getCurrentUserInfo() { |
| | | return R.ok(systemUserService.getSystemUserByPhone(getLoginUserInfo().getPhone()).orElse(null)); |
| | | } |
| | | /** |
| | | * 标记已读 |
| | | */ |
| | | @PostMapping("/read") |
| | | @ApiOperation("标记已读") |
| | | public R<?> read(){ |
| | | messageNotificationService.read(getLoginUserInfo()); |
| | | return R.ok(); |
| | | } |
| | | } |