From a6d30beca2390c0bc2dc90a9fa4e582f8459f643 Mon Sep 17 00:00:00 2001 From: songchuang <192749120@qq.com> Date: Wed, 19 Apr 2023 11:16:58 +0800 Subject: [PATCH] =?UTF-8?q?=E5=AF=B9=E8=B4=A6=E5=8D=95=E6=B5=8B=E8=AF=95?= =?UTF-8?q?=E4=BB=A3=E7=A0=81=E6=8F=90=E4=BA=A4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- cmd/internal/dao/statement.go | 3 ++ cmd/internal/logic/statement.go | 2 -- cmd/model/statement.go | 58 ++++++++++++++++----------------- 3 files changed, 31 insertions(+), 32 deletions(-) diff --git a/cmd/internal/dao/statement.go b/cmd/internal/dao/statement.go index ae43ce3..e64ed4f 100644 --- a/cmd/internal/dao/statement.go +++ b/cmd/internal/dao/statement.go @@ -2,6 +2,7 @@ package dao import ( "errors" + "fmt" "github.com/fonchain/fonchain-artistinfo/cmd/model" statement "github.com/fonchain/fonchain-artistinfo/pb/artistinfoStatement" @@ -152,6 +153,8 @@ func IsExistArtworkSoldCopyDetail(tx *gorm.DB, uid, tfNum string) (count int64, } func CreateArtworkSoldTxDetail(tx *gorm.DB, uid1, uid2 string, excelTwoInfo *statement.ExcelTwoInfo) (err error) { + fmt.Println("excelTwoInfo:", excelTwoInfo) + fmt.Println("excelTwoInfo.CompleteDate:", excelTwoInfo.CompleteDate) artworkSoldTxDetail := &model.ArtworkSoldTxDetail{ Uid: uid2, BatchUid: uid1, //批次uid diff --git a/cmd/internal/logic/statement.go b/cmd/internal/logic/statement.go index 70e6298..d1d8375 100644 --- a/cmd/internal/logic/statement.go +++ b/cmd/internal/logic/statement.go @@ -595,9 +595,7 @@ func (a *Statement) GetCopyInfoByBatchUid(req *statement.GetCopyInfoByBatchUidRe artworkSoldCopyDetail.Ruler = v.Ruler artworkSoldCopyDetail.SaleNo = v.SaleNo artworkSoldCopyDetail.CompleteDate = v.CompleteDate - artworkSoldCopyDetail.MinPrice = v.MinPrice artworkSoldCopyDetail.SalePrice = v.SalePrice - artworkSoldCopyDetail.GuaranteePrice = v.GuaranteePrice rep.ArtworkSoldCopyDetail = append(rep.ArtworkSoldCopyDetail, artworkSoldCopyDetail) } diff --git a/cmd/model/statement.go b/cmd/model/statement.go index 7d87a86..43897dc 100644 --- a/cmd/model/statement.go +++ b/cmd/model/statement.go @@ -25,11 +25,11 @@ type ArtworkTxDetail struct { ID int32 `gorm:"column:id;type:int(11);primary_key;AUTO_INCREMENT" json:"id"` Uid string `gorm:"column:uid;type:varchar(100);comment:对账单画作物权详情表的唯一表示;NOT NULL" json:"uid"` BatchUid string `gorm:"column:batch_uid;type:varchar(100);comment:对账单画作物权表的唯一表示,即批次Uid;NOT NULL" json:"batch_uid"` - TfNum string `gorm:"column:tf_num;unqiueIndex:batchid_tfnum_idx;comment:"泰丰画作编号"` - ArtworkName string `gorm:"column:artwork_name;comment:画作名称"` - Ruler float32 `gorm:"column:ruler;comment:平尺"` - MinPrice float32 `gorm:"column:min_price;comment:委托销售底价"` - GuaranteePrice float32 `gorm:"column:guarantee_price;comment:已收取保证金;"` + TfNum string `gorm:"column:tf_num;unqiueIndex:batchid_tfnum_idx;comment:"泰丰画作编号" json:"tf_num"` + ArtworkName string `gorm:"column:artwork_name;comment:画作名称" json:"artwork_name"` + Ruler float32 `gorm:"column:ruler;comment:平尺" json:"ruler"` + MinPrice float32 `gorm:"column:min_price;comment:委托销售底价" json:"min_price"` + GuaranteePrice float32 `gorm:"column:guarantee_price;comment:已收取保证金;" json:"guarantee_price"` CreatedAt int32 `gorm:"column:created_at;autoCreateTime"` UpdatedAt int32 `gorm:"column:updated_at;autoCreateTime"` DeletedAt soft_delete.DeletedAt @@ -40,12 +40,12 @@ type ArtworkSoldTxDetail struct { ID int32 `gorm:"column:id;type:int(11);primary_key;AUTO_INCREMENT" json:"id"` Uid string `gorm:"column:uid;type:varchar(100);comment:对账单画作物权委托详情表的唯一表示;NOT NULL" json:"uid"` BatchUid string `gorm:"column:batch_uid;type:varchar(100);comment:对账单画作物权表的唯一表示,即批次Uid;NOT NULL" json:"batch_uid"` - TfNum string `gorm:"column:tf_num;unqiueIndex:batchid_tfnum_idx;comment:"泰丰画作编号"` - ArtworkName string `gorm:"column:artwork_name;comment:画作名称"` - Ruler float32 `gorm:"column:ruler;comment:平尺"` - SaleNo string `gorm:"column:sale_no;comment:销售单号"` - CompleteDate string `gorm:"column:complete_date;comment:成交日期"` - SalePrice float32 `gorm:"column:sale_price;comment:画作售价"` + TfNum string `gorm:"column:tf_num;unqiueIndex:batchid_tfnum_idx;comment:"泰丰画作编号" json:"tf_num"` + ArtworkName string `gorm:"column:artwork_name;comment:画作名称" json:"artwork_name"` + Ruler float32 `gorm:"column:ruler;comment:平尺" json:"ruler"` + SaleNo string `gorm:"column:sale_no;comment:销售单号" json:"sale_no"` + CompleteDate string `gorm:"column:complete_date;comment:成交日期" json:"complete_date"` + SalePrice float32 `gorm:"column:sale_price;comment:画作售价" json:"sale_price"` CreatedAt int32 `gorm:"column:created_at;autoCreateTime"` UpdatedAt int32 `gorm:"column:updated_at;autoCreateTime"` DeletedAt soft_delete.DeletedAt @@ -69,11 +69,11 @@ type ArtworkCopyDetail struct { ID int32 `gorm:"column:id;type:int(11);primary_key;AUTO_INCREMENT" json:"id"` Uid string `gorm:"column:uid;type:varchar(100);comment:对账单画作版权详情表的唯一表示;NOT NULL" json:"uid"` BatchUid string `gorm:"column:batch_uid;type:varchar(100);comment:对账单画作版权表的唯一表示,即批次Uid;NOT NULL" json:"batch_uid"` - TfNum string `gorm:"column:tf_num;unqiueIndex:batchid_tfnum_idx;comment:"泰丰画作编号"` - ArtworkName string `gorm:"column:artwork_name;comment:画作名称"` - Ruler float32 `gorm:"column:ruler;comment:平尺"` - MinPrice float32 `gorm:"column:min_price;comment:委托销售底价"` - GuaranteePrice float32 `gorm:"column:guarantee_price;comment:已收取保证金;"` + TfNum string `gorm:"column:tf_num;unqiueIndex:batchid_tfnum_idx;comment:"泰丰画作编号" json:"tf_num"` + ArtworkName string `gorm:"column:artwork_name;comment:画作名称" json:"tf_num"` + Ruler float32 `gorm:"column:ruler;comment:平尺" json:"ruler"` + MinPrice float32 `gorm:"column:min_price;comment:委托销售底价" json:"min_price"` + GuaranteePrice float32 `gorm:"column:guarantee_price;comment:已收取保证金;" json:"guarantee_price"` CreatedAt int32 `gorm:"column:created_at;autoCreateTime"` UpdatedAt int32 `gorm:"column:updated_at;autoCreateTime"` DeletedAt soft_delete.DeletedAt @@ -81,18 +81,16 @@ type ArtworkCopyDetail struct { // 对账单画作版权委托售卖详情(该画家一个批次的全部已被售卖了的画作) type ArtworkSoldCopyDetail struct { - ID int32 `gorm:"column:id;type:int(11);primary_key;AUTO_INCREMENT" json:"id"` - Uid string `gorm:"column:uid;type:varchar(100);comment:对账单画作版权详情表的唯一表示;NOT NULL" json:"uid"` - BatchUid string `gorm:"column:batch_uid;type:varchar(100);comment:对账单画作版权表的唯一表示,即批次Uid;NOT NULL" json:"batch_uid"` - TfNum string `gorm:"column:tf_num;unqiueIndex:batchid_tfnum_idx;comment:"泰丰画作编号"` - ArtworkName string `gorm:"column:artwork_name;comment:画作名称"` - Ruler float32 `gorm:"column:ruler;comment:平尺"` - SaleNo string `gorm:"column:sale_no;comment:销售单号"` - CompleteDate string `gorm:"column:complete_date;comment:成交日期"` - MinPrice float32 `gorm:"column:min_price;comment:委托销售底价"` - SalePrice float32 `gorm:"column:sale_price;comment:画作售价"` - GuaranteePrice float32 `gorm:"column:guarantee_price;comment:已收取保证金;"` - CreatedAt int32 `gorm:"column:created_at;autoCreateTime"` - UpdatedAt int32 `gorm:"column:updated_at;autoCreateTime"` - DeletedAt soft_delete.DeletedAt + ID int32 `gorm:"column:id;type:int(11);primary_key;AUTO_INCREMENT" json:"id"` + Uid string `gorm:"column:uid;type:varchar(100);comment:对账单画作版权详情表的唯一表示;NOT NULL" json:"uid"` + BatchUid string `gorm:"column:batch_uid;type:varchar(100);comment:对账单画作版权表的唯一表示,即批次Uid;NOT NULL" json:"batch_uid"` + TfNum string `gorm:"column:tf_num;unqiueIndex:batchid_tfnum_idx;comment:"泰丰画作编号" json:"tf_num"` + ArtworkName string `gorm:"column:artwork_name;comment:画作名称" json:"tf_num"` + Ruler float32 `gorm:"column:ruler;comment:平尺" json:"ruler"` + SaleNo string `gorm:"column:sale_no;comment:销售单号" json:"sale_no"` + CompleteDate string `gorm:"column:complete_date;comment:成交日期" json:"complete_date"` + SalePrice float32 `gorm:"column:sale_price;comment:画作售价" json:"sale_price"` + CreatedAt int32 `gorm:"column:created_at;autoCreateTime"` + UpdatedAt int32 `gorm:"column:updated_at;autoCreateTime"` + DeletedAt soft_delete.DeletedAt }