| | |
| | | import com.ruoyi.management.service.ITUseGuideService; |
| | | import com.ruoyi.management.vo.PageVO; |
| | | import com.ruoyi.management.vo.SysSetVO; |
| | | import com.ruoyi.study.api.feignClient.StudyClient; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import org.springframework.beans.BeanUtils; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | |
| | | private ITProtocolService protocolService; |
| | | @Autowired |
| | | private ITUseGuideService useGuideService; |
| | | @Autowired |
| | | private StudyClient studyClient; |
| | | |
| | | @ApiOperation(value = "获取系统设置", tags = {"后台-系统设置"}) |
| | | @PostMapping(value = "/getSysSet") |
| | |
| | | String page2 = vo.getPage2(); |
| | | String page3 = vo.getPage3(); |
| | | String page4 = vo.getPage4(); |
| | | String page5 = vo.getPage5(); |
| | | if (StringUtils.hasLength(page1)) { |
| | | TPage type = pageService.getOne(new QueryWrapper<TPage>() |
| | | .eq("type", 1)); |
| | |
| | | pageService.updateById(type); |
| | | } |
| | | } |
| | | if (StringUtils.hasLength(page5)) { |
| | | TPage type = pageService.getOne(new QueryWrapper<TPage>() |
| | | .eq("type", 5)); |
| | | if (type == null) { |
| | | TPage tPage = new TPage(); |
| | | tPage.setImg(page5); |
| | | tPage.setType(5); |
| | | pageService.save(tPage); |
| | | } else { |
| | | if(!page5.equals(type.getImg())){ |
| | | studyClient.resetLookVideo(); |
| | | } |
| | | type.setImg(page5); |
| | | pageService.updateById(type); |
| | | } |
| | | } |
| | | return AjaxResult.success("保存成功"); |
| | | } |
| | | |