|
|
@@ -1,6 +1,7 @@
|
|
|
package com.ruoyi.web.controller.clock;
|
|
|
|
|
|
import cn.dev33.satoken.annotation.SaCheckPermission;
|
|
|
+import com.ruoyi.clock.domain.BasicInfo;
|
|
|
import com.ruoyi.clock.domain.bo.BasicInfoBo;
|
|
|
import com.ruoyi.clock.domain.vo.BasicInfoVo;
|
|
|
import com.ruoyi.clock.service.IBasicInfoService;
|
|
|
@@ -18,6 +19,7 @@ import com.ruoyi.common.utils.poi.ExcelUtil;
|
|
|
import io.swagger.annotations.Api;
|
|
|
import io.swagger.annotations.ApiOperation;
|
|
|
import io.swagger.annotations.ApiParam;
|
|
|
+import io.swagger.v3.oas.annotations.Operation;
|
|
|
import lombok.RequiredArgsConstructor;
|
|
|
import org.springframework.validation.annotation.Validated;
|
|
|
import org.springframework.web.bind.annotation.*;
|
|
|
@@ -43,26 +45,14 @@ public class BasicInfoController extends BaseController {
|
|
|
|
|
|
private final IBasicInfoService iBasicInfoService;
|
|
|
|
|
|
- /**
|
|
|
- * 分页查询基础设置列表
|
|
|
- */
|
|
|
- @ApiOperation("查询基础设置列表")
|
|
|
- @SaCheckPermission("clock:basicInfo:list")
|
|
|
- @GetMapping("/page")
|
|
|
- public TableDataInfo<BasicInfoVo> page(@Validated(QueryGroup.class) BasicInfoBo bo, PageQuery pageQuery) {
|
|
|
- return iBasicInfoService.queryPageList(bo, pageQuery);
|
|
|
- }
|
|
|
-
|
|
|
/**
|
|
|
* 获取基础设置详细信息
|
|
|
+ * @return
|
|
|
*/
|
|
|
- @ApiOperation("获取基础设置详细信息")
|
|
|
- @SaCheckPermission("clock:basicInfo:query")
|
|
|
- @GetMapping("/info/{basicId}")
|
|
|
- public R<BasicInfoVo> getInfo(@ApiParam("主键")
|
|
|
- @NotNull(message = "主键不能为空")
|
|
|
- @PathVariable("basicId") Long basicId) {
|
|
|
- return R.ok(iBasicInfoService.queryById(basicId));
|
|
|
+ @ApiOperation("用户协议配置-通过id查询")
|
|
|
+ @GetMapping(value = "/queryInfo")
|
|
|
+ public R<BasicInfo> queryInfo() {
|
|
|
+ return R.ok(iBasicInfoService.queryBasicInfo());
|
|
|
}
|
|
|
|
|
|
/**
|
|
|
@@ -74,44 +64,7 @@ public class BasicInfoController extends BaseController {
|
|
|
@RepeatSubmit()
|
|
|
@PostMapping("/add")
|
|
|
public R<Void> add(@Validated(AddGroup.class) @RequestBody BasicInfoBo bo) {
|
|
|
- return toAjax(iBasicInfoService.insertByBo(bo) ? 1 : 0);
|
|
|
- }
|
|
|
-
|
|
|
- /**
|
|
|
- * 修改基础设置
|
|
|
- */
|
|
|
- @ApiOperation("修改基础设置")
|
|
|
- @SaCheckPermission("clock:basicInfo:edit")
|
|
|
- @Log(title = "基础设置", businessType = BusinessType.UPDATE)
|
|
|
- @RepeatSubmit()
|
|
|
- @PostMapping("/edit")
|
|
|
- public R<Void> edit(@Validated(EditGroup.class) @RequestBody BasicInfoBo bo) {
|
|
|
- return toAjax(iBasicInfoService.updateByBo(bo) ? 1 : 0);
|
|
|
- }
|
|
|
-
|
|
|
- /**
|
|
|
- * 删除基础设置
|
|
|
- */
|
|
|
- @ApiOperation("删除基础设置")
|
|
|
- @SaCheckPermission("clock:basicInfo:remove")
|
|
|
- @Log(title = "基础设置", businessType = BusinessType.DELETE)
|
|
|
- @PostMapping("/del/{basicIds}")
|
|
|
- public R<Void> remove(@ApiParam("主键串")
|
|
|
- @NotEmpty(message = "主键不能为空")
|
|
|
- @PathVariable Long[] basicIds) {
|
|
|
- return toAjax(iBasicInfoService.deleteWithValidByIds(Arrays.asList(basicIds), true) ? 1 : 0);
|
|
|
- }
|
|
|
-
|
|
|
- /**
|
|
|
- * 导出基础设置列表
|
|
|
- */
|
|
|
- @ApiOperation("导出基础设置列表")
|
|
|
- @SaCheckPermission("clock:basicInfo:export")
|
|
|
- @Log(title = "基础设置", businessType = BusinessType.EXPORT)
|
|
|
- @PostMapping("/export")
|
|
|
- public void export(@Validated BasicInfoBo bo, HttpServletResponse response) {
|
|
|
- List<BasicInfoVo> list = iBasicInfoService.queryList(bo);
|
|
|
- ExcelUtil.exportExcel(list, "基础设置", BasicInfoVo.class, response);
|
|
|
+ return toAjax(iBasicInfoService.saveBasicInfo(bo) ? 1 : 0);
|
|
|
}
|
|
|
|
|
|
}
|