|
@@ -38,19 +38,18 @@ func (l *AppointmentAddLogic) AppointmentAdd(req *types.AppointmentAddReq) (resp
|
|
|
UseProductType: req.UseProductType,
|
|
|
ProductId: req.ProductId,
|
|
|
})
|
|
|
- if err != nil {
|
|
|
+ if err != nil || marketingResp == nil {
|
|
|
l.Error(fmt.Sprintf("%+v", req), resp.Error_msg)
|
|
|
resp.Error_code, resp.Error_msg = -1, "预约失败"
|
|
|
+ return
|
|
|
}
|
|
|
- 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{}{
|
|
|
- "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
|
|
|
}
|