Merge branch 'xjjdev'
This commit is contained in:
commit
64f754ac87
@ -661,7 +661,7 @@ func GetViewUserList(req *artistInfoUser.FindUsersRequest) (resp []model.UserVie
|
|||||||
tx = tx.Where("mgmt_artist_uid in ?", req.MgmtArtistUids)
|
tx = tx.Where("mgmt_artist_uid in ?", req.MgmtArtistUids)
|
||||||
}
|
}
|
||||||
if req.InviterName != "" {
|
if req.InviterName != "" {
|
||||||
tx = tx.Where("inviter_real_name LIKE '%?%'", req.InviterName)
|
tx = tx.Where("inviter_real_name LIKE ?", "%"+req.InviterName+"%")
|
||||||
}
|
}
|
||||||
if req.IsArtist {
|
if req.IsArtist {
|
||||||
tx = tx.Where("mgmt_artist_uid !='' ")
|
tx = tx.Where("mgmt_artist_uid !='' ")
|
||||||
@ -1124,7 +1124,7 @@ func GetInviteStaticList(in *artistInfoUser.GetInviteStaticListRequest) (res *ar
|
|||||||
Where("su.deleted_at=0").
|
Where("su.deleted_at=0").
|
||||||
Group("ui.invite_code") //HAVING count(ui.invited_code) >0
|
Group("ui.invite_code") //HAVING count(ui.invited_code) >0
|
||||||
if in.KeyWords != "" {
|
if in.KeyWords != "" {
|
||||||
orm = orm.Where("rn.name LIKE '%%?%%' OR su.tel_num LIKE '%%?%%' OR su.invited_code LIKE '%%?%%' ", in.KeyWords, in.KeyWords, in.KeyWords)
|
orm = orm.Where(fmt.Sprintf("rn.name LIKE '%%%v%%' OR su.tel_num LIKE '%%%v%%' OR su.invited_code LIKE '%%%v%%' ", in.KeyWords, in.KeyWords, in.KeyWords))
|
||||||
}
|
}
|
||||||
var datas []inviteStatic
|
var datas []inviteStatic
|
||||||
err = orm.Count(&res.Page.Total).Scopes(db.Pagination(in.Page, in.PageSize)).Find(&datas).Error
|
err = orm.Count(&res.Page.Total).Scopes(db.Pagination(in.Page, in.PageSize)).Find(&datas).Error
|
||||||
|
@ -3,10 +3,10 @@ package model
|
|||||||
// User 用户模型
|
// User 用户模型
|
||||||
type User struct {
|
type User struct {
|
||||||
Model
|
Model
|
||||||
MgmtAccId int64 `gorm:"column:mgmt_acc_id;not null;uniqueIndex:mgmt_acc_mgmt_artist_uid;comment:账号id"`
|
MgmtAccId int64 `gorm:"column:mgmt_acc_id;not null;uniqueIndex:mgmt_acc_mgmt_artist_tel_uid_tel_num;comment:账号id"`
|
||||||
MgmtArtistId int64 `gorm:"column:mgmt_artist_id;not null;comment:艺术家id"`
|
MgmtArtistId int64 `gorm:"column:mgmt_artist_id;not null;comment:艺术家id"`
|
||||||
MgmtArtistUid string `gorm:"column:mgmt_artist_uid;type:varchar(256);uniqueIndex:mgmt_acc_mgmt_artist_uid;comment:艺术家uid"`
|
MgmtArtistUid string `gorm:"column:mgmt_artist_uid;type:varchar(256);uniqueIndex:mgmt_acc_mgmt_artist_uid_tel_num;comment:艺术家uid"`
|
||||||
TelNum string `gorm:"column:tel_num;type:varchar(20);not null;电话号码"`
|
TelNum string `gorm:"column:tel_num;type:varchar(20);uniqueIndex:mgmt_acc_mgmt_artist_uid_tel_num;not null;电话号码"`
|
||||||
InviteCode string `gorm:"column:invited_code;type:varchar(16);default:'';comment:个人邀请码"`
|
InviteCode string `gorm:"column:invited_code;type:varchar(16);default:'';comment:个人邀请码"`
|
||||||
InvitedBy *Invite `gorm:"foreignKey:InvitedId"` //邀请者的相关信息
|
InvitedBy *Invite `gorm:"foreignKey:InvitedId"` //邀请者的相关信息
|
||||||
Account string `gorm:"column:account;varchar(191);comment:账号"`
|
Account string `gorm:"column:account;varchar(191);comment:账号"`
|
||||||
|
@ -2,12 +2,18 @@
|
|||||||
mode = dev #正式prod #测试dev
|
mode = dev #正式prod #测试dev
|
||||||
|
|
||||||
[mysql]
|
[mysql]
|
||||||
|
# Db = mysql
|
||||||
|
# DbHost = 127.0.0.1
|
||||||
|
# DbPort = 3306
|
||||||
|
# DbUser = root
|
||||||
|
# DbPassWord = 123456
|
||||||
|
# DbName = artistmgmttest
|
||||||
Db = mysql
|
Db = mysql
|
||||||
DbHost = 127.0.0.1
|
DbHost = 127.0.0.1
|
||||||
DbPort = 3306
|
DbPort = 13307
|
||||||
DbUser = root
|
DbUser = root
|
||||||
DbPassWord = 123456
|
DbPassWord = 123456
|
||||||
DbName = artistmgmttest
|
DbName = artistmgmtprod
|
||||||
|
|
||||||
[redis]
|
[redis]
|
||||||
RedisDB = 2
|
RedisDB = 2
|
||||||
|
Loading…
Reference in New Issue
Block a user