fix
This commit is contained in:
parent
be3279ba7e
commit
311ad581cc
|
@ -1,7 +1,6 @@
|
||||||
package logic
|
package logic
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"fmt"
|
|
||||||
"fusenapi/model/gmodel"
|
"fusenapi/model/gmodel"
|
||||||
"fusenapi/utils/auth"
|
"fusenapi/utils/auth"
|
||||||
"fusenapi/utils/basic"
|
"fusenapi/utils/basic"
|
||||||
|
@ -117,12 +116,11 @@ func (l *CartAddLogic) CartAdd(req *types.CartAddReq, userinfo *auth.UserInfo) (
|
||||||
if cartInfo.Id == 0 {
|
if cartInfo.Id == 0 {
|
||||||
err = cartModel.Create(l.ctx, data)
|
err = cartModel.Create(l.ctx, data)
|
||||||
} else {
|
} else {
|
||||||
fmt.Println("2222")
|
|
||||||
err = cartModel.Update(l.ctx, cartInfo.Id, data)
|
err = cartModel.Update(l.ctx, cartInfo.Id, data)
|
||||||
}
|
}
|
||||||
/*if err != nil {
|
if err != nil {
|
||||||
logx.Error(err)
|
logx.Error(err)
|
||||||
return resp.SetStatusWithMessage(basic.CodeServiceErr, "failed to add to cart")
|
return resp.SetStatusWithMessage(basic.CodeServiceErr, "failed to add to cart")
|
||||||
}*/
|
}
|
||||||
return resp.SetStatus(basic.CodeOK)
|
return resp.SetStatus(basic.CodeOK)
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue
Block a user