|
@@ -1,19 +1,24 @@
|
|
|
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;
|
|
|
import com.gree.mall.manager.bean.SVerification;
|
|
|
-import com.gree.mall.manager.bean.admin.*;
|
|
|
+import com.gree.mall.manager.bean.admin.AdminModuleTree;
|
|
|
+import com.gree.mall.manager.bean.admin.AdminUserBean;
|
|
|
+import com.gree.mall.manager.bean.admin.AdminUserCom;
|
|
|
+import com.gree.mall.manager.bean.admin.AdminWebsitGrantBean;
|
|
|
import com.gree.mall.manager.bean.admin.reqDto.AdminCompanyWechatReqBean;
|
|
|
import com.gree.mall.manager.bean.admin.reqDto.AdminUserAddReqBean;
|
|
|
import com.gree.mall.manager.bean.admin.respDto.AdminCompanyWechatRespPageBean;
|
|
|
import com.gree.mall.manager.constant.Constant;
|
|
|
-import com.gree.mall.manager.enums.RedisPrefixEnum;
|
|
|
-import com.gree.mall.manager.logic.admin.AdminCompanyWechatLogic;
|
|
|
-import com.gree.mall.manager.logic.admin.AdminUserLogic;
|
|
|
import com.gree.mall.manager.exception.RemoteServiceException;
|
|
|
import com.gree.mall.manager.helper.ResponseHelper;
|
|
|
+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.RedisUtil;
|
|
@@ -22,13 +27,16 @@ 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;
|
|
|
|
|
@@ -272,16 +280,19 @@ public class AdminUserController {
|
|
|
// return ResponseHelper.success(bean);
|
|
|
// }
|
|
|
|
|
|
- @ApiNotAuth
|
|
|
- @PostMapping("/check/big/view/login")
|
|
|
+ @PostMapping("/get/big/view/login")
|
|
|
@ApiOperation(value = "大屏校验登录")
|
|
|
- public ResponseHelper checkBigViewLogin(@ApiParam(value = "jsmToken",required = true) @RequestParam String jsmToken)
|
|
|
- throws Exception {
|
|
|
- final boolean hasKey = redisUtil.hasKey(RedisPrefixEnum.TOKEN_MGR + jsmToken);
|
|
|
- if (!hasKey) {
|
|
|
- return ResponseHelper.error("无效token");
|
|
|
+ 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("数据异常");
|
|
|
}
|
|
|
|
|
|
- return ResponseHelper.success();
|
|
|
+ return ResponseHelper.success(data);
|
|
|
}
|
|
|
}
|