| | |
| | | package com.ks.lijin.controller; |
| | | |
| | | import com.google.gson.Gson; |
| | | import com.ks.vip.pojo.DO.VipGrade; |
| | | import com.ks.vip.pojo.Enums.VIPEnum; |
| | | import com.ks.vip.service.VipGradeService; |
| | | import org.apache.dubbo.config.annotation.Reference; |
| | | import org.springframework.data.redis.core.RedisTemplate; |
| | | import org.springframework.stereotype.Controller; |
| | | import org.springframework.web.bind.annotation.RequestMapping; |
| | |
| | | @Resource |
| | | private RedisTemplate redisTemplate; |
| | | |
| | | @Reference(version = "1.0") |
| | | private VipGradeService vipGradeService; |
| | | |
| | | @ResponseBody |
| | | @RequestMapping("redis") |
| | | public String testRedis(String uid) throws Exception { |
| | |
| | | } |
| | | } |
| | | |
| | | @ResponseBody |
| | | @RequestMapping("vip") |
| | | public String testVip(String uid) throws Exception { |
| | | VipGrade grade = vipGradeService.getByVipEnum(VIPEnum.platinum); |
| | | return new Gson().toJson(grade); |
| | | } |
| | | |
| | | } |