对账单测试代码提交
This commit is contained in:
parent
ef3b719a9d
commit
a6d30beca2
@ -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
|
||||
|
@ -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)
|
||||
}
|
||||
|
||||
|
@ -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
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user