Merge branch 'dev' of http://192.168.12.3:8090/bugmaker/fonchain-artistinfo into dev
This commit is contained in:
commit
c0bed7763d
@ -21,9 +21,7 @@ func main() {
|
||||
config.SetProviderService(&controller.ArtistInfoArtworkProvider{})
|
||||
config.SetProviderService(&controller.ArtistInfoArtshowProvider{})
|
||||
config.SetProviderService(&controller.ArtistInfoContractProvider{})
|
||||
//config.SetProviderService(&controller.ContractProvider{})
|
||||
//config.SetProviderService(&controller.ArtWorkProvider{})
|
||||
//config.SetProviderService(&controller.SupplyProvider{})
|
||||
config.SetConsumerService(&controller.StatementServerProvider{})
|
||||
db.Init(m.SERVER_CONFIG)
|
||||
cache.InitRedis(m.SERVER_CONFIG)
|
||||
if err := config.Load(); err != nil {
|
||||
|
44
cmd/internal/controller/artistinfo_statement.go
Normal file
44
cmd/internal/controller/artistinfo_statement.go
Normal file
@ -0,0 +1,44 @@
|
||||
package controller
|
||||
|
||||
import (
|
||||
"context"
|
||||
|
||||
"github.com/fonchain/fonchain-artistinfo/cmd/internal/logic"
|
||||
"github.com/fonchain/fonchain-artistinfo/pb/artistinfoStatement"
|
||||
emptypb "google.golang.org/protobuf/types/known/emptypb"
|
||||
)
|
||||
|
||||
//go:generate mockgen -destination .\artistinfoStatement_triple.pb.go -package controller -source ..\..\..\pb\artistinfoStatement\artistinfoStatement_triple.pb.go StatementServer
|
||||
|
||||
type StatementServerProvider struct {
|
||||
artistinfoStatement.UnimplementedStatementServer
|
||||
logic logic.StatementServerLogic
|
||||
}
|
||||
|
||||
func (s *StatementServerProvider) CreateStatementBatch(ctx context.Context, in *artistinfoStatement.StatementBatchRequest) (res *artistinfoStatement.CreateStatementBatchResponse, err error) {
|
||||
return s.logic.CreateStatementBatch(in)
|
||||
}
|
||||
|
||||
func (s *StatementServerProvider) BatchCreateStatementBatch(ctx context.Context, in *artistinfoStatement.BatchCreateStatementBatchRequest) (*emptypb.Empty, error) {
|
||||
return s.logic.BatchCreateStatementBatch(in)
|
||||
}
|
||||
|
||||
func (s *StatementServerProvider) GetStatementBatchList(ctx context.Context, in *artistinfoStatement.GetStatementBatchListRequest) (*artistinfoStatement.GetStatementBatchListResponse, error) {
|
||||
return s.logic.GetStatementBatchList(in)
|
||||
}
|
||||
|
||||
func (s *StatementServerProvider) CreateStatementDetail(ctx context.Context, in *artistinfoStatement.StatementDetailRequest) (*artistinfoStatement.CreateStatementDetailResponse, error) {
|
||||
return s.logic.CreateStatementDetail(in)
|
||||
}
|
||||
|
||||
func (s *StatementServerProvider) BatchCreateStatementDetail(ctx context.Context, in *artistinfoStatement.BatchCreateStatementDetailRequest) (*emptypb.Empty, error) {
|
||||
return s.logic.BatchCreateStatementDetail(in)
|
||||
}
|
||||
|
||||
func (s *StatementServerProvider) GetStatementDetailList(ctx context.Context, in *artistinfoStatement.GetStatementDetailListRequest) (*artistinfoStatement.GetStatementDetailListResponse, error) {
|
||||
return s.logic.GetStatementDetailList(in)
|
||||
}
|
||||
|
||||
func (s *StatementServerProvider) GetStatementBatchTimeMenus(ctx context.Context, in *artistinfoStatement.GetStatementBatchListRequest) (*artistinfoStatement.GetStatementBatchTimeMenusResponse, error) {
|
||||
return s.logic.GetStatementBatchTimeMenus(in)
|
||||
}
|
@ -305,16 +305,20 @@ func UserLock(req *artistInfoUser.UserLockRequest) (rep *artistInfoUser.UserLock
|
||||
if !req.IsLock {
|
||||
fmt.Println("122312312312331")
|
||||
// 解锁时与另外4个模块联动
|
||||
if err = tx.Model(model.ArtworkLockRecord{}).Where("artist_uid = ? AND status =2 ", thisUser.MgmtArtistUid).Update("status", 3).Error; err != nil {
|
||||
if err = tx.Model(model.ArtworkLockRecord{}).Where("artist_uid = ? AND status =2", thisUser.MgmtArtistUid).Update("status", 3).Error; err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if err = tx.Model(model.ArtshowArtistSupplement{}).Where("artist_uid = ? AND status =2 ", thisUser.MgmtArtistUid).Update("status", 3).Error; err != nil {
|
||||
if err = tx.Model(model.ArtshowArtistSupplement{}).Where("artist_uid = ? AND status =2", thisUser.MgmtArtistUid).Update("status", 3).Error; err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if err = tx.Model(model.ArtshowArtistIndex{}).Where("artist_uid = ? AND status =2 ", thisUser.MgmtArtistUid).Update("status", 3).Error; err != nil {
|
||||
if err = tx.Model(model.ArtshowArtistIndex{}).Where("artist_uid = ? AND status =2", thisUser.MgmtArtistUid).Update("status", 3).Error; err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if err = tx.Model(model.ArtshowVideoRecord{}).Where("artist_uid = ? AND status =2 ", thisUser.MgmtArtistUid).Update("status", 3).Error; err != nil {
|
||||
if err = tx.Model(model.ArtshowVideoRecord{}).Where("artist_uid = ? AND status =2", thisUser.MgmtArtistUid).Update("status", 3).Error; err != nil {
|
||||
return nil, err
|
||||
}
|
||||
// 与画家宝的合同表进行联动
|
||||
if err = tx.Model(model.Contract{}).Where("artist_uid = ? AND status =2", thisUser.MgmtArtistUid).Update("status", 3).Error; err != nil {
|
||||
return nil, err
|
||||
}
|
||||
} else {
|
||||
@ -382,8 +386,9 @@ func UnFinishList(req *artistInfoUser.UnFinishListRequest) (rep *artistInfoUser.
|
||||
UnfinishedArtistSupplementCount int64 `gorm:"column:unfinished_artist_supplement_count;comment:未完成的画家补充信息数量"`
|
||||
UnfinishedArtistVideoRecordCount int64 `gorm:"column:unfinished_artist_video_record_count;comment:未完成的画展视频统计"`
|
||||
UnfinishedArtistIndexCount int64 `gorm:"column:unfinished_artist_index_count;comment:未完成的画家指数"`
|
||||
// UnfinishedContractCount int64 `gorm:"column:unfinished_contract_count;comment:未签署合同统计;"`
|
||||
}{}
|
||||
//todo 目前缺少合同列表
|
||||
// 查询未完成的画展相关操作统计
|
||||
var sql = fmt.Sprintf(`
|
||||
SELECT
|
||||
COUNT(1) unfinished_artwork_base_count ,
|
||||
@ -399,9 +404,14 @@ WHERE artist_uid = ? AND STATUS = 2 AND base_audit_status IN (1,3,5)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
//未签署合同统计
|
||||
var UnfinishedContractCount int64
|
||||
err = db.DB.Model(model.Contract{}).Where("artist_uid = ? AND STATUS = 2 AND state =1", user.MgmtArtistUid).Count(&UnfinishedContractCount).Error
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
rep = &artistInfoUser.UnFinishListRespond{
|
||||
ContractList: 0, //todo
|
||||
ContractList: UnfinishedContractCount,
|
||||
SupplyInfoList: viewData.UnfinishedArtworkBaseCount + viewData.UnfinishedArtworkSupplementCount + viewData.UnfinishedArtistIndexCount + viewData.UnfinishedArtistSupplementCount,
|
||||
AccountStateList: accountStatusList,
|
||||
}
|
||||
|
162
cmd/internal/dao/artistinfo_statement.go
Normal file
162
cmd/internal/dao/artistinfo_statement.go
Normal file
@ -0,0 +1,162 @@
|
||||
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"
|
||||
)
|
||||
|
||||
// =====================================
|
||||
//
|
||||
// 对账单批次
|
||||
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{}
|
||||
for _, in := range in.Data {
|
||||
datas = append(datas, 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(&datas).Error
|
||||
return err
|
||||
}
|
||||
|
||||
func GetStatementBatchList(in *artistinfoStatement.GetStatementBatchListRequest) (res []model.StatementBatch, total int64, err error) {
|
||||
res = []model.StatementBatch{}
|
||||
var orm = db.DB.Model(model.StatementBatch{}).Order("created_at desc").Preload("ArtworkList")
|
||||
if in.Condition.StType != 0 {
|
||||
orm = orm.Where("st_type = ?", in.Condition.StType)
|
||||
}
|
||||
if in.Condition.ArtistUid != "" {
|
||||
orm = orm.Where("artist_uid = ?", in.Condition.ArtistUid)
|
||||
}
|
||||
if in.Condition.ArtistRealName != "" {
|
||||
orm = orm.Where("artist_real_name = ?", in.Condition.ArtistRealName)
|
||||
}
|
||||
if in.Condition.FlowStatus != 0 {
|
||||
orm = orm.Where("flow_status = ?", in.Condition.FlowStatus)
|
||||
}
|
||||
if in.Condition.BatchTime != "" {
|
||||
orm = orm.Where("batch_time = ?", in.Condition.BatchTime)
|
||||
}
|
||||
if in.Condition.MinPrice != 0 {
|
||||
orm = orm.Where("min_price = ?", in.Condition.MinPrice)
|
||||
}
|
||||
if in.Condition.GuaranteePrice != 0 {
|
||||
orm = orm.Where("guarantee_price = ?", in.Condition.GuaranteePrice)
|
||||
}
|
||||
if in.Condition.Id != 0 {
|
||||
orm = orm.Where("id = ?", in.Condition.Id)
|
||||
}
|
||||
if in.Condition.FileUrl != "" {
|
||||
orm = orm.Where("file_url = ?", in.Condition.FileUrl)
|
||||
}
|
||||
if len(in.Ids) > 0 {
|
||||
orm = orm.Where("id in ?", in.Ids)
|
||||
}
|
||||
if len(in.BatchTimeList) > 0 {
|
||||
orm = orm.Where("batch_time in ?", in.BatchTimeList)
|
||||
}
|
||||
err = orm.Count(&total).Scopes(db.Pagination(in.Page, in.PageSize)).Find(&res).Error
|
||||
return
|
||||
}
|
||||
|
||||
func GetStatementBatchTimeMenus(in *artistinfoStatement.GetStatementBatchListRequest) (res []string, err error) {
|
||||
res = []string{}
|
||||
err = db.DB.Model(model.StatementBatch{}).Pluck("batch_time", &res).Error
|
||||
return
|
||||
}
|
||||
|
||||
//=====================================
|
||||
// 对账单详情
|
||||
|
||||
func CreateStatementDetail(in *artistinfoStatement.StatementDetailRequest) (res model.StatementDetail, err error) {
|
||||
res = model.StatementDetail{
|
||||
BatchId: in.BatchId,
|
||||
TfNum: in.TfNum,
|
||||
ArtworkName: in.ArtworkName,
|
||||
Ruler: in.Ruler,
|
||||
SaleNo: in.SaleNo,
|
||||
CompleteDate: in.CompleteDate,
|
||||
}
|
||||
err = db.DB.Clauses(clause.OnConflict{
|
||||
Columns: []clause.Column{{Name: "tf_num"}, {Name: "batch_id"}},
|
||||
UpdateAll: true,
|
||||
}).Create(&res).Error
|
||||
return
|
||||
}
|
||||
|
||||
func BatchCreateStatementDetail(in *artistinfoStatement.BatchCreateStatementDetailRequest) error {
|
||||
var datas = []model.StatementDetail{}
|
||||
for _, in := range in.Data {
|
||||
datas = append(datas, model.StatementDetail{
|
||||
BatchId: in.BatchId,
|
||||
TfNum: in.TfNum,
|
||||
ArtworkName: in.ArtworkName,
|
||||
Ruler: in.Ruler,
|
||||
SaleNo: in.SaleNo,
|
||||
CompleteDate: in.CompleteDate,
|
||||
})
|
||||
}
|
||||
err := db.DB.Clauses(clause.OnConflict{
|
||||
Columns: []clause.Column{{Name: "tf_num"}, {Name: "batch_id"}},
|
||||
UpdateAll: true,
|
||||
}).Create(&datas).Error
|
||||
return err
|
||||
}
|
||||
|
||||
func GetStatementDetailList(in *artistinfoStatement.GetStatementDetailListRequest) (res []model.StatementDetail, total int64, err error) {
|
||||
res = []model.StatementDetail{}
|
||||
var orm = db.DB.Model(model.StatementDetail{}).Order("created_at desc")
|
||||
if in.Condition.BatchId != 0 {
|
||||
orm = orm.Where(" batch_id = ?", in.Condition.BatchId)
|
||||
}
|
||||
if in.Condition.TfNum != "" {
|
||||
orm = orm.Where(" tf_num = ?", in.Condition.TfNum)
|
||||
}
|
||||
if in.Condition.ArtworkName != "" {
|
||||
orm = orm.Where(" artwork_name like = ?", "%"+in.Condition.ArtworkName+"%")
|
||||
}
|
||||
if in.Condition.Ruler != "" {
|
||||
orm = orm.Where(" = ?", in.Condition.Ruler)
|
||||
}
|
||||
if in.Condition.SaleNo != "" {
|
||||
orm = orm.Where(" = ?", in.Condition.SaleNo)
|
||||
}
|
||||
if in.Condition.CompleteDate != "" {
|
||||
orm = orm.Where(" complete_date = ?", in.Condition.CompleteDate)
|
||||
}
|
||||
if in.Condition.Id != 0 {
|
||||
orm = orm.Where(" id = ?", in.Condition.Id)
|
||||
}
|
||||
err = orm.Count(&total).Scopes(db.Pagination(in.Page, in.PageSize)).Find(&res).Error
|
||||
return
|
||||
}
|
@ -15,7 +15,6 @@ import (
|
||||
)
|
||||
|
||||
func GetArtistInfoByArtistUid(artistUid string) (user model.User, err error) {
|
||||
fmt.Println("1111")
|
||||
if err = db.DB.Where("mgmt_artist_uid = ?", artistUid).Preload("RealNameInfo").Find(&user).Error; err != nil {
|
||||
zap.L().Error("get user info err", zap.Error(err))
|
||||
err = errors.New(m.ERROR_SELECT)
|
||||
|
@ -8,9 +8,11 @@ package logic
|
||||
|
||||
import (
|
||||
"errors"
|
||||
|
||||
"github.com/fonchain/fonchain-artistinfo/cmd/internal/dao"
|
||||
"github.com/fonchain/fonchain-artistinfo/cmd/model"
|
||||
"github.com/fonchain/fonchain-artistinfo/pb/artistinfoArtshow"
|
||||
"github.com/fonchain/fonchain-artistinfo/pkg/util/stime"
|
||||
"google.golang.org/protobuf/types/known/emptypb"
|
||||
"gorm.io/gorm"
|
||||
)
|
||||
@ -61,8 +63,8 @@ func (a ArtshowVideoLogic) GetArtshowVideoDetail(request *artistinfoArtshow.GetA
|
||||
AuditStatus: int64(data.AuditStatus),
|
||||
AuditMark1: data.AuditMark1,
|
||||
AuditMark2: data.AuditMark2,
|
||||
CreatedAt: data.CreatedAt.Unix(),
|
||||
UpdatedAt: data.UpdatedAt.Unix(),
|
||||
CreatedAt: stime.TimeToString(data.CreatedAt, stime.Format_Normal_YMDhms),
|
||||
UpdatedAt: stime.TimeToString(data.UpdatedAt, stime.Format_Normal_YMDhms),
|
||||
DeletedAt: int64(data.DeletedAt),
|
||||
ArtistName: data.ArtistName,
|
||||
Status: data.Status,
|
||||
@ -91,8 +93,8 @@ func (a ArtshowVideoLogic) GetArtshowVideoList(request *artistinfoArtshow.GetArt
|
||||
AuditStatus: int64(v.AuditStatus),
|
||||
AuditMark1: v.AuditMark1,
|
||||
AuditMark2: v.AuditMark2,
|
||||
CreatedAt: v.CreatedAt.Unix(),
|
||||
UpdatedAt: v.UpdatedAt.Unix(),
|
||||
CreatedAt: stime.TimeToString(v.CreatedAt, stime.Format_Normal_YMDhms),
|
||||
UpdatedAt: stime.TimeToString(v.UpdatedAt, stime.Format_Normal_YMDhms),
|
||||
DeletedAt: int64(v.DeletedAt),
|
||||
Status: v.Status,
|
||||
ArtistName: v.ArtistName,
|
||||
|
95
cmd/internal/logic/artistinfo_statement.go
Normal file
95
cmd/internal/logic/artistinfo_statement.go
Normal file
@ -0,0 +1,95 @@
|
||||
package logic
|
||||
|
||||
import (
|
||||
"github.com/fonchain/fonchain-artistinfo/cmd/internal/dao"
|
||||
"github.com/fonchain/fonchain-artistinfo/pb/artistinfoStatement"
|
||||
"github.com/fonchain/fonchain-artistinfo/pkg/util/stime"
|
||||
"google.golang.org/protobuf/types/known/emptypb"
|
||||
)
|
||||
|
||||
type StatementServerLogic struct{}
|
||||
|
||||
func (s *StatementServerLogic) CreateStatementBatch(in *artistinfoStatement.StatementBatchRequest) (res *artistinfoStatement.CreateStatementBatchResponse, err error) {
|
||||
res = &artistinfoStatement.CreateStatementBatchResponse{}
|
||||
data, err := dao.CreateStatementBatch(in)
|
||||
res.Id = data.ID
|
||||
return
|
||||
}
|
||||
|
||||
func (s *StatementServerLogic) BatchCreateStatementBatch(in *artistinfoStatement.BatchCreateStatementBatchRequest) (*emptypb.Empty, error) {
|
||||
return nil, dao.BatchCreateStatementBatch(in)
|
||||
}
|
||||
|
||||
func (s *StatementServerLogic) GetStatementBatchList(in *artistinfoStatement.GetStatementBatchListRequest) (res *artistinfoStatement.GetStatementBatchListResponse, err error) {
|
||||
datas, total, err := dao.GetStatementBatchList(in)
|
||||
|
||||
res = &artistinfoStatement.GetStatementBatchListResponse{
|
||||
Page: &artistinfoStatement.StatementPageInfo{
|
||||
Page: in.Page,
|
||||
PageSize: in.PageSize,
|
||||
Total: total,
|
||||
},
|
||||
Data: []*artistinfoStatement.StatementBatchRequest{},
|
||||
}
|
||||
for _, v := range datas {
|
||||
res.Data = append(res.Data, &artistinfoStatement.StatementBatchRequest{
|
||||
StType: v.StType,
|
||||
ArtistUid: v.ArtistUid,
|
||||
ArtistRealName: v.ArtistRealName,
|
||||
FlowStatus: v.FlowStatus,
|
||||
BatchTime: v.BatchTime,
|
||||
MinPrice: v.MinPrice,
|
||||
GuaranteePrice: v.GuaranteePrice,
|
||||
Id: v.ID,
|
||||
CreatedAt: stime.TimeToString(v.CreatedAt, stime.Format_Normal_YMDhms),
|
||||
UpdatedAt: stime.TimeToString(v.UpdatedAt, stime.Format_Normal_YMDhms),
|
||||
DeletedAt: int64(v.DeletedAt),
|
||||
FileUrl: v.FileUrl,
|
||||
})
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
func (s *StatementServerLogic) CreateStatementDetail(in *artistinfoStatement.StatementDetailRequest) (res *artistinfoStatement.CreateStatementDetailResponse, err error) {
|
||||
res = &artistinfoStatement.CreateStatementDetailResponse{}
|
||||
data, err := dao.CreateStatementDetail(in)
|
||||
res.Id = data.ID
|
||||
return
|
||||
}
|
||||
|
||||
func (s *StatementServerLogic) BatchCreateStatementDetail(in *artistinfoStatement.BatchCreateStatementDetailRequest) (*emptypb.Empty, error) {
|
||||
return nil, dao.BatchCreateStatementDetail(in)
|
||||
}
|
||||
|
||||
func (s *StatementServerLogic) GetStatementDetailList(in *artistinfoStatement.GetStatementDetailListRequest) (res *artistinfoStatement.GetStatementDetailListResponse, err error) {
|
||||
datas, total, err := dao.GetStatementDetailList(in)
|
||||
res = &artistinfoStatement.GetStatementDetailListResponse{
|
||||
Data: []*artistinfoStatement.StatementDetailRequest{},
|
||||
Page: &artistinfoStatement.StatementPageInfo{
|
||||
Page: in.Page,
|
||||
PageSize: in.PageSize,
|
||||
Total: total,
|
||||
},
|
||||
}
|
||||
for _, v := range datas {
|
||||
res.Data = append(res.Data, &artistinfoStatement.StatementDetailRequest{
|
||||
BatchId: v.BatchId,
|
||||
TfNum: v.TfNum,
|
||||
ArtworkName: v.ArtworkName,
|
||||
Ruler: v.Ruler,
|
||||
SaleNo: v.SaleNo,
|
||||
CompleteDate: v.CompleteDate,
|
||||
Id: v.ID,
|
||||
CreatedAt: stime.TimeToString(v.CreatedAt, stime.Format_Normal_YMDhms),
|
||||
UpdatedAt: stime.TimeToString(v.UpdatedAt, stime.Format_Normal_YMDhms),
|
||||
DeletedAt: int64(v.DeletedAt),
|
||||
})
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
func (s *StatementServerLogic) GetStatementBatchTimeMenus(in *artistinfoStatement.GetStatementBatchListRequest) (res *artistinfoStatement.GetStatementBatchTimeMenusResponse, err error) {
|
||||
res = &artistinfoStatement.GetStatementBatchTimeMenusResponse{}
|
||||
res.Data, err = dao.GetStatementBatchTimeMenus(in)
|
||||
return
|
||||
}
|
34
cmd/model/artworkStatement.go
Normal file
34
cmd/model/artworkStatement.go
Normal file
@ -0,0 +1,34 @@
|
||||
package model
|
||||
|
||||
// 对账单批次
|
||||
type StatementBatch struct {
|
||||
Model
|
||||
StType int32 `gorm:"column:st_type;unqiueIndex:sttype_uid_batchtime_idx;comment:对账单类型 1=版权 2=物权;"`
|
||||
ArtistUid string `gorm:"column:artist_uid;unqiueIndex:sttype_uid_batchtime_idx;comment:画家uid"`
|
||||
ArtistRealName string `gorm:"column:artist_real_name;comment:画家真实姓名;"`
|
||||
FlowStatus int32 `gorm:"column:flow_status;comment:流程状态 1=未生成 2=已生成未签署 3=已签署"`
|
||||
BatchTime string `gorm:"column:batch_time;unqiueIndex:sttype_uid_batchtime_idx;comment:批次时间;"`
|
||||
MinPrice float32 `gorm:"column:min_price;comment:委托销售底价"`
|
||||
GuaranteePrice float32 `gorm:"column:guarantee_price;comment:以收取保证金;"`
|
||||
FileUrl string `gorm:"column:file_url,comment:对账单文件地址;"`
|
||||
ArtworkList []StatementDetail `gorm:"foreignKey:BatchId"`
|
||||
}
|
||||
|
||||
func (StatementBatch) TableName() string {
|
||||
return "statement_batch"
|
||||
}
|
||||
|
||||
// 对账单批次详情
|
||||
type StatementDetail struct {
|
||||
Model
|
||||
BatchId int64 `gorm:"column:batch_id;unqiueIndex:batchid_tfnum_idx;comment:批次id;"`
|
||||
TfNum string `gorm:"column:tf_num;unqiueIndex:batchid_tfnum_idx;comment:"泰丰画作编号"`
|
||||
ArtworkName string `gorm:"column:artwork_name;comment:画作名称"`
|
||||
Ruler string `gorm:"column:ruler;comment:平尺"`
|
||||
SaleNo string `gorm:"column:sale_no;comment:销售单号"`
|
||||
CompleteDate string `gorm:"column:complete_date;comment:成交日期"`
|
||||
}
|
||||
|
||||
func (StatementDetail) TableName() string {
|
||||
return "statement_detail"
|
||||
}
|
@ -13,8 +13,8 @@ type Contract struct {
|
||||
Type int32 `gorm:"column:type;type:int(1);comment:合同类型;NOT NULL" json:"type"`
|
||||
ViewUrl string `gorm:"column:view_url;type:varchar(500);comment:在线查看合同链接" json:"view_url"`
|
||||
DownloadUrl string `gorm:"column:download_url;type:varchar(500);comment:合同下载链接" json:"download_url"`
|
||||
State int32 `gorm:"column:state;type:int(1);comment:合同状态;NOT NULL" json:"state"`
|
||||
Status int32 `gorm:"column:status;default:2;comment:2=锁定 3=解锁" json:"status" ` //跟随用户的锁定和解锁状态,用于控制数据的展示
|
||||
State int32 `gorm:"column:state;type:int(1);comment:合同状态;NOT NULL" json:"state"` //1 未签署
|
||||
Status int32 `gorm:"column:status;default:2;comment:2=锁定 3=解锁" json:"status" ` //跟随用户的锁定和解锁状态,用于控制数据的展示
|
||||
LockTime string `gorm:"column:lock_time;comment:锁定时间" json:"lockTime"`
|
||||
SignTime string `gorm:"column:sign_time;comment:签署时间" json:"sign_time"`
|
||||
BatchId int32 `gorm:"column:batch_id;comment:批次ID" json:"batch_id"`
|
||||
|
@ -1,8 +1,10 @@
|
||||
package model
|
||||
package old
|
||||
|
||||
import "github.com/fonchain/fonchain-artistinfo/cmd/model"
|
||||
|
||||
// SupplyInfo 画作信息补充
|
||||
type SupplyInfo struct {
|
||||
Model
|
||||
model.Model
|
||||
ID uint `gorm:"not null"`
|
||||
ArtworkId string `gorm:"type:varchar(256) default ''"`
|
||||
ArtistId string `gorm:"type:varchar(256) default ''"`
|
@ -89,7 +89,9 @@ LEFT JOIN real_name rn ON rn.id = su.real_name_id
|
||||
LEFT JOIN invite ON invite.invited_id = su.id
|
||||
LEFT JOIN sys_user inviter ON inviter.invited_code = invite.invite_code
|
||||
LEFT JOIN real_name inviter_rn ON inviter_rn.id = inviter.real_name_id
|
||||
LEFT JOIN artshow_artist_supplement aas ON aas.artist_uid = su.mgmt_artist_uid
|
||||
LEFT JOIN artshow_artist_supplement aas ON aas.artist_uid = su.mgmt_artist_uid AND aas.lock_time = (
|
||||
select MAX(lock_time) from artshow_artist_supplement WHERE artist_uid = su.mgmt_artist_uid
|
||||
)
|
||||
WHERE
|
||||
su.deleted_at = 0
|
||||
`
|
||||
|
@ -68,8 +68,8 @@ message ArtshowVideoInfo {
|
||||
int64 auditStatus =5;
|
||||
string auditMark1 =6;
|
||||
string auditMark2 =7;
|
||||
int64 createdAt=8;
|
||||
int64 updatedAt=9;
|
||||
string createdAt=8;
|
||||
string updatedAt=9;
|
||||
int64 deletedAt=10;
|
||||
string artistName=11;
|
||||
int64 status=12;//锁定状态
|
||||
|
@ -259,8 +259,8 @@ type ArtshowVideoInfo struct {
|
||||
AuditStatus int64 `protobuf:"varint,5,opt,name=auditStatus,proto3" json:"auditStatus,omitempty"`
|
||||
AuditMark1 string `protobuf:"bytes,6,opt,name=auditMark1,proto3" json:"auditMark1,omitempty"`
|
||||
AuditMark2 string `protobuf:"bytes,7,opt,name=auditMark2,proto3" json:"auditMark2,omitempty"`
|
||||
CreatedAt int64 `protobuf:"varint,8,opt,name=createdAt,proto3" json:"createdAt,omitempty"`
|
||||
UpdatedAt int64 `protobuf:"varint,9,opt,name=updatedAt,proto3" json:"updatedAt,omitempty"`
|
||||
CreatedAt string `protobuf:"bytes,8,opt,name=createdAt,proto3" json:"createdAt,omitempty"`
|
||||
UpdatedAt string `protobuf:"bytes,9,opt,name=updatedAt,proto3" json:"updatedAt,omitempty"`
|
||||
DeletedAt int64 `protobuf:"varint,10,opt,name=deletedAt,proto3" json:"deletedAt,omitempty"`
|
||||
ArtistName string `protobuf:"bytes,11,opt,name=artistName,proto3" json:"artistName,omitempty"`
|
||||
Status int64 `protobuf:"varint,12,opt,name=status,proto3" json:"status,omitempty"` //锁定状态
|
||||
@ -348,18 +348,18 @@ func (x *ArtshowVideoInfo) GetAuditMark2() string {
|
||||
return ""
|
||||
}
|
||||
|
||||
func (x *ArtshowVideoInfo) GetCreatedAt() int64 {
|
||||
func (x *ArtshowVideoInfo) GetCreatedAt() string {
|
||||
if x != nil {
|
||||
return x.CreatedAt
|
||||
}
|
||||
return 0
|
||||
return ""
|
||||
}
|
||||
|
||||
func (x *ArtshowVideoInfo) GetUpdatedAt() int64 {
|
||||
func (x *ArtshowVideoInfo) GetUpdatedAt() string {
|
||||
if x != nil {
|
||||
return x.UpdatedAt
|
||||
}
|
||||
return 0
|
||||
return ""
|
||||
}
|
||||
|
||||
func (x *ArtshowVideoInfo) GetDeletedAt() int64 {
|
||||
@ -2968,9 +2968,9 @@ var file_pb_artistinfoArtshow_proto_rawDesc = []byte{
|
||||
0x72, 0x6b, 0x31, 0x12, 0x1e, 0x0a, 0x0a, 0x61, 0x75, 0x64, 0x69, 0x74, 0x4d, 0x61, 0x72, 0x6b,
|
||||
0x32, 0x18, 0x07, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x61, 0x75, 0x64, 0x69, 0x74, 0x4d, 0x61,
|
||||
0x72, 0x6b, 0x32, 0x12, 0x1c, 0x0a, 0x09, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x41, 0x74,
|
||||
0x18, 0x08, 0x20, 0x01, 0x28, 0x03, 0x52, 0x09, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x41,
|
||||
0x18, 0x08, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x41,
|
||||
0x74, 0x12, 0x1c, 0x0a, 0x09, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x64, 0x41, 0x74, 0x18, 0x09,
|
||||
0x20, 0x01, 0x28, 0x03, 0x52, 0x09, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x64, 0x41, 0x74, 0x12,
|
||||
0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x64, 0x41, 0x74, 0x12,
|
||||
0x1c, 0x0a, 0x09, 0x64, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x64, 0x41, 0x74, 0x18, 0x0a, 0x20, 0x01,
|
||||
0x28, 0x03, 0x52, 0x09, 0x64, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x64, 0x41, 0x74, 0x12, 0x1e, 0x0a,
|
||||
0x0a, 0x61, 0x72, 0x74, 0x69, 0x73, 0x74, 0x4e, 0x61, 0x6d, 0x65, 0x18, 0x0b, 0x20, 0x01, 0x28,
|
||||
|
@ -1,16 +1,94 @@
|
||||
syntax = "proto3";
|
||||
package artistinfo;
|
||||
option go_package = "./;artistinfoArtshow";
|
||||
option go_package = "./;artistinfoStatement";
|
||||
|
||||
//import "validate.proto";
|
||||
import public "google/protobuf/timestamp.proto";
|
||||
// import "google/protobuf/empty.proto"; //使用 google.protobuf.Empty
|
||||
import "google/protobuf/empty.proto"; //使用 google.protobuf.Empty
|
||||
|
||||
// protoc -I . -I ./pb --proto_path=. --go_out=./pb/artistinfoStatement --go-triple_out=./pb/artistinfoStatement --validate_out="lang=go:./pb/artistinfoStatement" ./pb/artistinfoStatement.proto
|
||||
service Statement {
|
||||
//版权对账
|
||||
|
||||
rpc CreateStatementBatch(StatementBatchRequest)returns(CreateStatementBatchResponse){}; //创建对账单批次
|
||||
rpc BatchCreateStatementBatch(BatchCreateStatementBatchRequest)returns(google.protobuf.Empty){}; //批量创建对账单批次
|
||||
rpc GetStatementBatchList(GetStatementBatchListRequest)returns(GetStatementBatchListResponse){}; //批量查询对账单批次
|
||||
rpc GetStatementBatchTimeMenus(GetStatementBatchListRequest)returns(GetStatementBatchTimeMenusResponse){}; //获取对账单批次时间菜单列表
|
||||
|
||||
//物权对账
|
||||
|
||||
rpc CreateStatementDetail(StatementDetailRequest)returns(CreateStatementDetailResponse){};//创建对账单详情
|
||||
rpc BatchCreateStatementDetail(BatchCreateStatementDetailRequest)returns(google.protobuf.Empty){};//批量创建对账单详情
|
||||
rpc GetStatementDetailList(GetStatementDetailListRequest)returns(GetStatementDetailListResponse){};//查询对账单详情列表
|
||||
}
|
||||
|
||||
message StatementPageInfo{
|
||||
int64 page =1;
|
||||
int64 pageSize =2;
|
||||
int64 total=3;
|
||||
}
|
||||
|
||||
message StatementBatchRequest{
|
||||
int32 StType=1; // 字段注释请查看对账单结构体模型 cmd/model/artworkStatement.go
|
||||
string ArtistUid=2;
|
||||
string ArtistRealName=3;
|
||||
int32 FlowStatus=4;
|
||||
string BatchTime=5;
|
||||
float MinPrice=6;
|
||||
float GuaranteePrice=7;
|
||||
int64 id = 8;
|
||||
string createdAt =9;
|
||||
string updatedAt =10;
|
||||
int64 deletedAt =11;
|
||||
string fileUrl =12;
|
||||
}
|
||||
message CreateStatementBatchResponse{
|
||||
int64 id =1;
|
||||
}
|
||||
message BatchCreateStatementBatchRequest{
|
||||
repeated StatementBatchRequest data =1;
|
||||
}
|
||||
|
||||
|
||||
message StatementDetailRequest{
|
||||
int64 BatchId = 1; //字段注释请查看对账单结构体模型 cmd/model/artworkStatement.go
|
||||
string TfNum = 2;
|
||||
string ArtworkName =3;
|
||||
string Ruler = 4;
|
||||
string SaleNo = 5;
|
||||
string CompleteDate = 6;
|
||||
int64 id = 8;
|
||||
string created_at=9;
|
||||
string updated_at=10;
|
||||
int64 deleted_at=11;
|
||||
}
|
||||
message CreateStatementDetailResponse{
|
||||
int64 id=1;
|
||||
}
|
||||
message BatchCreateStatementDetailRequest{
|
||||
repeated StatementDetailRequest data =1;
|
||||
}
|
||||
|
||||
message GetStatementBatchListRequest{
|
||||
StatementBatchRequest condition=1;
|
||||
int64 page =2;
|
||||
int64 pageSize =3;
|
||||
repeated int64 ids =4;
|
||||
repeated string batchTimeList =5;
|
||||
}
|
||||
message GetStatementBatchListResponse{
|
||||
repeated StatementBatchRequest data=1;
|
||||
StatementPageInfo page =2;
|
||||
}
|
||||
|
||||
|
||||
message GetStatementDetailListRequest{
|
||||
StatementDetailRequest condition=1; //通用条件
|
||||
int64 page =2;
|
||||
int64 pageSize =3;
|
||||
}
|
||||
|
||||
message GetStatementDetailListResponse{
|
||||
repeated StatementDetailRequest data=1;
|
||||
StatementPageInfo page =2;
|
||||
}
|
||||
|
||||
message GetStatementBatchTimeMenusResponse{
|
||||
repeated string data=1;
|
||||
}
|
1232
pb/artistinfoStatement/artistinfoStatement.pb.go
Normal file
1232
pb/artistinfoStatement/artistinfoStatement.pb.go
Normal file
File diff suppressed because it is too large
Load Diff
1589
pb/artistinfoStatement/artistinfoStatement.pb.validate.go
Normal file
1589
pb/artistinfoStatement/artistinfoStatement.pb.validate.go
Normal file
File diff suppressed because it is too large
Load Diff
418
pb/artistinfoStatement/artistinfoStatement_triple.pb.go
Normal file
418
pb/artistinfoStatement/artistinfoStatement_triple.pb.go
Normal file
@ -0,0 +1,418 @@
|
||||
// Code generated by protoc-gen-go-triple. DO NOT EDIT.
|
||||
// versions:
|
||||
// - protoc-gen-go-triple v1.0.8
|
||||
// - protoc v4.22.0--rc2
|
||||
// source: pb/artistinfoStatement.proto
|
||||
|
||||
package artistinfoStatement
|
||||
|
||||
import (
|
||||
context "context"
|
||||
protocol "dubbo.apache.org/dubbo-go/v3/protocol"
|
||||
dubbo3 "dubbo.apache.org/dubbo-go/v3/protocol/dubbo3"
|
||||
invocation "dubbo.apache.org/dubbo-go/v3/protocol/invocation"
|
||||
grpc_go "github.com/dubbogo/grpc-go"
|
||||
codes "github.com/dubbogo/grpc-go/codes"
|
||||
metadata "github.com/dubbogo/grpc-go/metadata"
|
||||
status "github.com/dubbogo/grpc-go/status"
|
||||
common "github.com/dubbogo/triple/pkg/common"
|
||||
constant "github.com/dubbogo/triple/pkg/common/constant"
|
||||
triple "github.com/dubbogo/triple/pkg/triple"
|
||||
emptypb "google.golang.org/protobuf/types/known/emptypb"
|
||||
)
|
||||
|
||||
// This is a compile-time assertion to ensure that this generated file
|
||||
// is compatible with the grpc package it is being compiled against.
|
||||
const _ = grpc_go.SupportPackageIsVersion7
|
||||
|
||||
// StatementClient is the client API for Statement service.
|
||||
//
|
||||
// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream.
|
||||
type StatementClient interface {
|
||||
CreateStatementBatch(ctx context.Context, in *StatementBatchRequest, opts ...grpc_go.CallOption) (*CreateStatementBatchResponse, common.ErrorWithAttachment)
|
||||
BatchCreateStatementBatch(ctx context.Context, in *BatchCreateStatementBatchRequest, opts ...grpc_go.CallOption) (*emptypb.Empty, common.ErrorWithAttachment)
|
||||
GetStatementBatchList(ctx context.Context, in *GetStatementBatchListRequest, opts ...grpc_go.CallOption) (*GetStatementBatchListResponse, common.ErrorWithAttachment)
|
||||
GetStatementBatchTimeMenus(ctx context.Context, in *GetStatementBatchListRequest, opts ...grpc_go.CallOption) (*GetStatementBatchTimeMenusResponse, common.ErrorWithAttachment)
|
||||
CreateStatementDetail(ctx context.Context, in *StatementDetailRequest, opts ...grpc_go.CallOption) (*CreateStatementDetailResponse, common.ErrorWithAttachment)
|
||||
BatchCreateStatementDetail(ctx context.Context, in *BatchCreateStatementDetailRequest, opts ...grpc_go.CallOption) (*emptypb.Empty, common.ErrorWithAttachment)
|
||||
GetStatementDetailList(ctx context.Context, in *GetStatementDetailListRequest, opts ...grpc_go.CallOption) (*GetStatementDetailListResponse, common.ErrorWithAttachment)
|
||||
}
|
||||
|
||||
type statementClient struct {
|
||||
cc *triple.TripleConn
|
||||
}
|
||||
|
||||
type StatementClientImpl struct {
|
||||
CreateStatementBatch func(ctx context.Context, in *StatementBatchRequest) (*CreateStatementBatchResponse, error)
|
||||
BatchCreateStatementBatch func(ctx context.Context, in *BatchCreateStatementBatchRequest) (*emptypb.Empty, error)
|
||||
GetStatementBatchList func(ctx context.Context, in *GetStatementBatchListRequest) (*GetStatementBatchListResponse, error)
|
||||
GetStatementBatchTimeMenus func(ctx context.Context, in *GetStatementBatchListRequest) (*GetStatementBatchTimeMenusResponse, error)
|
||||
CreateStatementDetail func(ctx context.Context, in *StatementDetailRequest) (*CreateStatementDetailResponse, error)
|
||||
BatchCreateStatementDetail func(ctx context.Context, in *BatchCreateStatementDetailRequest) (*emptypb.Empty, error)
|
||||
GetStatementDetailList func(ctx context.Context, in *GetStatementDetailListRequest) (*GetStatementDetailListResponse, error)
|
||||
}
|
||||
|
||||
func (c *StatementClientImpl) GetDubboStub(cc *triple.TripleConn) StatementClient {
|
||||
return NewStatementClient(cc)
|
||||
}
|
||||
|
||||
func (c *StatementClientImpl) XXX_InterfaceName() string {
|
||||
return "artistinfo.Statement"
|
||||
}
|
||||
|
||||
func NewStatementClient(cc *triple.TripleConn) StatementClient {
|
||||
return &statementClient{cc}
|
||||
}
|
||||
|
||||
func (c *statementClient) CreateStatementBatch(ctx context.Context, in *StatementBatchRequest, opts ...grpc_go.CallOption) (*CreateStatementBatchResponse, common.ErrorWithAttachment) {
|
||||
out := new(CreateStatementBatchResponse)
|
||||
interfaceKey := ctx.Value(constant.InterfaceKey).(string)
|
||||
return out, c.cc.Invoke(ctx, "/"+interfaceKey+"/CreateStatementBatch", in, out)
|
||||
}
|
||||
|
||||
func (c *statementClient) BatchCreateStatementBatch(ctx context.Context, in *BatchCreateStatementBatchRequest, opts ...grpc_go.CallOption) (*emptypb.Empty, common.ErrorWithAttachment) {
|
||||
out := new(emptypb.Empty)
|
||||
interfaceKey := ctx.Value(constant.InterfaceKey).(string)
|
||||
return out, c.cc.Invoke(ctx, "/"+interfaceKey+"/BatchCreateStatementBatch", in, out)
|
||||
}
|
||||
|
||||
func (c *statementClient) GetStatementBatchList(ctx context.Context, in *GetStatementBatchListRequest, opts ...grpc_go.CallOption) (*GetStatementBatchListResponse, common.ErrorWithAttachment) {
|
||||
out := new(GetStatementBatchListResponse)
|
||||
interfaceKey := ctx.Value(constant.InterfaceKey).(string)
|
||||
return out, c.cc.Invoke(ctx, "/"+interfaceKey+"/GetStatementBatchList", in, out)
|
||||
}
|
||||
|
||||
func (c *statementClient) GetStatementBatchTimeMenus(ctx context.Context, in *GetStatementBatchListRequest, opts ...grpc_go.CallOption) (*GetStatementBatchTimeMenusResponse, common.ErrorWithAttachment) {
|
||||
out := new(GetStatementBatchTimeMenusResponse)
|
||||
interfaceKey := ctx.Value(constant.InterfaceKey).(string)
|
||||
return out, c.cc.Invoke(ctx, "/"+interfaceKey+"/GetStatementBatchTimeMenus", in, out)
|
||||
}
|
||||
|
||||
func (c *statementClient) CreateStatementDetail(ctx context.Context, in *StatementDetailRequest, opts ...grpc_go.CallOption) (*CreateStatementDetailResponse, common.ErrorWithAttachment) {
|
||||
out := new(CreateStatementDetailResponse)
|
||||
interfaceKey := ctx.Value(constant.InterfaceKey).(string)
|
||||
return out, c.cc.Invoke(ctx, "/"+interfaceKey+"/CreateStatementDetail", in, out)
|
||||
}
|
||||
|
||||
func (c *statementClient) BatchCreateStatementDetail(ctx context.Context, in *BatchCreateStatementDetailRequest, opts ...grpc_go.CallOption) (*emptypb.Empty, common.ErrorWithAttachment) {
|
||||
out := new(emptypb.Empty)
|
||||
interfaceKey := ctx.Value(constant.InterfaceKey).(string)
|
||||
return out, c.cc.Invoke(ctx, "/"+interfaceKey+"/BatchCreateStatementDetail", in, out)
|
||||
}
|
||||
|
||||
func (c *statementClient) GetStatementDetailList(ctx context.Context, in *GetStatementDetailListRequest, opts ...grpc_go.CallOption) (*GetStatementDetailListResponse, common.ErrorWithAttachment) {
|
||||
out := new(GetStatementDetailListResponse)
|
||||
interfaceKey := ctx.Value(constant.InterfaceKey).(string)
|
||||
return out, c.cc.Invoke(ctx, "/"+interfaceKey+"/GetStatementDetailList", in, out)
|
||||
}
|
||||
|
||||
// StatementServer is the server API for Statement service.
|
||||
// All implementations must embed UnimplementedStatementServer
|
||||
// for forward compatibility
|
||||
type StatementServer interface {
|
||||
CreateStatementBatch(context.Context, *StatementBatchRequest) (*CreateStatementBatchResponse, error)
|
||||
BatchCreateStatementBatch(context.Context, *BatchCreateStatementBatchRequest) (*emptypb.Empty, error)
|
||||
GetStatementBatchList(context.Context, *GetStatementBatchListRequest) (*GetStatementBatchListResponse, error)
|
||||
GetStatementBatchTimeMenus(context.Context, *GetStatementBatchListRequest) (*GetStatementBatchTimeMenusResponse, error)
|
||||
CreateStatementDetail(context.Context, *StatementDetailRequest) (*CreateStatementDetailResponse, error)
|
||||
BatchCreateStatementDetail(context.Context, *BatchCreateStatementDetailRequest) (*emptypb.Empty, error)
|
||||
GetStatementDetailList(context.Context, *GetStatementDetailListRequest) (*GetStatementDetailListResponse, error)
|
||||
mustEmbedUnimplementedStatementServer()
|
||||
}
|
||||
|
||||
// UnimplementedStatementServer must be embedded to have forward compatible implementations.
|
||||
type UnimplementedStatementServer struct {
|
||||
proxyImpl protocol.Invoker
|
||||
}
|
||||
|
||||
func (UnimplementedStatementServer) CreateStatementBatch(context.Context, *StatementBatchRequest) (*CreateStatementBatchResponse, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method CreateStatementBatch not implemented")
|
||||
}
|
||||
func (UnimplementedStatementServer) BatchCreateStatementBatch(context.Context, *BatchCreateStatementBatchRequest) (*emptypb.Empty, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method BatchCreateStatementBatch not implemented")
|
||||
}
|
||||
func (UnimplementedStatementServer) GetStatementBatchList(context.Context, *GetStatementBatchListRequest) (*GetStatementBatchListResponse, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method GetStatementBatchList not implemented")
|
||||
}
|
||||
func (UnimplementedStatementServer) GetStatementBatchTimeMenus(context.Context, *GetStatementBatchListRequest) (*GetStatementBatchTimeMenusResponse, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method GetStatementBatchTimeMenus not implemented")
|
||||
}
|
||||
func (UnimplementedStatementServer) CreateStatementDetail(context.Context, *StatementDetailRequest) (*CreateStatementDetailResponse, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method CreateStatementDetail not implemented")
|
||||
}
|
||||
func (UnimplementedStatementServer) BatchCreateStatementDetail(context.Context, *BatchCreateStatementDetailRequest) (*emptypb.Empty, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method BatchCreateStatementDetail not implemented")
|
||||
}
|
||||
func (UnimplementedStatementServer) GetStatementDetailList(context.Context, *GetStatementDetailListRequest) (*GetStatementDetailListResponse, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method GetStatementDetailList not implemented")
|
||||
}
|
||||
func (s *UnimplementedStatementServer) XXX_SetProxyImpl(impl protocol.Invoker) {
|
||||
s.proxyImpl = impl
|
||||
}
|
||||
|
||||
func (s *UnimplementedStatementServer) XXX_GetProxyImpl() protocol.Invoker {
|
||||
return s.proxyImpl
|
||||
}
|
||||
|
||||
func (s *UnimplementedStatementServer) XXX_ServiceDesc() *grpc_go.ServiceDesc {
|
||||
return &Statement_ServiceDesc
|
||||
}
|
||||
func (s *UnimplementedStatementServer) XXX_InterfaceName() string {
|
||||
return "artistinfo.Statement"
|
||||
}
|
||||
|
||||
func (UnimplementedStatementServer) mustEmbedUnimplementedStatementServer() {}
|
||||
|
||||
// UnsafeStatementServer may be embedded to opt out of forward compatibility for this service.
|
||||
// Use of this interface is not recommended, as added methods to StatementServer will
|
||||
// result in compilation errors.
|
||||
type UnsafeStatementServer interface {
|
||||
mustEmbedUnimplementedStatementServer()
|
||||
}
|
||||
|
||||
func RegisterStatementServer(s grpc_go.ServiceRegistrar, srv StatementServer) {
|
||||
s.RegisterService(&Statement_ServiceDesc, srv)
|
||||
}
|
||||
|
||||
func _Statement_CreateStatementBatch_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc_go.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(StatementBatchRequest)
|
||||
if err := dec(in); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
base := srv.(dubbo3.Dubbo3GrpcService)
|
||||
args := []interface{}{}
|
||||
args = append(args, in)
|
||||
md, _ := metadata.FromIncomingContext(ctx)
|
||||
invAttachment := make(map[string]interface{}, len(md))
|
||||
for k, v := range md {
|
||||
invAttachment[k] = v
|
||||
}
|
||||
invo := invocation.NewRPCInvocation("CreateStatementBatch", args, invAttachment)
|
||||
if interceptor == nil {
|
||||
result := base.XXX_GetProxyImpl().Invoke(ctx, invo)
|
||||
return result, result.Error()
|
||||
}
|
||||
info := &grpc_go.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: ctx.Value("XXX_TRIPLE_GO_INTERFACE_NAME").(string),
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
result := base.XXX_GetProxyImpl().Invoke(ctx, invo)
|
||||
return result, result.Error()
|
||||
}
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
func _Statement_BatchCreateStatementBatch_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc_go.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(BatchCreateStatementBatchRequest)
|
||||
if err := dec(in); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
base := srv.(dubbo3.Dubbo3GrpcService)
|
||||
args := []interface{}{}
|
||||
args = append(args, in)
|
||||
md, _ := metadata.FromIncomingContext(ctx)
|
||||
invAttachment := make(map[string]interface{}, len(md))
|
||||
for k, v := range md {
|
||||
invAttachment[k] = v
|
||||
}
|
||||
invo := invocation.NewRPCInvocation("BatchCreateStatementBatch", args, invAttachment)
|
||||
if interceptor == nil {
|
||||
result := base.XXX_GetProxyImpl().Invoke(ctx, invo)
|
||||
return result, result.Error()
|
||||
}
|
||||
info := &grpc_go.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: ctx.Value("XXX_TRIPLE_GO_INTERFACE_NAME").(string),
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
result := base.XXX_GetProxyImpl().Invoke(ctx, invo)
|
||||
return result, result.Error()
|
||||
}
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
func _Statement_GetStatementBatchList_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc_go.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(GetStatementBatchListRequest)
|
||||
if err := dec(in); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
base := srv.(dubbo3.Dubbo3GrpcService)
|
||||
args := []interface{}{}
|
||||
args = append(args, in)
|
||||
md, _ := metadata.FromIncomingContext(ctx)
|
||||
invAttachment := make(map[string]interface{}, len(md))
|
||||
for k, v := range md {
|
||||
invAttachment[k] = v
|
||||
}
|
||||
invo := invocation.NewRPCInvocation("GetStatementBatchList", args, invAttachment)
|
||||
if interceptor == nil {
|
||||
result := base.XXX_GetProxyImpl().Invoke(ctx, invo)
|
||||
return result, result.Error()
|
||||
}
|
||||
info := &grpc_go.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: ctx.Value("XXX_TRIPLE_GO_INTERFACE_NAME").(string),
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
result := base.XXX_GetProxyImpl().Invoke(ctx, invo)
|
||||
return result, result.Error()
|
||||
}
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
func _Statement_GetStatementBatchTimeMenus_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc_go.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(GetStatementBatchListRequest)
|
||||
if err := dec(in); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
base := srv.(dubbo3.Dubbo3GrpcService)
|
||||
args := []interface{}{}
|
||||
args = append(args, in)
|
||||
md, _ := metadata.FromIncomingContext(ctx)
|
||||
invAttachment := make(map[string]interface{}, len(md))
|
||||
for k, v := range md {
|
||||
invAttachment[k] = v
|
||||
}
|
||||
invo := invocation.NewRPCInvocation("GetStatementBatchTimeMenus", args, invAttachment)
|
||||
if interceptor == nil {
|
||||
result := base.XXX_GetProxyImpl().Invoke(ctx, invo)
|
||||
return result, result.Error()
|
||||
}
|
||||
info := &grpc_go.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: ctx.Value("XXX_TRIPLE_GO_INTERFACE_NAME").(string),
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
result := base.XXX_GetProxyImpl().Invoke(ctx, invo)
|
||||
return result, result.Error()
|
||||
}
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
func _Statement_CreateStatementDetail_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc_go.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(StatementDetailRequest)
|
||||
if err := dec(in); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
base := srv.(dubbo3.Dubbo3GrpcService)
|
||||
args := []interface{}{}
|
||||
args = append(args, in)
|
||||
md, _ := metadata.FromIncomingContext(ctx)
|
||||
invAttachment := make(map[string]interface{}, len(md))
|
||||
for k, v := range md {
|
||||
invAttachment[k] = v
|
||||
}
|
||||
invo := invocation.NewRPCInvocation("CreateStatementDetail", args, invAttachment)
|
||||
if interceptor == nil {
|
||||
result := base.XXX_GetProxyImpl().Invoke(ctx, invo)
|
||||
return result, result.Error()
|
||||
}
|
||||
info := &grpc_go.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: ctx.Value("XXX_TRIPLE_GO_INTERFACE_NAME").(string),
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
result := base.XXX_GetProxyImpl().Invoke(ctx, invo)
|
||||
return result, result.Error()
|
||||
}
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
func _Statement_BatchCreateStatementDetail_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc_go.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(BatchCreateStatementDetailRequest)
|
||||
if err := dec(in); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
base := srv.(dubbo3.Dubbo3GrpcService)
|
||||
args := []interface{}{}
|
||||
args = append(args, in)
|
||||
md, _ := metadata.FromIncomingContext(ctx)
|
||||
invAttachment := make(map[string]interface{}, len(md))
|
||||
for k, v := range md {
|
||||
invAttachment[k] = v
|
||||
}
|
||||
invo := invocation.NewRPCInvocation("BatchCreateStatementDetail", args, invAttachment)
|
||||
if interceptor == nil {
|
||||
result := base.XXX_GetProxyImpl().Invoke(ctx, invo)
|
||||
return result, result.Error()
|
||||
}
|
||||
info := &grpc_go.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: ctx.Value("XXX_TRIPLE_GO_INTERFACE_NAME").(string),
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
result := base.XXX_GetProxyImpl().Invoke(ctx, invo)
|
||||
return result, result.Error()
|
||||
}
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
func _Statement_GetStatementDetailList_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc_go.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(GetStatementDetailListRequest)
|
||||
if err := dec(in); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
base := srv.(dubbo3.Dubbo3GrpcService)
|
||||
args := []interface{}{}
|
||||
args = append(args, in)
|
||||
md, _ := metadata.FromIncomingContext(ctx)
|
||||
invAttachment := make(map[string]interface{}, len(md))
|
||||
for k, v := range md {
|
||||
invAttachment[k] = v
|
||||
}
|
||||
invo := invocation.NewRPCInvocation("GetStatementDetailList", args, invAttachment)
|
||||
if interceptor == nil {
|
||||
result := base.XXX_GetProxyImpl().Invoke(ctx, invo)
|
||||
return result, result.Error()
|
||||
}
|
||||
info := &grpc_go.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: ctx.Value("XXX_TRIPLE_GO_INTERFACE_NAME").(string),
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
result := base.XXX_GetProxyImpl().Invoke(ctx, invo)
|
||||
return result, result.Error()
|
||||
}
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
// Statement_ServiceDesc is the grpc_go.ServiceDesc for Statement service.
|
||||
// It's only intended for direct use with grpc_go.RegisterService,
|
||||
// and not to be introspected or modified (even as a copy)
|
||||
var Statement_ServiceDesc = grpc_go.ServiceDesc{
|
||||
ServiceName: "artistinfo.Statement",
|
||||
HandlerType: (*StatementServer)(nil),
|
||||
Methods: []grpc_go.MethodDesc{
|
||||
{
|
||||
MethodName: "CreateStatementBatch",
|
||||
Handler: _Statement_CreateStatementBatch_Handler,
|
||||
},
|
||||
{
|
||||
MethodName: "BatchCreateStatementBatch",
|
||||
Handler: _Statement_BatchCreateStatementBatch_Handler,
|
||||
},
|
||||
{
|
||||
MethodName: "GetStatementBatchList",
|
||||
Handler: _Statement_GetStatementBatchList_Handler,
|
||||
},
|
||||
{
|
||||
MethodName: "GetStatementBatchTimeMenus",
|
||||
Handler: _Statement_GetStatementBatchTimeMenus_Handler,
|
||||
},
|
||||
{
|
||||
MethodName: "CreateStatementDetail",
|
||||
Handler: _Statement_CreateStatementDetail_Handler,
|
||||
},
|
||||
{
|
||||
MethodName: "BatchCreateStatementDetail",
|
||||
Handler: _Statement_BatchCreateStatementDetail_Handler,
|
||||
},
|
||||
{
|
||||
MethodName: "GetStatementDetailList",
|
||||
Handler: _Statement_GetStatementDetailList_Handler,
|
||||
},
|
||||
},
|
||||
Streams: []grpc_go.StreamDesc{},
|
||||
Metadata: "pb/artistinfoStatement.proto",
|
||||
}
|
@ -123,6 +123,8 @@ func migration() {
|
||||
&model.ArtshowArtistIndex{}, //画展-画家指数
|
||||
&model.ArtshowArtistSupplement{}, //画展-画家补充信息
|
||||
&model.Contract{}, //合同
|
||||
&model.StatementBatch{}, //对账单批次
|
||||
&model.StatementDetail{}, //对账单详情
|
||||
)
|
||||
if err != nil {
|
||||
fmt.Println("register table fail")
|
||||
|
Loading…
Reference in New Issue
Block a user