huanghongfa
2020-12-30 43a8d7b9b93555f6c1c8526bae6074d2ab06d045
增加接口测试使用
10个文件已修改
1个文件已添加
176 ■■■■■ 已修改文件
springcloud_k8s_panzhihuazhihuishequ/.idea/workspace.xml 85 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/applets/src/main/java/com/panzhihua/applets/api/UserApi.java 7 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/auth/src/main/java/com/panzhihua/auth/config/SecurityConfig.java 10 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/auth/src/main/java/com/panzhihua/auth/handel/AjaxAuthenticationEntryPoint.java 28 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/auth/src/main/resources/bootstrap.yml 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/service/user/UserService.java 8 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/common/target/classes/com/panzhihua/common/service/user/UserService.class 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/service_user/src/main/java/com/panzhihua/service_user/api/UserApi.java 10 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/service_user/src/main/java/com/panzhihua/service_user/dao/UserDao.java 3 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/service_user/src/main/java/com/panzhihua/service_user/service/UserService.java 6 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/service_user/src/main/java/com/panzhihua/service_user/service/impl/UserServiceImpl.java 15 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/.idea/workspace.xml
@@ -23,30 +23,17 @@
  </component>
  <component name="ChangeListManager">
    <list default="true" id="8ba27629-3e5d-4f42-993e-d0c055bc9371" name="Default Changelist" comment="">
      <change afterPath="$PROJECT_DIR$/auth/src/main/java/com/panzhihua/auth/handel/AjaxAuthenticationEntryPoint.java" afterDir="false" />
      <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/IndexApi.java" beforeDir="false" afterPath="$PROJECT_DIR$/applets/src/main/java/com/panzhihua/applets/api/IndexApi.java" afterDir="false" />
      <change beforePath="$PROJECT_DIR$/applets/src/main/java/com/panzhihua/applets/api/LoginApi.java" beforeDir="false" afterPath="$PROJECT_DIR$/applets/src/main/java/com/panzhihua/applets/api/LoginApi.java" 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/resources/bootstrap.yml" beforeDir="false" afterPath="$PROJECT_DIR$/applets/src/main/resources/bootstrap.yml" afterDir="false" />
      <change beforePath="$PROJECT_DIR$/applets_backstage/src/main/resources/bootstrap.yml" beforeDir="false" afterPath="$PROJECT_DIR$/applets_backstage/src/main/resources/bootstrap.yml" afterDir="false" />
      <change beforePath="$PROJECT_DIR$/auth/src/main/java/com/panzhihua/auth/config/SecurityConfig.java" beforeDir="false" afterPath="$PROJECT_DIR$/auth/src/main/java/com/panzhihua/auth/config/SecurityConfig.java" afterDir="false" />
      <change beforePath="$PROJECT_DIR$/auth/src/main/java/com/panzhihua/auth/handel/UserAuthenticationProvider.java" beforeDir="false" afterPath="$PROJECT_DIR$/auth/src/main/java/com/panzhihua/auth/handel/UserAuthenticationProvider.java" afterDir="false" />
      <change beforePath="$PROJECT_DIR$/auth/src/main/java/com/panzhihua/auth/handel/UserLoginFailureHandler.java" beforeDir="false" afterPath="$PROJECT_DIR$/auth/src/main/java/com/panzhihua/auth/handel/UserLoginFailureHandler.java" afterDir="false" />
      <change beforePath="$PROJECT_DIR$/auth/src/main/java/com/panzhihua/auth/handel/UserLoginSuccessHandler.java" beforeDir="false" afterPath="$PROJECT_DIR$/auth/src/main/java/com/panzhihua/auth/handel/UserLoginSuccessHandler.java" afterDir="false" />
      <change beforePath="$PROJECT_DIR$/auth/src/main/resources/bootstrap.yml" beforeDir="false" afterPath="$PROJECT_DIR$/auth/src/main/resources/bootstrap.yml" afterDir="false" />
      <change beforePath="$PROJECT_DIR$/common/src/main/java/com/panzhihua/common/model/vos/user/SysUserVO.java" beforeDir="false" afterPath="$PROJECT_DIR$/common/src/main/java/com/panzhihua/common/model/vos/user/SysUserVO.java" afterDir="false" />
      <change beforePath="$PROJECT_DIR$/common/target/classes/com/panzhihua/common/model/vos/user/SysUserVO.class" beforeDir="false" afterPath="$PROJECT_DIR$/common/target/classes/com/panzhihua/common/model/vos/user/SysUserVO.class" afterDir="false" />
      <change beforePath="$PROJECT_DIR$/community_backstage/src/main/resources/bootstrap.yml" beforeDir="false" afterPath="$PROJECT_DIR$/community_backstage/src/main/resources/bootstrap.yml" afterDir="false" />
      <change beforePath="$PROJECT_DIR$/service_community/src/main/java/com/panzhihua/service_community/dao/ComActEasyPhotoDAO.java" beforeDir="false" afterPath="$PROJECT_DIR$/service_community/src/main/java/com/panzhihua/service_community/dao/ComActEasyPhotoDAO.java" afterDir="false" />
      <change beforePath="$PROJECT_DIR$/service_community/src/main/java/com/panzhihua/service_community/service/impl/ComActEasyPhotoServiceImpl.java" beforeDir="false" afterPath="$PROJECT_DIR$/service_community/src/main/java/com/panzhihua/service_community/service/impl/ComActEasyPhotoServiceImpl.java" afterDir="false" />
      <change beforePath="$PROJECT_DIR$/service_community/src/main/resources/bootstrap.yml" beforeDir="false" afterPath="$PROJECT_DIR$/service_community/src/main/resources/bootstrap.yml" afterDir="false" />
      <change beforePath="$PROJECT_DIR$/service_partybuilding/src/main/java/com/panzhihua/service_dangjian/dao/ComBpActivityDAO.java" beforeDir="false" afterPath="$PROJECT_DIR$/service_partybuilding/src/main/java/com/panzhihua/service_dangjian/dao/ComBpActivityDAO.java" afterDir="false" />
      <change beforePath="$PROJECT_DIR$/service_partybuilding/src/main/java/com/panzhihua/service_dangjian/model/dos/ComPbActivityDO.java" beforeDir="false" afterPath="$PROJECT_DIR$/service_partybuilding/src/main/java/com/panzhihua/service_dangjian/model/dos/ComPbActivityDO.java" afterDir="false" />
      <change beforePath="$PROJECT_DIR$/service_partybuilding/src/main/java/com/panzhihua/service_dangjian/service/impl/ComBpActivityServiceImpl.java" beforeDir="false" afterPath="$PROJECT_DIR$/service_partybuilding/src/main/java/com/panzhihua/service_dangjian/service/impl/ComBpActivityServiceImpl.java" afterDir="false" />
      <change beforePath="$PROJECT_DIR$/service_partybuilding/src/main/resources/bootstrap.yml" beforeDir="false" afterPath="$PROJECT_DIR$/service_partybuilding/src/main/resources/bootstrap.yml" afterDir="false" />
      <change beforePath="$PROJECT_DIR$/common/src/main/java/com/panzhihua/common/service/user/UserService.java" beforeDir="false" afterPath="$PROJECT_DIR$/common/src/main/java/com/panzhihua/common/service/user/UserService.java" afterDir="false" />
      <change beforePath="$PROJECT_DIR$/common/target/classes/com/panzhihua/common/service/user/UserService.class" beforeDir="false" afterPath="$PROJECT_DIR$/common/target/classes/com/panzhihua/common/service/user/UserService.class" afterDir="false" />
      <change beforePath="$PROJECT_DIR$/service_user/src/main/java/com/panzhihua/service_user/api/UserApi.java" beforeDir="false" afterPath="$PROJECT_DIR$/service_user/src/main/java/com/panzhihua/service_user/api/UserApi.java" afterDir="false" />
      <change beforePath="$PROJECT_DIR$/service_user/src/main/java/com/panzhihua/service_user/dao/UserDao.java" beforeDir="false" afterPath="$PROJECT_DIR$/service_user/src/main/java/com/panzhihua/service_user/dao/UserDao.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$/zuul/src/main/resources/bootstrap.yml" beforeDir="false" afterPath="$PROJECT_DIR$/zuul/src/main/resources/bootstrap.yml" afterDir="false" />
      <change beforePath="$PROJECT_DIR$/service_user/src/main/java/com/panzhihua/service_user/service/UserService.java" beforeDir="false" afterPath="$PROJECT_DIR$/service_user/src/main/java/com/panzhihua/service_user/service/UserService.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" />
