1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
//package com.tourbida.system.web;
//
//import com.alicp.jetcache.anno.CacheInvalidate;
//import com.alicp.jetcache.anno.CacheRefresh;
//import com.alicp.jetcache.anno.CacheUpdate;
//import com.alicp.jetcache.anno.Cached;
//import com.tourbida.base.BaseCompanyVo;
//import com.tourbida.base.vo.LoginUserResVo;
//import com.tourbida.channel.vo.ChannelVo;
//import com.tourbida.check.vo.CheckDeviceVo;
//import com.tourbida.login.vo.TokenVo;
//import com.tourbida.system.vo.CompanyKeyVo;
//import com.tourbida.system.vo.CompanyVo;
//import com.yanzuoguang.token.TokenHelper;
//import com.yanzuoguang.util.base.ObjectHelper;
//import com.yanzuoguang.util.exception.CodeException;
//import com.yanzuoguang.util.helper.CheckerHelper;
//import com.yanzuoguang.util.helper.DateHelper;
//import com.yanzuoguang.util.helper.JsonHelper;
//import com.yanzuoguang.util.helper.StringHelper;
//import com.yanzuoguang.util.vo.ResponseResult;
//import io.swagger.annotations.Api;
//import io.swagger.annotations.ApiOperation;
//import org.springframework.beans.factory.annotation.Autowired;
//import org.springframework.boot.autoconfigure.security.SecurityProperties;
//import org.springframework.data.redis.core.RedisTemplate;
//import org.springframework.http.MediaType;
//import org.springframework.transaction.annotation.Transactional;
//import org.springframework.web.bind.annotation.*;
//
//import javax.annotation.Resource;
//import java.util.*;
//
///**
// * 颜佐光
// *
// * @author huangzheng
// */
//@RestController
//@RequestMapping("/redis")
//@Api(value = "测试redis", description = "测试redis")
//public class TestController {
//
// @Resource
// private RedisTemplate redisTemplate;
//
// @Autowired
// private TestCache testCache;
//
// @GetMapping("/setUser")
// public String setUser() {
// SecurityProperties.User user = new SecurityProperties.User();
// user.setName("yanzuoguang");
// user.setPassword("123456");
// List<String> list = new ArrayList<>();
// list.add("小学");
// list.add("初中");
// list.add("高中");
// list.add("大学");
// user.setRoles(list);
// redisTemplate.opsForValue().set("test.userInfo", user);
// return "success";
// }
//
// @GetMapping("/getUser")
// public SecurityProperties.User getUser() {
// return (SecurityProperties.User) redisTemplate.opsForValue().get("test.userInfo");
// }
//
//
//
// /**
// * 测试加载
// *
// * @return
// */
// @PostMapping(value = "/load", produces = MediaType.APPLICATION_JSON_UTF8_VALUE)
// @ApiOperation(value = "测试加载", notes = "测试加载")
// public ResponseResult<TokenVo> load(@RequestBody TokenVo req) {
// return ResponseResult.result(testCache.load(req));
// }
//
// /**
// * 测试保存
// *
// * @return
// */
// @PostMapping(value = "/save", produces = MediaType.APPLICATION_JSON_UTF8_VALUE)
// @ApiOperation(value = "测试保存", notes = "测试保存")
// public ResponseResult<String> save(@RequestBody TokenVo req) {
// return ResponseResult.result(testCache.save(req));
// }
//
// /**
// * 测试删除
// *
// * @return
// */
// @PostMapping(value = "/remove", produces = MediaType.APPLICATION_JSON_UTF8_VALUE)
// @ApiOperation(value = "测试删除", notes = "测试删除")
// public ResponseResult<Integer> remove(@RequestBody TokenVo req) {
// return ResponseResult.result(testCache.remove(req));
// }
//
//
//}