|
@@ -2,13 +2,12 @@ package public
|
|
|
|
|
|
import (
|
|
|
"app.yhyue.com/moapp/jybase/encrypt"
|
|
|
+ "bp.jydev.jianyu360.cn/ApplicationCenter/medicalField/api/medical/internal/svc"
|
|
|
+ "bp.jydev.jianyu360.cn/ApplicationCenter/medicalField/api/medical/internal/types"
|
|
|
"bp.jydev.jianyu360.cn/ApplicationCenter/medicalField/entity"
|
|
|
"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"
|
|
|
)
|
|
|
|
|
@@ -26,6 +25,7 @@ func NewDistributorUnclaimedLogic(ctx context.Context, svcCtx *svc.ServiceContex
|
|
|
}
|
|
|
}
|
|
|
|
|
|
+// DistributorUnclaimed 经销商取消认领
|
|
|
func (l *DistributorUnclaimedLogic) DistributorUnclaimed(req *types.ClaimReq) (resp *types.ClaimResp, err error) {
|
|
|
rs, err := l.svcCtx.Medical.UnClaimed(l.ctx, &medical.ClaimReq{
|
|
|
UserId: int64(req.UserId),
|
|
@@ -34,14 +34,9 @@ func (l *DistributorUnclaimedLogic) DistributorUnclaimed(req *types.ClaimReq) (r
|
|
|
AppId: req.AppId,
|
|
|
})
|
|
|
if err != nil || rs == nil {
|
|
|
- errMsg := ""
|
|
|
- if err == entity.RepeatErr || err == entity.OperateErr || err == entity.EntNoFoundErr {
|
|
|
- errMsg = err.Error()
|
|
|
- } else {
|
|
|
- errMsg = entity.OperateErr.Error()
|
|
|
- }
|
|
|
+ logx.Errorf("%v: req:%v err:%v ", entity.FunctionDistributorUnclaimed, req, err)
|
|
|
return &types.ClaimResp{
|
|
|
- Error_msg: errMsg,
|
|
|
+ Error_msg: entity.OperateErr.Error(),
|
|
|
Error_code: entity.ERRORCODE,
|
|
|
ResourceNum: 0,
|
|
|
ResourceIds: 0,
|