@@ -59,8 +46,8 @@
  <component name="FileTemplateManagerImpl">
    <option name="RECENT_TEMPLATES">
      <list>
        <option value="Class" />
        <option value="Interface" />
        <option value="Class" />
      </list>
    </option>
  </component>
@@ -401,7 +388,7 @@
      <workItem from="1609120633455" duration="2000" />
      <workItem from="1609120765557" duration="31000" />
      <workItem from="1609121031103" duration="30812000" />
      <workItem from="1609219740946" duration="42713000" />
      <workItem from="1609219740946" duration="44490000" />
    </task>
    <servers />
  </component>
@@ -425,10 +412,10 @@
      <screen x="0" y="0" width="1536" height="824" />
    </state>
    <state x="249" y="0" key="#Project_Structure/0.0.1536.824@0.0.1536.824" timestamp="1608546608273" />
    <state x="574" y="118" key="#com.intellij.ide.util.MemberChooser" timestamp="1609307599411">
    <state x="574" y="118" key="#com.intellij.ide.util.MemberChooser" timestamp="1609326309030">
      <screen x="0" y="0" width="1536" height="824" />
    </state>
    <state x="574" y="118" key="#com.intellij.ide.util.MemberChooser/0.0.1536.824@0.0.1536.824" timestamp="1609307599411" />
    <state x="574" y="118" key="#com.intellij.ide.util.MemberChooser/0.0.1536.824@0.0.1536.824" timestamp="1609326309030" />
    <state x="405" y="335" key="#com.intellij.refactoring.move.MoveHandler.SelectRefactoringDialog" timestamp="1606099594079">
      <screen x="0" y="0" width="1536" height="824" />
    </state>
