|
|
|
@@ -65,6 +65,7 @@ public class MallCooUserInfoServiceImpl implements MallCooUserInfoService { |
|
|
|
} |
|
|
|
if(StringUtils.isBlank(basicInfo.getPhone())){ |
|
|
|
basicInfo = wxCUserBasicInfoMapper.selectById(basicInfo.getId(),basicInfo.getFinalTenantId()); |
|
|
|
|
|
|
|
} |
|
|
|
MallCooUserInfo mallCooUserInfo = this.getByPhone(basicInfo.getPhone(), basicInfo.getFinalTenantId()); |
|
|
|
if(mallCooUserInfo == null){ |
|
|
|
@@ -89,20 +90,24 @@ public class MallCooUserInfoServiceImpl implements MallCooUserInfoService { |
|
|
|
info.setUserName(basicInfo.getName()); |
|
|
|
info.setBirthday(basicInfo.getBirthdate()); |
|
|
|
info.setGender(basicInfo.getSex()); |
|
|
|
info.setAddress(basicInfo.getAddress()); |
|
|
|
|
|
|
|
if(StringUtils.isNotBlank(basicInfo.getAddress())){ |
|
|
|
try{ |
|
|
|
JSONObject addressObject = JSONObject.parseObject(basicInfo.getAddress()); |
|
|
|
String address = addressObject.getString("address") + addressObject.getString("name"); |
|
|
|
mallCooUserInfo.setAddress(address); |
|
|
|
}catch(Exception e){ |
|
|
|
info.setAddress(basicInfo.getAddress()); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
if(info.canToRequest()){ |
|
|
|
boolean flag = MallcooHelper.updateByMobile(config, basicInfo.getPhone(), info); |
|
|
|
if(flag){ |
|
|
|
mallCooUserInfo.setUserName(basicInfo.getName()); |
|
|
|
mallCooUserInfo.setBirthdate(basicInfo.getBirthdate()); |
|
|
|
mallCooUserInfo.setGender(basicInfo.getSex()); |
|
|
|
if(StringUtils.isNotBlank(basicInfo.getAddress())){ |
|
|
|
try{ |
|
|
|
JSONObject addressObject = JSONObject.parseObject(basicInfo.getAddress()); |
|
|
|
String address = addressObject.getString("address") + addressObject.getString("name"); |
|
|
|
mallCooUserInfo.setAddress(address); |
|
|
|
}catch(Exception e){} |
|
|
|
} |
|
|
|
mallCooUserInfo.setUserName(info.getUserName()); |
|
|
|
mallCooUserInfo.setBirthdate(info.getBirthday()); |
|
|
|
mallCooUserInfo.setGender(info.getGender()); |
|
|
|
mallCooUserInfo.setAddress(info.getAddress()); |
|
|
|
mallCooUserInfo.setUpdateDate(new Date()); |
|
|
|
mallCooUserInfoMapper.updateById(mallCooUserInfo); |
|
|
|
} |
|
|
|
|