package logic import ( "bp.jydev.jianyu360.cn/ApplicationCenter/medicalField/entity" "context" "bp.jydev.jianyu360.cn/ApplicationCenter/medicalField/rpc/medical/internal/svc" "bp.jydev.jianyu360.cn/ApplicationCenter/medicalField/rpc/medical/medical" "github.com/zeromicro/go-zero/core/logx" ) type UnClaimedLogic struct { ctx context.Context svcCtx *svc.ServiceContext logx.Logger } func NewUnClaimedLogic(ctx context.Context, svcCtx *svc.ServiceContext) *UnClaimedLogic { return &UnClaimedLogic{ ctx: ctx, svcCtx: svcCtx, Logger: logx.WithContext(ctx), } } // UnClaimed 取消认领(经销商/医疗机构) func (l *UnClaimedLogic) UnClaimed(in *medical.UnclaimedReq) (*medical.CommonResp, error) { rs := l.svcCtx.EntClaimSrv.Unclaimed(int(in.Id), int(in.UserId)) if !rs { return &medical.CommonResp{ ErrorMsg: "操作失败", ErrorCode: entity.ERRORCODE, }, nil } return &medical.CommonResp{ ErrorMsg: "", ErrorCode: entity.SUCCESSCODE, }, nil }