修复报错
This commit is contained in:
parent
18d52d40a6
commit
7adf2cb8ba
@ -24,20 +24,20 @@ import (
|
||||
|
||||
func RegisterUser(req *artistInfoUser.RegisterUserRequest) (rep *artistInfoUser.RegisterUserRespond, err error) {
|
||||
|
||||
var user = model.User{
|
||||
MgmtAccId: req.MgmtAccId,
|
||||
TelNum: req.TelNum,
|
||||
MgmtArtistId: req.MgmtArtistId,
|
||||
MgmtArtistUid: req.MgmtArtistUid,
|
||||
InviteCode: req.UserInviteCode,
|
||||
Account: req.Account,
|
||||
}
|
||||
zap.L().Debug(fmt.Sprintf("RegisterUser--user: %+v", user))
|
||||
if err = db.DB.Create(&user).Error; err != nil {
|
||||
zap.L().Error("register user err", zap.Error(err))
|
||||
err = errors.New(m.ERROR_SELECT)
|
||||
return nil, err
|
||||
}
|
||||
// var user = model.User{
|
||||
// MgmtAccId: req.MgmtAccId,
|
||||
// TelNum: req.TelNum,
|
||||
// MgmtArtistId: req.MgmtArtistId,
|
||||
// MgmtArtistUid: req.MgmtArtistUid,
|
||||
// InviteCode: req.UserInviteCode,
|
||||
// Account: req.Account,
|
||||
// }
|
||||
// zap.L().Debug(fmt.Sprintf("RegisterUser--user: %+v", user))
|
||||
// if err = db.DB.Create(&user).Error; err != nil {
|
||||
// zap.L().Error("register user err", zap.Error(err))
|
||||
// err = errors.New(m.ERROR_SELECT)
|
||||
// return nil, err
|
||||
// }
|
||||
return
|
||||
}
|
||||
|
||||
@ -764,9 +764,9 @@ func UpdateUserData(req *artistInfoUser.UserInfo) (rep *artistInfoUser.CommonNoP
|
||||
if req.RealName.IdNum != "" {
|
||||
realName.IdNum = req.RealName.IdNum
|
||||
}
|
||||
if req.RealName.TelNum != "" {
|
||||
realName.TelNum = req.RealName.TelNum
|
||||
}
|
||||
// if req.RealName.TelNum != "" {
|
||||
// realName.TelNum = req.RealName.TelNum
|
||||
// }
|
||||
if req.RealName.IdCardFront != "" {
|
||||
realName.IdCardFront = req.RealName.IdCardFront
|
||||
}
|
||||
|
@ -1,32 +1,32 @@
|
||||
package dao
|
||||
|
||||
import (
|
||||
"github.com/fonchain/fonchain-artistinfo/cmd/model"
|
||||
"github.com/fonchain/fonchain-artistinfo/pb/artistinfoStatement"
|
||||
db "github.com/fonchain/fonchain-artistinfo/pkg/db"
|
||||
"gorm.io/gorm/clause"
|
||||
)
|
||||
// import (
|
||||
// "github.com/fonchain/fonchain-artistinfo/cmd/model"
|
||||
// "github.com/fonchain/fonchain-artistinfo/pb/artistinfoStatement"
|
||||
// db "github.com/fonchain/fonchain-artistinfo/pkg/db"
|
||||
// "gorm.io/gorm/clause"
|
||||
// )
|
||||
|
||||
// =====================================
|
||||
//
|
||||
// 对账单批次
|
||||
func CreateStatementBatch(in *artistinfoStatement.StatementBatchRequest) (res model.StatementBatch, err error) {
|
||||
res = model.StatementBatch{
|
||||
StType: in.StType,
|
||||
ArtistUid: in.ArtistUid,
|
||||
ArtistRealName: in.ArtistRealName,
|
||||
FlowStatus: in.FlowStatus,
|
||||
BatchTime: in.BatchTime,
|
||||
MinPrice: in.MinPrice,
|
||||
GuaranteePrice: in.GuaranteePrice,
|
||||
FileUrl: in.FileUrl,
|
||||
}
|
||||
err = db.DB.Clauses(clause.OnConflict{
|
||||
Columns: []clause.Column{{Name: "st_type"}, {Name: "artist_uid"}, {Name: "batch_time"}},
|
||||
UpdateAll: true,
|
||||
}).Create(&res).Error
|
||||
return
|
||||
}
|
||||
// func CreateStatementBatch(in *artistinfoStatement.StatementBatchRequest) (res model.StatementBatch, err error) {
|
||||
// res = model.StatementBatch{
|
||||
// StType: in.StType,
|
||||
// ArtistUid: in.ArtistUid,
|
||||
// ArtistRealName: in.ArtistRealName,
|
||||
// FlowStatus: in.FlowStatus,
|
||||
// BatchTime: in.BatchTime,
|
||||
// MinPrice: in.MinPrice,
|
||||
// GuaranteePrice: in.GuaranteePrice,
|
||||
// FileUrl: in.FileUrl,
|
||||
// }
|
||||
// err = db.DB.Clauses(clause.OnConflict{
|
||||
// Columns: []clause.Column{{Name: "st_type"}, {Name: "artist_uid"}, {Name: "batch_time"}},
|
||||
// UpdateAll: true,
|
||||
// }).Create(&res).Error
|
||||
// return
|
||||
// }
|
||||
|
||||
// func BatchCreateStatementBatch(in *artistinfoStatement.BatchCreateStatementBatchRequest) error {
|
||||
// var datas = []model.StatementBatch{}
|
||||
|
@ -30,7 +30,7 @@ func getColumnIndex(num int) string {
|
||||
return column
|
||||
}
|
||||
|
||||
func Int[T int | int | uint8 | uint32 | uint64 | int32 | int64](value string) T {
|
||||
func Int[T int | uint | uint8 | uint32 | uint64 | int32 | int64](value string) T {
|
||||
v, _ := strconv.Atoi(value)
|
||||
return T(v)
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user