12345678910111213141516171819202122232425262728293031323334353637383940 |
- package public
- import (
- "app.yhyue.com/moapp/jybase/common"
- "app.yhyue.com/moapp/jybase/encrypt"
- "bp.jydev.jianyu360.cn/ApplicationCenter/medicalField/rpc/medical/medical"
- "context"
- "bp.jydev.jianyu360.cn/ApplicationCenter/medicalField/api/medical/internal/svc"
- "bp.jydev.jianyu360.cn/ApplicationCenter/medicalField/api/medical/internal/types"
- "github.com/zeromicro/go-zero/core/logx"
- )
- type UnclaimedLogic struct {
- logx.Logger
- ctx context.Context
- svcCtx *svc.ServiceContext
- }
- func NewUnclaimedLogic(ctx context.Context, svcCtx *svc.ServiceContext) *UnclaimedLogic {
- return &UnclaimedLogic{
- Logger: logx.WithContext(ctx),
- ctx: ctx,
- svcCtx: svcCtx,
- }
- }
- // Unclaimed 取消认领
- func (l *UnclaimedLogic) Unclaimed(req *types.UnclaimedReq) (resp *types.CommonRes, err error) {
- rs, _ := l.svcCtx.Medical.UnClaimed(l.ctx, &medical.UnclaimedReq{
- UserId: int64(req.UserId),
- Id: common.Int64All(encrypt.SE.Decode4Hex(req.Id)),
- })
- return &types.CommonRes{
- Error_msg: rs.ErrorMsg,
- Error_code: int(rs.ErrorCode),
- }, nil
- }
|