|
@@ -3,8 +3,10 @@ package handler
|
|
|
import (
|
|
|
"github.com/gin-gonic/gin"
|
|
|
"github.com/sirupsen/logrus"
|
|
|
+ "youngee_b_api/consts"
|
|
|
"youngee_b_api/model/http_model"
|
|
|
"youngee_b_api/service"
|
|
|
+ "youngee_b_api/util"
|
|
|
)
|
|
|
|
|
|
func WrapFindKuaishouProductHandler(ctx *gin.Context) {
|
|
@@ -43,9 +45,8 @@ func (h *FindKuaishouProductHandler) run() {
|
|
|
|
|
|
res, err := service.Product.QueryKuaishouProduct(h.ctx, data)
|
|
|
if err != nil {
|
|
|
- logrus.Info("FindKuaishouProduct fail,req:%+v", h.req)
|
|
|
- h.resp.Status = 40000
|
|
|
- h.resp.Message = err.Error()
|
|
|
+ logrus.WithContext(h.ctx).Errorf("[FindKuaishouProductHandler] error FindKuaishouProductHandler, err:%+v", err)
|
|
|
+ util.HandlerPackErrorResp(h.resp, consts.ErrorInternal, consts.DefaultToast)
|
|
|
return
|
|
|
}
|
|
|
h.resp.Status = 20000
|