huanghongfa
2020-12-22 094e1d5048d3e3f22277659c60c653955ae631fc
登录用户信息获取
3个文件已修改
59 ■■■■ 已修改文件
springcloud_k8s_panzhihuazhihuishequ/.idea/workspace.xml 54 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/controller/BaseController.java 5 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/common/target/classes/com/panzhihua/common/controller/BaseController.class 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/.idea/workspace.xml
@@ -24,9 +24,7 @@
  <component name="ChangeListManager">
    <list default="true" id="8ba27629-3e5d-4f42-993e-d0c055bc9371" name="Default Changelist" comment="">
      <change beforePath="$PROJECT_DIR$/.idea/workspace.xml" beforeDir="false" afterPath="$PROJECT_DIR$/.idea/workspace.xml" afterDir="false" />
      <change beforePath="$PROJECT_DIR$/applets/src/main/java/com/panzhihua/applets/api/UserApi.java" beforeDir="false" afterPath="$PROJECT_DIR$/applets/src/main/java/com/panzhihua/applets/api/UserApi.java" afterDir="false" />
      <change beforePath="$PROJECT_DIR$/applets/src/main/java/com/panzhihua/applets/exception/GlobalExceptionCapture.java" beforeDir="false" afterPath="$PROJECT_DIR$/applets/src/main/java/com/panzhihua/applets/exception/GlobalExceptionCapture.java" afterDir="false" />
      <change beforePath="$PROJECT_DIR$/service_user/src/main/resources/bootstrap.yml" beforeDir="false" afterPath="$PROJECT_DIR$/service_user/src/main/resources/bootstrap.yml" afterDir="false" />
      <change beforePath="$PROJECT_DIR$/common/src/main/java/com/panzhihua/common/controller/BaseController.java" beforeDir="false" afterPath="$PROJECT_DIR$/common/src/main/java/com/panzhihua/common/controller/BaseController.java" afterDir="false" />
    </list>
    <option name="SHOW_DIALOG" value="false" />
    <option name="HIGHLIGHT_CONFLICTS" value="true" />
@@ -376,7 +374,7 @@
      <workItem from="1608371107059" duration="646000" />
      <workItem from="1608371917868" duration="79000" />
      <workItem from="1608379508016" duration="46000" />
      <workItem from="1608531425658" duration="41448000" />
      <workItem from="1608531425658" duration="42253000" />
    </task>
    <servers />
  </component>
