| | |
| | | package com.xcong.farmer.cms.modules.system.controller; |
| | | |
| | | import com.xcong.farmer.cms.common.response.Result; |
| | | import com.xcong.farmer.cms.modules.system.dto.AdminUpdateWebSetDto; |
| | | import com.xcong.farmer.cms.modules.system.dto.SetWebSettingDto; |
| | | import com.xcong.farmer.cms.modules.system.service.IReleaseService; |
| | | import com.xcong.farmer.cms.modules.system.service.IWebSetService; |
| | | import com.xcong.farmer.cms.modules.system.service.IWebSettingService; |
| | | import com.xcong.farmer.cms.modules.system.util.LoginUserUtil; |
| | | import com.xcong.farmer.cms.modules.system.vo.AdminSeeWebSetInfoVo; |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import io.swagger.annotations.ApiResponse; |
| | | import io.swagger.annotations.ApiResponses; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | |
| | | public class AdminWebSetController { |
| | | |
| | | @Resource |
| | | private IWebSetService iWebSetService; |
| | | private IWebSettingService iWebSetService; |
| | | |
| | | @Resource |
| | | private IReleaseService releaseService; |
| | | |
| | | @ApiOperation(value = "查看网页设置", notes = "查看网页设置") |
| | | @ApiResponses({ |
| | | @ApiResponse(code = 200, message = "success", response = AdminSeeWebSetInfoVo.class) |
| | | }) |
| | | @GetMapping(value = "/seeWebSetInfo") |
| | | public Result seeWebSetInfo() { |
| | | return iWebSetService.seeWebSetInfo(); |
| | | return iWebSetService.getWebSetting(); |
| | | } |
| | | |
| | | @ApiOperation(value = "更新网页设置", notes = "更新网页设置") |
| | | @PostMapping(value = "/updateWebSet") |
| | | public Result updateWebSet(@RequestBody @Valid AdminUpdateWebSetDto adminUpdateWebSetDto) { |
| | | return iWebSetService.updateWebSet(adminUpdateWebSetDto); |
| | | public Result updateWebSet(@RequestBody @Valid SetWebSettingDto setWebSettingDto) { |
| | | return iWebSetService.setWebSetting(setWebSettingDto); |
| | | } |
| | | |
| | | @ApiOperation(value = "发布全站", notes = "发布全站") |
| | | @PostMapping(value = "/releaseAll") |
| | | public Result releaseAll() { |
| | | return null; |
| | | Long companyId = LoginUserUtil.getCompanyId(); |
| | | releaseService.releaseAll(companyId); |
| | | return Result.ok("发布成功"); |
| | | } |
| | | } |