|
|
|
@ -11,7 +11,6 @@ import (
|
|
|
|
|
"github.com/lithammer/shortuuid/v3"
|
|
|
|
|
"github.com/opentracing/opentracing-go"
|
|
|
|
|
"go-micro.dev/v4/client"
|
|
|
|
|
"go-micro.dev/v4/errors"
|
|
|
|
|
"go-micro.dev/v4/web"
|
|
|
|
|
"goproduct/common"
|
|
|
|
|
"goproduct/proto"
|
|
|
|
@ -205,7 +204,8 @@ func main() {
|
|
|
|
|
}
|
|
|
|
|
resp, err = AddCartClient.AddCart(context.TODO(), req)
|
|
|
|
|
CartId = resp.ID
|
|
|
|
|
err = errors.New("400", "测试异常", 400)
|
|
|
|
|
//测试异常
|
|
|
|
|
//err = errors.New("400", "测试异常", 400)
|
|
|
|
|
if err != nil {
|
|
|
|
|
log.Println("/addCart err ", err)
|
|
|
|
|
c.JSON(http.StatusOK, gin.H{"dtm_reslut": "FAILURE", "Message": "新增购物车失败!"})
|
|
|
|
|