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