Compare commits

...

38 Commits
chat ... main

Author SHA1 Message Date
0bbb9e23b1 fix: 提交支持自动创建用户和订单代码 2025-07-07 13:29:53 +08:00
04d062a779 修改 2025-07-03 15:05:06 +08:00
8e632c0b8e 修改 2025-07-03 13:35:03 +08:00
70da033bee 修改 2025-07-03 11:55:19 +08:00
0a8a4c8b4e 11 2025-07-03 11:44:28 +08:00
953548b581 修改 2025-07-03 10:49:18 +08:00
f8d923197c 修改短信模板 2025-06-27 17:05:09 +08:00
cbc6a53731 修改 2025-06-27 16:56:31 +08:00
5fbfaa77fc 修改短信模板 2025-06-27 16:51:39 +08:00
8b867003be 修改 2025-06-25 16:29:33 +08:00
d0e90e0628 修改 2025-06-24 15:48:47 +08:00
b515257936 Update asChatRecordDao.go 2025-06-19 17:07:30 +08:00
6ba13ddb13 Update asChatRecordLogic.go 2025-06-19 17:02:17 +08:00
8fe0d6ab7a Merge branch 'main' of https://gitea-inner.fontree.cn/fiee/micro-account 2025-06-19 16:56:20 +08:00
5eca4cf59a Update asChatRecordDao.go 2025-06-19 16:55:50 +08:00
lzh
63f7029192 修改测试机数据库配置 2025-06-19 16:14:42 +08:00
f7b8558dbc Update asChatRecordDao.go 2025-06-19 14:45:58 +08:00
cb23383843 Update asChatRecordDao.go 2025-06-19 14:45:30 +08:00
bc5fd3014b Merge branch 'chat' 2025-06-19 12:31:46 +08:00
d6ff42f3ce Update asChatRecordDao.go 2025-06-19 12:30:54 +08:00
572a1e13b5 Update account.go 2025-06-17 14:39:13 +08:00
534ecc32f9 fix: 解决冲突 2025-06-17 11:17:29 +08:00
bc657da66f fix: 解决冲突 2025-06-17 11:16:56 +08:00
b2eceb73f1 Update chatAutoReplyRulerDao.go 2025-06-16 19:34:57 +08:00
e88797bdaf Update init.go 2025-06-16 19:14:52 +08:00
8521bffbdc Update init.go 2025-06-16 19:14:28 +08:00
c4f42fa251 解决冲突 2025-06-16 15:47:08 +08:00
e9d96a7cb3 fix: 修改消息类型 2025-06-16 15:46:24 +08:00
17ac03cef9 fix: update 2025-06-15 20:36:04 +08:00
7984f258a6 fix: update 2025-06-15 20:35:26 +08:00
db44510f0a Merge branch 'chat' 2025-06-15 20:28:30 +08:00
762291e780 Update asChatRecordDao.go 2025-06-15 20:28:19 +08:00
9769c22b48 fix: update 2025-06-14 17:16:38 +08:00
4503494fe8 fix: 解决冲突 2025-06-14 17:15:08 +08:00
4b7e529b7c 添加国籍筛选 2025-06-14 15:57:28 +08:00
b244f85a57 fix: 解决pb文件冲突 2025-06-14 14:42:43 +08:00
f41697bcf0 修改 2025-06-13 14:01:04 +08:00
503ff1af90 修改 2025-06-13 14:00:31 +08:00
26 changed files with 3090 additions and 3782 deletions

19
DockerfileSlim Normal file
View File

@ -0,0 +1,19 @@
FROM busybox:glibc
COPY ./docs/Shanghai /usr/share/zoneinfo/Asia/Shanghai
COPY ./docs/certs /etc/ssl/certs
RUN ln -sf /usr/share/zoneinfo/Asia/Shanghai /etc/localtime && echo 'Asia/Shanghai' >/etc/timezone
#ENV TZ Asia/Shanghai
ARG GIT_COMMIT=default_value
ENV GIT_COMMIT=$GIT_COMMIT
WORKDIR /app/main-client
#通过名称引用
COPY ./build/app ./bin/mainServer
COPY ./cmd/code/ ./bin/code/
COPY ./conf/ /app/conf/
COPY ./conf/ ./conf/
WORKDIR /app/main-client/bin
CMD ["./mainServer"]

File diff suppressed because it is too large Load Diff

View File

