|
@@ -4,7 +4,10 @@ import com.alibaba.fastjson.JSON;
|
|
|
import com.alibaba.fastjson.JSONObject;
|
|
|
import com.fdkankan.common.constant.MsgCode;
|
|
|
import com.fdkankan.common.exception.BaseRuntimeException;
|
|
|
-import com.fdkankan.common.util.*;
|
|
|
+import com.fdkankan.common.util.Base64Converter;
|
|
|
+import com.fdkankan.common.util.PasswordUtils;
|
|
|
+import com.fdkankan.common.util.RandomValidateCodeUtil;
|
|
|
+import com.fdkankan.common.util.Result;
|
|
|
import com.fdkankan.domain.backend.DepartmentEntity;
|
|
|
import com.fdkankan.domain.backend.RoleEntity;
|
|
|
import com.fdkankan.domain.backend.UserEntity;
|
|
@@ -24,16 +27,17 @@ import io.swagger.annotations.ApiImplicitParam;
|
|
|
import io.swagger.annotations.ApiImplicitParams;
|
|
|
import io.swagger.annotations.ApiOperation;
|
|
|
import lombok.extern.log4j.Log4j2;
|
|
|
+import org.apache.commons.codec.binary.Base64;
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
import org.springframework.data.redis.core.RedisTemplate;
|
|
|
import org.springframework.transaction.annotation.Transactional;
|
|
|
-import org.springframework.util.StringUtils;
|
|
|
import org.springframework.web.bind.annotation.*;
|
|
|
|
|
|
import javax.servlet.http.HttpServletRequest;
|
|
|
import javax.servlet.http.HttpServletResponse;
|
|
|
-import javax.servlet.http.HttpSession;
|
|
|
-import java.util.*;
|
|
|
+import java.util.Date;
|
|
|
+import java.util.HashMap;
|
|
|
+import java.util.List;
|
|
|
import java.util.concurrent.TimeUnit;
|
|
|
|
|
|
/**
|
|
@@ -259,6 +263,18 @@ public class IndexController {
|
|
|
|
|
|
}
|
|
|
|
|
|
+ @ApiOperation("返回url base64编码")
|
|
|
+ @GetMapping("/getEncodeUrl")
|
|
|
+ public Result getEncodeUrl(HttpServletRequest request, HttpServletResponse response) {
|
|
|
+ String url = request.getParameter("url");
|
|
|
+ byte[] b = url.getBytes();
|
|
|
+ org.apache.commons.codec.binary.Base64 base64 = new Base64();
|
|
|
+ b = base64.encode(b);
|
|
|
+ String base64Url = new String(b);
|
|
|
+ return Result.success("success", base64Url);
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
@ApiOperation("校验验证码")
|
|
|
@GetMapping(value = "/checkVerify")
|
|
|
@ApiImplicitParams({
|