@@ -453,54 +440,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="589" key="GridCell.Tab.0.bottom" timestamp="1609323188498">
    <state width="1031" height="500" key="GridCell.Tab.0.bottom" timestamp="1609326672196">
      <screen x="0" y="0" width="1536" height="824" />
    </state>
    <state width="1031" height="589" key="GridCell.Tab.0.bottom/0.0.1536.824@0.0.1536.824" timestamp="1609323188498" />
    <state width="1031" height="589" key="GridCell.Tab.0.center" timestamp="1609323188498">
    <state width="1031" height="500" key="GridCell.Tab.0.bottom/0.0.1536.824@0.0.1536.824" timestamp="1609326672196" />
    <state width="1031" height="500" key="GridCell.Tab.0.center" timestamp="1609326672196">
      <screen x="0" y="0" width="1536" height="824" />
    </state>
    <state width="1031" height="589" key="GridCell.Tab.0.center/0.0.1536.824@0.0.1536.824" timestamp="1609323188498" />
    <state width="1031" height="589" key="GridCell.Tab.0.left" timestamp="1609323188498">
    <state width="1031" height="500" key="GridCell.Tab.0.center/0.0.1536.824@0.0.1536.824" timestamp="1609326672196" />
    <state width="1031" height="500" key="GridCell.Tab.0.left" timestamp="1609326672196">
      <screen x="0" y="0" width="1536" height="824" />
    </state>
    <state width="1031" height="589" key="GridCell.Tab.0.left/0.0.1536.824@0.0.1536.824" timestamp="1609323188498" />
    <state width="1031" height="589" key="GridCell.Tab.0.right" timestamp="1609323188498">
    <state width="1031" height="500" key="GridCell.Tab.0.left/0.0.1536.824@0.0.1536.824" timestamp="1609326672196" />
    <state width="1031" height="500" key="GridCell.Tab.0.right" timestamp="1609326672196">
      <screen x="0" y="0" width="1536" height="824" />
    </state>
    <state width="1031" height="589" key="GridCell.Tab.0.right/0.0.1536.824@0.0.1536.824" timestamp="1609323188498" />
    <state width="1031" height="589" key="GridCell.Tab.1.bottom" timestamp="1609323188499">
    <state width="1031" height="500" key="GridCell.Tab.0.right/0.0.1536.824@0.0.1536.824" timestamp="1609326672196" />
    <state width="1031" height="500" key="GridCell.Tab.1.bottom" timestamp="1609326672196">
      <screen x="0" y="0" width="1536" height="824" />
    </state>
    <state width="1031" height="589" key="GridCell.Tab.1.bottom/0.0.1536.824@0.0.1536.824" timestamp="1609323188499" />
    <state width="1031" height="589" key="GridCell.Tab.1.center" timestamp="1609323188499">
    <state width="1031" height="500" key="GridCell.Tab.1.bottom/0.0.1536.824@0.0.1536.824" timestamp="1609326672196" />
    <state width="1031" height="500" key="GridCell.Tab.1.center" timestamp="1609326672196">
      <screen x="0" y="0" width="1536" height="824" />
    </state>
    <state width="1031" height="589" key="GridCell.Tab.1.center/0.0.1536.824@0.0.1536.824" timestamp="1609323188499" />
    <state width="1031" height="589" key="GridCell.Tab.1.left" timestamp="1609323188499">
    <state width="1031" height="500" key="GridCell.Tab.1.center/0.0.1536.824@0.0.1536.824" timestamp="1609326672196" />
    <state width="1031" height="500" key="GridCell.Tab.1.left" timestamp="1609326672196">
      <screen x="0" y="0" width="1536" height="824" />
    </state>
    <state width="1031" height="589" key="GridCell.Tab.1.left/0.0.1536.824@0.0.1536.824" timestamp="1609323188499" />
    <state width="1031" height="589" key="GridCell.Tab.1.right" timestamp="1609323188499">
    <state width="1031" height="500" key="GridCell.Tab.1.left/0.0.1536.824@0.0.1536.824" timestamp="1609326672196" />
    <state width="1031" height="500" key="GridCell.Tab.1.right" timestamp="1609326672196">
      <screen x="0" y="0" width="1536" height="824" />
    </state>
    <state width="1031" height="589" key="GridCell.Tab.1.right/0.0.1536.824@0.0.1536.824" timestamp="1609323188499" />
    <state width="1031" height="589" key="GridCell.Tab.2.bottom" timestamp="1609323188499">
    <state width="1031" height="500" key="GridCell.Tab.1.right/0.0.1536.824@0.0.1536.824" timestamp="1609326672196" />
    <state width="1031" height="500" key="GridCell.Tab.2.bottom" timestamp="1609326672196">
      <screen x="0" y="0" width="1536" height="824" />
    </state>
    <state width="1031" height="589" key="GridCell.Tab.2.bottom/0.0.1536.824@0.0.1536.824" timestamp="1609323188499" />
    <state width="1031" height="589" key="GridCell.Tab.2.center" timestamp="1609323188499">
    <state width="1031" height="500" key="GridCell.Tab.2.bottom/0.0.1536.824@0.0.1536.824" timestamp="1609326672196" />
    <state width="1031" height="500" key="GridCell.Tab.2.center" timestamp="1609326672196">
      <screen x="0" y="0" width="1536" height="824" />
    </state>
    <state width="1031" height="589" key="GridCell.Tab.2.center/0.0.1536.824@0.0.1536.824" timestamp="1609323188499" />
    <state width="1031" height="589" key="GridCell.Tab.2.left" timestamp="1609323188499">
    <state width="1031" height="500" key="GridCell.Tab.2.center/0.0.1536.824@0.0.1536.824" timestamp="1609326672196" />
    <state width="1031" height="500" key="GridCell.Tab.2.left" timestamp="1609326672196">
      <screen x="0" y="0" width="1536" height="824" />
    </state>
    <state width="1031" height="589" key="GridCell.Tab.2.left/0.0.1536.824@0.0.1536.824" timestamp="1609323188499" />
    <state width="1031" height="589" key="GridCell.Tab.2.right" timestamp="1609323188499">
    <state width="1031" height="500" key="GridCell.Tab.2.left/0.0.1536.824@0.0.1536.824" timestamp="1609326672196" />
    <state width="1031" height="500" key="GridCell.Tab.2.right" timestamp="1609326672196">
      <screen x="0" y="0" width="1536" height="824" />
    </state>
    <state width="1031" height="589" key="GridCell.Tab.2.right/0.0.1536.824@0.0.1536.824" timestamp="1609323188499" />
    <state width="1031" height="500" key="GridCell.Tab.2.right/0.0.1536.824@0.0.1536.824" timestamp="1609326672196" />
    <state x="299" y="67" key="Maven.ArtifactSearchDialog" timestamp="1606714311663">
      <screen x="0" y="0" width="1536" height="824" />
    </state>
