Commit 2fac68f8 2fac68f8cdcf77c90127a358c24c11308b89d9b6 by xianghan

1.切换主账号时,取消已是主账号的判断条件

1 parent b5c851ca
......@@ -54,7 +54,7 @@ public class MemberProfile implements Serializable {
// 生日
@NotNull(message = "【memberId】 not be null!!" , groups = DoSaveMemberProfileGroup.class)
@Column(name = "birthday", nullable = false)
private Timestamp birthday;
private String birthday;
// 手机号
@Column(name = "phone")
......
package com.topdraw.business.module.member.profile.domain;
import com.topdraw.utils.StringUtils;
import java.sql.Timestamp;
......@@ -7,7 +8,7 @@ import java.util.Objects;
public class MemberProfileBuild {
public static MemberProfile build(Long memberId , String realname , Integer gender, Timestamp birthday){
public static MemberProfile build(Long memberId , String realname , Integer gender, String birthday){
MemberProfile memberProfile = build(memberId,realname,gender,"","","","","","",
"","","",birthday);
return memberProfile;
......@@ -22,7 +23,7 @@ public class MemberProfileBuild {
public static MemberProfile build(Long memberId, String realName, Integer sex,
String contry, String district, String city, String idCard, String province,
String email, String description, String phone, String constellation,
Timestamp timestamp) {
String timestamp) {
if (memberId == null)
throw new NullPointerException("memberId is null");
......@@ -40,7 +41,7 @@ public class MemberProfileBuild {
memberProfile.setDescription(stringIsNull(description));
memberProfile.setPhone(stringIsNull(phone));
memberProfile.setConstellation(stringIsNull(constellation));
memberProfile.setBirthday(timestamp);
memberProfile.setBirthday(StringUtils.isNotBlank(timestamp) ? timestamp : "1900-01-01");
return memberProfile;
}
......
......@@ -27,7 +27,7 @@ public class MemberProfileDTO implements Serializable {
private Integer gender;
// 生日
private Timestamp birthday;
private String birthday;
// 生日字符串
private String birthdayStr;
......
......@@ -151,7 +151,8 @@ public class MemberProfileServiceImpl implements MemberProfileService {
member.setNickname(nickNameStr);
member.setGender(resources.getGender());
member.setBirthday(DateUtil.format(resources.getBirthday(), "yyyy-MM-dd"));
// member.setBirthday(DateUtil.format(resources.getBirthday(), "yyyy-MM-dd"));
member.setBirthday(resources.getBirthday());
member.setAvatarUrl(resources.getAvatarUrl());
// memberRepository.save(member);
......
......@@ -2,7 +2,7 @@
spring:
datasource:
# 测试/演示库url:
url: jdbc:log4jdbc:mysql://139.196.145.150:3306/ucs_test?serverTimezone=Asia/Shanghai&characterEncoding=utf8&useSSL=false
url: jdbc:log4jdbc:mysql://139.196.145.150:3306/ucs-small-sichuan?serverTimezone=Asia/Shanghai&characterEncoding=utf8&useSSL=false
username: root
password: Tjlh@2021
......@@ -71,7 +71,7 @@ spring:
rabbitmq:
host: 122.112.214.149 # rabbitmq的连接地址
port: 5672 # rabbitmq的连接端口号
virtual-host: member_center_sichuan # rabbitmq的虚拟host
virtual-host: member_center_small_sichuan # rabbitmq的虚拟host
username: guest # rabbitmq的用户名
password: guest # rabbitmq的密码
publisher-confirms: true #如果对异步消息需要回调必须设置为true
......
......@@ -19,7 +19,7 @@ public class MemberProfileServiceTest extends BaseTest {
MemberProfile resources = new MemberProfile();
resources.setMemberId(memberId);
resources.setIdCard("422827199208010713");
resources.setBirthday(TimestampUtil.now());
// resources.setBirthday(TimestampUtil.now());
resources.setGender(1);
resources.setDescription("");
resources.setRealname("");
......@@ -35,11 +35,14 @@ public class MemberProfileServiceTest extends BaseTest {
@Test
public void update(){
Long memberId = 1L;
Long memberId = 517998L;
MemberProfile resources = new MemberProfile();
resources.setId(1L);
resources.setId(352459L);
resources.setMemberId(memberId);
resources.setCity("sh");
resources.setBirthday("1992-08-01 08:00:00.0");
resources.setGender(0);
resources.setRealname("65465464");
resources.setCity("fdf");
String s = JSON.toJSONString(resources);
this.memberProfileService.update(resources);
LOG.info("=====>>>s=====>>>" + s);
......
......@@ -19,7 +19,7 @@ public class MemberProfileControllerTest extends BaseTest {
MemberProfile resources = new MemberProfile();
resources.setMemberId(memberId);
resources.setIdCard("422827199208010713");
resources.setBirthday(TimestampUtil.now());
// resources.setBirthday(TimestampUtil.now());
resources.setGender(1);
resources.setDescription("");
resources.setRealname("");
......