1234567891011121314151617181920212223242526272829303132333435363738394041424344454647 |
- package logic
- import (
- "context"
- "bp.jydev.jianyu360.cn/BaseService/biService/api/internal/svc"
- "bp.jydev.jianyu360.cn/BaseService/biService/api/internal/types"
- "bp.jydev.jianyu360.cn/BaseService/biService/rpc/biservice"
- "github.com/gogf/gf/v2/util/gconv"
- "github.com/zeromicro/go-zero/core/logx"
- )
- type DistributeClueShowLogic struct {
- logx.Logger
- ctx context.Context
- svcCtx *svc.ServiceContext
- }
- func NewDistributeClueShowLogic(ctx context.Context, svcCtx *svc.ServiceContext) *DistributeClueShowLogic {
- return &DistributeClueShowLogic{
- Logger: logx.WithContext(ctx),
- ctx: ctx,
- svcCtx: svcCtx,
- }
- }
- func (l *DistributeClueShowLogic) DistributeClueShow(req *types.DistributeClueShowReq) (resp *types.BiResp, err error) {
- // todo: add your logic here and delete this line
- datas := []*biservice.DistributeClueShows{}
- for _, v := range req.Datas {
- data := &biservice.DistributeClueShows{
- PositionId: gconv.Int64(v["positionId"]),
- DistributedCount: gconv.Int64(v["distributedCount"]),
- }
- datas = append(datas, data)
- }
- res, err := l.svcCtx.BiServiceRpc.DistributeClueShow(l.ctx, &biservice.DistributeClueShowReq{
- DataType: req.DataType,
- ClueIdList: req.ClueIdList,
- PositionId: req.PositionId,
- Datas: datas,
- IsTask: req.IsTask,
- UpdatePositionID: req.UpdatePositionID,
- })
- return &types.BiResp{Error_code: res.ErrorCode, Error_msg: res.ErrorMsg, Data: res.Data}, err
- }
|