@@ -428,54 +426,54 @@
      <screen x="0" y="0" width="1536" height="824" />
    </state>
    <state x="549" y="167" key="FileChooserDialogImpl/0.0.1536.824@0.0.1536.824" timestamp="1606197830966" />
    <state width="1031" height="342" key="GridCell.Tab.0.bottom" timestamp="1608631728646">
    <state width="1031" height="342" key="GridCell.Tab.0.bottom" timestamp="1608631764049">
      <screen x="0" y="0" width="1536" height="824" />
    </state>
    <state width="1031" height="342" key="GridCell.Tab.0.bottom/0.0.1536.824@0.0.1536.824" timestamp="1608631728646" />
    <state width="1031" height="342" key="GridCell.Tab.0.center" timestamp="1608631728646">
    <state width="1031" height="342" key="GridCell.Tab.0.bottom/0.0.1536.824@0.0.1536.824" timestamp="1608631764049" />
    <state width="1031" height="342" key="GridCell.Tab.0.center" timestamp="1608631764049">
      <screen x="0" y="0" width="1536" height="824" />
    </state>
    <state width="1031" height="342" key="GridCell.Tab.0.center/0.0.1536.824@0.0.1536.824" timestamp="1608631728646" />
    <state width="1031" height="342" key="GridCell.Tab.0.left" timestamp="1608631728646">
    <state width="1031" height="342" key="GridCell.Tab.0.center/0.0.1536.824@0.0.1536.824" timestamp="1608631764049" />
    <state width="1031" height="342" key="GridCell.Tab.0.left" timestamp="1608631764049">
      <screen x="0" y="0" width="1536" height="824" />
    </state>
    <state width="1031" height="342" key="GridCell.Tab.0.left/0.0.1536.824@0.0.1536.824" timestamp="1608631728646" />
    <state width="1031" height="342" key="GridCell.Tab.0.right" timestamp="1608631728646">
    <state width="1031" height="342" key="GridCell.Tab.0.left/0.0.1536.824@0.0.1536.824" timestamp="1608631764049" />
    <state width="1031" height="342" key="GridCell.Tab.0.right" timestamp="1608631764049">
      <screen x="0" y="0" width="1536" height="824" />
    </state>
    <state width="1031" height="342" key="GridCell.Tab.0.right/0.0.1536.824@0.0.1536.824" timestamp="1608631728646" />
    <state width="1031" height="342" key="GridCell.Tab.1.bottom" timestamp="1608631728646">
    <state width="1031" height="342" key="GridCell.Tab.0.right/0.0.1536.824@0.0.1536.824" timestamp="1608631764049" />
    <state width="1031" height="342" key="GridCell.Tab.1.bottom" timestamp="1608631764049">
      <screen x="0" y="0" width="1536" height="824" />
    </state>
    <state width="1031" height="342" key="GridCell.Tab.1.bottom/0.0.1536.824@0.0.1536.824" timestamp="1608631728646" />
    <state width="1031" height="342" key="GridCell.Tab.1.center" timestamp="1608631728646">
    <state width="1031" height="342" key="GridCell.Tab.1.bottom/0.0.1536.824@0.0.1536.824" timestamp="1608631764049" />
    <state width="1031" height="342" key="GridCell.Tab.1.center" timestamp="1608631764049">
      <screen x="0" y="0" width="1536" height="824" />
    </state>
    <state width="1031" height="342" key="GridCell.Tab.1.center/0.0.1536.824@0.0.1536.824" timestamp="1608631728646" />
    <state width="1031" height="342" key="GridCell.Tab.1.left" timestamp="1608631728646">
    <state width="1031" height="342" key="GridCell.Tab.1.center/0.0.1536.824@0.0.1536.824" timestamp="1608631764049" />
    <state width="1031" height="342" key="GridCell.Tab.1.left" timestamp="1608631764049">
      <screen x="0" y="0" width="1536" height="824" />
    </state>
    <state width="1031" height="342" key="GridCell.Tab.1.left/0.0.1536.824@0.0.1536.824" timestamp="1608631728646" />
    <state width="1031" height="342" key="GridCell.Tab.1.right" timestamp="1608631728646">
    <state width="1031" height="342" key="GridCell.Tab.1.left/0.0.1536.824@0.0.1536.824" timestamp="1608631764049" />
    <state width="1031" height="342" key="GridCell.Tab.1.right" timestamp="1608631764049">
      <screen x="0" y="0" width="1536" height="824" />
    </state>
    <state width="1031" height="342" key="GridCell.Tab.1.right/0.0.1536.824@0.0.1536.824" timestamp="1608631728646" />
    <state width="1031" height="342" key="GridCell.Tab.2.bottom" timestamp="1608631728647">
    <state width="1031" height="342" key="GridCell.Tab.1.right/0.0.1536.824@0.0.1536.824" timestamp="1608631764049" />
    <state width="1031" height="342" key="GridCell.Tab.2.bottom" timestamp="1608631764049">
      <screen x="0" y="0" width="1536" height="824" />
    </state>
    <state width="1031" height="342" key="GridCell.Tab.2.bottom/0.0.1536.824@0.0.1536.824" timestamp="1608631728647" />
    <state width="1031" height="342" key="GridCell.Tab.2.center" timestamp="1608631728646">
    <state width="1031" height="342" key="GridCell.Tab.2.bottom/0.0.1536.824@0.0.1536.824" timestamp="1608631764049" />
    <state width="1031" height="342" key="GridCell.Tab.2.center" timestamp="1608631764049">
      <screen x="0" y="0" width="1536" height="824" />
    </state>
    <state width="1031" height="342" key="GridCell.Tab.2.center/0.0.1536.824@0.0.1536.824" timestamp="1608631728646" />
    <state width="1031" height="342" key="GridCell.Tab.2.left" timestamp="1608631728646">
    <state width="1031" height="342" key="GridCell.Tab.2.center/0.0.1536.824@0.0.1536.824" timestamp="1608631764049" />
    <state width="1031" height="342" key="GridCell.Tab.2.left" timestamp="1608631764049">
      <screen x="0" y="0" width="1536" height="824" />
    </state>
    <state width="1031" height="342" key="GridCell.Tab.2.left/0.0.1536.824@0.0.1536.824" timestamp="1608631728646" />
    <state width="1031" height="342" key="GridCell.Tab.2.right" timestamp="1608631728646">
    <state width="1031" height="342" key="GridCell.Tab.2.left/0.0.1536.824@0.0.1536.824" timestamp="1608631764049" />
    <state width="1031" height="342" key="GridCell.Tab.2.right" timestamp="1608631764049">
      <screen x="0" y="0" width="1536" height="824" />
    </state>
    <state width="1031" height="342" key="GridCell.Tab.2.right/0.0.1536.824@0.0.1536.824" timestamp="1608631728646" />
    <state width="1031" height="342" key="GridCell.Tab.2.right/0.0.1536.824@0.0.1536.824" timestamp="1608631764049" />
    <state x="299" y="67" key="Maven.ArtifactSearchDialog" timestamp="1606714311663">
      <screen x="0" y="0" width="1536" height="824" />
    </state>
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/controller/BaseController.java
@@ -9,6 +9,7 @@
import com.panzhihua.common.utlis.AES;
import io.swagger.models.auth.In;
import lombok.SneakyThrows;
import lombok.extern.slf4j.Slf4j;
import org.springframework.util.ObjectUtils;
import org.springframework.web.context.request.RequestContextHolder;
import org.springframework.web.context.request.ServletRequestAttributes;
@@ -22,6 +23,7 @@
 * @author: huang.hongfa weixin hhf9596 qq 959656820
 * @create: 2020-11-24 09:31
 **/
@Slf4j
public class BaseController {
    /**
     * 获取request对象
@@ -82,8 +84,11 @@
        if (empty) {
            throw new UnAuthenticationException("获取登录人信息失败");
        }
        log.info("userInfo【{}】",userInfo);
        byte[] bytes = AES.parseHexStr2Byte(userInfo);
        log.info("bytes【{}】",bytes);
        byte[] decrypt = AES.decrypt(bytes, Constants.AES_KEY);
        log.info("decrypt【{}】",decrypt);
        userInfo=new String(decrypt);
        LoginUserInfoVO loginUserInfoVO= JSONObject.parseObject(userInfo,LoginUserInfoVO.class);
        return loginUserInfoVO;
springcloud_k8s_panzhihuazhihuishequ/common/target/classes/com/panzhihua/common/controller/BaseController.class
Binary files differ