|
@@ -1,6 +1,7 @@
|
|
|
package com.yonge.cooleshow.student.controller;
|
|
|
|
|
|
import com.yonge.cooleshow.common.entity.HttpResponseResult;
|
|
|
+import com.yonge.toolset.utils.http.HttpUtil;
|
|
|
import io.swagger.annotations.Api;
|
|
|
import io.swagger.annotations.ApiOperation;
|
|
|
|
|
@@ -12,6 +13,7 @@ import java.util.Map;
|
|
|
import org.apache.commons.lang3.StringUtils;
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
import org.springframework.web.bind.annotation.GetMapping;
|
|
|
+import org.springframework.web.bind.annotation.PostMapping;
|
|
|
import org.springframework.web.bind.annotation.RequestMapping;
|
|
|
import org.springframework.web.bind.annotation.RestController;
|
|
|
|
|
@@ -73,4 +75,10 @@ public class SysConfigController extends BaseController {
|
|
|
List<String> paramNameList = Arrays.asList(paramNames.split(","));
|
|
|
return succeed(sysConfigService.findByParamName(paramNameList));
|
|
|
}
|
|
|
+
|
|
|
+ @ApiOperation(value = "url短链接")
|
|
|
+ @PostMapping("shortURL")
|
|
|
+ public HttpResponseResult<String> shortURL(String orginURL) {
|
|
|
+ return succeed(HttpUtil.getSortUrl(orginURL));
|
|
|
+ }
|
|
|
}
|