Compare commits

..

No commits in common. "8629decdc0435c0e48d0af26e8eb65ab389b60fe" and "272d59af4cc2b441c293a07b7ed76693a9e9292b" have entirely different histories.

7 changed files with 1295 additions and 849 deletions

File diff suppressed because it is too large Load Diff

View File

@ -7,8 +7,8 @@ import (
fmt "fmt"
math "math"
proto "github.com/golang/protobuf/proto"
_ "github.com/mwitkow/go-proto-validators"
_ "google.golang.org/protobuf/types/descriptorpb"
_ "github.com/mwitkow/go-proto-validators"
github_com_mwitkow_go_proto_validators "github.com/mwitkow/go-proto-validators"
)
@ -89,6 +89,13 @@ func (this *BundleDetailResponseV2) Validate() error {
return github_com_mwitkow_go_proto_validators.FieldError("Bundle", err)
}
}
for _, item := range this.SelectValueAddService {
if item != nil {
if err := github_com_mwitkow_go_proto_validators.CallValidatorIfExists(item); err != nil {
return github_com_mwitkow_go_proto_validators.FieldError("SelectValueAddService", err)
}
}
}
return nil
}
func (this *OrderRecord) Validate() error {
@ -200,9 +207,9 @@ func (this *ValueAddServiceDetailRequest) Validate() error {
return nil
}
func (this *ValueAddServiceDetailResponse) Validate() error {
if this.ValueAddService != nil {
if err := github_com_mwitkow_go_proto_validators.CallValidatorIfExists(this.ValueAddService); err != nil {
return github_com_mwitkow_go_proto_validators.FieldError("ValueAddService", err)
if this.ValueAddServiceLang != nil {
if err := github_com_mwitkow_go_proto_validators.CallValidatorIfExists(this.ValueAddServiceLang); err != nil {
return github_com_mwitkow_go_proto_validators.FieldError("ValueAddServiceLang", err)
}
}
return nil

View File

@ -1,7 +1,7 @@
// Code generated by protoc-gen-go-triple. DO NOT EDIT.
// versions:
// - protoc-gen-go-triple v1.0.8
// - protoc v5.29.2
// - protoc v3.20.3
// source: pb/bundle.proto
package bundle

View File

@ -4,7 +4,6 @@ import (
"fonchain-fiee/pkg/middleware"
"fonchain-fiee/pkg/service"
"fonchain-fiee/pkg/service/bundle"
"github.com/gin-gonic/gin"
)
@ -22,20 +21,11 @@ func BundleRouter(r *gin.RouterGroup) {
bundleClientRoute.POST("remove", bundle.DeleteBundle)
bundleClientRoute.POST("bundle-list", bundle.BundleList)
}
bundleClientRouteV2 := bundleRoute.Group("system/v2")
bundleClientRouteV2.POST("save", bundle.SaveBundleV2)
bundleClientRouteV2.POST("update/shelfStatus", bundle.HandShelf)
bundleAppRoute = bundleAppRoute.Group("common")
{
bundleAppRoute.POST("bundle-list", bundle.BundleList)
}
bundleAppRouteV2 := bundleRoute.Group("common/v2")
{
bundleAppRouteV2.POST("bundle-list", bundle.BundleListV2)
bundleAppRouteV2.POST("bundle-detail", bundle.BundleDetailV2)
}
}

View File

@ -23,12 +23,6 @@ func ValueAddBundleRouter(r *gin.RouterGroup) {
bundleClientRoute.POST("list", bundle.ValueAddBundleList)
bundleClientRoute.POST("detail", bundle.ValueAddBundleDetail)
}
bundleClientRouteV2 := valueAddBundleRoute.Group("system/v2")
{
bundleClientRouteV2.POST("save", bundle.SaveValueAddService)
bundleClientRouteV2.POST("list", bundle.ValueAddServiceList)
bundleClientRouteV2.POST("detail", bundle.ValueAddServiceDetail)
}
valueAddBundleAppRoute = valueAddBundleAppRoute.Group("system")
{

View File

@ -77,66 +77,3 @@ func BundleList(c *gin.Context) {
service.Success(c, res)
}
func SaveBundleV2(c *gin.Context) {
var req bundle.BundleProfile
if err := c.ShouldBindBodyWith(&req, binding.JSON); err != nil {
service.Error(c, err)
return
}
res, err := service.BundleProvider.SaveBundle(context.Background(), &req)
if err != nil {
service.Error(c, err)
return
}
service.Success(c, res)
}
func BundleListV2(c *gin.Context) {
var req bundle.BundleListRequest
if err := c.ShouldBindBodyWith(&req, binding.JSON); err != nil {
service.Error(c, err)
return
}
res, err := service.BundleProvider.BundleListV2(context.Background(), &req)
if err != nil {
service.Error(c, err)
return
}
service.Success(c, res)
}
func BundleDetailV2(c *gin.Context) {
var req bundle.BundleDetailRequest
if err := c.ShouldBindBodyWith(&req, binding.JSON); err != nil {
service.Error(c, err)
return
}
res, err := service.BundleProvider.BundleDetailV2(context.Background(), &req)
if err != nil {
service.Error(c, err)
return
}
service.Success(c, res)
}
func HandShelf(c *gin.Context) {
var req bundle.HandShelfRequest
if err := c.ShouldBindBodyWith(&req, binding.JSON); err != nil {
service.Error(c, err)
return
}
res, err := service.BundleProvider.HandShelf(context.Background(), &req)
if err != nil {
service.Error(c, err)
return
}
service.Success(c, res)
}

View File

@ -67,49 +67,3 @@ func ValueAddBundleDetail(c *gin.Context) {
service.Success1(c, res.Msg, res)
}
func SaveValueAddService(c *gin.Context) {
var req bundle.ValueAddServiceLang
if err := c.ShouldBindBodyWith(&req, binding.JSON); err != nil {
service.Error1(c, err)
return
}
res, err := service.BundleProvider.SaveValueAddService(context.Background(), &req)
if err != nil {
service.Error(c, err)
return
}
service.Success(c, res)
}
func ValueAddServiceList(c *gin.Context) {
var req bundle.ValueAddServiceListRequest
if err := c.ShouldBindBodyWith(&req, binding.JSON); err != nil {
service.Error1(c, err)
return
}
res, err := service.BundleProvider.ValueAddServiceList(context.Background(), &req)
if err != nil {
service.Error(c, err)
return
}
service.Success(c, res)
}
func ValueAddServiceDetail(c *gin.Context) {
var req bundle.ValueAddServiceDetailRequest
if err := c.ShouldBindBodyWith(&req, binding.JSON); err != nil {
service.Error1(c, err)
return
}
res, err := service.BundleProvider.ValueAddServiceDetail(context.Background(), &req)
if err != nil {
service.Error(c, err)
return
}
service.Success(c, res)
}