| | |
| | | |
| | | |
| | | import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
| | | import com.ruoyi.common.core.domain.R; |
| | | import com.ruoyi.common.core.web.domain.AjaxResult; |
| | | import com.ruoyi.common.core.web.page.PageInfo; |
| | | import com.ruoyi.management.domain.TPage; |
| | |
| | | * @author 无关风月 |
| | | * @since 2024-04-26 |
| | | */ |
| | | @Controller |
| | | @RestController |
| | | @RequestMapping("/tSysSet") |
| | | public class TSysSetController { |
| | | @Autowired |
| | |
| | | |
| | | @ApiOperation(value = "获取系统设置", tags = {"后台-系统设置"}) |
| | | @PostMapping(value = "/getSysSet") |
| | | @ResponseBody |
| | | public AjaxResult getSysSet() { |
| | | TSysSet byId = sysSetService.getById(1); |
| | | SysSetVO sysSetVO = new SysSetVO(); |
| | |
| | | } |
| | | @ApiOperation(value = "保存系统设置", tags = {"后台-系统设置"}) |
| | | @PostMapping(value = "/saveSysSet") |
| | | @ResponseBody |
| | | public AjaxResult saveSysSet(SysSetVO vo) { |
| | | TSysSet byId = sysSetService.getById(1); |
| | | BeanUtils.copyProperties(vo,byId); |
| | |
| | | } |
| | | @ApiOperation(value = "获取启动页", tags = {"后台-启动页管理"}) |
| | | @PostMapping(value = "/getPage") |
| | | @ResponseBody |
| | | public AjaxResult getPage() { |
| | | List<TPage> list = pageService.list(); |
| | | return AjaxResult.success(list); |
| | | } |
| | | @ApiOperation(value = "获取注意事项、启动页", tags = {"家长端-获取注意事项、启动页"}) |
| | | @PostMapping(value = "/getPage1") |
| | | public R<List<TPage>> getPage1() { |
| | | List<TPage> list = pageService.list(); |
| | | return R.ok(list); |
| | | } |
| | | @ApiOperation(value = "保存启动页", tags = {"后台-启动页管理"}) |
| | | @PostMapping(value = "/setPage") |
| | | @ResponseBody |
| | | public AjaxResult setPage(PageVO vo) { |
| | | for (TPage tPage : vo.getList()) { |
| | | if (tPage.getId() == null){ |
| | |
| | | } |
| | | return AjaxResult.success("保存成功"); |
| | | } |
| | | @ResponseBody |
| | | @PostMapping("/agreement") |
| | | @ApiOperation(value = "协议", tags = {"后台-协议管理"}) |
| | | public AjaxResult agreement(@RequestBody AggrementDTO dto) { |
| | |
| | | return AjaxResult.success(protocol.getContent()); |
| | | } |
| | | } |
| | | @ResponseBody |
| | | @PostMapping("/useGuide") |
| | | @ApiOperation(value = "使用指南-列表查询", tags = {"后台-使用指南"}) |
| | | public AjaxResult<PageInfo<TUseGuide>> agreement(String title, Integer pageNumber, Integer pageSize) { |
| | |
| | | res.setTotal(useGuides.size()); |
| | | return AjaxResult.success(res); |
| | | } |
| | | @ResponseBody |
| | | @PostMapping("/updateUseGuide") |
| | | @ApiOperation(value = "使用指南-添加/编辑/查看详情", tags = {"使用指南"}) |
| | | public AjaxResult<TUseGuide> updateUseGuide(@RequestBody UseGuidDTO dto) { |
| | |
| | | } |
| | | return AjaxResult.success(new TUseGuide()); |
| | | } |
| | | @ResponseBody |
| | | @DeleteMapping("/delete{id}") |
| | | @ApiOperation(value = "使用指南-删除", tags = {"使用指南"}) |
| | | public AjaxResult updateUseGuide(@PathVariable Integer id) { |