From 7adf2cb8ba41a097ff65645102903f6d1e6c2285 Mon Sep 17 00:00:00 2001 From: dorlolo <428192774@qq.com> Date: Tue, 21 Mar 2023 15:54:03 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E6=8A=A5=E9=94=99?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- cmd/internal/dao/artistInfo_user.go | 34 +++++++++--------- cmd/internal/dao/artistinfo_statement.go | 46 ++++++++++++------------ pkg/util/excel/utils.go | 2 +- 3 files changed, 41 insertions(+), 41 deletions(-) diff --git a/cmd/internal/dao/artistInfo_user.go b/cmd/internal/dao/artistInfo_user.go index 783170e..818a26b 100644 --- a/cmd/internal/dao/artistInfo_user.go +++ b/cmd/internal/dao/artistInfo_user.go @@ -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 } diff --git a/cmd/internal/dao/artistinfo_statement.go b/cmd/internal/dao/artistinfo_statement.go index 34cbaac..f5a43be 100644 --- a/cmd/internal/dao/artistinfo_statement.go +++ b/cmd/internal/dao/artistinfo_statement.go @@ -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{} diff --git a/pkg/util/excel/utils.go b/pkg/util/excel/utils.go index a8a59b3..2078606 100644 --- a/pkg/util/excel/utils.go +++ b/pkg/util/excel/utils.go @@ -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) }