| | |
| | | |
| | | |
| | | import com.xinquan.common.core.domain.R; |
| | | import com.xinquan.system.domain.CommissionRule; |
| | | import com.xinquan.system.domain.Page; |
| | | import com.xinquan.system.service.CommissionRuleService; |
| | | 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.*; |
| | | |
| | |
| | | public class PageController { |
| | | @Resource |
| | | private PageService pageService; |
| | | @Resource |
| | | private TurnService turnService; |
| | | @PostMapping("/getPage") |
| | | @ApiOperation(value = "获取启动页",tags = "获取启动页") |
| | | public R<String> getPage() { |
| | |
| | | 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(); |
| | | } |
| | | @PostMapping("/saveOrUpdatePlan") |
| | | @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") |
| | | @ApiOperation(value = "获取计划引导设置",tags = "计划引导设置") |
| | | public R<String> saveOrUpdatePlan() { |
| | | public R<String> getPlan() { |
| | | Page one = pageService.lambdaQuery().eq(Page::getType,2).one(); |
| | | if (one!=null){ |
| | | return R.ok(one.getImg()); |
| | |
| | | if(one == null){ |
| | | Page page = new Page(); |
| | | page.setImg(img); |
| | | page.setType(2); |
| | | pageService.save(page); |
| | | }else{ |
| | | one.setImg(img); |
| | | one.setType(2); |
| | | pageService.updateById(one); |
| | | } |
| | | return R.ok(); |