123456789101112131415161718192021222324252627282930313233343536373839404142434445464748 |
- package logic
- import (
- "context"
- "fmt"
- "bp.jydev.jianyu360.cn/ApplicationCenter/threeMarket/public/entity"
- "bp.jydev.jianyu360.cn/ApplicationCenter/threeMarket/rpc/internal/svc"
- "bp.jydev.jianyu360.cn/ApplicationCenter/threeMarket/rpc/pb"
- "github.com/zeromicro/go-zero/core/logx"
- )
- type AssessListLogic struct {
- ctx context.Context
- svcCtx *svc.ServiceContext
- logx.Logger
- }
- func NewAssessListLogic(ctx context.Context, svcCtx *svc.ServiceContext) *AssessListLogic {
- return &AssessListLogic{
- ctx: ctx,
- svcCtx: svcCtx,
- Logger: logx.WithContext(ctx),
- }
- }
- // 评价列表
- func (l *AssessListLogic) AssessList(in *pb.AssessListReq) (*pb.AssessListResp, error) {
- // todo: add your logic here and delete this line
- resp := &pb.AssessListResp{}
- tripartite_goods_assess := &entity.Tripartite_goods_assess_struct{
- Appid: in.Appid,
- Goods_code: in.GoodsCode,
- }
- list, assess, err := tripartite_goods_assess.List(in.PageNum, in.PageSize)
- if err != nil {
- l.Error(fmt.Sprintf("%+v", in), err.Error())
- resp.ErrorMsg = err.Error()
- resp.ErrorCode = -1
- } else {
- resp.Data = list
- resp.Assess = assess
- }
- return resp, nil
- }
|