mirror of
https://gitee.com/xiaochemgzi/RuoYi-Wvp.git
synced 2025-12-30 04:42:25 +00:00
v1.2.0
This commit is contained in:
@@ -0,0 +1,45 @@
|
|||||||
|
package com.ruoyi.web.controller.system;
|
||||||
|
|
||||||
|
import com.ruoyi.common.annotation.Log;
|
||||||
|
import com.ruoyi.common.constant.CacheConstants;
|
||||||
|
import com.ruoyi.common.core.controller.BaseController;
|
||||||
|
import com.ruoyi.common.core.domain.AjaxResult;
|
||||||
|
import com.ruoyi.common.enums.BusinessType;
|
||||||
|
import com.ruoyi.system.domain.SysWork;
|
||||||
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
import org.springframework.data.redis.core.RedisTemplate;
|
||||||
|
import org.springframework.security.access.prepost.PreAuthorize;
|
||||||
|
import org.springframework.web.bind.annotation.*;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 工作台
|
||||||
|
*
|
||||||
|
* @author fengcheng
|
||||||
|
*/
|
||||||
|
@RestController
|
||||||
|
@RequestMapping("/system/work")
|
||||||
|
public class SysWorkController extends BaseController {
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
private RedisTemplate redisTemplate;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取工作台列表
|
||||||
|
*/
|
||||||
|
@PreAuthorize("@ss.hasPermi('system:work:list')")
|
||||||
|
@GetMapping("/list")
|
||||||
|
public AjaxResult list() {
|
||||||
|
return success(redisTemplate.opsForValue().get(CacheConstants.SYS_WORK_LIST));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 修改工作台
|
||||||
|
*/
|
||||||
|
@PreAuthorize("@ss.hasPermi('system:work:edit')")
|
||||||
|
@Log(title = "工作台", businessType = BusinessType.UPDATE)
|
||||||
|
@PutMapping
|
||||||
|
public AjaxResult edit(@RequestBody SysWork work) {
|
||||||
|
redisTemplate.opsForValue().set(CacheConstants.SYS_WORK_LIST, work);
|
||||||
|
return success();
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,42 @@
|
|||||||
|
package com.ruoyi.system.domain;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 工作台
|
||||||
|
*
|
||||||
|
* @author fengcheng
|
||||||
|
*/
|
||||||
|
public class SysWork {
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
private String layoutList;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 索引
|
||||||
|
*/
|
||||||
|
private String index;
|
||||||
|
|
||||||
|
public String getLayoutList() {
|
||||||
|
return layoutList;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setLayoutList(String layoutList) {
|
||||||
|
this.layoutList = layoutList;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getIndex() {
|
||||||
|
return index;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setIndex(String index) {
|
||||||
|
this.index = index;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String toString() {
|
||||||
|
return "SysWork{" +
|
||||||
|
"layoutList='" + layoutList + '\'' +
|
||||||
|
", index='" + index + '\'' +
|
||||||
|
'}';
|
||||||
|
}
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user