From 031ead5480c61bb7492079b7473940ed53d5e822 Mon Sep 17 00:00:00 2001
From: k94314517 <8417338+k94314517@user.noreply.gitee.com>
Date: 星期三, 07 八月 2024 09:35:01 +0800
Subject: [PATCH] 代码提交
---
server/service/src/main/java/com/doumee/service/business/impl/CustomerUserServiceImpl.java | 4 ++
server/service/src/main/java/com/doumee/biz/zbom/model/zhongtai/ZTUserInfoUpdateRequest.java | 14 +++++++
server/service/src/main/java/com/doumee/dao/web/response/ZTBaseInfoResponse.java | 3 +
server/service/src/main/java/com/doumee/service/business/impl/GetZhongTaiDataServiceImpl.java | 4 ++
server/service/src/main/java/com/doumee/service/business/impl/MemberServiceImpl.java | 50 +++++++++++++++++-------
5 files changed, 60 insertions(+), 15 deletions(-)
diff --git a/server/service/src/main/java/com/doumee/biz/zbom/model/zhongtai/ZTUserInfoUpdateRequest.java b/server/service/src/main/java/com/doumee/biz/zbom/model/zhongtai/ZTUserInfoUpdateRequest.java
index 8630ead..0ed0f78 100644
--- a/server/service/src/main/java/com/doumee/biz/zbom/model/zhongtai/ZTUserInfoUpdateRequest.java
+++ b/server/service/src/main/java/com/doumee/biz/zbom/model/zhongtai/ZTUserInfoUpdateRequest.java
@@ -129,4 +129,18 @@
* 寰俊鍙�
*/
private String weixin;
+
+
+ /**
+ * 鐪佷唤缂栫爜
+ */
+ private String province;
+ /**
+ * 甯傜紪鐮�
+ */
+ private String city;
+ /**
+ * 鍖哄煙缂栫爜
+ */
+ private String county;
}
diff --git a/server/service/src/main/java/com/doumee/dao/web/response/ZTBaseInfoResponse.java b/server/service/src/main/java/com/doumee/dao/web/response/ZTBaseInfoResponse.java
index 858aaba..6e352f9 100644
--- a/server/service/src/main/java/com/doumee/dao/web/response/ZTBaseInfoResponse.java
+++ b/server/service/src/main/java/com/doumee/dao/web/response/ZTBaseInfoResponse.java
@@ -17,6 +17,9 @@
private String userType;
+ private String ztUserId;
+
+
}
diff --git a/server/service/src/main/java/com/doumee/service/business/impl/CustomerUserServiceImpl.java b/server/service/src/main/java/com/doumee/service/business/impl/CustomerUserServiceImpl.java
index 1a3b88f..640ec0d 100644
--- a/server/service/src/main/java/com/doumee/service/business/impl/CustomerUserServiceImpl.java
+++ b/server/service/src/main/java/com/doumee/service/business/impl/CustomerUserServiceImpl.java
@@ -29,6 +29,7 @@
import java.util.ArrayList;
import java.util.Date;
import java.util.List;
+import java.util.Objects;
/**
* 瀹㈡埛瀵艰喘鍏宠仈琛⊿ervice瀹炵幇
@@ -250,6 +251,9 @@
if(member == null){
continue;
}
+ if(Objects.isNull(user)){
+ continue;
+ }
memberIds.add(member.getId());
phoneList.add(data.getCustomerPhone());
diff --git a/server/service/src/main/java/com/doumee/service/business/impl/GetZhongTaiDataServiceImpl.java b/server/service/src/main/java/com/doumee/service/business/impl/GetZhongTaiDataServiceImpl.java
index 38d963a..2a74b67 100644
--- a/server/service/src/main/java/com/doumee/service/business/impl/GetZhongTaiDataServiceImpl.java
+++ b/server/service/src/main/java/com/doumee/service/business/impl/GetZhongTaiDataServiceImpl.java
@@ -303,6 +303,7 @@
users.setImgurlFull(prefix + users.getImgurl());
}
response.setUsers(users);
+ memberMapper.updateById(member);
}
}
List<String> stringList = new ArrayList<String>();
@@ -360,6 +361,7 @@
users.setImgurlFull(prefix + users.getImgurl());
}
response.setUsers(users);
+ memberMapper.updateById(member);
}
}
List<String> stringList = new ArrayList<String>();
@@ -411,6 +413,7 @@
users.setImgurlFull(prefix + users.getImgurl());
}
response.setUsers(users);
+ memberMapper.updateById(member);
}
}
List<String> stringList = new ArrayList<String>();
@@ -467,6 +470,7 @@
users.setImgurlFull(prefix + users.getImgurl());
}
response.setUsers(users);
+ memberMapper.updateById(member);
}
}
List<String> stringList = new ArrayList<String>();
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 0ed0e1a..0d7c1b2 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
@@ -291,12 +291,8 @@
member.setOpenid(openId);
member.setType(Constants.ZERO);
member.setAuthStatus(Constants.ZERO);
+ member.setStatus(Constants.ZERO);
//濡傛灉缁戝畾浜嗗璐� 鍒欑洿鎺ヤ娇鐢ㄥ凡缁戝畾瀵艰喘淇℃伅 璺宠繃鎵嬫満鍙风粦瀹氱殑鐘舵��
-// if(Objects.nonNull(users)){
-// member.setAuthStatus(Constants.TWO);
-// }else{
-// member.setAuthStatus(Constants.ZERO);
-// }
ZTUserGetTokenResponse ztUserGetTokenResponse = this.syncZhongTaiUser(member);
if(!Objects.isNull(ztUserGetTokenResponse)){
member.setToken(ztUserGetTokenResponse.getToken());
@@ -305,12 +301,14 @@
}
memberMapper.insert(member);
}else{
- ZTUserGetTokenResponse ztUserGetTokenResponse = this.syncZhongTaiUser(member);
- if(!Objects.isNull(ztUserGetTokenResponse)){
- member.setToken(ztUserGetTokenResponse.getToken());
- member.setZtUserId(StringUtils.defaultString(ztUserGetTokenResponse.getZtUserId(),ztUserGetTokenResponse.getToken()));
+ ZTBaseInfoResponse ztBaseInfoResponse = MemberServiceImpl.getZTToken(zbomZhongTaiService,memberMapper,usersMapper,systemDictDataBiz,
+ member.getId(),ZTConstants.CUSTOMER);
+ if(!Objects.isNull(ztBaseInfoResponse)){
+ member.setToken(ztBaseInfoResponse.getToken());
+ member.setZtUserId(StringUtils.defaultString(ztBaseInfoResponse.getZtUserId(),ztBaseInfoResponse.getToken()));
Member update = new Member();
- update.setZtUserId(StringUtils.defaultString(ztUserGetTokenResponse.getZtUserId(),ztUserGetTokenResponse.getToken()));
+ update.setZtUserId(StringUtils.defaultString(ztBaseInfoResponse.getZtUserId(),ztBaseInfoResponse.getToken()));
+ update.setToken(member.getToken());
update.setToken(member.getToken());
update.setId(member.getId());
update.setAuthStatus(member.getAuthStatus());
@@ -455,7 +453,9 @@
//鏈粦瀹氳繃
if (Objects.isNull(customerUser.getId())) {
customerUserMapper.insert(customerUser);
+ member.setAuthStatus(Constants.TWO);
} else if(ztBaseResponse !=null) {
+ member.setAuthStatus(Constants.TWO);
customerUserMapper.updateById(customerUser);
}
}
@@ -543,7 +543,9 @@
if(!Constants.equalsInteger(member.getPhone().length(),11)){
throw new BusinessException(ResponseStatus.BAD_REQUEST.getCode(),"鎵嬫満鍙烽敊璇�!");
}
- member.setAuthStatus(Constants.ONE);
+ if(Constants.equalsInteger(member.getAuthStatus(),Constants.ZERO)){
+ member.setAuthStatus(Constants.ONE);
+ }
}
memberMapper.updateById(member);
return this.getMemberInfo(member.getId());
@@ -569,9 +571,11 @@
ZTUserGetTokenResponse ztUserGetTokenResponse = this.syncZhongTaiUser(memberDto);
if(!Objects.isNull(ztUserGetTokenResponse)){
member.setToken(ztUserGetTokenResponse.getToken());
- member.setToken(StringUtils.defaultString(ztUserGetTokenResponse.getZtUserId(),ztUserGetTokenResponse.getToken()));
+ member.setZtUserId(StringUtils.defaultString(ztUserGetTokenResponse.getZtUserId(),ztUserGetTokenResponse.getToken()));
}
- memberDto.setAuthStatus(Constants.ONE);
+ if(Constants.equalsInteger(member.getAuthStatus(),Constants.ZERO)){
+ memberDto.setAuthStatus(Constants.ONE);
+ }
memberMapper.updateById(memberDto);
return this.getMemberInfo(member.getId());
}
@@ -586,7 +590,14 @@
ztUserInfoUpdateRequest.setPhone(member.getPhone());
ztUserInfoUpdateRequest.setName(member.getName());
ztUserInfoUpdateRequest.setNickName(member.getNickname());
-// ztUserInfoUpdateRequest.setAddress(member.getProvinceName()+member.getCityName()+member.getAreaName());
+ if(StringUtils.isNotBlank(member.getProvinceName())
+ && StringUtils.isNotBlank(member.getCityName())
+ && StringUtils.isNotBlank(member.getAreaName())){
+ ztUserInfoUpdateRequest.setAddress(member.getProvinceName()+member.getCityName()+member.getAreaName());
+ }
+ ztUserInfoUpdateRequest.setProvince(member.getProvinceCode());
+ ztUserInfoUpdateRequest.setCity(member.getCityCode());
+ ztUserInfoUpdateRequest.setCounty(member.getAreaCode());
ztUserInfoUpdateRequest.setFullAddress(member.getAddress());
String prefix = systemDictDataBiz.queryByCode(Constants.OBJCET_STORAGE, Constants.RESOURCE_PATH).getCode() +
systemDictDataBiz.queryByCode(Constants.OBJCET_STORAGE, Constants.MEMBER).getCode();
@@ -614,7 +625,16 @@
ztUserInfoUpdateRequest.setPhone(member.getPhone());
ztUserInfoUpdateRequest.setName(member.getName());
ztUserInfoUpdateRequest.setNickName(member.getNickname());
-// ztUserInfoUpdateRequest.setAddress(member.getProvinceName()+member.getCityName()+member.getAreaName());
+
+ if(StringUtils.isNotBlank(member.getProvinceName())
+ && StringUtils.isNotBlank(member.getCityName())
+ && StringUtils.isNotBlank(member.getAreaName())){
+ ztUserInfoUpdateRequest.setAddress(member.getProvinceName()+member.getCityName()+member.getAreaName());
+ }
+ ztUserInfoUpdateRequest.setProvince(member.getProvinceCode());
+ ztUserInfoUpdateRequest.setCity(member.getCityCode());
+ ztUserInfoUpdateRequest.setCounty(member.getAreaCode());
+
ztUserInfoUpdateRequest.setFullAddress(member.getAddress());
String prefix = systemDictDataBiz.queryByCode(Constants.OBJCET_STORAGE, Constants.RESOURCE_PATH).getCode() +
systemDictDataBiz.queryByCode(Constants.OBJCET_STORAGE, Constants.MEMBER).getCode();
--
Gitblit v1.9.3