Compare commits
11 Commits
Author | SHA1 | Date | |
---|---|---|---|
9402bad9fd | |||
637fc47188 | |||
1bab9a17e6 | |||
f36758d8ac | |||
ba65fbe5b7 | |||
b71fef10ef | |||
78246a5b2a | |||
7b228e0c03 | |||
9120e6acfd | |||
463404d774 | |||
99f4ca986a |
16
.gitignore
vendored
16
.gitignore
vendored
@ -1,12 +1,17 @@
|
|||||||
|
.gitignore
|
||||||
|
.idea
|
||||||
|
.scannerwork
|
||||||
|
.vscode
|
||||||
# local env files
|
# local env files
|
||||||
.env.local
|
.env.local
|
||||||
.env.*.local
|
.env.*.local
|
||||||
|
|
||||||
# Log files
|
# Log files
|
||||||
*.log
|
npm-debug.log*
|
||||||
|
yarn-debug.log*
|
||||||
|
yarn-error.log*
|
||||||
|
|
||||||
.idea
|
# Editor directories and files
|
||||||
.vscode
|
|
||||||
*.suo
|
*.suo
|
||||||
*.ntvs*
|
*.ntvs*
|
||||||
*.njsproj
|
*.njsproj
|
||||||
@ -27,4 +32,7 @@
|
|||||||
# Output of the go coverage tool, specifically when used with LiteIDE
|
# Output of the go coverage tool, specifically when used with LiteIDE
|
||||||
*.out
|
*.out
|
||||||
|
|
||||||
/cmd/runtime
|
|
||||||
|
/cmd/logs/*.log
|
||||||
|
/cmd/runtime/log/*.log
|
||||||
|
/build/*
|
File diff suppressed because it is too large
Load Diff
@ -7,8 +7,8 @@ import (
|
|||||||
fmt "fmt"
|
fmt "fmt"
|
||||||
math "math"
|
math "math"
|
||||||
proto "github.com/golang/protobuf/proto"
|
proto "github.com/golang/protobuf/proto"
|
||||||
_ "google.golang.org/protobuf/types/descriptorpb"
|
|
||||||
_ "github.com/mwitkow/go-proto-validators"
|
_ "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 "github.com/mwitkow/go-proto-validators"
|
||||||
)
|
)
|
||||||
|
|
||||||
@ -17,10 +17,81 @@ var _ = proto.Marshal
|
|||||||
var _ = fmt.Errorf
|
var _ = fmt.Errorf
|
||||||
var _ = math.Inf
|
var _ = math.Inf
|
||||||
|
|
||||||
|
func (this *OrderInfoByOrderNoRequest) Validate() error {
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
func (this *OrderInfoByOrderNoResp) Validate() error {
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
func (this *OrderCreateRecord) Validate() error {
|
||||||
|
for _, item := range this.AddRecords {
|
||||||
|
if item != nil {
|
||||||
|
if err := github_com_mwitkow_go_proto_validators.CallValidatorIfExists(item); err != nil {
|
||||||
|
return github_com_mwitkow_go_proto_validators.FieldError("AddRecords", err)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
func (this *OrderCreateAddRecord) Validate() error {
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
func (this *OrderRecordsRequestV2) Validate() error {
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
func (this *OrderRecordsResponseV2) Validate() error {
|
||||||
|
for _, item := range this.BundleInfo {
|
||||||
|
if item != nil {
|
||||||
|
if err := github_com_mwitkow_go_proto_validators.CallValidatorIfExists(item); err != nil {
|
||||||
|
return github_com_mwitkow_go_proto_validators.FieldError("BundleInfo", err)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
func (this *OrderBundleRecordInfo) Validate() error {
|
||||||
|
for _, item := range this.AddBundleInfo {
|
||||||
|
if item != nil {
|
||||||
|
if err := github_com_mwitkow_go_proto_validators.CallValidatorIfExists(item); err != nil {
|
||||||
|
return github_com_mwitkow_go_proto_validators.FieldError("AddBundleInfo", err)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
func (this *OrderAddBundleRecordInfo) Validate() error {
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
func (this *PackagePriceAndTimeResponse) Validate() error {
|
||||||
|
return nil
|
||||||
|
}
|
||||||
func (this *CommonResponse) Validate() error {
|
func (this *CommonResponse) Validate() error {
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
func (this *BundleProfile) Validate() error {
|
func (this *BundleProfile) Validate() error {
|
||||||
|
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)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
for _, item := range this.BundleProfileLang {
|
||||||
|
if item != nil {
|
||||||
|
if err := github_com_mwitkow_go_proto_validators.CallValidatorIfExists(item); err != nil {
|
||||||
|
return github_com_mwitkow_go_proto_validators.FieldError("BundleProfileLang", err)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
func (this *BundleProfileLang) Validate() error {
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
func (this *SaveResponse) Validate() error {
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
func (this *SelectValueAddService) Validate() error {
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
func (this *DelBundleRequest) Validate() error {
|
func (this *DelBundleRequest) Validate() error {
|
||||||
@ -42,6 +113,9 @@ func (this *BundleListResponse) Validate() error {
|
|||||||
func (this *BundleDetailRequest) Validate() error {
|
func (this *BundleDetailRequest) Validate() error {
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
func (this *HandShelfRequest) Validate() error {
|
||||||
|
return nil
|
||||||
|
}
|
||||||
func (this *BundleDetailResponse) Validate() error {
|
func (this *BundleDetailResponse) Validate() error {
|
||||||
if this.Bundle != nil {
|
if this.Bundle != nil {
|
||||||
if err := github_com_mwitkow_go_proto_validators.CallValidatorIfExists(this.Bundle); err != nil {
|
if err := github_com_mwitkow_go_proto_validators.CallValidatorIfExists(this.Bundle); err != nil {
|
||||||
@ -50,7 +124,38 @@ func (this *BundleDetailResponse) Validate() error {
|
|||||||
}
|
}
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
func (this *BundleDetailResponseV2) Validate() error {
|
||||||
|
if this.Bundle != nil {
|
||||||
|
if err := github_com_mwitkow_go_proto_validators.CallValidatorIfExists(this.Bundle); err != nil {
|
||||||
|
return github_com_mwitkow_go_proto_validators.FieldError("Bundle", err)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return nil
|
||||||
|
}
|
||||||
func (this *OrderRecord) Validate() error {
|
func (this *OrderRecord) Validate() error {
|
||||||
|
for _, item := range this.PriceOptionsInfo {
|
||||||
|
if item != nil {
|
||||||
|
if err := github_com_mwitkow_go_proto_validators.CallValidatorIfExists(item); err != nil {
|
||||||
|
return github_com_mwitkow_go_proto_validators.FieldError("PriceOptionsInfo", err)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
func (this *OrderAddRecord) Validate() error {
|
||||||
|
for _, item := range this.AddPriceOptionsList {
|
||||||
|
if item != nil {
|
||||||
|
if err := github_com_mwitkow_go_proto_validators.CallValidatorIfExists(item); err != nil {
|
||||||
|
return github_com_mwitkow_go_proto_validators.FieldError("AddPriceOptionsList", err)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
func (this *AddPriceOptionsInfo) Validate() error {
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
func (this *PriceOptionsInfo) Validate() error {
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
func (this *OrderRecordsRequest) Validate() error {
|
func (this *OrderRecordsRequest) Validate() error {
|
||||||
@ -119,3 +224,163 @@ func (this *ValueAddBundleDetailResponse) Validate() error {
|
|||||||
func (this *FinancialConfirmationRequest) Validate() error {
|
func (this *FinancialConfirmationRequest) Validate() error {
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
func (this *ValueAddService) Validate() error {
|
||||||
|
for _, item := range this.ServiceLang {
|
||||||
|
if item != nil {
|
||||||
|
if err := github_com_mwitkow_go_proto_validators.CallValidatorIfExists(item); err != nil {
|
||||||
|
return github_com_mwitkow_go_proto_validators.FieldError("ServiceLang", err)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
func (this *ValueAddServiceLang) Validate() error {
|
||||||
|
for _, item := range this.Options {
|
||||||
|
if item != nil {
|
||||||
|
if err := github_com_mwitkow_go_proto_validators.CallValidatorIfExists(item); err != nil {
|
||||||
|
return github_com_mwitkow_go_proto_validators.FieldError("Options", err)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
func (this *ValueAddPriceOptions) Validate() error {
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
func (this *ValueAddServiceListRequest) Validate() error {
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
func (this *ValueAddServiceListResponse) Validate() error {
|
||||||
|
for _, item := range this.ValueAddServiceList {
|
||||||
|
if item != nil {
|
||||||
|
if err := github_com_mwitkow_go_proto_validators.CallValidatorIfExists(item); err != nil {
|
||||||
|
return github_com_mwitkow_go_proto_validators.FieldError("ValueAddServiceList", err)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
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)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
func (this *CalculatePriceRequest) Validate() error {
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
func (this *CalculatePriceResponse) Validate() error {
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
func (this *BundleExtendRequest) Validate() error {
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
func (this *BundleExtendResponse) Validate() error {
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
func (this *BundleExtendRecordsListRequest) Validate() error {
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
func (this *BundleExtendRecordsListResponse) Validate() error {
|
||||||
|
for _, item := range this.Data {
|
||||||
|
if item != nil {
|
||||||
|
if err := github_com_mwitkow_go_proto_validators.CallValidatorIfExists(item); err != nil {
|
||||||
|
return github_com_mwitkow_go_proto_validators.FieldError("Data", err)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
func (this *BundleExtendRecordItem) Validate() error {
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
func (this *GetBundleBalanceListReq) Validate() error {
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
func (this *GetBundleBalanceReq) Validate() error {
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
func (this *BundleBalanceItem) Validate() error {
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
func (this *GetBundleBalanceResp) Validate() error {
|
||||||
|
for _, item := range this.Data {
|
||||||
|
if item != nil {
|
||||||
|
if err := github_com_mwitkow_go_proto_validators.CallValidatorIfExists(item); err != nil {
|
||||||
|
return github_com_mwitkow_go_proto_validators.FieldError("Data", err)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
func (this *GetBundleBalanceListResp) Validate() error {
|
||||||
|
for _, item := range this.Data {
|
||||||
|
if item != nil {
|
||||||
|
if err := github_com_mwitkow_go_proto_validators.CallValidatorIfExists(item); err != nil {
|
||||||
|
return github_com_mwitkow_go_proto_validators.FieldError("Data", err)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
func (this *CreateBundleBalanceReq) Validate() error {
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
func (this *CreateBundleBalanceResp) Validate() error {
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
func (this *AddBundleBalanceReq) Validate() error {
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
func (this *AddBundleBalanceResp) Validate() error {
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
func (this *GetUsedRecordListReq) Validate() error {
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
func (this *GetUsedRecordListResp) Validate() error {
|
||||||
|
for _, item := range this.Data {
|
||||||
|
if item != nil {
|
||||||
|
if err := github_com_mwitkow_go_proto_validators.CallValidatorIfExists(item); err != nil {
|
||||||
|
return github_com_mwitkow_go_proto_validators.FieldError("Data", err)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
func (this *WorkCastItem) Validate() error {
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
func (this *GetImageWorkDetailReq) Validate() error {
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
func (this *GetVedioWorkDetailReq) Validate() error {
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
func (this *GetImageWorkDetailResp) Validate() error {
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
func (this *GetVedioeWorkDetailResp) Validate() error {
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
func (this *ToBeComfirmedWorksReq) Validate() error {
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
func (this *WorkItem) Validate() error {
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
func (this *ToBeComfirmedWorksResp) Validate() error {
|
||||||
|
for _, item := range this.Data {
|
||||||
|
if item != nil {
|
||||||
|
if err := github_com_mwitkow_go_proto_validators.CallValidatorIfExists(item); err != nil {
|
||||||
|
return github_com_mwitkow_go_proto_validators.FieldError("Data", err)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
File diff suppressed because it is too large
Load Diff
@ -4,6 +4,7 @@ import (
|
|||||||
"fonchain-fiee/pkg/middleware"
|
"fonchain-fiee/pkg/middleware"
|
||||||
"fonchain-fiee/pkg/service"
|
"fonchain-fiee/pkg/service"
|
||||||
"fonchain-fiee/pkg/service/bundle"
|
"fonchain-fiee/pkg/service/bundle"
|
||||||
|
|
||||||
"github.com/gin-gonic/gin"
|
"github.com/gin-gonic/gin"
|
||||||
)
|
)
|
||||||
|
|
||||||
@ -21,10 +22,21 @@ func BundleRouter(r *gin.RouterGroup) {
|
|||||||
bundleClientRoute.POST("remove", bundle.DeleteBundle)
|
bundleClientRoute.POST("remove", bundle.DeleteBundle)
|
||||||
bundleClientRoute.POST("bundle-list", bundle.BundleList)
|
bundleClientRoute.POST("bundle-list", bundle.BundleList)
|
||||||
}
|
}
|
||||||
|
bundleClientRouteV2 := bundleRoute.Group("system/v2")
|
||||||
bundleAppRoute = bundleAppRoute.Group("common")
|
|
||||||
{
|
{
|
||||||
bundleAppRoute.POST("bundle-list", bundle.BundleList)
|
bundleClientRouteV2.POST("save", bundle.SaveBundleV2)
|
||||||
|
bundleClientRouteV2.POST("update/shelfStatus", bundle.HandShelf)
|
||||||
|
bundleClientRouteV2.POST("bundle-list", bundle.BundleListV2)
|
||||||
|
bundleClientRouteV2.POST("bundle-detail", bundle.BundleDetailV2)
|
||||||
|
}
|
||||||
|
bundleAppRouteV1 := bundleAppRoute.Group("common")
|
||||||
|
{
|
||||||
|
bundleAppRouteV1.POST("bundle-list", bundle.BundleList)
|
||||||
|
}
|
||||||
|
bundleAppRouteV2 := bundleAppRoute.Group("app/system/v2")
|
||||||
|
{
|
||||||
|
bundleAppRouteV2.POST("bundle-list", bundle.BundleListV2)
|
||||||
|
bundleAppRouteV2.POST("bundle-detail", bundle.BundleDetailV2)
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -23,10 +23,22 @@ func ValueAddBundleRouter(r *gin.RouterGroup) {
|
|||||||
bundleClientRoute.POST("list", bundle.ValueAddBundleList)
|
bundleClientRoute.POST("list", bundle.ValueAddBundleList)
|
||||||
bundleClientRoute.POST("detail", bundle.ValueAddBundleDetail)
|
bundleClientRoute.POST("detail", bundle.ValueAddBundleDetail)
|
||||||
}
|
}
|
||||||
|
bundleClientRouteV2 := valueAddBundleRoute.Group("system/v2")
|
||||||
valueAddBundleAppRoute = valueAddBundleAppRoute.Group("system")
|
|
||||||
{
|
{
|
||||||
valueAddBundleAppRoute.POST("list", bundle.ValueAddBundleList)
|
bundleClientRouteV2.POST("save", bundle.SaveValueAddService)
|
||||||
|
bundleClientRouteV2.POST("list", bundle.ValueAddServiceList)
|
||||||
|
bundleClientRouteV2.POST("detail", bundle.ValueAddServiceDetail)
|
||||||
|
}
|
||||||
|
|
||||||
|
valueAddBundleAppRouteV1 := valueAddBundleAppRoute.Group("system")
|
||||||
|
{
|
||||||
|
valueAddBundleAppRouteV1.POST("list", bundle.ValueAddBundleList)
|
||||||
|
}
|
||||||
|
valueAddBundleAppRouteV2 := valueAddBundleAppRoute.Group("system/v2")
|
||||||
|
{
|
||||||
|
valueAddBundleAppRouteV2.POST("list", bundle.ValueAddServiceList)
|
||||||
|
valueAddBundleAppRouteV2.POST("detail", bundle.ValueAddServiceDetail)
|
||||||
|
valueAddBundleAppRouteV2.POST("detail/lang", bundle.ValueAddServiceLangDetail)
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -4,6 +4,7 @@ import (
|
|||||||
"context"
|
"context"
|
||||||
"fonchain-fiee/api/bundle"
|
"fonchain-fiee/api/bundle"
|
||||||
"fonchain-fiee/pkg/service"
|
"fonchain-fiee/pkg/service"
|
||||||
|
|
||||||
"github.com/gin-gonic/gin"
|
"github.com/gin-gonic/gin"
|
||||||
"github.com/gin-gonic/gin/binding"
|
"github.com/gin-gonic/gin/binding"
|
||||||
)
|
)
|
||||||
@ -76,3 +77,66 @@ func BundleList(c *gin.Context) {
|
|||||||
|
|
||||||
service.Success(c, res)
|
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)
|
||||||
|
}
|
||||||
|
@ -67,3 +67,65 @@ func ValueAddBundleDetail(c *gin.Context) {
|
|||||||
|
|
||||||
service.Success1(c, res.Msg, res)
|
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)
|
||||||
|
}
|
||||||
|
func ValueAddServiceLangDetail(c *gin.Context) {
|
||||||
|
var req bundle.ValueAddServiceDetailRequest
|
||||||
|
|
||||||
|
if err := c.ShouldBindBodyWith(&req, binding.JSON); err != nil {
|
||||||
|
service.Error1(c, err)
|
||||||
|
return
|
||||||
|
}
|
||||||
|
language := c.GetHeader("Accept-Language")
|
||||||
|
req.Language = language
|
||||||
|
res, err := service.BundleProvider.ValueAddServiceLangByUuidAndLanguage(context.Background(), &req)
|
||||||
|
if err != nil {
|
||||||
|
service.Error(c, err)
|
||||||
|
return
|
||||||
|
}
|
||||||
|
service.Success(c, res)
|
||||||
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user