| | |
| | | import com.doumee.core.annotation.excel.ExcelExporter; |
| | | import com.doumee.core.annotation.pr.PreventRepeat; |
| | | import com.doumee.core.model.ApiResponse; |
| | | import com.doumee.core.model.LoginUserInfo; |
| | | import com.doumee.core.model.PageWrap; |
| | | import com.doumee.core.model.PageData; |
| | | import com.doumee.core.utils.Constants; |
| | | import com.doumee.dao.business.model.Notices; |
| | | import com.doumee.dao.business.vo.ApplyNoticeVO; |
| | | import com.doumee.service.business.NoticesService; |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import org.apache.shiro.authz.annotation.RequiresPermissions; |
| | | import org.apache.shiro.SecurityUtils; |
| | | import org.apache.shiro.authz.annotation.RequiresPermissions; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.web.bind.annotation.*; |
| | | import javax.servlet.http.HttpServletResponse; |
| | |
| | | |
| | | /** |
| | | * @author 江蹄蹄 |
| | | * @date 2024/01/15 15:07 |
| | | * @date 2024/01/16 10:03 |
| | | */ |
| | | @Api(tags = "系统消息信息表") |
| | | @RestController |
| | |
| | | @PostMapping("/page") |
| | | @RequiresPermissions("business:notices:query") |
| | | public ApiResponse<PageData<Notices>> findPage (@RequestBody PageWrap<Notices> pageWrap) { |
| | | LoginUserInfo loginUserInfo = (LoginUserInfo) SecurityUtils.getSubject().getPrincipal(); |
| | | pageWrap.getModel().setCompanyId(loginUserInfo.getCompanyId()); |
| | | pageWrap.getModel().setPalt(Constants.ONE); |
| | | return ApiResponse.success(noticesService.findPage(pageWrap)); |
| | | } |
| | | |
| | |
| | | public ApiResponse findById(@PathVariable Integer id) { |
| | | return ApiResponse.success(noticesService.findById(id)); |
| | | } |
| | | |
| | | |
| | | @ApiOperation("查询投保单提醒数量") |
| | | @GetMapping("/getApplyNotice") |
| | | public ApiResponse<ApplyNoticeVO> getApplyNotice() { |
| | | LoginUserInfo loginUserInfo = (LoginUserInfo) SecurityUtils.getSubject().getPrincipal(); |
| | | return ApiResponse.success(noticesService.getApplyNotice(loginUserInfo.getCompanyId())); |
| | | } |
| | | |
| | | @ApiOperation("投保单关闭提醒") |
| | | @GetMapping("/closeApplyNotice") |
| | | public ApiResponse closeApplyNotice(@RequestParam Integer type) { |
| | | LoginUserInfo loginUserInfo = (LoginUserInfo) SecurityUtils.getSubject().getPrincipal(); |
| | | noticesService.closeApplyNotice(loginUserInfo.getCompanyId(),type); |
| | | return ApiResponse.success("操作成功"); |
| | | } |
| | | |
| | | |
| | | } |