@@ -521,10 +508,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="1609226181026" />
    <state x="468" y="42" width="766" height="782" key="find.popup" timestamp="1609312579188">
    <state x="468" y="42" width="766" height="782" key="find.popup" timestamp="1609324935410">
      <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="1609312579188" />
    <state x="468" y="42" width="766" height="782" key="find.popup/0.0.1536.824@0.0.1536.824" timestamp="1609324935410" />
    <state x="301" y="45" key="new project wizard" timestamp="1609120520884">
      <screen x="0" y="0" width="1536" height="824" />
    </state>
springcloud_k8s_panzhihuazhihuishequ/applets/src/main/java/com/panzhihua/applets/api/UserApi.java
@@ -233,5 +233,12 @@
        return communityService.putMicroWishConfirm(comActMicroWishVO);
    }
    @ApiOperation(value = "调试接口--清除昵称、社区、小区" )
    @DeleteMapping("usertest")
    public R deleteUserTest() {
        Long userId = this.getUserId();
        return userService.deleteUserTest(userId);
    }
}
springcloud_k8s_panzhihuazhihuishequ/auth/src/main/java/com/panzhihua/auth/config/SecurityConfig.java
@@ -1,10 +1,7 @@
package com.panzhihua.auth.config;
import com.panzhihua.auth.handel.UserAuthenticationProvider;
import com.panzhihua.auth.handel.UserLoginFailureHandler;
import com.panzhihua.auth.handel.UserLoginSuccessHandler;
import com.panzhihua.auth.handel.UserLogoutSuccessHandler;
import com.panzhihua.auth.handel.*;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.security.authentication.AuthenticationManager;
@@ -76,7 +73,7 @@
                .and()
                // 配置登录成功自定义处理类
                .formLogin()
                .successHandler(new UserLoginSuccessHandler())
