class NoticeMessageManagerController {
    @Autowired
    private NoticeMessageService noticeMessageService;

    @ApiOperation(value = "消息模板分页")
    @GetMapping
    @ApiImplicitParams({
            @ApiImplicitParam(name = "type", value = "消息类型", dataType = "String", paramType = "query",
                    allowableValues = "MEMBER,OTHER,STORE,WECHAT", allowMultiple = true)
    })
    public ResultMessage<IPage<NoticeMessage>> getPage(PageVO pageVO, String type) {
        return ResultUtil.data(noticeMessageService.getMessageTemplate(pageVO, type));
    }


    @ApiOperation(value = "根据id获取通知详情")
    @ApiImplicitParam(name = "id", value = "模板id", dataType = "String", paramType = "path")
    @GetMapping("/{id}")
    public ResultMessage<NoticeMessageDetailDTO> get(@PathVariable String id) {<FILL_FUNCTION_BODY>}


    @ApiOperation(value = "修改站内信模板")
    @ApiImplicitParams({
            @ApiImplicitParam(name = "noticeContent", value = "站内信内容", dataType = "String", paramType = "query"),
            @ApiImplicitParam(name = "noticeTitle", value = "站内信模板标题", dataType = "String", paramType = "query"),
            @ApiImplicitParam(name = "id", value = "模板id", dataType = "String", paramType = "path")
    })
    @PutMapping("/{id}")
    public ResultMessage<NoticeMessage> updateNoticeTemplate(@RequestParam String noticeContent,
                                                             @RequestParam String noticeTitle,
                                                             @PathVariable String id) {
        //根据id获取当前消息模板
        NoticeMessage noticeMessage = noticeMessageService.getById(id);
        if (noticeMessage != null) {
            noticeMessage.setNoticeContent(noticeContent);
            noticeMessage.setNoticeTitle(noticeTitle);
            noticeMessageService.updateById(noticeMessage);
            return ResultUtil.data(noticeMessage);
        }
        throw new ResourceNotFoundException(ResultCode.NOTICE_NOT_EXIST.message());
    }

    @ApiOperation(value = "修改站内信状态")

    @ApiImplicitParams({
            @ApiImplicitParam(name = "id", value = "站内信状态", dataType = "String", paramType = "path"),
            @ApiImplicitParam(name = "status", value = "站内信状态", dataType = "String", paramType = "path")
    })
    @PutMapping("/{id}/{status}")
    public ResultMessage<NoticeMessage> status(@PathVariable String id, @PathVariable String status) {
        //根据id获取当前消息模板
        NoticeMessage messageTemplate = noticeMessageService.getById(id);
        if (messageTemplate != null) {
            //校验传递站内信是否符合规范
            Boolean b = EnumUtils.isValidEnum(SwitchEnum.class, status);
            if (b) {
                //赋值执行修改操作
                messageTemplate.setNoticeStatus(status);
                noticeMessageService.updateById(messageTemplate);
                return ResultUtil.data(messageTemplate);
            }
            throw new ServiceException(ResultCode.NOTICE_ERROR);
        }
        throw new ResourceNotFoundException(ResultCode.NOTICE_NOT_EXIST.message());
    }

}

        //根据id获取当前消息模板
        NoticeMessage noticeMessage = noticeMessageService.getById(id);
        if (noticeMessage != null) {
            NoticeMessageDetailDTO noticeMessageDetailDTO = new NoticeMessageDetailDTO();
            BeanUtil.copyProperties(noticeMessage, noticeMessageDetailDTO);
            //组织消息变量
            String[] variableNames = noticeMessage.getVariable().split(",");
            //定义返回参数中变量列表
            List<String> variableValues = new ArrayList<>();
            //循环消息变量赋值
            if (variableNames.length > 0) {
                for (String variableName : variableNames) {
                    if (NoticeMessageParameterEnum.getValueByType(variableName) != null) {
                        variableValues.add(NoticeMessageParameterEnum.getValueByType(variableName));
                    }
                }
                noticeMessageDetailDTO.setVariables(variableValues);
            }

            return ResultUtil.data(noticeMessageDetailDTO);
        }
        throw new ResourceNotFoundException(ResultCode.NOTICE_NOT_EXIST.message());
    
<no_super_class>