123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354 |
- package logic
- import (
- "context"
- "fmt"
- "bp.jydev.jianyu360.cn/ApplicationCenter/threeMarket/rpc/pb"
- "bp.jydev.jianyu360.cn/ApplicationCenter/threeMarket/api/internal/svc"
- "bp.jydev.jianyu360.cn/ApplicationCenter/threeMarket/api/internal/types"
- . "bp.jydev.jianyu360.cn/ApplicationCenter/threeMarket/public/service"
- "github.com/zeromicro/go-zero/core/logx"
- )
- type AssessAddLogic struct {
- logx.Logger
- ctx context.Context
- svcCtx *svc.ServiceContext
- }
- func NewAssessAddLogic(ctx context.Context, svcCtx *svc.ServiceContext) *AssessAddLogic {
- return &AssessAddLogic{
- Logger: logx.WithContext(ctx),
- ctx: ctx,
- svcCtx: svcCtx,
- }
- }
- func (l *AssessAddLogic) AssessAdd(req *types.AssessAddReq) (resp *types.Reply, err error) {
- // todo: add your logic here and delete this line
- resp = &types.Reply{}
- threeMarketResp, err := ThreemarketRpc.AssessAdd(l.ctx, &pb.AssessAddReq{
- Appid: req.AppId,
- BaseUserId: req.Base_user_id,
- GoodsCode: req.Goods_code,
- ServiceAttitude: req.Service_attitude,
- WorkProgress: req.Work_progress,
- Impression: req.Impression,
- CompletionQuality: req.Completion_quality,
- Describe: req.Describe,
- Score: req.Score,
- })
- if threeMarketResp.ErrorMsg != "" {
- resp.Error_msg = threeMarketResp.ErrorMsg
- resp.Error_code = -1
- l.Error(fmt.Sprintf("%+v", req), resp.Error_msg)
- }
- resp.Data = map[string]interface{}{
- "status": threeMarketResp.Status,
- }
- return
- }
|