Compare commits
No commits in common. "e8e27a9f533c9bc316e7520994190dfd5cc5d18e" and "6d3c8fbc6316e0c63d23549e2ae61ee520577453" have entirely different histories.
e8e27a9f53
...
6d3c8fbc63
|
@ -4,6 +4,7 @@ CREATE TABLE `user_table` (
|
|||
`alarm_type` tinyint DEFAULT 0 NOT NULL COMMENT '告警狀態 0. 異常 1. 正常(未告警) 2.系統告警中',
|
||||
`status` tinyint DEFAULT 0 NOT NULL COMMENT '會員狀態 0. 異常 1. 尚未驗證 2. 啟用 3. 停權中 4. 信箱以驗證 5. 手機以驗證 6. GA 以驗證',
|
||||
`uid` VARCHAR(255) NOT NULL,
|
||||
`role_id` VARCHAR(255) NOT NULL DEFAULT '',
|
||||
`language` VARCHAR(255) NOT NULL DEFAULT '',
|
||||
`currency` VARCHAR(255) NOT NULL DEFAULT '',
|
||||
`nick_name` VARCHAR(255) DEFAULT '',
|
||||
|
|
|
@ -72,11 +72,12 @@ message CreateUserInfoReq {
|
|||
VerifyType verify_type = 2;
|
||||
AlarmType alarm_type = 3;
|
||||
MemberStatus status = 4;
|
||||
string language = 5;
|
||||
string currency = 6;
|
||||
optional string nick_name = 7;
|
||||
optional uint32 gender = 8;
|
||||
optional int64 birthday = 9;
|
||||
string role_id = 5;
|
||||
string language = 6;
|
||||
string currency = 7;
|
||||
optional string nick_name = 8;
|
||||
optional uint32 gender = 9;
|
||||
optional int64 birthday = 10;
|
||||
}
|
||||
|
||||
message GetAccountInfoResp {
|
||||
|
@ -94,7 +95,8 @@ message UpdateUserInfoReq {
|
|||
optional int64 birthday = 6;
|
||||
optional VerifyType verify_type = 7;
|
||||
optional AlarmType alarm_type = 8;
|
||||
optional MemberStatus status = 9;
|
||||
optional string role_id = 9;
|
||||
optional MemberStatus status = 10;
|
||||
}
|
||||
|
||||
message GetUIDByAccountReq {
|
||||
|
@ -150,11 +152,12 @@ message UserInfo {
|
|||
VerifyType verify_type = 2;
|
||||
AlarmType alarm_type = 3;
|
||||
MemberStatus status = 4;
|
||||
string language = 5;
|
||||
string currency = 6;
|
||||
optional string nick_name = 7;
|
||||
optional uint32 gender = 8;
|
||||
optional int64 birthday = 9;
|
||||
string role_id = 5;
|
||||
string language = 6;
|
||||
string currency = 7;
|
||||
optional string nick_name = 8;
|
||||
optional uint32 gender = 9;
|
||||
optional int64 birthday = 10;
|
||||
}
|
||||
|
||||
message GetUserInfoResp {
|
||||
|
@ -163,13 +166,14 @@ message GetUserInfoResp {
|
|||
}
|
||||
|
||||
message ListUserInfoReq {
|
||||
optional VerifyType verify_type = 1;
|
||||
optional AlarmType alarm_type = 2;
|
||||
optional MemberStatus status = 3;
|
||||
optional int64 create_start_time = 4;
|
||||
optional int64 create_end_time = 5;
|
||||
int64 page_size =6;
|
||||
int64 page_index=7;
|
||||
optional string role_id = 1;
|
||||
optional VerifyType verify_type = 2;
|
||||
optional AlarmType alarm_type = 3;
|
||||
optional MemberStatus status = 4;
|
||||
optional int64 create_start_time = 5;
|
||||
optional int64 create_end_time = 6;
|
||||
int64 page_size =7;
|
||||
int64 page_index=8;
|
||||
}
|
||||
|
||||
message ListUserInfoResp {
|
||||
|
|
|
@ -51,6 +51,7 @@ func (l *BindUserInfoLogic) BindUserInfo(in *member.CreateUserInfoReq) (*member.
|
|||
VerifyType: int32(in.GetVerifyType()),
|
||||
AlarmType: int32(in.GetAlarmType()),
|
||||
Status: int32(in.GetStatus()),
|
||||
RoleId: in.GetRoleId(),
|
||||
Language: in.GetLanguage(),
|
||||
Currency: in.GetCurrency(),
|
||||
NickName: in.GetNickName(),
|
||||
|
@ -66,6 +67,7 @@ func (l *BindUserInfoLogic) BindUserInfo(in *member.CreateUserInfoReq) (*member.
|
|||
VerifyType: int64(in.GetVerifyType()),
|
||||
AlarmType: int64(in.GetAlarmType()),
|
||||
Status: int64(in.GetStatus()),
|
||||
RoleId: in.GetRoleId(),
|
||||
Language: in.GetLanguage(),
|
||||
Currency: in.GetCurrency(),
|
||||
NickName: in.GetNickName(),
|
||||
|
|
|
@ -36,6 +36,11 @@ func parse(in *member.ListUserInfoReq) (model.UserQueryParams, error) {
|
|||
// 設置 PageIndex
|
||||
filter.PageIndex = getValidPageIndex(in.PageIndex)
|
||||
|
||||
// 設置 RoleId
|
||||
if in.RoleId != nil {
|
||||
filter.RoleId = in.RoleId
|
||||
}
|
||||
|
||||
// 設置 VerifyType
|
||||
svt := fmt.Sprintf("%d", in.GetVerifyType().Number())
|
||||
vt, err := getInt32FromStringPointer(&svt)
|
||||
|
@ -137,6 +142,7 @@ func (l *ListMemberLogic) ListMember(in *member.ListUserInfoReq) (*member.ListUs
|
|||
VerifyType: member.VerifyType(item.VerifyType),
|
||||
AlarmType: member.AlarmType(item.AlarmType),
|
||||
Status: member.MemberStatus(item.Status),
|
||||
RoleId: item.RoleId,
|
||||
Language: item.Language,
|
||||
Currency: item.Currency,
|
||||
NickName: &item.NickName,
|
||||
|
|
|
@ -177,7 +177,10 @@ func (m *defaultUserTableModel) UpdateSome(ctx context.Context, newData *member.
|
|||
updates = append(updates, "status = ?")
|
||||
args = append(args, *newData.Status)
|
||||
}
|
||||
|
||||
if newData.RoleId != nil {
|
||||
updates = append(updates, "role_id = ?")
|
||||
args = append(args, *newData.RoleId)
|
||||
}
|
||||
if newData.Language != nil {
|
||||
updates = append(updates, "language = ?")
|
||||
args = append(args, *newData.Language)
|
||||
|
|
|
@ -4,8 +4,6 @@
|
|||
|
||||
goctl
|
||||
|
||||
goctl rpc protoc ./generate/protobuf/member.proto --style=go_zero --go_out=./gen_result/pb --go-grpc_out=./gen_result/pb --zrpc_out=.
|
||||
|
||||
go get -d github.com/envoyproxy/protoc-gen-validate
|
||||
mockgen -source=./validate.go -destination=../../mock/lib/validate.go -package=lib
|
||||
|
||||
|
|
Loading…
Reference in New Issue