| | |
| | | |
| | | |
| | | 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.service.PageService; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import org.springframework.web.bind.annotation.*; |
| | |
| | | } |
| | | return R.ok(); |
| | | } |
| | | @PostMapping("/saveOrUpdatePlan") |
| | | @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(); |