1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162 |
- package logic
- import (
- "app.yhyue.com/moapp/jybase/common"
- "context"
- "jyBXBase/api/internal/svc"
- "jyBXBase/api/internal/types"
- "jyBXBase/rpc/bxbase"
- "log"
- "net/http"
- "time"
- "github.com/zeromicro/go-zero/core/logx"
- )
- type NewestBiddingLogic struct {
- logx.Logger
- ctx context.Context
- svcCtx *svc.ServiceContext
- r *http.Request
- }
- func NewNewestBiddingLogic(ctx context.Context, svcCtx *svc.ServiceContext, r *http.Request) *NewestBiddingLogic {
- return &NewestBiddingLogic{
- Logger: logx.WithContext(ctx),
- ctx: ctx,
- svcCtx: svcCtx,
- r: r,
- }
- }
- func (l *NewestBiddingLogic) NewestBidding(req *types.NewestReq) (resp *types.CommonRes, err error) {
- t := time.Now()
- res, err0 := l.svcCtx.Bxbase.NewestBidding(l.ctx, &bxbase.NewestBiddingReq{
- City: req.City,
- IsSearch: req.IsSearch,
- EntId: req.EntId,
- EntUserId: req.EntUserId,
- PositionId: req.PositionId,
- PositionType: req.PositionType,
- AppId: req.AppId,
- MgoUserId: req.MgoUserId,
- AccountId: req.AccountId,
- UserId: req.UserId,
- NewUserId: req.NewUserId,
- EntAccountId: req.EntAccountId,
- Phone: req.Phone,
- })
- log.Println(req.PositionId, "----", req.Phone, "-查询耗时:-", time.Since(t).Seconds())
- if err0 != nil {
- return &types.CommonRes{
- Err_code: -1,
- Err_msg: "错误",
- Data: nil,
- }, nil
- }
- return &types.CommonRes{
- Err_code: common.IntAll(res.ErrCode),
- Err_msg: res.ErrMsg,
- Data: res.Data,
- }, nil
- }
|