huanghongfa
2021-01-18 2cfe95a954364b559c945e9eea4cfede22f6541a
修改密码
2个文件已修改
90 ■■■■ 已修改文件
springcloud_k8s_panzhihuazhihuishequ/.idea/workspace.xml 72 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/service_user/src/main/java/com/panzhihua/service_user/service/impl/UserServiceImpl.java 18 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/.idea/workspace.xml
@@ -24,15 +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_backstage/src/main/java/com/panzhihua/applets_backstage/api/CommunityApi.java" beforeDir="false" afterPath="$PROJECT_DIR$/applets_backstage/src/main/java/com/panzhihua/applets_backstage/api/CommunityApi.java" afterDir="false" />
      <change beforePath="$PROJECT_DIR$/common/src/main/java/com/panzhihua/common/model/vos/user/MenuRoleVO.java" beforeDir="false" afterPath="$PROJECT_DIR$/common/src/main/java/com/panzhihua/common/model/vos/user/MenuRoleVO.java" afterDir="false" />
      <change beforePath="$PROJECT_DIR$/common/target/classes/com/panzhihua/common/model/vos/user/MenuRoleVO.class" beforeDir="false" afterPath="$PROJECT_DIR$/common/target/classes/com/panzhihua/common/model/vos/user/MenuRoleVO.class" afterDir="false" />
      <change beforePath="$PROJECT_DIR$/common/target/common-1.0-SNAPSHOT.jar" beforeDir="false" />
      <change beforePath="$PROJECT_DIR$/common/target/maven-archiver/pom.properties" beforeDir="false" />
      <change beforePath="$PROJECT_DIR$/common/target/maven-status/maven-compiler-plugin/compile/default-compile/createdFiles.lst" beforeDir="false" />
      <change beforePath="$PROJECT_DIR$/common/target/maven-status/maven-compiler-plugin/compile/default-compile/inputFiles.lst" beforeDir="false" />
      <change beforePath="$PROJECT_DIR$/community_backstage/src/main/java/com/panzhihua/community_backstage/api/SystemManagementApi.java" beforeDir="false" afterPath="$PROJECT_DIR$/community_backstage/src/main/java/com/panzhihua/community_backstage/api/SystemManagementApi.java" afterDir="false" />
      <change beforePath="$PROJECT_DIR$/service_user/src/main/java/com/panzhihua/service_user/service/impl/RoleServiceImpl.java" beforeDir="false" afterPath="$PROJECT_DIR$/service_user/src/main/java/com/panzhihua/service_user/service/impl/RoleServiceImpl.java" afterDir="false" />
      <change beforePath="$PROJECT_DIR$/service_user/src/main/java/com/panzhihua/service_user/service/impl/UserServiceImpl.java" beforeDir="false" afterPath="$PROJECT_DIR$/service_user/src/main/java/com/panzhihua/service_user/service/impl/UserServiceImpl.java" afterDir="false" />
    </list>
    <option name="SHOW_DIALOG" value="false" />
    <option name="HIGHLIGHT_CONFLICTS" value="true" />
@@ -119,7 +111,7 @@
      </set>
    </option>
  </component>
  <component name="RunManager" selected="Spring Boot.TimejobApplication">
  <component name="RunManager" selected="Application.UserServiceImpl">
    <configuration name="ComBpActivityServiceImpl" type="Application" factoryName="Application" temporary="true" nameIsGenerated="true">
      <option name="MAIN_CLASS_NAME" value="com.panzhihua.service_dangjian.service.impl.ComBpActivityServiceImpl" />
      <module name="service_partybuilding" />
@@ -295,10 +287,10 @@
    </list>
    <recent_temporary>
      <list>
        <item itemvalue="Application.UserServiceImpl" />
        <item itemvalue="Application.ComBpActivityServiceImpl" />
        <item itemvalue="Application.RealNameUtil" />
        <item itemvalue="Application.CommonApi" />
        <item itemvalue="Application.UserServiceImpl" />
        <item itemvalue="Application.IPUtil" />
      </list>
    </recent_temporary>
@@ -413,7 +405,7 @@
      <workItem from="1610930834137" duration="517000" />
      <workItem from="1610934956567" duration="1325000" />
      <workItem from="1610939265133" duration="8588000" />
      <workItem from="1610956684718" duration="2359000" />
      <workItem from="1610956684718" duration="4709000" />
    </task>
    <servers />
  </component>
