| | |
| | | package com.doumee.api.web; |
| | | |
| | | import com.doumee.core.annotation.LoginRequired; |
| | | import com.doumee.core.annotation.LoginShopRequired; |
| | | import com.doumee.core.annotation.trace.Trace; |
| | | import com.doumee.core.constants.Constants; |
| | | import com.doumee.core.model.ApiResponse; |
| | |
| | | } |
| | | |
| | | |
| | | @LoginShopRequired |
| | | @ApiOperation(value = "门店通知消息分页", notes = "未读优先,时间倒序") |
| | | @PostMapping("/shopNoticePage") |
| | | @ApiImplicitParams({ |
| | | @ApiImplicitParam(paramType = "header", dataType = "String", name = "token", value = "用户token值", required = true) |
| | | }) |
| | | public ApiResponse<PageData<Notice>> shopNoticePage(@RequestBody PageWrap<Notice> pageWrap) { |
| | | if (pageWrap.getModel() == null) { |
| | | pageWrap.setModel(new Notice()); |
| | | } |
| | | pageWrap.getModel().setUserId(this.getShopId()); |
| | | pageWrap.getModel().setUserType(Constants.TWO); |
| | | return ApiResponse.success("查询成功", noticeService.findPage(pageWrap)); |
| | | } |
| | | |
| | | @LoginRequired |
| | | @ApiOperation(value = "门店标记全部已读", notes = "标记当前用户所有未读通知为已读") |
| | | @PostMapping("/shopReadAllNotice") |
| | | @ApiImplicitParams({ |
| | | @ApiImplicitParam(paramType = "header", dataType = "String", name = "token", value = "用户token值", required = true) |
| | | }) |
| | | public ApiResponse shopReadAllNotice() { |
| | | noticeService.readAllNotice(Constants.TWO, this.getShopId()); |
| | | return ApiResponse.success("操作成功"); |
| | | } |
| | | |
| | | |
| | | @LoginRequired |
| | | @ApiOperation(value = "首页进行中订单提示", notes = "返回最新一条进行中订单的状态和提示文案,无订单返回null") |
| | | @GetMapping("/getActiveOrderTip") |