123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354 |
- 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 AssessAddLogic struct {
- ctx context.Context
- svcCtx *svc.ServiceContext
- logx.Logger
- }
- func NewAssessAddLogic(ctx context.Context, svcCtx *svc.ServiceContext) *AssessAddLogic {
- return &AssessAddLogic{
- ctx: ctx,
- svcCtx: svcCtx,
- Logger: logx.WithContext(ctx),
- }
- }
- // 提交评价
- func (l *AssessAddLogic) AssessAdd(in *pb.AssessAddReq) (*pb.Resp, error) {
- // todo: add your logic here and delete this line
- resp := &pb.Resp{}
- tripartite_goods_assess := &entity.Tripartite_goods_assess_struct{
- Appid: in.Appid,
- User_id: in.BaseUserId,
- Goods_code: in.GoodsCode,
- Score: in.Score,
- Service_attitude: in.ServiceAttitude,
- Work_progress: in.WorkProgress,
- Completion_quality: in.CompletionQuality,
- Impression: in.Impression,
- Content: in.Describe,
- }
- status, err := tripartite_goods_assess.Add()
- if err != nil {
- l.Error(fmt.Sprintf("%+v", in), err.Error())
- resp.ErrorMsg = err.Error()
- resp.ErrorCode = -1
- }
- resp.Status = status
- return resp, nil
- }
|