@@ -465,54 +457,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="1610606590056" />
    <state width="1031" height="439" key="GridCell.Tab.0.bottom" timestamp="1610959091349">
    <state width="1031" height="248" key="GridCell.Tab.0.bottom" timestamp="1610961345718">
      <screen x="0" y="0" width="1536" height="824" />
    </state>
    <state width="1031" height="439" key="GridCell.Tab.0.bottom/0.0.1536.824@0.0.1536.824" timestamp="1610959091349" />
    <state width="1031" height="439" key="GridCell.Tab.0.center" timestamp="1610959091349">
    <state width="1031" height="248" key="GridCell.Tab.0.bottom/0.0.1536.824@0.0.1536.824" timestamp="1610961345718" />
    <state width="1031" height="248" key="GridCell.Tab.0.center" timestamp="1610961345718">
      <screen x="0" y="0" width="1536" height="824" />
    </state>
    <state width="1031" height="439" key="GridCell.Tab.0.center/0.0.1536.824@0.0.1536.824" timestamp="1610959091349" />
    <state width="1031" height="439" key="GridCell.Tab.0.left" timestamp="1610959091348">
    <state width="1031" height="248" key="GridCell.Tab.0.center/0.0.1536.824@0.0.1536.824" timestamp="1610961345718" />
    <state width="1031" height="248" key="GridCell.Tab.0.left" timestamp="1610961345717">
      <screen x="0" y="0" width="1536" height="824" />
    </state>
    <state width="1031" height="439" key="GridCell.Tab.0.left/0.0.1536.824@0.0.1536.824" timestamp="1610959091348" />
    <state width="1031" height="439" key="GridCell.Tab.0.right" timestamp="1610959091349">
    <state width="1031" height="248" key="GridCell.Tab.0.left/0.0.1536.824@0.0.1536.824" timestamp="1610961345717" />
    <state width="1031" height="248" key="GridCell.Tab.0.right" timestamp="1610961345718">
      <screen x="0" y="0" width="1536" height="824" />
    </state>
    <state width="1031" height="439" key="GridCell.Tab.0.right/0.0.1536.824@0.0.1536.824" timestamp="1610959091349" />
    <state width="1031" height="439" key="GridCell.Tab.1.bottom" timestamp="1610959091349">
    <state width="1031" height="248" key="GridCell.Tab.0.right/0.0.1536.824@0.0.1536.824" timestamp="1610961345718" />
    <state width="1031" height="248" key="GridCell.Tab.1.bottom" timestamp="1610961345718">
      <screen x="0" y="0" width="1536" height="824" />
    </state>
    <state width="1031" height="439" key="GridCell.Tab.1.bottom/0.0.1536.824@0.0.1536.824" timestamp="1610959091349" />
    <state width="1031" height="439" key="GridCell.Tab.1.center" timestamp="1610959091349">
    <state width="1031" height="248" key="GridCell.Tab.1.bottom/0.0.1536.824@0.0.1536.824" timestamp="1610961345718" />
    <state width="1031" height="248" key="GridCell.Tab.1.center" timestamp="1610961345718">
      <screen x="0" y="0" width="1536" height="824" />
    </state>
    <state width="1031" height="439" key="GridCell.Tab.1.center/0.0.1536.824@0.0.1536.824" timestamp="1610959091349" />
    <state width="1031" height="439" key="GridCell.Tab.1.left" timestamp="1610959091349">
    <state width="1031" height="248" key="GridCell.Tab.1.center/0.0.1536.824@0.0.1536.824" timestamp="1610961345718" />
    <state width="1031" height="248" key="GridCell.Tab.1.left" timestamp="1610961345718">
      <screen x="0" y="0" width="1536" height="824" />
    </state>
    <state width="1031" height="439" key="GridCell.Tab.1.left/0.0.1536.824@0.0.1536.824" timestamp="1610959091349" />
    <state width="1031" height="439" key="GridCell.Tab.1.right" timestamp="1610959091349">
    <state width="1031" height="248" key="GridCell.Tab.1.left/0.0.1536.824@0.0.1536.824" timestamp="1610961345718" />
    <state width="1031" height="248" key="GridCell.Tab.1.right" timestamp="1610961345718">
      <screen x="0" y="0" width="1536" height="824" />
    </state>
    <state width="1031" height="439" key="GridCell.Tab.1.right/0.0.1536.824@0.0.1536.824" timestamp="1610959091349" />
    <state width="1031" height="439" key="GridCell.Tab.2.bottom" timestamp="1610959091349">
    <state width="1031" height="248" key="GridCell.Tab.1.right/0.0.1536.824@0.0.1536.824" timestamp="1610961345718" />
    <state width="1031" height="248" key="GridCell.Tab.2.bottom" timestamp="1610961345718">
      <screen x="0" y="0" width="1536" height="824" />
    </state>
    <state width="1031" height="439" key="GridCell.Tab.2.bottom/0.0.1536.824@0.0.1536.824" timestamp="1610959091349" />
    <state width="1031" height="439" key="GridCell.Tab.2.center" timestamp="1610959091349">
    <state width="1031" height="248" key="GridCell.Tab.2.bottom/0.0.1536.824@0.0.1536.824" timestamp="1610961345718" />
    <state width="1031" height="248" key="GridCell.Tab.2.center" timestamp="1610961345718">
      <screen x="0" y="0" width="1536" height="824" />
    </state>
    <state width="1031" height="439" key="GridCell.Tab.2.center/0.0.1536.824@0.0.1536.824" timestamp="1610959091349" />
    <state width="1031" height="439" key="GridCell.Tab.2.left" timestamp="1610959091349">
    <state width="1031" height="248" key="GridCell.Tab.2.center/0.0.1536.824@0.0.1536.824" timestamp="1610961345718" />
    <state width="1031" height="248" key="GridCell.Tab.2.left" timestamp="1610961345718">
      <screen x="0" y="0" width="1536" height="824" />
    </state>
    <state width="1031" height="439" key="GridCell.Tab.2.left/0.0.1536.824@0.0.1536.824" timestamp="1610959091349" />
    <state width="1031" height="439" key="GridCell.Tab.2.right" timestamp="1610959091349">
    <state width="1031" height="248" key="GridCell.Tab.2.left/0.0.1536.824@0.0.1536.824" timestamp="1610961345718" />
    <state width="1031" height="248" key="GridCell.Tab.2.right" timestamp="1610961345718">
      <screen x="0" y="0" width="1536" height="824" />
    </state>
    <state width="1031" height="439" key="GridCell.Tab.2.right/0.0.1536.824@0.0.1536.824" timestamp="1610959091349" />
    <state width="1031" height="248" key="GridCell.Tab.2.right/0.0.1536.824@0.0.1536.824" timestamp="1610961345718" />
    <state x="299" y="67" key="Maven.ArtifactSearchDialog" timestamp="1610611848124">
      <screen x="0" y="0" width="1536" height="824" />
    </state>