@ -1,3 +1,5 @@
/*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
@ -29,7 +31,7 @@ service AccountFiee {
rpc OnlineLog (LoginInfosByUserIdRequest) returns (LoginLogsResponse) {}//id获取登录的信息
rpc OnlineLogById (OnlineLogByIdRequest) returns (LoginLog) {}//id获取登录的信息
rpc CheckPwd (CheckPwdRequest) returns (UpdateResponse) {}//
// rpc RegisterOrExist (RegistRequest) returns (RequestStatus) {}
// rpc RegisterOrExist (RegistRequest) returns (RequestStatus) {}
rpc SendMsg (SendMsgRequest) returns (SendMsgStatusResponse) {} //
rpc SendCustomMsg (SendCustomMsgRequest) returns (SendMsgStatusResponse) {}//
rpc SendExCustomMsg (SendCustomMsgRequest) returns (SendMsgStatusResponse) {}//
@ -62,6 +64,10 @@ service AccountFiee {
rpc VerifySliderCaptcha(VerifySliderCaptchaRequest) returns (VerifySliderCaptchaResponse) {}//
rpc SendNationMsg (SendNationMsgRequest) returns (SendMsgStatusResponse) {} // --
rpc VerifySliderStatus(VerifySliderStatusRequest) returns (VerifySliderStatusResponse) {}//
rpc SendNationTemplateMsg (SendNationMsgRequest) returns (SendMsgStatusResponse) {} // --
rpc CreateUserAndRealName (CreateUserAndRealNameRequest) returns (CreateUserAndRealNameResponse) {}// ,
// submit info
rpc SaveSubmitInfo(SubmitInfoRequest) returns (CommonResponse);
@ -184,6 +190,9 @@ message UserListRequest{
int32 auditStatus = 7;
uint64 page = 8;
uint64 pageSize = 9;
string blurNameTel = 10;
repeated int64 ids = 11;
string nationality = 12;
}
message UserInfoResponse{
uint64 id = 1;
@ -204,6 +213,7 @@ message UserInfoResponse{
string subscriberNumber = 16;
string nickName = 17;
string telNum = 18;
string telAreaCode = 19;
}
message RealNameResponse{
uint64 id = 1;
@ -804,7 +814,7 @@ message ClockBatchBindRequest{
repeated uint64 deviceId =3;
}
message ClockBatchListResponse{
repeated ClockUserDeviceBatch data = 1;
repeated ClockUserDeviceBatch data = 1;
}
message ClockUserDeviceBatch{
uint64 userId = 1;
@ -866,7 +876,7 @@ enum MsgType{
ImageMsgType = 2 ;//
AudioMsgType = 3 ;//
VideoMsgType = 4 ;//
FileType = 5 ;//
CardType = 5 ;//
}
message ChatRecordData{
int64 ID=1;
@ -883,6 +893,7 @@ message ChatRecordData{
int32 waiterRead=12;// 1= 2=
int64 localStamp = 13; //
string domain =14;//
int32 role=15;//: 1= 2= 3=
}
message CreateChatRecordResp{
ChatRecordData data=1;
@ -972,7 +983,7 @@ message ChatUser2{
string name=2;
string avatar=3;
string origin=4;
string originId=5;
int64 originId=5;
}
message GetChatUserListResp2{
repeated ChatUser2 list=1;
@ -1023,7 +1034,7 @@ message ChatUserData{
int64 deletedAt = 4; //
string nickName = 5; //
string account = 6; //
int32 role = 7; // 1= 2=
int32 role = 7; // 1= 2= 3=
string origin = 8; //
int64 originId = 9; //ID
string avatar = 10; //
@ -1054,3 +1065,24 @@ message GetChatUserListResp{
int64 pageSize=3;
int64 Total=4;
}
message CreateUserAndRealNameRequest{
string userNum = 1;
string userName = 2;
string userTelArea = 3;
string userTel = 4;
string userSex = 5;
string nationality = 6;
string placeOfResidence = 7;
int32 documentType = 8;
string userIdCardFrontUrl = 9;
string userIdCardReverseUrl = 10;
string userIdCardValidity = 11;
string auditTime = 12;
}
message CreateUserAndRealNameResponse {
int64 userId = 1;
string userNum = 2;
string userName = 3;
}

View File

@ -5,11 +5,11 @@ package accountFiee
import (
fmt "fmt"
math "math"
proto "github.com/golang/protobuf/proto"
_ "github.com/mwitkow/go-proto-validators"
regexp "regexp"
github_com_mwitkow_go_proto_validators "github.com/mwitkow/go-proto-validators"
math "math"
regexp "regexp"
)
// Reference imports to suppress errors if they are not otherwise used.
@ -525,3 +525,181 @@ func (this *ClockLogListResponse) Validate() error {
func (this *SubmitInfoRequest) Validate() error {
return nil
}
func (this *CommonMsg) Validate() error {
return nil
}
func (this *ChatRecordData) Validate() error {
for _, item := range this.Medias {
if item != nil {
if err := github_com_mwitkow_go_proto_validators.CallValidatorIfExists(item); err != nil {
return github_com_mwitkow_go_proto_validators.FieldError("Medias", err)
}
}
}
return nil
}
func (this *CreateChatRecordResp) Validate() error {
if this.Data != nil {
if err := github_com_mwitkow_go_proto_validators.CallValidatorIfExists(this.Data); err != nil {
return github_com_mwitkow_go_proto_validators.FieldError("Data", err)
}
}
return nil
}
func (this *DeleteChatRecordRequest) Validate() error {
return nil
}
func (this *GetChatRecordByIdRequest) Validate() error {
return nil
}
func (this *GetChatRecordListRequest) Validate() error {
if this.Query != nil {
if err := github_com_mwitkow_go_proto_validators.CallValidatorIfExists(this.Query); err != nil {
return github_com_mwitkow_go_proto_validators.FieldError("Query", err)
}
}
return nil
}
func (this *GetChatRecordListResp) Validate() error {
for _, item := range this.List {
if item != nil {
if err := github_com_mwitkow_go_proto_validators.CallValidatorIfExists(item); err != nil {
return github_com_mwitkow_go_proto_validators.FieldError("List", err)
}
}
}
return nil
}
func (this *RegisterWaiterRequest) Validate() error {
return nil
}
func (this *RegisterWaiterResp) Validate() error {
return nil
}
func (this *ChatMediaData) Validate() error {
return nil
}
func (this *CreateChatMediaResp) Validate() error {
if this.Data != nil {
if err := github_com_mwitkow_go_proto_validators.CallValidatorIfExists(this.Data); err != nil {
return github_com_mwitkow_go_proto_validators.FieldError("Data", err)
}
}
return nil
}
func (this *DeleteChatMediaRequest) Validate() error {
return nil
}
func (this *GetChatMediaByIdRequest) Validate() error {
return nil
}
func (this *GetChatMediaListRequest) Validate() error {
if this.Query != nil {
if err := github_com_mwitkow_go_proto_validators.CallValidatorIfExists(this.Query); err != nil {
return github_com_mwitkow_go_proto_validators.FieldError("Query", err)
}
}
return nil
}
func (this *GetChatMediaListResp) Validate() error {
for _, item := range this.List {
if item != nil {
if err := github_com_mwitkow_go_proto_validators.CallValidatorIfExists(item); err != nil {
return github_com_mwitkow_go_proto_validators.FieldError("List", err)
}
}
}
return nil
}
func (this *GetChatUserListRequest2) Validate() error {
return nil
}
func (this *ChatUser2) Validate() error {
return nil
}
func (this *GetChatUserListResp2) Validate() error {
for _, item := range this.List {
if item != nil {
if err := github_com_mwitkow_go_proto_validators.CallValidatorIfExists(item); err != nil {
return github_com_mwitkow_go_proto_validators.FieldError("List", err)
}
}
}
return nil
}
func (this *ChatAutoReplyRulerData) Validate() error {
return nil
}
func (this *CreateChatAutoReplyRulerResp) Validate() error {
if this.Data != nil {
if err := github_com_mwitkow_go_proto_validators.CallValidatorIfExists(this.Data); err != nil {
return github_com_mwitkow_go_proto_validators.FieldError("Data", err)
}
}
return nil
}
func (this *DeleteChatAutoReplyRulerRequest) Validate() error {
return nil
}
func (this *GetChatAutoReplyRulerByIdRequest) Validate() error {
return nil
}
func (this *GetChatAutoReplyRulerListRequest) Validate() error {
if this.Query != nil {
if err := github_com_mwitkow_go_proto_validators.CallValidatorIfExists(this.Query); err != nil {
return github_com_mwitkow_go_proto_validators.FieldError("Query", err)
}
}
return nil
}
func (this *GetChatAutoReplyRulerListResp) Validate() error {
for _, item := range this.List {
if item != nil {
if err := github_com_mwitkow_go_proto_validators.CallValidatorIfExists(item); err != nil {
return github_com_mwitkow_go_proto_validators.FieldError("List", err)
}
}
}
return nil
}
func (this *ChatUserData) Validate() error {
return nil
}
func (this *CreateChatUserResp) Validate() error {
if this.Data != nil {
if err := github_com_mwitkow_go_proto_validators.CallValidatorIfExists(this.Data); err != nil {
return github_com_mwitkow_go_proto_validators.FieldError("Data", err)
}
}
return nil
}
func (this *DeleteChatUserRequest) Validate() error {
return nil
}
func (this *GetChatUserByIdRequest) Validate() error {
return nil
}
func (this *GetChatUserListRequest) Validate() error {
if this.Query != nil {
if err := github_com_mwitkow_go_proto_validators.CallValidatorIfExists(this.Query); err != nil {
return github_com_mwitkow_go_proto_validators.FieldError("Query", err)
}
}
return nil
}
func (this *GetChatUserListResp) Validate() error {
for _, item := range this.List {
if item != nil {
if err := github_com_mwitkow_go_proto_validators.CallValidatorIfExists(item); err != nil {
return github_com_mwitkow_go_proto_validators.FieldError("List", err)
}
}
}
return nil
}
func (this *CreateUserAndRealNameRequest) Validate() error {
return nil
}
func (this *CreateUserAndRealNameResponse) Validate() error {
return nil
}

View File

@ -1,8 +1,8 @@
// Code generated by protoc-gen-go-triple. DO NOT EDIT.
// versions:
// - protoc-gen-go-triple v1.0.8
// - protoc v4.22.0--rc2
// source: accountFiee.proto
// - protoc v5.26.1
// source: api/accountFiee/accountFiee.proto
package accountFiee
@ -68,6 +68,8 @@ type AccountFieeClient interface {
VerifySliderCaptcha(ctx context.Context, in *VerifySliderCaptchaRequest, opts ...grpc_go.CallOption) (*VerifySliderCaptchaResponse, common.ErrorWithAttachment)
SendNationMsg(ctx context.Context, in *SendNationMsgRequest, opts ...grpc_go.CallOption) (*SendMsgStatusResponse, common.ErrorWithAttachment)
VerifySliderStatus(ctx context.Context, in *VerifySliderStatusRequest, opts ...grpc_go.CallOption) (*VerifySliderStatusResponse, common.ErrorWithAttachment)
SendNationTemplateMsg(ctx context.Context, in *SendNationMsgRequest, opts ...grpc_go.CallOption) (*SendMsgStatusResponse, common.ErrorWithAttachment)
CreateUserAndRealName(ctx context.Context, in *CreateUserAndRealNameRequest, opts ...grpc_go.CallOption) (*CreateUserAndRealNameResponse, common.ErrorWithAttachment)
// submit info
SaveSubmitInfo(ctx context.Context, in *SubmitInfoRequest, opts ...grpc_go.CallOption) (*CommonResponse, common.ErrorWithAttachment)
// -----------------------------客服聊天系统--------------------------------
@ -143,6 +145,8 @@ type AccountFieeClientImpl struct {
VerifySliderCaptcha func(ctx context.Context, in *VerifySliderCaptchaRequest) (*VerifySliderCaptchaResponse, error)
SendNationMsg func(ctx context.Context, in *SendNationMsgRequest) (*SendMsgStatusResponse, error)
VerifySliderStatus func(ctx context.Context, in *VerifySliderStatusRequest) (*VerifySliderStatusResponse, error)
SendNationTemplateMsg func(ctx context.Context, in *SendNationMsgRequest) (*SendMsgStatusResponse, error)
CreateUserAndRealName func(ctx context.Context, in *CreateUserAndRealNameRequest) (*CreateUserAndRealNameResponse, error)
SaveSubmitInfo func(ctx context.Context, in *SubmitInfoRequest) (*CommonResponse, error)
CreateChatUser func(ctx context.Context, in *ChatUserData) (*CreateChatUserResp, error)
UpdateChatUser func(ctx context.Context, in *ChatUserData) (*CommonMsg, error)
@ -418,6 +422,18 @@ func (c *accountFieeClient) VerifySliderStatus(ctx context.Context, in *VerifySl
return out, c.cc.Invoke(ctx, "/"+interfaceKey+"/VerifySliderStatus", in, out)
}
func (c *accountFieeClient) SendNationTemplateMsg(ctx context.Context, in *SendNationMsgRequest, opts ...grpc_go.CallOption) (*SendMsgStatusResponse, common.ErrorWithAttachment) {
out := new(SendMsgStatusResponse)
interfaceKey := ctx.Value(constant.InterfaceKey).(string)
return out, c.cc.Invoke(ctx, "/"+interfaceKey+"/SendNationTemplateMsg", in, out)
}
func (c *accountFieeClient) CreateUserAndRealName(ctx context.Context, in *CreateUserAndRealNameRequest, opts ...grpc_go.CallOption) (*CreateUserAndRealNameResponse, common.ErrorWithAttachment) {
out := new(CreateUserAndRealNameResponse)
interfaceKey := ctx.Value(constant.InterfaceKey).(string)
return out, c.cc.Invoke(ctx, "/"+interfaceKey+"/CreateUserAndRealName", in, out)
}
func (c *accountFieeClient) SaveSubmitInfo(ctx context.Context, in *SubmitInfoRequest, opts ...grpc_go.CallOption) (*CommonResponse, common.ErrorWithAttachment) {
out := new(CommonResponse)
interfaceKey := ctx.Value(constant.InterfaceKey).(string)
@ -624,6 +640,8 @@ type AccountFieeServer interface {
VerifySliderCaptcha(context.Context, *VerifySliderCaptchaRequest) (*VerifySliderCaptchaResponse, error)
SendNationMsg(context.Context, *SendNationMsgRequest) (*SendMsgStatusResponse, error)
VerifySliderStatus(context.Context, *VerifySliderStatusRequest) (*VerifySliderStatusResponse, error)
SendNationTemplateMsg(context.Context, *SendNationMsgRequest) (*SendMsgStatusResponse, error)
CreateUserAndRealName(context.Context, *CreateUserAndRealNameRequest) (*CreateUserAndRealNameResponse, error)
// submit info
SaveSubmitInfo(context.Context, *SubmitInfoRequest) (*CommonResponse, error)
// -----------------------------客服聊天系统--------------------------------
@ -778,6 +796,12 @@ func (UnimplementedAccountFieeServer) SendNationMsg(context.Context, *SendNation
func (UnimplementedAccountFieeServer) VerifySliderStatus(context.Context, *VerifySliderStatusRequest) (*VerifySliderStatusResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method VerifySliderStatus not implemented")
}
func (UnimplementedAccountFieeServer) SendNationTemplateMsg(context.Context, *SendNationMsgRequest) (*SendMsgStatusResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method SendNationTemplateMsg not implemented")
}
func (UnimplementedAccountFieeServer) CreateUserAndRealName(context.Context, *CreateUserAndRealNameRequest) (*CreateUserAndRealNameResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method CreateUserAndRealName not implemented")
}
func (UnimplementedAccountFieeServer) SaveSubmitInfo(context.Context, *SubmitInfoRequest) (*CommonResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method SaveSubmitInfo not implemented")
}
@ -2018,6 +2042,64 @@ func _AccountFiee_VerifySliderStatus_Handler(srv interface{}, ctx context.Contex
return interceptor(ctx, in, info, handler)
}
func _AccountFiee_SendNationTemplateMsg_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc_go.UnaryServerInterceptor) (interface{}, error) {
in := new(SendNationMsgRequest)
if err := dec(in); err != nil {
return nil, err
}
base := srv.(dubbo3.Dubbo3GrpcService)
args := []interface{}{}
args = append(args, in)
md, _ := metadata.FromIncomingContext(ctx)
invAttachment := make(map[string]interface{}, len(md))
for k, v := range md {
invAttachment[k] = v
}
invo := invocation.NewRPCInvocation("SendNationTemplateMsg", args, invAttachment)
if interceptor == nil {
result := base.XXX_GetProxyImpl().Invoke(ctx, invo)
return result, result.Error()
}
info := &grpc_go.UnaryServerInfo{
Server: srv,
FullMethod: ctx.Value("XXX_TRIPLE_GO_INTERFACE_NAME").(string),
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
result := base.XXX_GetProxyImpl().Invoke(ctx, invo)
return result, result.Error()
}
return interceptor(ctx, in, info, handler)
}
func _AccountFiee_CreateUserAndRealName_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc_go.UnaryServerInterceptor) (interface{}, error) {
in := new(CreateUserAndRealNameRequest)
if err := dec(in); err != nil {
return nil, err
}
base := srv.(dubbo3.Dubbo3GrpcService)
args := []interface{}{}
args = append(args, in)
md, _ := metadata.FromIncomingContext(ctx)
invAttachment := make(map[string]interface{}, len(md))
for k, v := range md {
invAttachment[k] = v
}
invo := invocation.NewRPCInvocation("CreateUserAndRealName", args, invAttachment)
if interceptor == nil {
result := base.XXX_GetProxyImpl().Invoke(ctx, invo)
return result, result.Error()
}
info := &grpc_go.UnaryServerInfo{
Server: srv,
FullMethod: ctx.Value("XXX_TRIPLE_GO_INTERFACE_NAME").(string),
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
result := base.XXX_GetProxyImpl().Invoke(ctx, invo)
return result, result.Error()
}
return interceptor(ctx, in, info, handler)
}
func _AccountFiee_SaveSubmitInfo_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc_go.UnaryServerInterceptor) (interface{}, error) {
in := new(SubmitInfoRequest)
if err := dec(in); err != nil {
@ -2964,6 +3046,14 @@ var AccountFiee_ServiceDesc = grpc_go.ServiceDesc{
MethodName: "VerifySliderStatus",
Handler: _AccountFiee_VerifySliderStatus_Handler,
},
{
MethodName: "SendNationTemplateMsg",
Handler: _AccountFiee_SendNationTemplateMsg_Handler,
},
{
MethodName: "CreateUserAndRealName",
Handler: _AccountFiee_CreateUserAndRealName_Handler,
},
{
MethodName: "SaveSubmitInfo",
Handler: _AccountFiee_SaveSubmitInfo_Handler,
@ -3074,5 +3164,5 @@ var AccountFiee_ServiceDesc = grpc_go.ServiceDesc{
},
},
Streams: []grpc_go.StreamDesc{},
Metadata: "accountFiee.proto",
Metadata: "api/accountFiee/accountFiee.proto",
}

BIN
cmd/code/1.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 291 KiB

BIN
cmd/code/10.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 228 KiB

BIN
cmd/code/2.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 357 KiB

BIN
cmd/code/3.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 377 KiB

BIN
cmd/code/4.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 375 KiB

BIN
cmd/code/5.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 386 KiB

BIN
cmd/code/6.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 230 KiB

BIN
cmd/code/7.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 306 KiB

BIN
cmd/code/8.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 167 KiB

BIN
cmd/code/9.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 307 KiB

View File

@ -11,10 +11,10 @@ Domain = "fontree.cn"
[mysql]
Db = "mysql"
DbHost = "172.16.100.30"
DbPort = "3306"
DbUser = "root"
DbPassWord = "IhQmhg8HZjDmU=Ove5PnA^D"
DbHost = "172.16.100.99"
DbPort = "9007"
DbUser = "artuser"
DbPassWord = "C250PflXIWv2SQm8"
DbName = "micro-account"
[redis]

32
docs/env/prod/log.yaml vendored Normal file
View File

@ -0,0 +1,32 @@
logger:
CallerSkip: 4
zap-config:
level: info # 日志级别
development: false
disableCaller: false
disableStacktrace: false
encoding: "console"
# zap encoder 配置
encoderConfig:
messageKey: "message"
levelKey: "level"
timeKey: "time"
nameKey: "logger"
callerKey: "caller"
stacktraceKey: "stacktrace"
lineEnding: ""
levelEncoder: "capitalColor"
timeEncoder: "iso8601"
durationEncoder: "seconds"
callerEncoder: "short"
nameEncoder: ""
EncodeDuration: zapcore.SecondsDurationEncoder,
params:
service: "my-service"
version: "1.0.0"
outputPaths:
- "stderr"
initialFields:
app: "account"
errorOutputPaths:
- "stderr"

18
docs/env/prod/sdk.yaml vendored Normal file
View File

@ -0,0 +1,18 @@
# endorseService Info
# testNet addrs
# endorseServiceHost: "120.48.24.223:37101"
endorseServiceHost: "127.0.0.1:37101"
complianceCheck:
# 是否需要进行合规性背书
isNeedComplianceCheck: false
# 是否需要支付合规性背书费用
isNeedComplianceCheckFee: false
# 合规性背书费用
complianceCheckEndorseServiceFee: 400
# 支付合规性背书费用的收款地址
complianceCheckEndorseServiceFeeAddr: WwLgfAatHyKx2mCJruRaML4oVf7Chzp42
# 如果通过合规性检查,签发认证签名的地址
complianceCheckEndorseServiceAddr: WwLgfAatHyKx2mCJruRaML4oVf7Chzp42
#创建平行链所需要的最低费用
minNewChainAmount: "100"
crypto: "xchain"

View File

@ -3,10 +3,12 @@ package utils
import (
"bytes"
"encoding/base64"
"errors"
"fmt"
"image"
"image/color"
"image/draw"
"image/jpeg"
"image/png"
"math/rand"
"net/http"
@ -18,8 +20,9 @@ import (
)
const (
ImgURL = "https://cdns.fontree.cn/fonchain-main/test/image/artwork/config/slidCode_%d.jpg"
ImgPath = "./code/%d.jpg" //本地路径,暂不使用
ImgURL = "https://cdns.fontree.cn/fonchain-main/test/image/artwork/config/slidCode_%d.jpg"
ImgPath = "./code/%d.jpg" //本地路径,暂不使用
ImgPathPng = "./code/%d.png" //本地路径,暂不使用
)
// 生成指定范围内的随机数
@ -29,41 +32,96 @@ func GetNonceByRange(start, end int) int {
}
// 获取缓冲图片可能是通过URL或本地路径
func GetBufferedImage(place int) (image.Image, error) {
func GetBufferedImage(place, canvasWidth, canvasHeight int) (draw.Image, error) {
startTime := time.Now()
fmt.Println("")
fmt.Println("")
fmt.Println("")
fmt.Println("1---")
nonce := GetNonceByRange(1, 10)
fmt.Println("2", time.Now().Sub(startTime))
var imgURL string
place = 0 // 注意这边的图片现在只使用url图片
//place = 0 // 注意这边的图片现在只使用url图片
if place == 1 {
if place == 0 {
fmt.Println("3-1", time.Now().Sub(startTime))
imgURL = fmt.Sprintf(ImgURL, nonce)
resp, err := http.Get(imgURL)
if err != nil {
return nil, err
}
fmt.Println("3-2", time.Now().Sub(startTime))
defer resp.Body.Close()
img, _, err := image.Decode(resp.Body)
img, ff, err := image.Decode(resp.Body)
fmt.Println("----", ff)
if err != nil {
return nil, err
}
return img, nil
} else {
file, err := os.Open(fmt.Sprintf(ImgPath, nonce))
fmt.Println("3-3", time.Now().Sub(startTime))
canvasImage := ImageResize(img, canvasWidth, canvasHeight).(*image.RGBA)
return canvasImage, nil
} else { //从redis中获取
file, err := os.Open(fmt.Sprintf(ImgPathPng, nonce))
fmt.Println("4-1", time.Now().Sub(startTime))
if err != nil {
return nil, err
}
defer file.Close()
img, _, err := image.Decode(file)
//img, format, err := image.Decode(file)
img, err := png.Decode(file)
format := "1"
fmt.Println("", err)
//img, err := jpeg.Decode(file)
fmt.Println("4-1-1", time.Now().Sub(startTime), err)
fmt.Println("4-2", time.Now().Sub(startTime), format)
if err != nil {
return nil, err
}
return img, nil
ss := ImageResize(img, canvasWidth, canvasHeight)
canvasImage := ss.(*image.RGBA)
return canvasImage, nil
}
return nil, errors.New("类型错误")
}
// 将 image.YCbCr 转换为 *image.RGBA
func convertYCbCrToRGBA(yCbCrImage *image.YCbCr) *image.RGBA {
bounds := yCbCrImage.Bounds()
rgba := image.NewRGBA(bounds)
for y := bounds.Min.Y; y < bounds.Max.Y; y++ {
for x := bounds.Min.X; x < bounds.Max.X; x++ {
// 获取 (x, y) 点的颜色
ycbcrColor := yCbCrImage.At(x, y)
// 使用 color.RGBAModel 转换为 RGBA 颜色
rgbaColor := color.RGBAModel.Convert(ycbcrColor).(color.RGBA)
// 设置到 RGBA 图像中
rgba.SetRGBA(x, y, rgbaColor)
}
}
return rgba
}
// 调整图片大小
func ImageResize(bufferedImage image.Image, width, height int) image.Image {
return resize.Resize(uint(width), uint(height), bufferedImage, resize.Lanczos3)
return resize.Resize(uint(width), uint(height), bufferedImage, resize.Bilinear)
}
// CutByTemplate 根据模板裁剪图像 // 生成圆角正方形的滑块图像
@ -364,6 +422,19 @@ func ToBase64(img image.Image, format string) string {
switch format {
case "png":
png.Encode(buf, img)
case "jpeg":
jpeg.Encode(buf, img, &jpeg.Options{Quality: 80})
}
return base64.StdEncoding.EncodeToString(buf.Bytes())
}
// ToBase64Jpeg 将图像转换为Base64编码
func ToBase64Jpeg(img image.Image, format string) string {
buf := new(bytes.Buffer)
switch format {
case "png":
jpeg.Encode(buf, img, &jpeg.Options{Quality: 100})
}
return base64.StdEncoding.EncodeToString(buf.Bytes())
}

View File

@ -13,7 +13,7 @@ const SIG_NO = 145031
const SIG_NO_SELLER = 159789
func SendMsg(telNum string, project string) (string, error) {
TMP := 277455
var sigNo uint
sigNo = SIG_NO
@ -28,7 +28,7 @@ func SendMsg(telNum string, project string) (string, error) {
code := mobile.RandCode()
//content := "验证码模板:尊敬的用户,您的验证码为$$15分钟内有效请勿泄露。"
fmt.Println("发送短信请求参数:", telNum, mobile.TMP1, sigNo, code)
fmt.Println("发送短信请求参数:", telNum, TMP, sigNo, code)
/**
TODO
@ -40,13 +40,14 @@ func SendMsg(telNum string, project string) (string, error) {
}
*/
fmt.Println("发送短信请求参数:", telNum, mobile.TMP1, sigNo, code)
return code, mobileTemplate.Send(telNum, mobile.TMP1, sigNo, code)
fmt.Println("发送短信请求参数:", telNum, TMP, sigNo, code)
return code, mobileTemplate.Send(telNum, uint(TMP), sigNo, code)
}
func SendMsgV2(telNum string, project string, tempSignNo uint) (string, error) {
TMP := 277455
var sigNo uint
sigNo = SIG_NO
//if project == "seller" {
@ -71,9 +72,8 @@ func SendMsgV2(telNum string, project string, tempSignNo uint) (string, error) {
return code, nil
}
*/
fmt.Println("发送短信请求参数:", telNum, mobile.TMP1, sigNo, code)
return code, mobileTemplate.Send(telNum, mobile.TMP1, sigNo, code)
fmt.Println("发送短信请求参数:", telNum, TMP, sigNo, code)
return code, mobileTemplate.Send(telNum, uint(TMP), sigNo, code)
//fmt.Println("发送短信请求参数:", telNum, mobile.Sign, mobile.AlTMP1, code)
//return code, mobileTemplate.SendAlSms(telNum, mobile.Sign, mobile.AlTMP1, code)

View File

@ -69,6 +69,9 @@ func (chatDao) UpdateChatRecord(data *model.ChatRecord) (err error) {
if data.LocalStamp != 0 {
thisData.LocalStamp = data.LocalStamp
}
if data.Role != 0 {
thisData.Role = data.Role
}
if err = model.DB.Updates(&thisData).Error; err != nil {
return err
@ -98,7 +101,7 @@ func (chatDao) GetChatRecordById(id int) (res model.ChatRecord, err error) {
// 批量查询ChatRecord
func (chatDao) GetChatRecordList(info *accountFiee.GetChatRecordListRequest) (resp []model.ChatRecord, total int64, err error) {
var dbQuery = model.DB.Model(&model.ChatRecord{}).Preload("Medias")
var dbQuery = model.DB.Model(&model.ChatRecord{}).Preload("Medias").Debug()
if info.Query != nil {
if info.Query.SessionId != "" {
@ -125,6 +128,9 @@ func (chatDao) GetChatRecordList(info *accountFiee.GetChatRecordListRequest) (re
if info.Query.LocalStamp != 0 {
dbQuery = dbQuery.Where("local_stamp = ?", info.Query.LocalStamp)
}
if info.Query.Role != 0 {
dbQuery = dbQuery.Where("role = ?", info.Query.Role)
}
}
if info.Where != "" {
dbQuery = dbQuery.Where(info.Where)
@ -135,6 +141,9 @@ func (chatDao) GetChatRecordList(info *accountFiee.GetChatRecordListRequest) (re
//数据查询
dbQuery.Count(&total)
err = dbQuery.Scopes(db.Pagination(info.Page, info.PageSize)).Find(&resp).Error
fmt.Println("err:", err)
fmt.Println("resp.len:", len(resp))
fmt.Println("total", total)
if err != nil {
//log.L().Error("GetChatRecordList Err", zap.Error(err))
err = errors.New(m.DBError)
@ -244,28 +253,39 @@ func (chatDao) GetChatMediaList(info *accountFiee.GetChatMediaListRequest) (resp
// 批量查询ChatMedia
func (chatDao) GetChatUserList(req *accountFiee.GetChatUserListRequest2) (resp []*accountFiee.ChatUser2, total int64, err error) {
var dbQuery = model.DB.Model(&model.User{})
var dbQuery = model.DB.Model(&model.ChatUser{}).Debug()
if req.Where != "" {
dbQuery = dbQuery.Where(req.Where)
}
if req.UserIdIn != nil {
dbQuery = dbQuery.Where("user_id in (?)", req.UserIdIn)
dbQuery = dbQuery.Where("id in (?)", req.UserIdIn)
}
if req.Name != "" {
dbQuery = dbQuery.Where(fmt.Sprintf("name like '%%%v%%'", req.Name))
dbQuery = dbQuery.Where(fmt.Sprintf("nick_name like '%%%v%%'", req.Name))
}
if req.Account != "" {
dbQuery = dbQuery.Where(fmt.Sprintf("account like '%%%v%%'", req.Name))
dbQuery = dbQuery.Where(fmt.Sprintf("account like '%%%v%%'", req.Account))
}
if req.RoleIn != nil {
dbQuery = dbQuery.Where("role in (?)", req.RoleIn)
}
var data []model.ChatUser
//数据查询
dbQuery.Count(&total)
err = dbQuery.Scopes(db.Pagination(req.Page, req.PageSize)).Find(&resp).Error
err = dbQuery.Scopes(db.Pagination(req.Page, req.PageSize)).Find(&data).Error
if err != nil {
//log.L().Error("GetChatUserList Err", zap.Error(err))
err = errors.New(m.DBError)
}
for _, v := range data {
tmp := &accountFiee.ChatUser2{
UserId: v.ID,
Name: v.NickName,
Avatar: v.Avatar,
Origin: v.Origin,
OriginId: v.OriginId,
}
resp = append(resp, tmp)
}
return
}

View File

@ -56,6 +56,9 @@ func (chatAutoReplyRulerDao) UpdateChatAutoReplyRuler(data *model.ChatAutoReplyR
if data.Status != 0 {
thisData.Status = data.Status
}
if data.Response != "" {
thisData.Response = data.Response
}
if err = model.DB.Updates(&thisData).Error; err != nil {
return err

View File

@ -120,9 +120,11 @@ func (AsChatLogic) GetChatRecordList(req *accountFiee.GetChatRecordListRequest)
if err != nil {
return
}
fmt.Println("GetChatRecordList len(data):", len(data))
if err = copier.CopyWithOption(&resp.List, &data, utils.CopierProtoOptions); err != nil {
return
}
fmt.Println("GetChatRecordList len(resp.List):", len(resp.List))
return
}
func (AsChatLogic) RegisterWaiter(request *accountFiee.RegisterWaiterRequest) (resp *accountFiee.RegisterWaiterResp, err error) {

View File

@ -29,6 +29,7 @@ type ChatRecord struct {
Medias []*ChatMedia `gorm:"many2many:chat_record_media;"`
WaiterRead int32 `gorm:"column:waiter_read;default:2;comment:客服是否已读 1=已读 2=未读"` // (被任意客服读取过均为已读)
LocalStamp int64 `gorm:"column:local_stamp;comment:用户端的消息唯一值,用于用户端的消息校验"`
Role int32 `gorm:"column:role,comment:用户角色: 1=用户 2=客服 3=机器人"`
}
func (c ChatRecord) TableName() string {

View File

@ -28,7 +28,7 @@ func LoadEnv(config MysqlConfig) {
//MySQL数据库
path := strings.Join([]string{config.DbUser, ":", config.DbPassWord, "@tcp(", config.DbHost, ":",
config.DbPort, ")/", config.DbName, "?charset=utf8&parseTime=true&loc=Local"}, "")
config.DbPort, ")/", config.DbName, "?charset=utf8mb4&parseTime=true&loc=Local"}, "")
fmt.Println(path)
//连接数据库

View File

@ -643,6 +643,7 @@ func (a *AccountFieeProvider) Info(ctx context.Context, in *account.InfoRequest)
SubscriberNumber: user.SubscriberNumber,
NickName: user.Nickname,
TelNum: user.TelNum,
TelAreaCode: user.TelAreaCode,
}
return response, nil
@ -654,6 +655,9 @@ func (a *AccountFieeProvider) UserList(ctx context.Context, in *account.UserList
if in.Domain != "" {
modelObj.Where("domain = ? ", in.Domain)
}
if len(in.Ids) != 0 {
modelObj.Where("user.id in (?) ", in.Ids)
}
if in.SubNum != "" {
modelObj.Where("sub_num like ? ", "%"+in.SubNum+"%")
}
@ -665,6 +669,9 @@ func (a *AccountFieeProvider) UserList(ctx context.Context, in *account.UserList
if in.Name != "" {
modelObj.Where("RealName.name like ? ", "%"+in.Name+"%")
}
if in.Nationality != "" {
modelObj.Where("RealName.nationality like ? ", "%"+in.Nationality+"%")
}
if in.DocumentType != 0 {
modelObj.Where("RealName.document_type = ? ", in.DocumentType)
}
@ -674,6 +681,9 @@ func (a *AccountFieeProvider) UserList(ctx context.Context, in *account.UserList
if in.Sex != "" {
modelObj.Where("RealName.sex = ?", in.Sex)
}
if in.BlurNameTel != "" {
modelObj.Where("RealName.name like ? or tel_num like ? ", "%"+in.BlurNameTel+"%", "%"+in.BlurNameTel+"%")
}
modelObj.Count(&count)
if in.Page > 0 && in.PageSize > 0 {
modelObj.Limit(int(in.PageSize)).Offset(page.GetOffset(in.Page, in.PageSize))
@ -690,6 +700,33 @@ func (a *AccountFieeProvider) UserList(ctx context.Context, in *account.UserList
return response, nil
}
// SendNationTemplateMsg 发送国际模板短信
func (a *AccountFieeProvider) SendNationTemplateMsg(_ context.Context, in *account.SendNationMsgRequest) (*account.SendMsgStatusResponse, error) {
response := &account.SendMsgStatusResponse{}
if domain.InBlockList(in.Domain, in.TelNum) {
return nil, errors.New(m.Black_Mobile_Sended)
}
//是否存活 (1分钟冷却) (1-是否已经发送 2-是否今日发送超过指定数量) 55秒
if err := domain.CodeLive(in.Domain, in.TelNum); err != nil {
return nil, err
}
//今日是否达到上限
if err := domain.CheckMsg(redis_key.GetAccountKeyCountToday(in.Domain, in.TelNum)); err != nil {
return nil, err
}
err := verifica.SendNationMsg(in.TelNum, "FiEE", int(in.MId))
if err != nil {
return nil, err
}
return response, nil
}
// 艺术商城,发送国际短信验证码
func (a *AccountFieeProvider) SendNationMsg(_ context.Context, in *account.SendNationMsgRequest) (*account.SendMsgStatusResponse, error) {
response := &account.SendMsgStatusResponse{}
@ -742,6 +779,8 @@ func (a *AccountFieeProvider) SendNationMsg(_ context.Context, in *account.SendN
}
func (a *AccountFieeProvider) GenerateSliderCaptcha(_ context.Context, in *account.GenerateSliderCaptchaRequest) (*account.GenerateSliderCaptchaResponse, error) {
startTime := time.Now()
realTime := time.Now()
captcha := &model.Captcha{
CanvasWidth: int(in.CanvasWidth),
@ -755,6 +794,12 @@ func (a *AccountFieeProvider) GenerateSliderCaptcha(_ context.Context, in *accou
if err != nil {
return nil, err
}
fmt.Println()
fmt.Println()
fmt.Println()
fmt.Println("1-耗时", time.Now().Sub(startTime))
startTime = time.Now()
canvasWidth := captcha.CanvasWidth
canvasHeight := captcha.CanvasHeight
blockWidth := captcha.BlockWidth
@ -762,41 +807,66 @@ func (a *AccountFieeProvider) GenerateSliderCaptcha(_ context.Context, in *accou
//blockRadius := captcha.BlockRadius
place := captcha.Place
img, _ := utils.GetBufferedImage(place)
canvasImage := utils.ImageResize(img, canvasWidth, canvasHeight).(*image.RGBA)
canvasImage, _ := utils.GetBufferedImage(place, canvasWidth, canvasHeight)
fmt.Println("2-耗时", time.Now().Sub(startTime))
startTime = time.Now()
fmt.Println()
fmt.Println("3-耗时", time.Now().Sub(startTime))
startTime = time.Now()
blockX := utils.GetNonceByRange(blockWidth, canvasWidth-blockWidth-10)
fmt.Println("4-耗时", time.Now().Sub(startTime))
startTime = time.Now()
blockY := utils.GetNonceByRange(10, canvasHeight-blockHeight+1)
fmt.Println("5-耗时", time.Now().Sub(startTime))
startTime = time.Now()
blockImage := image.NewRGBA(image.Rect(0, 0, blockWidth, blockHeight))
fmt.Println("6-耗时", time.Now().Sub(startTime))
startTime = time.Now()
utils.CutByTemplate(canvasImage, blockImage, blockWidth, blockHeight, blockX, blockY)
fmt.Println("1---", 0)
fmt.Println("2---", blockY)
fmt.Println("2---", blockX)
fmt.Println("2---X", blockX)
fmt.Println("6-耗时", time.Now().Sub(startTime))
startTime = time.Now()
// 生成UUID
nonceStr := fmt.Sprintf("%x", rand2.New(rand2.NewSource(time.Now().UnixNano())).Uint64())
fmt.Println("6-耗时", time.Now().Sub(startTime))
startTime = time.Now()
// 保存X轴像素
cache.RedisClient.Set("imageCode:"+nonceStr, blockX, 15*time.Minute)
resp := &account.GenerateSliderCaptchaResponse{
NonceStr: nonceStr,
CanvasSrc: utils.ToBase64(canvasImage, "png"),
CanvasSrc: utils.ToBase64(canvasImage, "jpeg"),
BlockSrc: utils.ToBase64(blockImage, "png"),
BlockY: uint64(blockY),
FaceY: 0,
//BlockX: uint64(blockX),
}
fmt.Println("7耗时", time.Now().Sub(startTime))
fmt.Println("总耗时", time.Now().Sub(realTime))
return resp, nil
}
func (a *AccountFieeProvider) VerifySliderCaptcha(_ context.Context, in *account.VerifySliderCaptchaRequest) (*account.VerifySliderCaptchaResponse, error) {
resp := &account.VerifySliderCaptchaResponse{}
// 检查图像验证码
text, err := cache.RedisClient.Get("imageCode:" + in.NonceStr).Result()
key := "imageCode:" + in.NonceStr
text, err := cache.RedisClient.Get(key).Result()
if err == redis.Nil {
err = errors.New("验证码已失效")
return resp, err
@ -814,6 +884,20 @@ func (a *AccountFieeProvider) VerifySliderCaptcha(_ context.Context, in *account
if err != nil {
return resp, err
}
// 获取验证次数计数器key
countKey := "imageCode:count:" + in.NonceStr
count, _ := cache.RedisClient.Get(countKey).Int64()
// 验证成功,增加计数
count++
if count >= 2 {
// 达到2次后删除两个key
cache.RedisClient.Del(key)
cache.RedisClient.Del(countKey)
} else {
// 未达到2次更新计数并设置过期时间
cache.RedisClient.Set(countKey, count, 15*time.Minute)
}
resp.NonceStr = in.NonceStr
@ -857,7 +941,12 @@ func (a *AccountFieeProvider) UserByTel(_ context.Context, in *account.UserByTel
response := &account.UserInfoResponse{}
var user *model.User
if in.Tel == "" {
return response, errors.New("无效参数tel")
}
if in.Domain == "" {
return response, errors.New("无效参数domain")
}
if err := model.DB.Model(&model.User{}).Preload("RealName").Where(&model.User{Domain: &in.Domain, TelNum: in.Tel}).First(&user).Error; err != nil {
if err.Error() == "record not found" { //不存在
@ -1144,3 +1233,57 @@ func (a *AccountFieeProvider) VerifySliderStatus(_ context.Context, in *account.
}
return resp, nil
}
func (a *AccountFieeProvider) CreateUserAndRealName(ctx context.Context, in *account.CreateUserAndRealNameRequest) (*account.CreateUserAndRealNameResponse, error) {
var tempUser *model.User
if err := model.DB.Model(&model.User{}).Where("deleted_at = 0 and domain='app' and tel_num=?", in.UserTel).First(&tempUser).Error; err == nil {
// 用户已存在
return nil, errors.New("用户已存在")
}
// 实名
newRealName := model.RealName{
Name: in.UserName,
Sex: in.UserSex,
Nationality: in.Nationality,
DocumentType: int(in.DocumentType),
CertificatePicture: in.UserIdCardFrontUrl,
Validity: in.UserIdCardValidity,
PlaceOfResidence: in.PlaceOfResidence,
GroupPhoto: in.UserIdCardFrontUrl,
}
// 创建实名信息
if err := model.DB.Create(&newRealName).Error; err != nil {
return nil, err
}
// 更新用户的实名信息 ID
domain := "app"
date := time.Now().Format("20060102")
// 生成一个 5 位随机数
rand2.Seed(time.Now().UnixNano())
randomNum := rand2.Intn(90000) + 10000
subscriberNumber := fmt.Sprintf("FiEE%s%05d", date, randomNum)
// 建用户
user := model.User{
Domain: &domain,
TelNum: in.UserTel,
Status: m.Pass,
TelAreaCode: in.UserTelArea,
AuditTime: in.AuditTime,
RegistrationTime: in.AuditTime,
SubNum: in.UserNum,
RealNameID: &newRealName.ID,
SubscriberNumber: subscriberNumber,
Language: "zh_CN",
Nickname: in.UserName,
}
if err := model.DB.Create(&user).Error; err != nil {
return nil, err
}
return &account.CreateUserAndRealNameResponse{UserId: int64(user.ID), UserNum: user.SubNum, UserName: user.Nickname}, nil
}