|
@@ -27,7 +27,11 @@ func NewIsAppointmentLogic(ctx context.Context, svcCtx *svc.ServiceContext) *IsA
|
|
|
|
|
|
func (l *IsAppointmentLogic) IsAppointment(req *types.IsAppointmentReq) (resp *types.Reply, err error) {
|
|
func (l *IsAppointmentLogic) IsAppointment(req *types.IsAppointmentReq) (resp *types.Reply, err error) {
|
|
// todo: add your logic here and delete this line
|
|
// todo: add your logic here and delete this line
|
|
- resp = &types.Reply{}
|
|
|
|
|
|
+ resp = &types.Reply{
|
|
|
|
+ Data: map[string]interface{}{
|
|
|
|
+ "status": -1,
|
|
|
|
+ },
|
|
|
|
+ }
|
|
marketingResp, err := service.MarketingRpc.IsAppointment(l.ctx, &pb.IsAppointmentReq{
|
|
marketingResp, err := service.MarketingRpc.IsAppointment(l.ctx, &pb.IsAppointmentReq{
|
|
AppId: req.AppId,
|
|
AppId: req.AppId,
|
|
UserId: req.UserId,
|
|
UserId: req.UserId,
|
|
@@ -35,18 +39,16 @@ func (l *IsAppointmentLogic) IsAppointment(req *types.IsAppointmentReq) (resp *t
|
|
})
|
|
})
|
|
if err != nil {
|
|
if err != nil {
|
|
l.Error(fmt.Sprintf("%+v", req), resp.Error_msg)
|
|
l.Error(fmt.Sprintf("%+v", req), resp.Error_msg)
|
|
|
|
+ }
|
|
|
|
+ if marketingResp != nil {
|
|
|
|
+ if marketingResp.ErrorMsg != "" {
|
|
|
|
+ resp.Error_msg = marketingResp.ErrorMsg
|
|
|
|
+ resp.Error_code = -1
|
|
|
|
+ l.Error(fmt.Sprintf("%+v", req), resp.Error_msg)
|
|
|
|
+ }
|
|
resp.Data = map[string]interface{}{
|
|
resp.Data = map[string]interface{}{
|
|
- "status": -1,
|
|
|
|
|
|
+ "status": marketingResp.Status,
|
|
}
|
|
}
|
|
}
|
|
}
|
|
-
|
|
|
|
- if marketingResp.ErrorMsg != "" {
|
|
|
|
- resp.Error_msg = marketingResp.ErrorMsg
|
|
|
|
- resp.Error_code = -1
|
|
|
|
- l.Error(fmt.Sprintf("%+v", req), resp.Error_msg)
|
|
|
|
- }
|
|
|
|
- resp.Data = map[string]interface{}{
|
|
|
|
- "status": marketingResp.Status,
|
|
|
|
- }
|
|
|
|
return
|
|
return
|
|
}
|
|
}
|