黄磊的项目,分享文件
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 

36 lines
1.1 KiB

package com.ruoyi.web.controller.upload;
import cn.hutool.core.util.StrUtil;
import com.ruoyi.common.core.redis.RedisCache;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.servlet.ModelAndView;
import org.springframework.web.servlet.view.RedirectView;
@Slf4j
@Controller
@RequestMapping("/s")
public class ShortLinkController {
@Autowired
private RedisCache redisCache;
/**
* 查询允许列列表
*/
@GetMapping("/{code}")
public ModelAndView list(@PathVariable("code") String code)
{
String completeUrl=redisCache.getCacheObject(BVideoAllowController.short_link_code_key+code);
log.info("jump to completeUrl:{}",completeUrl);
ModelAndView downloadView = new ModelAndView(new RedirectView(completeUrl));
return downloadView;
}
}