//                .successHandler(new UserLoginSuccessHandler())
                // 配置登录失败自定义处理类
                .failureHandler(new UserLoginFailureHandler())
                .and()
@@ -88,6 +85,9 @@
                .and()
                // 开启跨域
                .cors()
                //异常处理(权限拒绝、登录失效等)
                .and().exceptionHandling()
                .authenticationEntryPoint(new AjaxAuthenticationEntryPoint())//匿名用户访问无权限资源时的异常处理;
                .and()
                // 取消跨站请求伪造防护
                .csrf().disable();
springcloud_k8s_panzhihuazhihuishequ/auth/src/main/java/com/panzhihua/auth/handel/AjaxAuthenticationEntryPoint.java
New file
@@ -0,0 +1,28 @@
package com.panzhihua.auth.handel;
import com.panzhihua.common.model.vos.R;
import com.panzhihua.common.utlis.ResultUtil;
import org.springframework.security.core.AuthenticationException;
import org.springframework.security.web.AuthenticationEntryPoint;
import org.springframework.stereotype.Component;
import javax.servlet.ServletException;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.io.IOException;
/**
 * @program: springcloud_k8s_panzhihuazhihuishequ
 * @description:
 * @author: huang.hongfa weixin hhf9596 qq 959656820
 * @create: 2020-12-30 18:57
 **/
