//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)); // } // // //}