Merge branch 'xjjdev' into dev

This commit is contained in:
徐俊杰 2023-03-17 11:55:38 +08:00
commit 487f284f1d
16 changed files with 3246 additions and 28 deletions

View File

@ -0,0 +1,40 @@
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)
}

View File

@ -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,
}

View File

@ -0,0 +1,25 @@
package dao
import (
"github.com/fonchain/fonchain-artistinfo/pb/artistinfoStatement"
"google.golang.org/protobuf/types/known/emptypb"
)
func CreateStatementBatch(in *artistinfoStatement.StatementBatchRequest) (res *artistinfoStatement.CreateStatementBatchResponse, err error) {
return nil, nil
}
func BatchCreateStatementBatch(in *artistinfoStatement.BatchCreateStatementBatchRequest) (*emptypb.Empty, error) {
return nil, nil
}
func GetStatementBatchList(in *artistinfoStatement.GetStatementBatchListRequest) (*artistinfoStatement.GetStatementBatchListResponse, error) {
return nil, nil
}
func CreateStatementDetail(in *artistinfoStatement.StatementDetailRequest) (*artistinfoStatement.CreateStatementDetailResponse, error) {
return nil, nil
}
func BatchCreateStatementDetail(in *artistinfoStatement.BatchCreateStatementDetailRequest) (*emptypb.Empty, error) {
return nil, nil
}
func GetStatementDetailList(in *artistinfoStatement.GetStatementDetailListRequest) (*artistinfoStatement.GetStatementDetailListResponse, error) {
return nil, nil
}

View File

@ -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"
)
@ -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,

View File

@ -0,0 +1,33 @@
package logic
import (
"github.com/fonchain/fonchain-artistinfo/cmd/internal/dao"
"github.com/fonchain/fonchain-artistinfo/pb/artistinfoStatement"
"google.golang.org/protobuf/types/known/emptypb"
)
type StatementServerLogic struct{}
func (s *StatementServerLogic) CreateStatementBatch(in *artistinfoStatement.StatementBatchRequest) (res *artistinfoStatement.CreateStatementBatchResponse, err error) {
return dao.CreateStatementBatch(in)
}
func (s *StatementServerLogic) BatchCreateStatementBatch(in *artistinfoStatement.BatchCreateStatementBatchRequest) (*emptypb.Empty, error) {
return dao.BatchCreateStatementBatch(in)
}
func (s *StatementServerLogic) GetStatementBatchList(in *artistinfoStatement.GetStatementBatchListRequest) (*artistinfoStatement.GetStatementBatchListResponse, error) {
return dao.GetStatementBatchList(in)
}
func (s *StatementServerLogic) CreateStatementDetail(in *artistinfoStatement.StatementDetailRequest) (*artistinfoStatement.CreateStatementDetailResponse, error) {
return dao.CreateStatementDetail(in)
}
func (s *StatementServerLogic) BatchCreateStatementDetail(in *artistinfoStatement.BatchCreateStatementDetailRequest) (*emptypb.Empty, error) {
return dao.BatchCreateStatementDetail(in)
}
func (s *StatementServerLogic) GetStatementDetailList(in *artistinfoStatement.GetStatementDetailListRequest) (*artistinfoStatement.GetStatementDetailListResponse, error) {
return dao.GetStatementDetailList(in)
}

View File

@ -0,0 +1,34 @@
package model
// 对账单批次
type StatementBatch struct {
Model
StType int32 `gorm:"column:st_type;comment:对账单类型 1=版权 2=物权;"`
ArtistUid string `gorm:"column:artist_uid;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;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,comment:批次id;"`
TfNum string `gorm:"column:tf_num;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"
}

View File

@ -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"`

View File

@ -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 ''"`

View File

@ -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
`

View File

@ -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;//

View File

@ -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,

View File

@ -1,16 +1,88 @@
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 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;
}
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;
}

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,373 @@
// 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)
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)
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) 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)
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) 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_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: "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",
}

View File

@ -123,6 +123,8 @@ func migration() {
&model.ArtshowArtistIndex{}, //画展-画家指数
&model.ArtshowArtistSupplement{}, //画展-画家补充信息
&model.Contract{}, //合同
&model.StatementBatch{}, //对账单批次
&model.StatementDetail{}, //对账单详情
)
if err != nil {
fmt.Println("register table fail")