From 99367ea1c11a68b420936e7f7db5fa7367da4f44 Mon Sep 17 00:00:00 2001 From: 无关风月 <443237572@qq.com> Date: 星期三, 22 一月 2025 11:44:54 +0800 Subject: [PATCH] 全部代码、数据库提交 --- xinquan-modules/xinquan-system/src/main/java/com/xinquan/system/controller/PageController.java | 24 ++++++++++++++++++++++++ 1 files changed, 24 insertions(+), 0 deletions(-) diff --git a/xinquan-modules/xinquan-system/src/main/java/com/xinquan/system/controller/PageController.java b/xinquan-modules/xinquan-system/src/main/java/com/xinquan/system/controller/PageController.java index 6ecc3ab..7ba91a3 100644 --- a/xinquan-modules/xinquan-system/src/main/java/com/xinquan/system/controller/PageController.java +++ b/xinquan-modules/xinquan-system/src/main/java/com/xinquan/system/controller/PageController.java @@ -2,8 +2,12 @@ import com.xinquan.common.core.domain.R; +import com.xinquan.common.log.annotation.Log; +import com.xinquan.common.log.enums.BusinessType; import com.xinquan.system.domain.Page; +import com.xinquan.system.domain.Turn; import com.xinquan.system.service.PageService; +import com.xinquan.system.service.TurnService; import io.swagger.annotations.ApiOperation; import org.springframework.web.bind.annotation.*; @@ -22,6 +26,8 @@ public class PageController { @Resource private PageService pageService; + @Resource + private TurnService turnService; @PostMapping("/getPage") @ApiOperation(value = "获取启动页",tags = "获取启动页") public R<String> getPage() { @@ -33,16 +39,32 @@ } @GetMapping("/saveOrUpdate") @ApiOperation(value = "保存/修改启动页",tags = "管理后台-启动页") + @Log(title = "【启动页】修改", businessType = BusinessType.UPDATE) + public R saveOrUpdate(String img) { Page one = pageService.lambdaQuery().eq(Page::getType,1).one(); if(one == null){ Page page = new Page(); page.setImg(img); + page.setType(1); pageService.save(page); }else{ + one.setType(1); one.setImg(img); pageService.updateById(one); } + return R.ok(); + } + @GetMapping("/updateTurn") + @ApiOperation(value = "修改IOS获取是否跳转三方支付", tags = "管理后台-启动页") + public R updateTurn() { + Turn one = turnService.getOne(null); + if (one.getIsTurn()==1){ + one.setIsTurn(2); + }else { + one.setIsTurn(1); + } + turnService.updateById(one); return R.ok(); } @PostMapping("/getPlan") @@ -56,6 +78,8 @@ } @GetMapping("/saveOrUpdatePlan") @ApiOperation(value = "保存/修改计划引导设置",tags = "计划引导设置") + @Log(title = "【计划引导设置】修改", businessType = BusinessType.UPDATE) + public R saveOrUpdatePlan(String img) { Page one = pageService.lambdaQuery().eq(Page::getType,2).one(); if(one == null){ -- Gitblit v1.7.1