@Component
public class AjaxAuthenticationEntryPoint implements AuthenticationEntryPoint {
    @Override
    public void commence(HttpServletRequest httpServletRequest, HttpServletResponse httpServletResponse, AuthenticationException e) throws IOException, ServletException {
        ResultUtil.responseJson(httpServletResponse,R.fail("密码错误"));
    }
}
springcloud_k8s_panzhihuazhihuishequ/auth/src/main/resources/bootstrap.yml
@@ -6,9 +6,9 @@
      discovery:
        enabled: true
        service-id: config  # 注册中心的服务名
      profile: test  # 指定配置文件的环境
      profile: dev  # 指定配置文件的环境
  profiles:
    active: test
    active: dev
eureka:
  client:
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/service/user/UserService.java
@@ -354,4 +354,12 @@
     */
    @PostMapping("putuserappletsbackstage")
    R putUserAppletsBackstage(@RequestBody PageUserAppletsBackstageDTO pageUserAppletsBackstageDTO);
    /**
     * 调试接口--清除昵称、社区、小区
     * @param userId 登录用户id
     * @return 清除结果
     */
    @PostMapping("deleteusertest")
    R deleteUserTest(@RequestParam("userId")Long userId);
}
springcloud_k8s_panzhihuazhihuishequ/common/target/classes/com/panzhihua/common/service/user/UserService.class
Binary files differ
springcloud_k8s_panzhihuazhihuishequ/service_user/src/main/java/com/panzhihua/service_user/api/UserApi.java
@@ -361,4 +361,14 @@
    public R putUserAppletsBackstage(@RequestBody PageUserAppletsBackstageDTO pageUserAppletsBackstageDTO){
        return userService.putUserAppletsBackstage(pageUserAppletsBackstageDTO);
    }
    /**
     * 调试接口--清除昵称、社区、小区
     * @param userId 登录用户id
     * @return 清除结果
     */
    @PostMapping("deleteusertest")
    public R deleteUserTest(@RequestParam("userId")Long userId){
        return userService.deleteUserTest(userId);
    }
}
springcloud_k8s_panzhihuazhihuishequ/service_user/src/main/java/com/panzhihua/service_user/dao/UserDao.java
@@ -12,6 +12,7 @@
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;
import org.apache.ibatis.annotations.Update;
/**
 * @program: springcloud_k8s_panzhihuazhihuishequ
@@ -157,4 +158,6 @@
            "order by u.create_at desc \n" +
            "</script>")
    IPage<SysUserVO> pageUserAppletsBackstage(Page page, @Param("pageUserAppletsBackstageDTO") PageUserAppletsBackstageDTO pageUserAppletsBackstageDTO);
    @Update("update sys_user set nick_name=null ,community_id=null,area_id=null where user_id=#{userId}")
    int deleteUserTest(Long userId);
}
springcloud_k8s_panzhihuazhihuishequ/service_user/src/main/java/com/panzhihua/service_user/service/UserService.java
@@ -223,4 +223,10 @@
     * @return 编辑结果
     */
    R putUserAppletsBackstage(PageUserAppletsBackstageDTO pageUserAppletsBackstageDTO);
    /**
     * 调试接口--清除昵称、社区、小区
     * @param userId 登录用户id
     * @return 清除结果
     */
    R deleteUserTest(Long userId);
}
springcloud_k8s_panzhihuazhihuishequ/service_user/src/main/java/com/panzhihua/service_user/service/impl/UserServiceImpl.java
@@ -920,6 +920,21 @@
        return R.fail("用户不存在");
    }
    /**
     * 调试接口--清除昵称、社区、小区
     *
     * @param userId 登录用户id
     * @return 清除结果
     */
    @Override
    public R deleteUserTest(Long userId) {
        int num=userDao.deleteUserTest(userId);
        if (num>0) {
            return R.ok();
        }
        return R.fail("清除失败");
    }
    public static void main(String[] args) {
        String encode = new BCryptPasswordEncoder().encode("123456");
        System.out.println(encode);