@@ -533,10 +525,10 @@
      <screen x="0" y="0" width="1536" height="824" />
    </state>
    <state x="93" y="93" width="1350" height="638" key="com.intellij.history.integration.ui.views.FileHistoryDialog/0.0.1536.824@0.0.1536.824" timestamp="1610939578806" />
    <state x="468" y="42" width="766" height="782" key="find.popup" timestamp="1610956110199">
    <state x="468" y="42" width="766" height="782" key="find.popup" timestamp="1610961508400">
      <screen x="0" y="0" width="1536" height="824" />
    </state>
    <state x="468" y="42" width="766" height="782" key="find.popup/0.0.1536.824@0.0.1536.824" timestamp="1610956110199" />
    <state x="468" y="42" width="766" height="782" key="find.popup/0.0.1536.824@0.0.1536.824" timestamp="1610961508400" />
    <state width="600" height="428" key="javadoc.popup" timestamp="1610005781618">
      <screen x="0" y="0" width="1536" height="824" />
    </state>
@@ -553,10 +545,10 @@
      <screen x="0" y="0" width="1536" height="824" />
    </state>
    <state x="425" y="187" key="run.anything.popup/0.0.1536.824@0.0.1536.824" timestamp="1608280452280" />
    <state x="431" y="145" width="672" height="678" key="search.everywhere.popup" timestamp="1610075113322">
    <state x="431" y="145" width="672" height="678" key="search.everywhere.popup" timestamp="1610961524558">
      <screen x="0" y="0" width="1536" height="824" />
    </state>
    <state x="431" y="145" width="672" height="678" key="search.everywhere.popup/0.0.1536.824@0.0.1536.824" timestamp="1610075113322" />
    <state x="431" y="145" width="672" height="678" key="search.everywhere.popup/0.0.1536.824@0.0.1536.824" timestamp="1610961524558" />
  </component>
  <component name="XDebuggerManager">
    <pin-to-top-manager>
springcloud_k8s_panzhihuazhihuishequ/service_user/src/main/java/com/panzhihua/service_user/service/impl/UserServiceImpl.java
@@ -240,15 +240,15 @@
    public R changePassword(ChangePasswordVO changePasswordVO) {
        Long userId = changePasswordVO.getUserId();
        SysUserDO sysUserDO1 = userDao.selectById(userId);
        String oldPassoword = sysUserDO1.getPassword();
        String dataPassowrd = sysUserDO1.getPassword();
        String oldPassword = changePasswordVO.getOldPassword();
        String newPassword = changePasswordVO.getNewPassword();
        if (oldPassoword.equals(newPassword)) {
            return R.fail("新老密码不能相同");
        if (oldPassword.equals(newPassword)) {
            return R.fail("新密码与原密码不能相同");
        }
         oldPassoword = new BCryptPasswordEncoder().encode(oldPassoword);
        BCryptPasswordEncoder encoder = new BCryptPasswordEncoder();
        if( !encoder.matches(oldPassoword,newPassword)){
            return R.fail("老密码错误");
        if( !encoder.matches(oldPassword,dataPassowrd)){
            return R.fail("原密码错误");
        }
        SysUserDO sysUserDO=new SysUserDO();
@@ -1277,5 +1277,11 @@
    public static void main(String[] args) {
        String encode = new BCryptPasswordEncoder().encode("admin123456");
        System.out.println(encode);
        BCryptPasswordEncoder encoder = new BCryptPasswordEncoder();
        boolean matches = encoder.matches("admin1234567", encode);
        System.out.println(matches);
    }
}