package com.persagy.account.controller; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.data.redis.core.RedisTemplate; import org.springframework.validation.annotation.Validated; import org.springframework.web.bind.annotation.RequestBody; import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RequestMethod; import org.springframework.web.bind.annotation.RestController; import com.persagy.account.pojo.vo.BaseGroupVO; import com.persagy.common.constant.SaasCommonConstant; import com.persagy.common.utils.ResponseResult; import com.persagy.common.utils.ResponseResultUtil; import io.swagger.annotations.Api; import io.swagger.annotations.ApiOperation; /** * 通用controller * * @version 1.0.0 * @company persagy * @author zhangqiankun * @date 2021-04-26 15:29:50 */ @Api(tags = "通用接口管理") @RestController @RequestMapping(value = "/common", method = RequestMethod.POST) public class SaasCommonController { @Autowired private RedisTemplate redisTemplate; /** * 查询菜单历史记录 */ @ApiOperation(value = "查询菜单历史记录") @RequestMapping(value = "test") public ResponseResult test(@RequestBody @Validated BaseGroupVO model) { this.redisTemplate.opsForSet().add(SaasCommonConstant.SAAS_CLIENT_ID_REDIS_KEY, "EF4C04481E604506995AF5CF5BF2E395"); this.redisTemplate.opsForHash().put("EF4C04481E604506995AF5CF5BF2E395", SaasCommonConstant.INNER_CLIENT_REDIS_HASH_KEY, true); return ResponseResultUtil.successResult(); } }