39 lines
1.2 KiB
Go
39 lines
1.2 KiB
Go
package controller
|
|
|
|
import (
|
|
"context"
|
|
"fmt"
|
|
|
|
"github.com/fonchain/fonchain-artistinfo/cmd/internal/logic"
|
|
statement "github.com/fonchain/fonchain-artistinfo/pb/artistinfoStatement"
|
|
)
|
|
|
|
type ArtistInfoStatementProvider struct {
|
|
statement.UnimplementedStatementServer
|
|
statementLogic *logic.Statement
|
|
}
|
|
|
|
func (c *ArtistInfoStatementProvider) StatementList(ctx context.Context, req *statement.StatementListRequest) (rep *statement.StatementListRespond, err error) {
|
|
fmt.Println("第一处")
|
|
if rep, err = c.statementLogic.StatementList(req); err != nil {
|
|
return nil, err
|
|
}
|
|
return rep, nil
|
|
}
|
|
|
|
func (c *ArtistInfoStatementProvider) GetTxInfoByBatchUid(ctx context.Context, req *statement.GetTxInfoByBatchUidRequest) (rep *statement.GetTxInfoByBatchUidRespond, err error) {
|
|
fmt.Println("第一处")
|
|
if rep, err = c.statementLogic.GetTxInfoByBatchUid(req); err != nil {
|
|
return nil, err
|
|
}
|
|
return rep, nil
|
|
}
|
|
|
|
func (c *ArtistInfoStatementProvider) GetCopyInfoByBatchUid(ctx context.Context, req *statement.GetCopyInfoByBatchUidRequest) (rep *statement.GetCopyInfoByBatchUidRespond, err error) {
|
|
fmt.Println("第一处")
|
|
if rep, err = c.statementLogic.GetCopyInfoByBatchUid(req); err != nil {
|
|
return nil, err
|
|
}
|
|
return rep, nil
|
|
}
|