|
@@ -1,8 +1,5 @@
|
|
|
package com.gree.mall.manager.controller.admin;
|
|
|
|
|
|
-import cn.hutool.http.HttpUtil;
|
|
|
-import cn.hutool.json.JSONObject;
|
|
|
-import cn.hutool.json.JSONUtil;
|
|
|
import com.baomidou.mybatisplus.core.metadata.IPage;
|
|
|
import com.gree.mall.manager.annotation.ApiNotAuth;
|
|
|
import com.gree.mall.manager.bean.ExcelData;
|
|
@@ -21,22 +18,20 @@ import com.gree.mall.manager.logic.admin.AdminCompanyWechatLogic;
|
|
|
import com.gree.mall.manager.logic.admin.AdminUserLogic;
|
|
|
import com.gree.mall.manager.plus.entity.AdminCompanyWechat;
|
|
|
import com.gree.mall.manager.plus.entity.AdminUser;
|
|
|
+import com.gree.mall.manager.utils.JwtUtils;
|
|
|
import com.gree.mall.manager.utils.RedisUtil;
|
|
|
import com.gree.mall.manager.utils.excel.ExcelUtils;
|
|
|
import io.swagger.annotations.Api;
|
|
|
import io.swagger.annotations.ApiOperation;
|
|
|
import io.swagger.annotations.ApiParam;
|
|
|
import lombok.extern.slf4j.Slf4j;
|
|
|
-import org.apache.commons.lang3.StringUtils;
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
import org.springframework.integration.redis.util.RedisLockRegistry;
|
|
|
import org.springframework.web.bind.annotation.*;
|
|
|
|
|
|
import javax.servlet.http.HttpServletRequest;
|
|
|
import javax.servlet.http.HttpServletResponse;
|
|
|
-import java.util.HashMap;
|
|
|
import java.util.List;
|
|
|
-import java.util.Map;
|
|
|
import java.util.concurrent.TimeUnit;
|
|
|
import java.util.concurrent.locks.Lock;
|
|
|
|
|
@@ -283,16 +278,8 @@ public class AdminUserController {
|
|
|
@PostMapping("/get/big/view/login")
|
|
|
@ApiOperation(value = "大屏校验登录")
|
|
|
public ResponseHelper getBigViewLogin() throws Exception {
|
|
|
- Map<String, Object> reqMap = new HashMap<>();
|
|
|
- reqMap.put("username", "zfire");
|
|
|
- reqMap.put("password", "zfire2022@");
|
|
|
- final String result = HttpUtil.post("https://pgxtadm.greeapps.com/java/big/data/login", reqMap);
|
|
|
- final JSONObject parseObj = JSONUtil.parseObj(result);
|
|
|
- final String data = parseObj.get("data", String.class);
|
|
|
- if (StringUtils.isBlank(data)) {
|
|
|
- throw new RemoteServiceException("数据异常");
|
|
|
- }
|
|
|
+ final String jwt = JwtUtils.createJWT("zfire", "zfire2022@", 60 * 60 * 10000);
|
|
|
|
|
|
- return ResponseHelper.success(data);
|
|
|
+ return ResponseHelper.success(jwt);
|
|
|
}
|
|
|
}
|