无关风月
2025-01-22 99367ea1c11a68b420936e7f7db5fa7367da4f44
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){