From b9b6de6fc6cf1d586bd43b2c72b447da03cb01f3 Mon Sep 17 00:00:00 2001
From: liukangdong <898885815@qq.com>
Date: 星期一, 05 八月 2024 18:38:21 +0800
Subject: [PATCH] Merge branch 'master' of http://139.186.142.91:10010/r/productDev/zbomyoujia

---
 server/web/src/main/java/com/doumee/api/web/CustomerApi.java                         |    7 +++----
 server/service/src/main/resources/application-pro.yml                                |    8 ++++----
 server/web/src/main/java/com/doumee/api/web/CustomerManageApi.java                   |    4 ----
 server/service/src/main/java/com/doumee/service/business/impl/MemberServiceImpl.java |   14 ++++++++++----
 4 files changed, 17 insertions(+), 16 deletions(-)

diff --git a/server/service/src/main/java/com/doumee/service/business/impl/MemberServiceImpl.java b/server/service/src/main/java/com/doumee/service/business/impl/MemberServiceImpl.java
index 3847315..0ed0e1a 100644
--- a/server/service/src/main/java/com/doumee/service/business/impl/MemberServiceImpl.java
+++ b/server/service/src/main/java/com/doumee/service/business/impl/MemberServiceImpl.java
@@ -290,6 +290,7 @@
                 member.setIsdeleted(Constants.ZERO);
                 member.setOpenid(openId);
                 member.setType(Constants.ZERO);
+                member.setAuthStatus(Constants.ZERO);
                 //濡傛灉缁戝畾浜嗗璐� 鍒欑洿鎺ヤ娇鐢ㄥ凡缁戝畾瀵艰喘淇℃伅 璺宠繃鎵嬫満鍙风粦瀹氱殑鐘舵��
 //                if(Objects.nonNull(users)){
 //                    member.setAuthStatus(Constants.TWO);
@@ -518,7 +519,7 @@
         } catch (Exception e) {
             e.printStackTrace();
         }
-        throw new BusinessException(ResponseStatus.NOT_ALLOWED.getCode(),"鏇存柊鎵嬫満鍙峰け璐�");
+        throw new BusinessException(ResponseStatus.NOT_ALLOWED.getCode(),"鑾峰彇鎵嬫満鍙峰け璐�");
     }
 
 
@@ -537,6 +538,12 @@
         if(!Objects.isNull(ztUserGetTokenResponse)){
             member.setToken(ztUserGetTokenResponse.getToken());
             member.setZtUserId(StringUtils.defaultString(ztUserGetTokenResponse.getZtUserId(),ztUserGetTokenResponse.getToken()));
+        }
+        if(StringUtils.isNotBlank(member.getPhone())){
+            if(!Constants.equalsInteger(member.getPhone().length(),11)){
+                throw new BusinessException(ResponseStatus.BAD_REQUEST.getCode(),"鎵嬫満鍙烽敊璇�!");
+            }
+            member.setAuthStatus(Constants.ONE);
         }
         memberMapper.updateById(member);
         return this.getMemberInfo(member.getId());
@@ -560,12 +567,11 @@
         BeanUtils.copyProperties(editMemberRequest,memberDto);
         memberDto.setOpenid(member.getOpenid());
         ZTUserGetTokenResponse ztUserGetTokenResponse = this.syncZhongTaiUser(memberDto);
-        if(Objects.isNull(ztUserGetTokenResponse)){
-//            throw new BusinessException(ResponseStatus.NOT_ALLOWED.getCode(),"涓彴鏈嶅姟璋冭捣澶辫触!");
-        }else{
+        if(!Objects.isNull(ztUserGetTokenResponse)){
             member.setToken(ztUserGetTokenResponse.getToken());
             member.setToken(StringUtils.defaultString(ztUserGetTokenResponse.getZtUserId(),ztUserGetTokenResponse.getToken()));
         }
+        memberDto.setAuthStatus(Constants.ONE);
         memberMapper.updateById(memberDto);
         return this.getMemberInfo(member.getId());
     }
diff --git a/server/service/src/main/resources/application-pro.yml b/server/service/src/main/resources/application-pro.yml
index c8a2977..7002d45 100644
--- a/server/service/src/main/resources/application-pro.yml
+++ b/server/service/src/main/resources/application-pro.yml
@@ -7,10 +7,10 @@
     driver-class-name: com.mysql.cj.jdbc.Driver
     type: com.alibaba.druid.pool.DruidDataSource
   redis:
-    #    database: 0
-    host: 127.0.0.1
-    port: 6379
-    password:
+    #    蹇楅偊瀹堕�夊彲浠ョ敤鐨剅edis锛岃繖涓猺edisU瀹篃鍦ㄧ敤
+    host: 10.200.100.39
+    port: 20032
+    password: Zbom_2020@123
     timeout: 5000      # 杩炴帴姹犱腑鐨勬渶灏忕┖闂茶繛鎺�
   jackson:
     time-zone: GMT+8
diff --git a/server/web/src/main/java/com/doumee/api/web/CustomerApi.java b/server/web/src/main/java/com/doumee/api/web/CustomerApi.java
index 2cb5b22..05a0f8e 100644
--- a/server/web/src/main/java/com/doumee/api/web/CustomerApi.java
+++ b/server/web/src/main/java/com/doumee/api/web/CustomerApi.java
@@ -123,13 +123,11 @@
     public ApiResponse<Member> editMember(@RequestBody EditMemberRequest editMemberRequest) {
         editMemberRequest.setId(getMemberId());
         String  phone = editMemberRequest.getPhone();
-//        if(StringUtils.isNotBlank(editMemberRequest.getPhone())){
-//            customerUserService.syncByPhone(editMemberRequest.getPhone());
-//        }
         //鍚屾瀵艰喘缁戝畾淇℃伅
         Member member =memberService.updMemberDetail(editMemberRequest);
         if(StringUtils.isNotBlank(phone)){
-            customerUserService.syncByPhone(member);
+          customerUserService.syncByPhone(member);
+          member = memberService.getMemberInfo(member.getId());
         }
         return  ApiResponse.success("鏇存柊鎴愬姛",member);
     }
@@ -147,6 +145,7 @@
         //鍚屾瀵艰喘缁戝畾淇℃伅
         if(StringUtils.isNotBlank(phone)){
             customerUserService.syncByPhone(member);
+            member = memberService.getMemberInfo(getMemberId());
         }
         return  ApiResponse.success("鏇存柊鎴愬姛",member);
     }
diff --git a/server/web/src/main/java/com/doumee/api/web/CustomerManageApi.java b/server/web/src/main/java/com/doumee/api/web/CustomerManageApi.java
index 5eccaa3..f6a361d 100644
--- a/server/web/src/main/java/com/doumee/api/web/CustomerManageApi.java
+++ b/server/web/src/main/java/com/doumee/api/web/CustomerManageApi.java
@@ -89,10 +89,6 @@
     }
 
 
-
-
-
-
     @UserLoginRequired
     @ApiOperation(value = "銆怋绔皬绋嬪簭銆戞瘡鏃ヤ笂鏂版暟鎹�")
     @GetMapping("/getDailyUpdates")

--
Gitblit v1.9.3