| | |
| | | |
| | | @PostMapping("/agreement") |
| | | @ApiOperation(value = "协议", tags = {"后台-协议管理"}) |
| | | public AjaxResult agreement(AggrementDTO dto) { |
| | | public AjaxResult agreement(@RequestBody AggrementDTO dto) { |
| | | TProtocol protocol = protocolService.getById(dto.getType()); |
| | | if (StringUtils.hasLength(dto.getContent())){ |
| | | protocol.setContent(dto.getContent()); |
| | |
| | | public R<String> agreement1(@PathVariable("type") Integer type) { |
| | | TProtocol protocol = protocolService.getOne(new QueryWrapper<TProtocol>() |
| | | .eq("type", type)); |
| | | |
| | | return R.ok(protocol.getContent()); |
| | | |
| | | } |
| | | |
| | | @PostMapping("/useGuide") |
| | |
| | | List<String> strings = new ArrayList<>(); |
| | | strings.add("insertTime"); |
| | | wrapper.orderByDesc(strings); |
| | | |
| | | List<TUseGuide> useGuides = useGuideService.list(wrapper); |
| | | PageInfo<TUseGuide> res = new PageInfo<>(pageNumber, pageSize); |
| | | res.setRecords(useGuides); |
| | |
| | | PageInfo<TUseGuide> res = new PageInfo<>(query.getPageNumber(), query.getPageSize()); |
| | | List<TUseGuide> useGuides = useGuideService.list(wrapper); |
| | | List<TUseGuide> useGuides2 = useGuideService.listAll(query); |
| | | PageInfo<TUseGuide> page = useGuideService.page(new PageInfo<>(query.getPageNumber(), query.getPageSize()), wrapper); |
| | | |
| | | res.setRecords(useGuides2); |
| | | res.setTotal(useGuides.size()); |
| | | |
| | |
| | | |
| | | @PostMapping("/updateUseGuide") |
| | | @ApiOperation(value = "使用指南-添加/编辑/查看详情", tags = {"使用指南"}) |
| | | public AjaxResult<TUseGuide> updateUseGuide(UseGuidDTO dto) { |
| | | public AjaxResult<TUseGuide> updateUseGuide(@RequestBody UseGuidDTO dto) { |
| | | switch (dto.getType()) { |
| | | case 1: |
| | | TUseGuide useGuide = new TUseGuide(); |
| | |
| | | public R<TSysSet> promptVoice() { |
| | | return R.ok(sysSetService.lambdaQuery().eq(TSysSet::getDisabled, 0).one()); |
| | | } |
| | | @ApiOperation(value = "2.0新增,是否展示文字配置", tags = {"2.0新增,是否展示文字配置"}) |
| | | @GetMapping(value = "/getIsOpen") |
| | | public R<Boolean> getIsOpen() { |
| | | TSysSet one = sysSetService.lambdaQuery().eq(TSysSet::getDisabled, 0).one(); |
| | | switch (one.getIsOpen()){ |
| | | case 1: |
| | | return R.ok(true); |
| | | case 0: |
| | | return R.ok(false); |
| | | } |
| | | return R.ok(); |
| | | } |
| | | |
| | | } |
| | | |