瀏覽代碼

账号注销调整

yuanliang 10 月之前
父節點
當前提交
695b967265

+ 2 - 2
cooleshow-api/src/main/java/com/yonge/cooleshow/api/feign/AdminFeignService.java

@@ -213,8 +213,8 @@ public interface AdminFeignService {
      * 账号注销校验
      */
     @PostMapping("/sysUser/logoffCheck")
-    HttpResponseResult<List<String>> accountLogoffCheck(@RequestParam("phone") String phone);
+    HttpResponseResult<List<String>> accountLogoffCheck(@RequestParam(value = "phone") String phone);
 
     @PostMapping("/sysUser/logoffQuitImGroup")
-    HttpResponseResult<Boolean> logoffQuitImGroup(@RequestParam("phone") String phone);
+    HttpResponseResult<Boolean> logoffQuitImGroup(@RequestParam(value = "phone") String phone);
 }

+ 2 - 2
cooleshow-api/src/main/java/com/yonge/cooleshow/api/feign/MallPortalFeignService.java

@@ -40,6 +40,6 @@ public interface MallPortalFeignService {
 
 
     @GetMapping("/order/queryOrderList")
-    HttpResponseResult<List<OmsOrderDetail>> queryOrderList(@RequestParam String status,
-                                                            @RequestParam Long userId);
+    HttpResponseResult<List<OmsOrderDetail>> queryOrderList(@RequestParam("status") String status,
+                                                            @RequestParam("userId") Long userId);
 }

+ 7 - 3
cooleshow-app/src/main/java/com/yonge/cooleshow/admin/controller/SysUserController.java

@@ -5,6 +5,7 @@ import com.yonge.cooleshow.common.controller.BaseController;
 import com.yonge.cooleshow.common.entity.HttpResponseResult;
 import io.swagger.annotations.Api;
 import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.util.CollectionUtils;
 import org.springframework.web.bind.annotation.PostMapping;
 import org.springframework.web.bind.annotation.RequestMapping;
 import org.springframework.web.bind.annotation.RequestParam;
@@ -24,13 +25,16 @@ public class SysUserController extends BaseController {
     /**
      * 账号注销校验
      */
-    @PostMapping("/sysUser/logoffCheck")
+    @PostMapping("/logoffCheck")
     HttpResponseResult<List<String>> accountLogoffCheck(@RequestParam("phone") String phone) {
         List<String> strings = sysUserService.accountLogoffCheck(phone);
-        return HttpResponseResult.succeed(strings);
+        if (!CollectionUtils.isEmpty(strings)) {
+            return HttpResponseResult.succeed(strings);
+        }
+        return HttpResponseResult.succeed();
     }
 
-    @PostMapping("/sysUser/logoffQuitImGroup")
+    @PostMapping("/logoffQuitImGroup")
     HttpResponseResult<Boolean> logoffQuitImGroup(@RequestParam("phone") String phone){
         sysUserService.logoffQuitImGroup(phone);
         return HttpResponseResult.succeed(true);

+ 6 - 3
cooleshow-auth/auth-server/src/main/java/com/yonge/cooleshow/auth/service/impl/SysUserServiceImpl.java

@@ -435,9 +435,12 @@ public class SysUserServiceImpl extends BaseServiceImpl<Long, SysUser> implement
     public HttpResponseResult<List<String>> logoffByPhone(String phone) {
 
         HttpResponseResult<List<String>> check = adminFeignService.accountLogoffCheck(phone);
-        List<String> errMsg = check.getData();
-        if (org.apache.commons.collections.CollectionUtils.isNotEmpty(errMsg)) {
-            return HttpResponseResult.failed(500, errMsg, "注销失败");
+        if (check.getCode() != 200) {
+            List<String> errMsg = check.getData();
+            if (org.apache.commons.collections.CollectionUtils.isNotEmpty(errMsg)) {
+                return HttpResponseResult.failed(500, errMsg, "注销失败");
+            }
+            return HttpResponseResult.failed("");
         }
 
         int num = sysUserDao.countByPhone(phone);