fonchain-artistinfo/cmd/internal/logic/artistinfo_statement.go

96 lines
3.8 KiB
Go
Raw Normal View History

2023-03-16 10:17:12 +00:00
package logic
2023-03-17 10:05:51 +00:00
// 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"
// )
2023-03-16 10:17:12 +00:00
2023-03-17 10:05:51 +00:00
// type StatementServerLogic struct{}
2023-03-16 10:17:12 +00:00
2023-03-17 10:05:51 +00:00
// 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
// }
2023-03-16 10:17:12 +00:00
2023-03-17 10:05:51 +00:00
// func (s *StatementServerLogic) BatchCreateStatementBatch(in *artistinfoStatement.BatchCreateStatementBatchRequest) (*emptypb.Empty, error) {
// return nil, dao.BatchCreateStatementBatch(in)
// }
2023-03-16 10:17:12 +00:00
2023-03-17 10:05:51 +00:00
// func (s *StatementServerLogic) GetStatementBatchList(in *artistinfoStatement.GetStatementBatchListRequest) (res *artistinfoStatement.GetStatementBatchListResponse, err error) {
// datas, total, err := dao.GetStatementBatchList(in)
2023-03-17 06:36:55 +00:00
2023-03-17 10:05:51 +00:00
// 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
// }
2023-03-16 10:17:12 +00:00
2023-03-17 10:05:51 +00:00
// 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
// }
2023-03-16 10:17:12 +00:00
2023-03-17 10:05:51 +00:00
// func (s *StatementServerLogic) BatchCreateStatementDetail(in *artistinfoStatement.BatchCreateStatementDetailRequest) (*emptypb.Empty, error) {
// return nil, dao.BatchCreateStatementDetail(in)
// }
2023-03-17 06:36:55 +00:00
2023-03-17 10:05:51 +00:00
// 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
// }
2023-03-16 10:17:12 +00:00
2023-03-17 10:05:51 +00:00
// func (s *StatementServerLogic) GetStatementBatchTimeMenus(in *artistinfoStatement.GetStatementBatchListRequest) (res *artistinfoStatement.GetStatementBatchTimeMenusResponse, err error) {
// res = &artistinfoStatement.GetStatementBatchTimeMenusResponse{}
// res.Data, err = dao.GetStatementBatchTimeMenus(in)
// return
// }