feat: bff resp string to json
CI / changes (push) Successful in 1s
CI / docker-bff (push) Successful in 1s
CI / docker-product (push) Failing after 1s

This commit is contained in:
zzw
2026-08-07 11:57:43 +08:00
parent cf49ec56c7
commit 39fb09e7df
9 changed files with 192 additions and 188 deletions
+29
View File
@@ -0,0 +1,29 @@
package logic
import (
"product/product"
"pkg.local/utils"
)
func okResponse(data string) *product.Response {
return &product.Response{
Code: utils.Ok.Code,
Msg: utils.Ok.Msg,
Data: data,
}
}
func failResponse(err utils.Error) *product.Response {
return &product.Response{
Code: int32(err.GetCode()),
Msg: err.GetMsg(),
}
}
func msgResponse(code int32, msg string) *product.Response {
return &product.Response{
Code: code,
Msg: msg,
}
}