by Robin at 20240227;

This commit is contained in:
Leufolium 2024-02-27 01:28:27 +08:00
parent 5c164795f7
commit 14e8ae6cd7
3 changed files with 22 additions and 11 deletions

View File

@ -25,6 +25,7 @@ import (
vericodeproto "service/api/proto/vericode/proto"
"service/apollostruct"
businessvalidator "service/app/mix/service/business_validator"
"service/bizcommon/common"
"service/bizcommon/util"
"service/dbstruct"
"service/library/apollo"
@ -127,8 +128,11 @@ func (s *Service) ApiLoginByVeriCode(ctx *gin.Context, req *loginproto.ApiLoginB
login, account, vericode, ec = s.ApiLoginByVeriCodeBusinessValidate(ctx, req)
// 2.如果错误码是登录信息不存在,则判断为首次登录,将创建用户信息
if req.Channel == "h5" {
req.DevType = common.DeviceTypeH5
}
if ec == errcode.ErrCodeLoginNotExist {
login, account, ec = s.utilRegisterUser(ctx, &req.MobilePhoneInfoComponent, req.Inviter, req.BaseRequest.DevType)
login, account, ec = s.utilRegisterUser(ctx, &req.MobilePhoneInfoComponent, req.Inviter, req.DevType)
if ec != errcode.ErrCodeLoginSrvOk {
logger.Error("utilRegisterUser failed")
ec = errcode.ErrCodeLoginRegisterUserFail

View File

@ -163,6 +163,10 @@ func (p *Account) OpCount(ctx *gin.Context, req *accountproto.OpCountReq) (int64
return count, err
}
func (p *Account) OpCountRegisterSource(ctx *gin.Context, req *accountproto.OpCountReq) (int64, int64, int64, error) {
}
func (p *Account) GetInviterMid(ctx *gin.Context, mid int64) (int64, error) {
inviterMid := int64(0)
userAcct, err := p.OpListByMid(ctx, &accountproto.OpListByMidReq{

View File

@ -1,15 +1,18 @@
package dbstruct
type DailyStatement struct {
Id *int64 `json:"id" bson:"_id"` // 每日报表id
H5CallCount *int64 `json:"h5_call_count" bson:"h5_call_count"` // H5接口调用总量
RegisteredUserCount *int64 `json:"registered_user_count" bson:"registered_user_count"` // 注册用户总量
OrderCreatedCount *int64 `json:"order_created_count" bson:"order_created_count"` // 订单创建总量
OrderFinishedCount *int64 `json:"order_finished_count" bson:"order_finished_count"` // 订单完成总量
StartTime *int64 `json:"start_time" bson:"start_time"` // 起始时间
EndTime *int64 `json:"end_time" bson:"end_time"` // 结束时间
Ct *int64 `json:"ct" bson:"ct"` // 创建时间
Ut *int64 `json:"ut" bson:"ut"` // 更新时间
DelFlag *int64 `json:"del_flag" bson:"del_flag"` // 删除标记
Id *int64 `json:"id" bson:"_id"` // 每日报表id
H5CallCount *int64 `json:"h5_call_count" bson:"h5_call_count"` // H5接口调用总量
RegisteredUserCount *int64 `json:"registered_user_count" bson:"registered_user_count"` // 注册用户总量
OrderCreatedCount *int64 `json:"order_created_count" bson:"order_created_count"` // 订单创建总量
OrderFinishedCount *int64 `json:"order_finished_count" bson:"order_finished_count"` // 订单完成总量
AndroidRegisteredUserCount *int64 `json:"android_registered_user_count" bson:"android_registered_user_count"` // 安卓注册总量
IosRegisteredUserCount *int64 `json:"ios_registered_user_count" bson:"ios_registered_user_count"` // ios注册总量
H5RegisteredUserCount *int64 `json:"h5_registered_user_count" bson:"h5_registered_user_count"` // h5注册总量
StartTime *int64 `json:"start_time" bson:"start_time"` // 起始时间
EndTime *int64 `json:"end_time" bson:"end_time"` // 结束时间
Ct *int64 `json:"ct" bson:"ct"` // 创建时间
Ut *int64 `json:"ut" bson:"ut"` // 更新时间
DelFlag *int64 `json:"del_flag" bson:"del_flag"` // 删除标记
}