Merge branch 'xjjdev'

This commit is contained in:
徐俊杰 2023-03-23 19:20:58 +08:00
commit 64f754ac87
3 changed files with 13 additions and 7 deletions

View File

@ -661,7 +661,7 @@ func GetViewUserList(req *artistInfoUser.FindUsersRequest) (resp []model.UserVie
tx = tx.Where("mgmt_artist_uid in ?", req.MgmtArtistUids)
}
if req.InviterName != "" {
tx = tx.Where("inviter_real_name LIKE '%?%'", req.InviterName)
tx = tx.Where("inviter_real_name LIKE ?", "%"+req.InviterName+"%")
}
if req.IsArtist {
tx = tx.Where("mgmt_artist_uid !='' ")
@ -1124,7 +1124,7 @@ func GetInviteStaticList(in *artistInfoUser.GetInviteStaticListRequest) (res *ar
Where("su.deleted_at=0").
Group("ui.invite_code") //HAVING count(ui.invited_code) >0
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
err = orm.Count(&res.Page.Total).Scopes(db.Pagination(in.Page, in.PageSize)).Find(&datas).Error

View File

@ -3,10 +3,10 @@ package model
// User 用户模型
type User struct {
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"`
MgmtArtistUid string `gorm:"column:mgmt_artist_uid;type:varchar(256);uniqueIndex:mgmt_acc_mgmt_artist_uid;comment:艺术家uid"`
TelNum string `gorm:"column:tel_num;type:varchar(20);not null;电话号码"`
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);uniqueIndex:mgmt_acc_mgmt_artist_uid_tel_num;not null;电话号码"`
InviteCode string `gorm:"column:invited_code;type:varchar(16);default:'';comment:个人邀请码"`
InvitedBy *Invite `gorm:"foreignKey:InvitedId"` //邀请者的相关信息
Account string `gorm:"column:account;varchar(191);comment:账号"`

View File

@ -2,12 +2,18 @@
mode = dev #正式prod #测试dev
[mysql]
# Db = mysql
# DbHost = 127.0.0.1
# DbPort = 3306
# DbUser = root
# DbPassWord = 123456
# DbName = artistmgmttest
Db = mysql
DbHost = 127.0.0.1
DbPort = 3306
DbPort = 13307
DbUser = root
DbPassWord = 123456
DbName = artistmgmttest
DbName = artistmgmtprod
[redis]
RedisDB = 2