Browse Source

1.新增页面配置主表、组件类型编码、页面组件实例表、轮播图配置表、直播配置表、宣传视频配置表、品质农产配置表模块
2.新增轮播图配置表、组件类型编码、直播配置表、页面组件实例表、页面配置主表、品质农产配置表、宣传视频配置表启用禁用接口
3.新增页面组件实例表排序接口
4.开发页面组件实例表删除逻辑
5.列表查询增加筛选条件,新增修改处理文件
6.迁入osm服务

kongxianghui 2 months ago
parent
commit
1df209db83
46 changed files with 3530 additions and 3 deletions
  1. 10 0
      application/application.go
  2. 73 0
      application/domain/mini_carousel_config/entity.go
  3. 20 0
      application/domain/mini_carousel_config/info.go
  4. 61 0
      application/domain/mini_carousel_config/request_params.go
  5. 65 0
      application/domain/mini_component_type/entity.go
  6. 18 0
      application/domain/mini_component_type/info.go
  7. 58 0
      application/domain/mini_component_type/request_params.go
  8. 73 0
      application/domain/mini_live_config/entity.go
  9. 23 0
      application/domain/mini_live_config/info.go
  10. 59 0
      application/domain/mini_live_config/request_params.go
  11. 65 0
      application/domain/mini_page_component/entity.go
  12. 18 0
      application/domain/mini_page_component/info.go
  13. 110 0
      application/domain/mini_page_component/request_params.go
  14. 61 0
      application/domain/mini_page_config/entity.go
  15. 17 0
      application/domain/mini_page_config/info.go
  16. 53 0
      application/domain/mini_page_config/request_params.go
  17. 73 0
      application/domain/mini_quality_product_config/entity.go
  18. 22 0
      application/domain/mini_quality_product_config/info.go
  19. 59 0
      application/domain/mini_quality_product_config/request_params.go
  20. 73 0
      application/domain/mini_video_config/entity.go
  21. 23 0
      application/domain/mini_video_config/info.go
  22. 59 0
      application/domain/mini_video_config/request_params.go
  23. 7 0
      application/domain/oss/info.go
  24. 146 0
      application/service/mini_carousel_config.go
  25. 237 0
      application/service/mini_component_type.go
  26. 234 0
      application/service/mini_live_config.go
  27. 583 0
      application/service/mini_page_component.go
  28. 134 0
      application/service/mini_page_config.go
  29. 206 0
      application/service/mini_quality_product_config.go
  30. 226 0
      application/service/mini_video_config.go
  31. 8 1
      application/service/service.go
  32. 11 0
      config/config.go
  33. 7 0
      deployment/config/config.yaml
  34. 77 0
      deployment/data_service/data_containers/mini_carousel_config.yaml
  35. 67 0
      deployment/data_service/data_containers/mini_component_type.yaml
  36. 77 0
      deployment/data_service/data_containers/mini_live_config.yaml
  37. 67 0
      deployment/data_service/data_containers/mini_page_component.yaml
  38. 62 0
      deployment/data_service/data_containers/mini_page_config.yaml
  39. 77 0
      deployment/data_service/data_containers/mini_quality_product_config.yaml
  40. 77 0
      deployment/data_service/data_containers/mini_video_config.yaml
  41. 0 0
      deployment/data_service/datactl/.offline/.database/.trtest.yaml
  42. 1 0
      go.mod
  43. 2 0
      go.sum
  44. 1 2
      main.go
  45. 105 0
      osm/osm.go
  46. 25 0
      utils/utils.go

+ 10 - 0
application/application.go

@@ -6,6 +6,8 @@ import (
 	"git.sxidc.com/go-framework/baize"
 	"git.sxidc.com/go-framework/baize"
 	"git.sxidc.com/go-framework/baize/framework/core/api"
 	"git.sxidc.com/go-framework/baize/framework/core/api"
 	"git.sxidc.com/go-framework/baize/framework/core/application"
 	"git.sxidc.com/go-framework/baize/framework/core/application"
+	"git.sxidc.com/service-supports/fslog"
+	"git.sxidc.com/service-supports/osm_sdk"
 	"net/http"
 	"net/http"
 )
 )
 
 
@@ -18,6 +20,14 @@ func NewApp() {
 
 
 	appInstance = baize.NewApplication(config.GetConfig().ApplicationConfig)
 	appInstance = baize.NewApplication(config.GetConfig().ApplicationConfig)
 
 
+	osmConfig := config.GetConfig().OsmConfig
+
+	err := osm_sdk.Init(osmConfig.Prefix, osmConfig.Namespace, osmConfig.Name, osmConfig.BaseUrl, 0)
+	if err != nil {
+		fslog.Error(err)
+		panic(err)
+	}
+
 	// 注册Router
 	// 注册Router
 	appInstance.Api().PrefixRouter().RegisterVersionedRouter("v1")
 	appInstance.Api().PrefixRouter().RegisterVersionedRouter("v1")
 }
 }

+ 73 - 0
application/domain/mini_carousel_config/entity.go

@@ -0,0 +1,73 @@
+package mini_carousel_config
+
+import (
+	"git.sxidc.com/go-framework/baize/framework/core/domain"
+	"git.sxidc.com/go-framework/baize/framework/core/domain/entity"
+)
+
+const (
+	FieldComponentID = "ComponentID"
+	FieldImageUrl    = "ImageUrl"
+	FieldImageAlt    = "ImageAlt"
+	FieldLinkType    = "LinkType"
+	FieldLinkUrl     = "LinkUrl"
+	FieldLinkParams  = "LinkParams"
+	FieldSortOrder   = "SortOrder"
+	FieldIsEnabled   = "IsEnabled"
+)
+
+var fieldMap = map[string]string{
+	FieldComponentID: "组件实例ID",
+	FieldImageUrl:    "图片地址",
+	FieldImageAlt:    "图片描述",
+	FieldLinkType:    "链接类型",
+	FieldLinkUrl:     "链接地址",
+	FieldLinkParams:  "链接参数",
+	FieldSortOrder:   "排序",
+	FieldIsEnabled:   "是否启用",
+}
+
+var (
+	ColumnComponentID = domain.ColumnName(FieldComponentID)
+	ColumnImageUrl    = domain.ColumnName(FieldImageUrl)
+	ColumnImageAlt    = domain.ColumnName(FieldImageAlt)
+	ColumnLinkType    = domain.ColumnName(FieldLinkType)
+	ColumnLinkUrl     = domain.ColumnName(FieldLinkUrl)
+	ColumnLinkParams  = domain.ColumnName(FieldLinkParams)
+	ColumnSortOrder   = domain.ColumnName(FieldSortOrder)
+	ColumnIsEnabled   = domain.ColumnName(FieldIsEnabled)
+)
+
+type Entity struct {
+	entity.Base
+	ComponentID string `sqlmapping:"column:component_id;" sqlresult:"column:component_id;" check:"required,lte=32,when=create/update"`
+	ImageUrl    string `sqlmapping:"column:image_url;" sqlresult:"column:image_url;" check:"required,lte=500,when=create/update"`
+	ImageAlt    string `sqlmapping:"column:image_alt;updateClear;" sqlresult:"column:image_alt;"`
+	LinkType    int    `sqlmapping:"column:link_type;" sqlresult:"column:link_type;" check:"required,when=create/update"`
+	LinkUrl     string `sqlmapping:"column:link_url;updateClear;" sqlresult:"column:link_url;"`
+	LinkParams  string `sqlmapping:"column:link_params;" sqlresult:"column:link_params;" check:"required,when=create/update"`
+	SortOrder   int    `sqlmapping:"column:sort_order;" sqlresult:"column:sort_order;" check:"required,when=create/update"`
+	IsEnabled   string `sqlmapping:"column:is_enabled;" sqlresult:"column:is_enabled;" check:"required,lte=10,when=create/update"`
+	entity.TenantIDField
+	entity.UserIDFields
+	entity.OperatorUserNameField
+	entity.TimeFields
+
+	/* HAC: ENTITY RELATION FIELDS */
+	/* HAC: END ENTITY RELATION FIELDS */
+}
+
+func (e *Entity) DomainCNName() string {
+	return "轮播图配置表"
+}
+
+func (e *Entity) DomainCamelName() string {
+	return "MiniCarouselConfig"
+}
+
+func (e *Entity) GetFieldMap() map[string]string {
+	return fieldMap
+}
+
+/* HAC: ENTITY RELATION METHODS */
+/* HAC: END ENTITY RELATION METHODS */

+ 20 - 0
application/domain/mini_carousel_config/info.go

@@ -0,0 +1,20 @@
+package mini_carousel_config
+
+import (
+	"git.sxidc.com/go-framework/baize/framework/core/application"
+)
+
+type Info struct {
+	application.InfoIDField
+	ComponentID string `json:"componentId" sqlresult:"column:component_id;"`
+	ImageUrl    string `json:"imageUrl" sqlresult:"column:image_url;"`
+	ImageAlt    string `json:"imageAlt" sqlresult:"column:image_alt;"`
+	LinkType    int    `json:"linkType" sqlresult:"column:link_type;"`
+	LinkUrl     string `json:"linkUrl" sqlresult:"column:link_url;"`
+	LinkParams  string `json:"linkParams" sqlresult:"column:link_params;"`
+	SortOrder   int    `json:"sortOrder" sqlresult:"column:sort_order;"`
+	IsEnabled   string `json:"isEnabled" sqlresult:"column:is_enabled;"`
+	application.InfoTenantIDField
+	application.InfoUserIDFields
+	application.InfoTimeFields
+}

+ 61 - 0
application/domain/mini_carousel_config/request_params.go

@@ -0,0 +1,61 @@
+package mini_carousel_config
+
+import (
+	"git.sxidc.com/go-framework/baize/framework/core/api/request"
+)
+
+type (
+	CreateMiniCarouselConfigJsonBody struct {
+		ComponentID string `json:"componentId" binding:"required" assign:"toField:ComponentID"`
+		ImageUrl    string `json:"imageUrl" binding:"required" assign:"toField:ImageUrl"`
+		ImageAlt    string `json:"imageAlt" assign:"toField:ImageAlt"`
+		LinkType    int    `json:"linkType" binding:"required" assign:"toField:LinkType"`
+		LinkUrl     string `json:"linkUrl" assign:"toField:LinkUrl"`
+		LinkParams  string `json:"linkParams" binding:"required" assign:"toField:LinkParams"`
+		SortOrder   int    `json:"sortOrder" binding:"required" assign:"toField:SortOrder"`
+		IsEnabled   string `json:"isEnabled" binding:"required" assign:"toField:IsEnabled"`
+		request.TenantIDJsonBody
+		request.CreateUserIDJsonBody
+		request.OperatorUserNameJsonBody
+	}
+
+	DeleteMiniCarouselConfigQueryParams struct {
+		request.IDQueryParam
+		request.DeleteUserIDQueryParams
+		request.OperatorUserNameQueryParams
+	}
+
+	UpdateMiniCarouselConfigJsonBody struct {
+		request.IDJsonBody
+		ComponentID string `json:"componentId" assign:"toField:ComponentID"`
+		ImageUrl    string `json:"imageUrl" assign:"toField:ImageUrl"`
+		ImageAlt    string `json:"imageAlt" assign:"toField:ImageAlt"`
+		LinkType    int    `json:"linkType" assign:"toField:LinkType"`
+		LinkUrl     string `json:"linkUrl" assign:"toField:LinkUrl"`
+		LinkParams  string `json:"linkParams" assign:"toField:LinkParams"`
+		SortOrder   int    `json:"sortOrder" assign:"toField:SortOrder"`
+		IsEnabled   string `json:"isEnabled" assign:"toField:IsEnabled"`
+		request.UpdateUserIDJsonBody
+		request.OperatorUserNameJsonBody
+	}
+
+	GetMiniCarouselConfigsQueryParams struct {
+		ComponentID string `form:"componentId" assign:"toField:ComponentID"`
+		LinkType    int    `form:"linkType" assign:"toField:LinkType"`
+		IsEnabled   string `form:"isEnabled" assign:"toField:IsEnabled"`
+		request.BaseQueryParams
+		request.TenantIDQueryParam
+	}
+
+	GetMiniCarouselConfigQueryParams2 struct {
+		request.IDQueryParam
+	}
+
+	EnabledOrDisableJsonBody struct {
+		request.IDJsonBody
+		IsEnabled string `json:"isEnabled" assign:"toField:IsEnabled"`
+	}
+
+	/* HAC: HTTP RELATION REQUEST PARAMS */
+	/* HAC: END HTTP RELATION REQUEST PARAMS */
+)

+ 65 - 0
application/domain/mini_component_type/entity.go

@@ -0,0 +1,65 @@
+package mini_component_type
+
+import (
+	"git.sxidc.com/go-framework/baize/framework/core/domain"
+	"git.sxidc.com/go-framework/baize/framework/core/domain/entity"
+)
+
+const (
+	FieldTypeCode        = "TypeCode"
+	FieldTypeName        = "TypeName"
+	FieldDescription     = "Description"
+	FieldComponentConfig = "ComponentConfig"
+	FieldIsEnabled       = "IsEnabled"
+	FieldSortOrder       = "SortOrder"
+)
+
+var fieldMap = map[string]string{
+	FieldTypeCode:        "组件类型编码",
+	FieldTypeName:        "组件类型名称",
+	FieldDescription:     "组件描述",
+	FieldComponentConfig: "组件默认配置模板",
+	FieldIsEnabled:       "是否启用",
+	FieldSortOrder:       "排序",
+}
+
+var (
+	ColumnTypeCode        = domain.ColumnName(FieldTypeCode)
+	ColumnTypeName        = domain.ColumnName(FieldTypeName)
+	ColumnDescription     = domain.ColumnName(FieldDescription)
+	ColumnComponentConfig = domain.ColumnName(FieldComponentConfig)
+	ColumnIsEnabled       = domain.ColumnName(FieldIsEnabled)
+	ColumnSortOrder       = domain.ColumnName(FieldSortOrder)
+)
+
+type Entity struct {
+	entity.Base
+	TypeCode        string `sqlmapping:"column:type_code;" sqlresult:"column:type_code;" check:"required,lte=50,when=create/update"`
+	TypeName        string `sqlmapping:"column:type_name;" sqlresult:"column:type_name;" check:"required,lte=100,when=create/update"`
+	Description     string `sqlmapping:"column:description;" sqlresult:"column:description;" check:"required,when=create/update"`
+	ComponentConfig string `sqlmapping:"column:component_config;" sqlresult:"column:component_config;" check:"required,when=create/update"`
+	IsEnabled       string `sqlmapping:"column:is_enabled;" sqlresult:"column:is_enabled;" check:"required,lte=10,when=create/update"`
+	SortOrder       int    `sqlmapping:"column:sort_order;" sqlresult:"column:sort_order;" check:"required,when=create/update"`
+	entity.TenantIDField
+	entity.UserIDFields
+	entity.OperatorUserNameField
+	entity.TimeFields
+
+	/* HAC: ENTITY RELATION FIELDS */
+	/* HAC: END ENTITY RELATION FIELDS */
+}
+
+func (e *Entity) DomainCNName() string {
+	return "页面组件实例表"
+}
+
+func (e *Entity) DomainCamelName() string {
+	return "MiniComponentType"
+}
+
+func (e *Entity) GetFieldMap() map[string]string {
+	return fieldMap
+}
+
+/* HAC: ENTITY RELATION METHODS */
+/* HAC: END ENTITY RELATION METHODS */

+ 18 - 0
application/domain/mini_component_type/info.go

@@ -0,0 +1,18 @@
+package mini_component_type
+
+import (
+	"git.sxidc.com/go-framework/baize/framework/core/application"
+)
+
+type Info struct {
+	application.InfoIDField
+	TypeCode        string `json:"typeCode" sqlresult:"column:type_code;"`
+	TypeName        string `json:"typeName" sqlresult:"column:type_name;"`
+	Description     string `json:"description" sqlresult:"column:description;"`
+	ComponentConfig string `json:"componentConfig" sqlresult:"column:component_config;"`
+	IsEnabled       string `json:"isEnabled" sqlresult:"column:is_enabled;"`
+	SortOrder       int    `json:"sortOrder" sqlresult:"column:sort_order;"`
+	application.InfoTenantIDField
+	application.InfoUserIDFields
+	application.InfoTimeFields
+}

+ 58 - 0
application/domain/mini_component_type/request_params.go

@@ -0,0 +1,58 @@
+package mini_component_type
+
+import (
+	"git.sxidc.com/go-framework/baize/framework/core/api/request"
+)
+
+type (
+	CreateMiniComponentTypeJsonBody struct {
+		TypeCode        string `json:"typeCode" binding:"required" assign:"toField:TypeCode"`
+		TypeName        string `json:"typeName" binding:"required" assign:"toField:TypeName"`
+		Description     string `json:"description" binding:"required" assign:"toField:Description"`
+		ComponentConfig string `json:"componentConfig" binding:"required" assign:"toField:ComponentConfig"`
+		IsEnabled       string `json:"isEnabled" binding:"required" assign:"toField:IsEnabled"`
+		SortOrder       int    `json:"sortOrder" binding:"required" assign:"toField:SortOrder"`
+		request.TenantIDJsonBody
+		request.CreateUserIDJsonBody
+		request.OperatorUserNameJsonBody
+	}
+
+	DeleteMiniComponentTypeQueryParams struct {
+		request.IDQueryParam
+		request.DeleteUserIDQueryParams
+		request.OperatorUserNameQueryParams
+	}
+
+	UpdateMiniComponentTypeJsonBody struct {
+		request.IDJsonBody
+		TypeCode        string `json:"typeCode" assign:"toField:TypeCode"`
+		TypeName        string `json:"typeName" assign:"toField:TypeName"`
+		Description     string `json:"description" assign:"toField:Description"`
+		ComponentConfig string `json:"componentConfig" assign:"toField:ComponentConfig"`
+		IsEnabled       string `json:"isEnabled" assign:"toField:IsEnabled"`
+		SortOrder       int    `json:"sortOrder" assign:"toField:SortOrder"`
+		request.UpdateUserIDJsonBody
+		request.OperatorUserNameJsonBody
+	}
+
+	GetMiniComponentTypesQueryParams struct {
+		TypeCode  string `form:"typeCode" assign:"toField:TypeCode"`
+		TypeName  string `form:"typeName" assign:"toField:TypeName"`
+		IsEnabled string `form:"isEnabled" assign:"toField:IsEnabled"`
+		request.BaseQueryParams
+		request.TenantIDQueryParam
+	}
+
+	GetMiniComponentTypeQueryParams struct {
+		request.IDQueryParam
+	}
+
+	EnabledOrDisableJsonBody struct {
+		request.IDJsonBody
+		TypeCode  string `json:"typeCode" assign:"toField:TypeCode"`
+		IsEnabled string `json:"isEnabled" assign:"toField:IsEnabled"`
+	}
+
+	/* HAC: HTTP RELATION REQUEST PARAMS */
+	/* HAC: END HTTP RELATION REQUEST PARAMS */
+)

+ 73 - 0
application/domain/mini_live_config/entity.go

@@ -0,0 +1,73 @@
+package mini_live_config
+
+import (
+	"git.sxidc.com/go-framework/baize/framework/core/domain"
+	"git.sxidc.com/go-framework/baize/framework/core/domain/entity"
+)
+
+const (
+	FieldComponentID      = "ComponentID"
+	FieldLiveTitle        = "LiveTitle"
+	FieldLiveCoverUrl     = "LiveCoverUrl"
+	FieldLiveRoomID       = "LiveRoomID"
+	FieldLiveStatus       = "LiveStatus"
+	FieldPlaceholderImage = "PlaceholderImage"
+	FieldPlaceholderText  = "PlaceholderText"
+	FieldIsEnabled        = "IsEnabled"
+)
+
+var fieldMap = map[string]string{
+	FieldComponentID:      "组件实例ID",
+	FieldLiveTitle:        "直播标题",
+	FieldLiveCoverUrl:     "直播封面图",
+	FieldLiveRoomID:       "直播间ID",
+	FieldLiveStatus:       "直播状态",
+	FieldPlaceholderImage: "占位图片",
+	FieldPlaceholderText:  "占位文本",
+	FieldIsEnabled:        "是否启用",
+}
+
+var (
+	ColumnComponentID      = domain.ColumnName(FieldComponentID)
+	ColumnLiveTitle        = domain.ColumnName(FieldLiveTitle)
+	ColumnLiveCoverUrl     = domain.ColumnName(FieldLiveCoverUrl)
+	ColumnLiveRoomID       = domain.ColumnName(FieldLiveRoomID)
+	ColumnLiveStatus       = domain.ColumnName(FieldLiveStatus)
+	ColumnPlaceholderImage = domain.ColumnName(FieldPlaceholderImage)
+	ColumnPlaceholderText  = domain.ColumnName(FieldPlaceholderText)
+	ColumnIsEnabled        = domain.ColumnName(FieldIsEnabled)
+)
+
+type Entity struct {
+	entity.Base
+	ComponentID      string `sqlmapping:"column:component_id;" sqlresult:"column:component_id;" check:"required,lte=32,when=create/update"`
+	LiveTitle        string `sqlmapping:"column:live_title;" sqlresult:"column:live_title;" check:"required,lte=200,when=create/update"`
+	LiveCoverUrl     string `sqlmapping:"column:live_cover_url;updateClear;" sqlresult:"column:live_cover_url;"`
+	LiveRoomID       string `sqlmapping:"column:live_room_id;updateClear;" sqlresult:"column:live_room_id;"`
+	LiveStatus       int    `sqlmapping:"column:live_status;" sqlresult:"column:live_status;" check:"required,when=create/update"`
+	PlaceholderImage string `sqlmapping:"column:placeholder_image;" sqlresult:"column:placeholder_image;" check:"required,lte=500,when=create/update"`
+	PlaceholderText  string `sqlmapping:"column:placeholder_text;" sqlresult:"column:placeholder_text;" check:"required,lte=200,when=create/update"`
+	IsEnabled        string `sqlmapping:"column:is_enabled;" sqlresult:"column:is_enabled;" check:"required,lte=10,when=create/update"`
+	entity.TenantIDField
+	entity.UserIDFields
+	entity.OperatorUserNameField
+	entity.TimeFields
+
+	/* HAC: ENTITY RELATION FIELDS */
+	/* HAC: END ENTITY RELATION FIELDS */
+}
+
+func (e *Entity) DomainCNName() string {
+	return "直播配置表"
+}
+
+func (e *Entity) DomainCamelName() string {
+	return "MiniLiveConfig"
+}
+
+func (e *Entity) GetFieldMap() map[string]string {
+	return fieldMap
+}
+
+/* HAC: ENTITY RELATION METHODS */
+/* HAC: END ENTITY RELATION METHODS */

+ 23 - 0
application/domain/mini_live_config/info.go

@@ -0,0 +1,23 @@
+package mini_live_config
+
+import (
+	"ecos/application/domain/oss"
+	"git.sxidc.com/go-framework/baize/framework/core/application"
+)
+
+type Info struct {
+	application.InfoIDField
+	ComponentID         string           `json:"componentId" sqlresult:"column:component_id;"`
+	LiveTitle           string           `json:"liveTitle" sqlresult:"column:live_title;"`
+	LiveCoverUrlStr     string           `json:"liveCoverUrlStr" sqlresult:"column:live_cover_url;"`
+	LiveCoverUrl        []oss.FileObject `json:"liveCoverUrl" sqlresult:"column:-;"`
+	LiveRoomID          string           `json:"liveRoomId" sqlresult:"column:live_room_id;"`
+	LiveStatus          int              `json:"liveStatus" sqlresult:"column:live_status;"`
+	PlaceholderImageStr string           `json:"placeholderImageStr" sqlresult:"column:placeholder_image;"`
+	PlaceholderImage    []oss.FileObject `json:"placeholderImage" sqlresult:"column:-;"`
+	PlaceholderText     string           `json:"placeholderText" sqlresult:"column:placeholder_text;"`
+	IsEnabled           string           `json:"isEnabled" sqlresult:"column:is_enabled;"`
+	application.InfoTenantIDField
+	application.InfoUserIDFields
+	application.InfoTimeFields
+}

+ 59 - 0
application/domain/mini_live_config/request_params.go

@@ -0,0 +1,59 @@
+package mini_live_config
+
+import (
+	"git.sxidc.com/go-framework/baize/framework/core/api/request"
+)
+
+type (
+	CreateMiniLiveConfigJsonBody struct {
+		ComponentID      string `json:"componentId" binding:"required" assign:"toField:ComponentID"`
+		LiveTitle        string `json:"liveTitle" binding:"required" assign:"toField:LiveTitle"`
+		LiveCoverUrl     string `json:"liveCoverUrl" assign:"toField:LiveCoverUrl"`
+		LiveRoomID       string `json:"liveRoomId" assign:"toField:LiveRoomID"`
+		LiveStatus       int    `json:"liveStatus" binding:"required" assign:"toField:LiveStatus"`
+		PlaceholderImage string `json:"placeholderImage" binding:"required" assign:"toField:PlaceholderImage"`
+		PlaceholderText  string `json:"placeholderText" binding:"required" assign:"toField:PlaceholderText"`
+		IsEnabled        string `json:"isEnabled" binding:"required" assign:"toField:IsEnabled"`
+		request.TenantIDJsonBody
+		request.CreateUserIDJsonBody
+		request.OperatorUserNameJsonBody
+	}
+
+	DeleteMiniLiveConfigQueryParams struct {
+		request.IDQueryParam
+		request.DeleteUserIDQueryParams
+		request.OperatorUserNameQueryParams
+	}
+
+	UpdateMiniLiveConfigJsonBody struct {
+		request.IDJsonBody
+		ComponentID      string `json:"componentId" assign:"toField:ComponentID"`
+		LiveTitle        string `json:"liveTitle" assign:"toField:LiveTitle"`
+		LiveCoverUrl     string `json:"liveCoverUrl" assign:"toField:LiveCoverUrl"`
+		LiveRoomID       string `json:"liveRoomId" assign:"toField:LiveRoomID"`
+		LiveStatus       int    `json:"liveStatus" assign:"toField:LiveStatus"`
+		PlaceholderImage string `json:"placeholderImage" assign:"toField:PlaceholderImage"`
+		PlaceholderText  string `json:"placeholderText" assign:"toField:PlaceholderText"`
+		IsEnabled        string `json:"isEnabled" assign:"toField:IsEnabled"`
+		request.UpdateUserIDJsonBody
+		request.OperatorUserNameJsonBody
+	}
+
+	GetMiniLiveConfigsQueryParams struct {
+		ComponentID string `form:"componentId" assign:"toField:ComponentID"`
+		request.BaseQueryParams
+		request.TenantIDQueryParam
+	}
+
+	GetMiniLiveConfigQueryParams struct {
+		request.IDQueryParam
+	}
+
+	EnabledOrDisableJsonBody struct {
+		request.IDJsonBody
+		IsEnabled string `json:"isEnabled" assign:"toField:IsEnabled"`
+	}
+
+	/* HAC: HTTP RELATION REQUEST PARAMS */
+	/* HAC: END HTTP RELATION REQUEST PARAMS */
+)

+ 65 - 0
application/domain/mini_page_component/entity.go

@@ -0,0 +1,65 @@
+package mini_page_component
+
+import (
+	"git.sxidc.com/go-framework/baize/framework/core/domain"
+	"git.sxidc.com/go-framework/baize/framework/core/domain/entity"
+)
+
+const (
+	FieldPageID          = "PageID"
+	FieldComponentTypeID = "ComponentTypeID"
+	FieldTypeName        = "TypeName"
+	FieldComponentConfig = "ComponentConfig"
+	FieldSortOrder       = "SortOrder"
+	FieldIsEnabled       = "IsEnabled"
+)
+
+var fieldMap = map[string]string{
+	FieldPageID:          "页面ID",
+	FieldComponentTypeID: "组件类型ID",
+	FieldTypeName:        "组件类型名称",
+	FieldComponentConfig: "组件配置数据",
+	FieldSortOrder:       "排序",
+	FieldIsEnabled:       "是否启用",
+}
+
+var (
+	ColumnPageID          = domain.ColumnName(FieldPageID)
+	ColumnComponentTypeID = domain.ColumnName(FieldComponentTypeID)
+	ColumnTypeName        = domain.ColumnName(FieldTypeName)
+	ColumnComponentConfig = domain.ColumnName(FieldComponentConfig)
+	ColumnSortOrder       = domain.ColumnName(FieldSortOrder)
+	ColumnIsEnabled       = domain.ColumnName(FieldIsEnabled)
+)
+
+type Entity struct {
+	entity.Base
+	PageID          string `sqlmapping:"column:page_id;updateClear;" sqlresult:"column:page_id;"`
+	ComponentTypeID string `sqlmapping:"column:component_type_id;" sqlresult:"column:component_type_id;" check:"required,lte=32,when=create/update"`
+	TypeName        string `sqlmapping:"column:type_name;" sqlresult:"column:type_name;" check:"required,lte=100,when=create/update"`
+	ComponentConfig string `sqlmapping:"column:component_config;" sqlresult:"column:component_config;" check:"required,when=create/update"`
+	SortOrder       int    `sqlmapping:"column:sort_order;" sqlresult:"column:sort_order;" check:"required,when=create/update"`
+	IsEnabled       string `sqlmapping:"column:is_enabled;" sqlresult:"column:is_enabled;" check:"required,lte=10,when=create/update"`
+	entity.TenantIDField
+	entity.UserIDFields
+	entity.OperatorUserNameField
+	entity.TimeFields
+
+	/* HAC: ENTITY RELATION FIELDS */
+	/* HAC: END ENTITY RELATION FIELDS */
+}
+
+func (e *Entity) DomainCNName() string {
+	return "页面组件实例表"
+}
+
+func (e *Entity) DomainCamelName() string {
+	return "MiniPageComponent"
+}
+
+func (e *Entity) GetFieldMap() map[string]string {
+	return fieldMap
+}
+
+/* HAC: ENTITY RELATION METHODS */
+/* HAC: END ENTITY RELATION METHODS */

+ 18 - 0
application/domain/mini_page_component/info.go

@@ -0,0 +1,18 @@
+package mini_page_component
+
+import (
+	"git.sxidc.com/go-framework/baize/framework/core/application"
+)
+
+type Info struct {
+	application.InfoIDField
+	PageID          string `json:"pageId" sqlresult:"column:page_id;"`
+	ComponentTypeID string `json:"componentTypeId" sqlresult:"column:component_type_id;"`
+	TypeName        string `json:"typeName" sqlresult:"column:type_name;"`
+	ComponentConfig string `json:"componentConfig" sqlresult:"column:component_config;"`
+	SortOrder       int    `json:"sortOrder" sqlresult:"column:sort_order;"`
+	IsEnabled       string `json:"isEnabled" sqlresult:"column:is_enabled;"`
+	application.InfoTenantIDField
+	application.InfoUserIDFields
+	application.InfoTimeFields
+}

+ 110 - 0
application/domain/mini_page_component/request_params.go

@@ -0,0 +1,110 @@
+package mini_page_component
+
+import (
+	"ecos/application/domain/oss"
+	"git.sxidc.com/go-framework/baize/framework/core/api/request"
+)
+
+type (
+	CreateMiniPageComponentJsonBody struct {
+		PageID          string `json:"pageId" assign:"toField:PageID"`
+		ComponentTypeID string `json:"componentTypeId" binding:"required" assign:"toField:ComponentTypeID"`
+		TypeName        string `json:"typeName" binding:"required" assign:"toField:TypeName"`
+		ComponentConfig string `json:"componentConfig" binding:"required" assign:"toField:ComponentConfig"`
+		SortOrder       int    `json:"sortOrder" binding:"required" assign:"toField:SortOrder"`
+		IsEnabled       string `json:"isEnabled" binding:"required" assign:"toField:IsEnabled"`
+		request.TenantIDJsonBody
+		request.CreateUserIDJsonBody
+		request.OperatorUserNameJsonBody
+	}
+
+	DeleteMiniPageComponentQueryParams struct {
+		request.IDQueryParam
+		request.DeleteUserIDQueryParams
+		request.OperatorUserNameQueryParams
+	}
+
+	UpdateMiniPageComponentJsonBody struct {
+		request.IDJsonBody
+		PageID          string `json:"pageId" assign:"toField:PageID"`
+		ComponentTypeID string `json:"componentTypeId" assign:"toField:ComponentTypeID"`
+		TypeName        string `json:"typeName" assign:"toField:TypeName"`
+		ComponentConfig string `json:"componentConfig" assign:"toField:ComponentConfig"`
+		SortOrder       int    `json:"sortOrder" assign:"toField:SortOrder"`
+		IsEnabled       string `json:"isEnabled" assign:"toField:IsEnabled"`
+		request.UpdateUserIDJsonBody
+		request.OperatorUserNameJsonBody
+	}
+
+	GetMiniPageComponentsQueryParams struct {
+		PageID          string `form:"pageId" assign:"toField:PageID"`
+		ComponentTypeID string `form:"componentTypeId" assign:"toField:ComponentTypeID"`
+		TypeName        string `form:"typeName" assign:"toField:TypeName"`
+		IsEnabled       string `form:"isEnabled" assign:"toField:IsEnabled"`
+		request.BaseQueryParams
+		request.TenantIDQueryParam
+	}
+
+	GetMiniPageComponentQueryParams struct {
+		request.IDQueryParam
+	}
+
+	EnabledOrDisableJsonBody struct {
+		request.IDJsonBody
+		ComponentTypeID string `json:"componentTypeId" assign:"toField:ComponentTypeID"`
+		IsEnabled       string `json:"isEnabled" assign:"toField:IsEnabled"`
+	}
+
+	SortOrderJsonBody struct {
+		SortOrders []SortOrder `json:"sortOrders"`
+	}
+
+	SortOrder struct {
+		request.IDJsonBody
+		SortOrder int `json:"sortOrder" assign:"toField:SortOrder"`
+	}
+
+	// CarouselConfig 轮播组件的整体配置
+	CarouselConfig struct {
+		Autoplay string         `json:"autoplay"` // 自动播放,"1"表示开启,"0"表示关闭
+		Interval int            `json:"interval"` // 轮播间隔时间,单位毫秒
+		Height   int            `json:"height"`   // 轮播高度
+		Items    []CarouselItem `json:"items"`    // 轮播项列表
+	}
+
+	// CarouselItem 轮播项的具体信息
+	CarouselItem struct {
+		ImageUrl   string           `json:"imageUrl"`
+		ImageUrls  []oss.FileObject `json:"attachments"`
+		ImageAlt   string           `json:"imageAlt"`
+		LinkType   int              `json:"linkType"`
+		LinkUrl    string           `json:"linkUrl"`
+		LinkParams string           `json:"linkParams"`
+		SortOrder  int              `json:"sortOrder"`
+		IsEnabled  string           `json:"isEnabled"`
+	}
+
+	VideoComponentConfig struct {
+		VideoTitle     string           `json:"videoTitle"`
+		VideoUrlStr    string           `json:"videoUrl"`
+		VideoUrlFile   []oss.FileObject `json:"videoUrlFile"`
+		VideoCoverStr  string           `json:"videoCover"`
+		VideoCoverFile []oss.FileObject `json:"videoCoverFile"`
+		AutoPlay       string           `json:"autoPlay"`
+		ShowControls   string           `json:"showControls"`
+	}
+
+	// LiveWindowConfig 直播窗口组件的详细配置
+	LiveWindowConfig struct {
+		LiveTitle        string           `json:"liveTitle"`
+		LiveCoverUrl     string           `json:"liveCoverUrl"`
+		LiveCoverUrlFile []oss.FileObject `json:"liveCoverUrlFile"`
+		LiveRoomId       string           `json:"liveRoomId"`
+		LiveStatus       int              `json:"liveStatus"`
+		PlaceholderImage string           `json:"placeholderImage"`
+		PlaceholderText  string           `json:"placeholderText"`
+	}
+
+	/* HAC: HTTP RELATION REQUEST PARAMS */
+	/* HAC: END HTTP RELATION REQUEST PARAMS */
+)

+ 61 - 0
application/domain/mini_page_config/entity.go

@@ -0,0 +1,61 @@
+package mini_page_config
+
+import (
+	"git.sxidc.com/go-framework/baize/framework/core/domain"
+	"git.sxidc.com/go-framework/baize/framework/core/domain/entity"
+)
+
+const (
+	FieldPageCode    = "PageCode"
+	FieldPageName    = "PageName"
+	FieldDescription = "Description"
+	FieldIsEnabled   = "IsEnabled"
+	FieldSortOrder   = "SortOrder"
+)
+
+var fieldMap = map[string]string{
+	FieldPageCode:    "页面编码",
+	FieldPageName:    "页面名称",
+	FieldDescription: "页面描述",
+	FieldIsEnabled:   "是否启用",
+	FieldSortOrder:   "排序",
+}
+
+var (
+	ColumnPageCode    = domain.ColumnName(FieldPageCode)
+	ColumnPageName    = domain.ColumnName(FieldPageName)
+	ColumnDescription = domain.ColumnName(FieldDescription)
+	ColumnIsEnabled   = domain.ColumnName(FieldIsEnabled)
+	ColumnSortOrder   = domain.ColumnName(FieldSortOrder)
+)
+
+type Entity struct {
+	entity.Base
+	PageCode    string `sqlmapping:"column:page_code;" sqlresult:"column:page_code;" check:"required,lte=50,when=create/update"`
+	PageName    string `sqlmapping:"column:page_name;" sqlresult:"column:page_name;" check:"required,lte=100,when=create/update"`
+	Description string `sqlmapping:"column:description;" sqlresult:"column:description;" check:"required,when=create/update"`
+	IsEnabled   string `sqlmapping:"column:is_enabled;" sqlresult:"column:is_enabled;" check:"required,lte=10,when=create/update"`
+	SortOrder   int    `sqlmapping:"column:sort_order;" sqlresult:"column:sort_order;" check:"required,when=create/update"`
+	entity.TenantIDField
+	entity.UserIDFields
+	entity.OperatorUserNameField
+	entity.TimeFields
+
+	/* HAC: ENTITY RELATION FIELDS */
+	/* HAC: END ENTITY RELATION FIELDS */
+}
+
+func (e *Entity) DomainCNName() string {
+	return "页面配置主表"
+}
+
+func (e *Entity) DomainCamelName() string {
+	return "MiniPageConfig"
+}
+
+func (e *Entity) GetFieldMap() map[string]string {
+	return fieldMap
+}
+
+/* HAC: ENTITY RELATION METHODS */
+/* HAC: END ENTITY RELATION METHODS */

+ 17 - 0
application/domain/mini_page_config/info.go

@@ -0,0 +1,17 @@
+package mini_page_config
+
+import (
+	"git.sxidc.com/go-framework/baize/framework/core/application"
+)
+
+type Info struct {
+	application.InfoIDField
+	PageCode    string `json:"pageCode" sqlresult:"column:page_code;"`
+	PageName    string `json:"pageName" sqlresult:"column:page_name;"`
+	Description string `json:"description" sqlresult:"column:description;"`
+	IsEnabled   string `json:"isEnabled" sqlresult:"column:is_enabled;"`
+	SortOrder   int    `json:"sortOrder" sqlresult:"column:sort_order;"`
+	application.InfoTenantIDField
+	application.InfoUserIDFields
+	application.InfoTimeFields
+}

+ 53 - 0
application/domain/mini_page_config/request_params.go

@@ -0,0 +1,53 @@
+package mini_page_config
+
+import (
+	"git.sxidc.com/go-framework/baize/framework/core/api/request"
+)
+
+type (
+	CreateMiniPageConfigJsonBody struct {
+		PageCode    string `json:"pageCode" binding:"required" assign:"toField:PageCode"`
+		PageName    string `json:"pageName" binding:"required" assign:"toField:PageName"`
+		Description string `json:"description" binding:"required" assign:"toField:Description"`
+		IsEnabled   string `json:"isEnabled" binding:"required" assign:"toField:IsEnabled"`
+		SortOrder   int    `json:"sortOrder" binding:"required" assign:"toField:SortOrder"`
+		request.TenantIDJsonBody
+		request.CreateUserIDJsonBody
+		request.OperatorUserNameJsonBody
+	}
+
+	DeleteMiniPageConfigQueryParams struct {
+		request.IDQueryParam
+		request.DeleteUserIDQueryParams
+		request.OperatorUserNameQueryParams
+	}
+
+	UpdateMiniPageConfigJsonBody struct {
+		request.IDJsonBody
+		PageCode    string `json:"pageCode" assign:"toField:PageCode"`
+		PageName    string `json:"pageName" assign:"toField:PageName"`
+		Description string `json:"description" assign:"toField:Description"`
+		IsEnabled   string `json:"isEnabled" assign:"toField:IsEnabled"`
+		SortOrder   int    `json:"sortOrder" assign:"toField:SortOrder"`
+		request.UpdateUserIDJsonBody
+		request.OperatorUserNameJsonBody
+	}
+
+	GetMiniPageConfigsQueryParams struct {
+		PageCode string `form:"pageCode" assign:"toField:PageCode"`
+		request.BaseQueryParams
+		request.TenantIDQueryParam
+	}
+
+	GetMiniPageConfigQueryParams struct {
+		request.IDQueryParam
+	}
+
+	EnabledOrDisableJsonBody struct {
+		request.IDJsonBody
+		IsEnabled string `json:"isEnabled" assign:"toField:IsEnabled"`
+	}
+
+	/* HAC: HTTP RELATION REQUEST PARAMS */
+	/* HAC: END HTTP RELATION REQUEST PARAMS */
+)

+ 73 - 0
application/domain/mini_quality_product_config/entity.go

@@ -0,0 +1,73 @@
+package mini_quality_product_config
+
+import (
+	"git.sxidc.com/go-framework/baize/framework/core/domain"
+	"git.sxidc.com/go-framework/baize/framework/core/domain/entity"
+)
+
+const (
+	FieldComponentID     = "ComponentID"
+	FieldProductID       = "ProductID"
+	FieldCustomTitle     = "CustomTitle"
+	FieldCustomSubtitle  = "CustomSubtitle"
+	FieldCustomImage     = "CustomImage"
+	FieldBackgroundColor = "BackgroundColor"
+	FieldSortOrder       = "SortOrder"
+	FieldIsEnabled       = "IsEnabled"
+)
+
+var fieldMap = map[string]string{
+	FieldComponentID:     "组件实例ID",
+	FieldProductID:       "关联的商品ID",
+	FieldCustomTitle:     "自定义标题",
+	FieldCustomSubtitle:  "自定义副标题",
+	FieldCustomImage:     "自定义图片",
+	FieldBackgroundColor: "背景颜色",
+	FieldSortOrder:       "排序",
+	FieldIsEnabled:       "是否启用",
+}
+
+var (
+	ColumnComponentID     = domain.ColumnName(FieldComponentID)
+	ColumnProductID       = domain.ColumnName(FieldProductID)
+	ColumnCustomTitle     = domain.ColumnName(FieldCustomTitle)
+	ColumnCustomSubtitle  = domain.ColumnName(FieldCustomSubtitle)
+	ColumnCustomImage     = domain.ColumnName(FieldCustomImage)
+	ColumnBackgroundColor = domain.ColumnName(FieldBackgroundColor)
+	ColumnSortOrder       = domain.ColumnName(FieldSortOrder)
+	ColumnIsEnabled       = domain.ColumnName(FieldIsEnabled)
+)
+
+type Entity struct {
+	entity.Base
+	ComponentID     string `sqlmapping:"column:component_id;" sqlresult:"column:component_id;" check:"required,lte=32,when=create/update"`
+	ProductID       string `sqlmapping:"column:product_id;" sqlresult:"column:product_id;" check:"required,lte=32,when=create/update"`
+	CustomTitle     string `sqlmapping:"column:custom_title;" sqlresult:"column:custom_title;" check:"required,lte=200,when=create/update"`
+	CustomSubtitle  string `sqlmapping:"column:custom_subtitle;" sqlresult:"column:custom_subtitle;" check:"required,lte=200,when=create/update"`
+	CustomImage     string `sqlmapping:"column:custom_image;" sqlresult:"column:custom_image;" check:"required,lte=500,when=create/update"`
+	BackgroundColor string `sqlmapping:"column:background_color;" sqlresult:"column:background_color;" check:"required,lte=20,when=create/update"`
+	SortOrder       int    `sqlmapping:"column:sort_order;" sqlresult:"column:sort_order;" check:"required,when=create/update"`
+	IsEnabled       string `sqlmapping:"column:is_enabled;" sqlresult:"column:is_enabled;" check:"required,lte=10,when=create/update"`
+	entity.TenantIDField
+	entity.UserIDFields
+	entity.OperatorUserNameField
+	entity.TimeFields
+
+	/* HAC: ENTITY RELATION FIELDS */
+	/* HAC: END ENTITY RELATION FIELDS */
+}
+
+func (e *Entity) DomainCNName() string {
+	return "品质农产配置表"
+}
+
+func (e *Entity) DomainCamelName() string {
+	return "MiniQualityProductConfig"
+}
+
+func (e *Entity) GetFieldMap() map[string]string {
+	return fieldMap
+}
+
+/* HAC: ENTITY RELATION METHODS */
+/* HAC: END ENTITY RELATION METHODS */

+ 22 - 0
application/domain/mini_quality_product_config/info.go

@@ -0,0 +1,22 @@
+package mini_quality_product_config
+
+import (
+	"ecos/application/domain/oss"
+	"git.sxidc.com/go-framework/baize/framework/core/application"
+)
+
+type Info struct {
+	application.InfoIDField
+	ComponentID     string           `json:"componentId" sqlresult:"column:component_id;"`
+	ProductID       string           `json:"productId" sqlresult:"column:product_id;"`
+	CustomTitle     string           `json:"customTitle" sqlresult:"column:custom_title;"`
+	CustomSubtitle  string           `json:"customSubtitle" sqlresult:"column:custom_subtitle;"`
+	CustomImageStr  string           `json:"customImageStr" sqlresult:"column:custom_image;"`
+	CustomImage     []oss.FileObject `json:"customImage" sqlresult:"column:-;"`
+	BackgroundColor string           `json:"backgroundColor" sqlresult:"column:background_color;"`
+	SortOrder       int              `json:"sortOrder" sqlresult:"column:sort_order;"`
+	IsEnabled       string           `json:"isEnabled" sqlresult:"column:is_enabled;"`
+	application.InfoTenantIDField
+	application.InfoUserIDFields
+	application.InfoTimeFields
+}

+ 59 - 0
application/domain/mini_quality_product_config/request_params.go

@@ -0,0 +1,59 @@
+package mini_quality_product_config
+
+import (
+	"git.sxidc.com/go-framework/baize/framework/core/api/request"
+)
+
+type (
+	CreateMiniQualityProductConfigJsonBody struct {
+		ComponentID     string `json:"componentId" binding:"required" assign:"toField:ComponentID"`
+		ProductID       string `json:"productId" binding:"required" assign:"toField:ProductID"`
+		CustomTitle     string `json:"customTitle" binding:"required" assign:"toField:CustomTitle"`
+		CustomSubtitle  string `json:"customSubtitle" binding:"required" assign:"toField:CustomSubtitle"`
+		CustomImage     string `json:"customImage" binding:"required" assign:"toField:CustomImage"`
+		BackgroundColor string `json:"backgroundColor" binding:"required" assign:"toField:BackgroundColor"`
+		SortOrder       int    `json:"sortOrder" binding:"required" assign:"toField:SortOrder"`
+		IsEnabled       string `json:"isEnabled" binding:"required" assign:"toField:IsEnabled"`
+		request.TenantIDJsonBody
+		request.CreateUserIDJsonBody
+		request.OperatorUserNameJsonBody
+	}
+
+	DeleteMiniQualityProductConfigQueryParams struct {
+		request.IDQueryParam
+		request.DeleteUserIDQueryParams
+		request.OperatorUserNameQueryParams
+	}
+
+	UpdateMiniQualityProductConfigJsonBody struct {
+		request.IDJsonBody
+		ComponentID     string `json:"componentId" assign:"toField:ComponentID"`
+		ProductID       string `json:"productId" assign:"toField:ProductID"`
+		CustomTitle     string `json:"customTitle" assign:"toField:CustomTitle"`
+		CustomSubtitle  string `json:"customSubtitle" assign:"toField:CustomSubtitle"`
+		CustomImage     string `json:"customImage" assign:"toField:CustomImage"`
+		BackgroundColor string `json:"backgroundColor" assign:"toField:BackgroundColor"`
+		SortOrder       int    `json:"sortOrder" assign:"toField:SortOrder"`
+		IsEnabled       string `json:"isEnabled" assign:"toField:IsEnabled"`
+		request.UpdateUserIDJsonBody
+		request.OperatorUserNameJsonBody
+	}
+
+	GetMiniQualityProductConfigsQueryParams struct {
+		ComponentID string `form:"componentId" assign:"toField:ComponentID"`
+		request.BaseQueryParams
+		request.TenantIDQueryParam
+	}
+
+	GetMiniQualityProductConfigQueryParams struct {
+		request.IDQueryParam
+	}
+
+	EnabledOrDisableJsonBody struct {
+		request.IDJsonBody
+		IsEnabled string `json:"isEnabled" assign:"toField:IsEnabled"`
+	}
+
+	/* HAC: HTTP RELATION REQUEST PARAMS */
+	/* HAC: END HTTP RELATION REQUEST PARAMS */
+)

+ 73 - 0
application/domain/mini_video_config/entity.go

@@ -0,0 +1,73 @@
+package mini_video_config
+
+import (
+	"git.sxidc.com/go-framework/baize/framework/core/domain"
+	"git.sxidc.com/go-framework/baize/framework/core/domain/entity"
+)
+
+const (
+	FieldComponentID   = "ComponentID"
+	FieldVideoTitle    = "VideoTitle"
+	FieldVideoUrl      = "VideoUrl"
+	FieldVideoCover    = "VideoCover"
+	FieldVideoDuration = "VideoDuration"
+	FieldAutoPlay      = "AutoPlay"
+	FieldShowControls  = "ShowControls"
+	FieldIsEnabled     = "IsEnabled"
+)
+
+var fieldMap = map[string]string{
+	FieldComponentID:   "组件实例ID",
+	FieldVideoTitle:    "视频标题",
+	FieldVideoUrl:      "视频地址",
+	FieldVideoCover:    "视频封面",
+	FieldVideoDuration: "视频时长(秒)",
+	FieldAutoPlay:      "是否自动播放",
+	FieldShowControls:  "是否显示控制器",
+	FieldIsEnabled:     "是否启用",
+}
+
+var (
+	ColumnComponentID   = domain.ColumnName(FieldComponentID)
+	ColumnVideoTitle    = domain.ColumnName(FieldVideoTitle)
+	ColumnVideoUrl      = domain.ColumnName(FieldVideoUrl)
+	ColumnVideoCover    = domain.ColumnName(FieldVideoCover)
+	ColumnVideoDuration = domain.ColumnName(FieldVideoDuration)
+	ColumnAutoPlay      = domain.ColumnName(FieldAutoPlay)
+	ColumnShowControls  = domain.ColumnName(FieldShowControls)
+	ColumnIsEnabled     = domain.ColumnName(FieldIsEnabled)
+)
+
+type Entity struct {
+	entity.Base
+	ComponentID   string `sqlmapping:"column:component_id;" sqlresult:"column:component_id;" check:"required,lte=32,when=create/update"`
+	VideoTitle    string `sqlmapping:"column:video_title;" sqlresult:"column:video_title;" check:"required,lte=200,when=create/update"`
+	VideoUrl      string `sqlmapping:"column:video_url;" sqlresult:"column:video_url;" check:"required,lte=500,when=create/update"`
+	VideoCover    string `sqlmapping:"column:video_cover;" sqlresult:"column:video_cover;" check:"required,lte=500,when=create/update"`
+	VideoDuration int    `sqlmapping:"column:video_duration;updateClear;" sqlresult:"column:video_duration;"`
+	AutoPlay      string `sqlmapping:"column:auto_play;" sqlresult:"column:auto_play;" check:"required,when=create/update"`
+	ShowControls  string `sqlmapping:"column:show_controls;" sqlresult:"column:show_controls;" check:"required,when=create/update"`
+	IsEnabled     string `sqlmapping:"column:is_enabled;" sqlresult:"column:is_enabled;" check:"required,lte=10,when=create/update"`
+	entity.TenantIDField
+	entity.UserIDFields
+	entity.OperatorUserNameField
+	entity.TimeFields
+
+	/* HAC: ENTITY RELATION FIELDS */
+	/* HAC: END ENTITY RELATION FIELDS */
+}
+
+func (e *Entity) DomainCNName() string {
+	return "宣传视频配置表"
+}
+
+func (e *Entity) DomainCamelName() string {
+	return "MiniVideoConfig"
+}
+
+func (e *Entity) GetFieldMap() map[string]string {
+	return fieldMap
+}
+
+/* HAC: ENTITY RELATION METHODS */
+/* HAC: END ENTITY RELATION METHODS */

+ 23 - 0
application/domain/mini_video_config/info.go

@@ -0,0 +1,23 @@
+package mini_video_config
+
+import (
+	"ecos/application/domain/oss"
+	"git.sxidc.com/go-framework/baize/framework/core/application"
+)
+
+type Info struct {
+	application.InfoIDField
+	ComponentID   string           `json:"componentId" sqlresult:"column:component_id;"`
+	VideoTitle    string           `json:"videoTitle" sqlresult:"column:video_title;"`
+	VideoUrlStr   string           `json:"videoUrlStr" sqlresult:"column:video_url;"`
+	VideoUrl      []oss.FileObject `json:"videoUrl" sqlresult:"column:-;"`
+	VideoCoverStr string           `json:"videoCoverStr" sqlresult:"column:video_cover;"`
+	VideoCover    []oss.FileObject `json:"videoCover" sqlresult:"column:-;"`
+	VideoDuration int              `json:"videoDuration" sqlresult:"column:video_duration;"`
+	AutoPlay      string           `json:"autoPlay" sqlresult:"column:auto_play;"`
+	ShowControls  string           `json:"showControls" sqlresult:"column:show_controls;"`
+	IsEnabled     string           `json:"isEnabled" sqlresult:"column:is_enabled;"`
+	application.InfoTenantIDField
+	application.InfoUserIDFields
+	application.InfoTimeFields
+}

+ 59 - 0
application/domain/mini_video_config/request_params.go

@@ -0,0 +1,59 @@
+package mini_video_config
+
+import (
+	"git.sxidc.com/go-framework/baize/framework/core/api/request"
+)
+
+type (
+	CreateMiniVideoConfigJsonBody struct {
+		ComponentID   string `json:"componentId" binding:"required" assign:"toField:ComponentID"`
+		VideoTitle    string `json:"videoTitle" binding:"required" assign:"toField:VideoTitle"`
+		VideoUrl      string `json:"videoUrl" binding:"required" assign:"toField:VideoUrl"`
+		VideoCover    string `json:"videoCover" binding:"required" assign:"toField:VideoCover"`
+		VideoDuration int    `json:"videoDuration" assign:"toField:VideoDuration"`
+		AutoPlay      string `json:"autoPlay" binding:"required" assign:"toField:AutoPlay"`
+		ShowControls  string `json:"showControls" binding:"required" assign:"toField:ShowControls"`
+		IsEnabled     string `json:"isEnabled" binding:"required" assign:"toField:IsEnabled"`
+		request.TenantIDJsonBody
+		request.CreateUserIDJsonBody
+		request.OperatorUserNameJsonBody
+	}
+
+	DeleteMiniVideoConfigQueryParams struct {
+		request.IDQueryParam
+		request.DeleteUserIDQueryParams
+		request.OperatorUserNameQueryParams
+	}
+
+	UpdateMiniVideoConfigJsonBody struct {
+		request.IDJsonBody
+		ComponentID   string `json:"componentId" assign:"toField:ComponentID"`
+		VideoTitle    string `json:"videoTitle" assign:"toField:VideoTitle"`
+		VideoUrl      string `json:"videoUrl" assign:"toField:VideoUrl"`
+		VideoCover    string `json:"videoCover" assign:"toField:VideoCover"`
+		VideoDuration int    `json:"videoDuration" assign:"toField:VideoDuration"`
+		AutoPlay      string `json:"autoPlay" assign:"toField:AutoPlay"`
+		ShowControls  string `json:"showControls" assign:"toField:ShowControls"`
+		IsEnabled     string `json:"isEnabled" assign:"toField:IsEnabled"`
+		request.UpdateUserIDJsonBody
+		request.OperatorUserNameJsonBody
+	}
+
+	GetMiniVideoConfigsQueryParams struct {
+		ComponentID string `form:"componentId" assign:"toField:ComponentID"`
+		request.BaseQueryParams
+		request.TenantIDQueryParam
+	}
+
+	GetMiniVideoConfigQueryParams struct {
+		request.IDQueryParam
+	}
+
+	EnabledOrDisableJsonBody struct {
+		request.IDJsonBody
+		IsEnabled string `json:"isEnabled" assign:"toField:IsEnabled"`
+	}
+
+	/* HAC: HTTP RELATION REQUEST PARAMS */
+	/* HAC: END HTTP RELATION REQUEST PARAMS */
+)

+ 7 - 0
application/domain/oss/info.go

@@ -0,0 +1,7 @@
+package oss
+
+type FileObject struct {
+	Url  string `json:"url"`
+	Name string `json:"name"`
+	Temp string `json:"temp"`
+}

+ 146 - 0
application/service/mini_carousel_config.go

@@ -0,0 +1,146 @@
+package service
+
+import (
+	"ecos/application/domain/mini_carousel_config"
+	"git.sxidc.com/go-framework/baize/convenient/entity_crud"
+	"git.sxidc.com/go-framework/baize/framework/binding"
+	"git.sxidc.com/go-framework/baize/framework/core/api"
+	"git.sxidc.com/go-framework/baize/framework/core/api/request"
+	"git.sxidc.com/go-framework/baize/framework/core/api/response"
+	"git.sxidc.com/go-framework/baize/framework/core/application"
+	"git.sxidc.com/go-framework/baize/framework/core/domain"
+	"git.sxidc.com/go-framework/baize/framework/core/domain/entity"
+	"git.sxidc.com/go-framework/baize/framework/core/infrastructure"
+	"git.sxidc.com/go-framework/baize/framework/core/infrastructure/database"
+	"git.sxidc.com/go-framework/baize/framework/core/infrastructure/database/sql"
+	"git.sxidc.com/go-tools/utils/strutils"
+	"github.com/pkg/errors"
+)
+
+var miniCarouselConfigService = &MiniCarouselConfigService{}
+
+type MiniCarouselConfigService struct{}
+
+func (svc *MiniCarouselConfigService) Init(appInstance *application.App) error {
+	svc.v1(appInstance)
+	return nil
+}
+
+func (svc *MiniCarouselConfigService) Destroy() error {
+	return nil
+}
+
+func (svc *MiniCarouselConfigService) v1(appInstance *application.App) {
+	v1Binder := binding.NewBinder(appInstance.ChooseRouter(api.RouterPrefix, "v1"),
+		appInstance.Infrastructure())
+
+	entity_crud.BindSimple[mini_carousel_config.Info](v1Binder, &entity_crud.Simple[mini_carousel_config.Info]{
+		Entity:             &mini_carousel_config.Entity{},
+		Schema:             dbSchema,
+		CreateJsonBody:     &mini_carousel_config.CreateMiniCarouselConfigJsonBody{},
+		DeleteQueryParams:  &mini_carousel_config.DeleteMiniCarouselConfigQueryParams{},
+		UpdateJsonBody:     &mini_carousel_config.UpdateMiniCarouselConfigJsonBody{},
+		QueryQueryParams:   &mini_carousel_config.GetMiniCarouselConfigsQueryParams{},
+		GetByIDQueryParams: &mini_carousel_config.GetMiniCarouselConfigQueryParams2{},
+	},
+		entity_crud.WithQueryFormCustomConditionFunc[mini_carousel_config.Info](func(c *api.Context, params request.Params, e entity.Entity, i *infrastructure.Infrastructure) (*entity_crud.CustomCondition, error) {
+			requestParams, err := request.ToConcrete[*mini_carousel_config.GetMiniCarouselConfigsQueryParams](params)
+			if err != nil {
+				return nil, err
+			}
+			conditions := sql.NewConditions()
+			if strutils.IsStringNotEmpty(requestParams.TenantID) {
+				conditions.Equal(entity.ColumnTenantID, requestParams.TenantID)
+			}
+
+			if strutils.IsStringNotEmpty(requestParams.ComponentID) {
+				conditions.Equal(mini_carousel_config.ColumnComponentID, requestParams.ComponentID)
+			}
+
+			if requestParams.LinkType > 0 {
+				conditions.Equal(mini_carousel_config.ColumnLinkType, requestParams.LinkType)
+			}
+
+			if strutils.IsStringNotEmpty(requestParams.IsEnabled) {
+				conditions.Equal(mini_carousel_config.ColumnIsEnabled, requestParams.IsEnabled)
+			}
+
+			return &entity_crud.CustomCondition{
+				Conditions: conditions,
+				OrderBy:    mini_carousel_config.ColumnSortOrder,
+			}, nil
+		}),
+	)
+
+	binding.PutBind(v1Binder, &binding.SimpleBindItem[any]{
+		Path:             "/miniCarouselConfig/enabledOrDisable",
+		SendResponseFunc: response.SendMsgResponse,
+		RequestParams:    &mini_carousel_config.EnabledOrDisableJsonBody{},
+		ServiceFunc: func(c *api.Context, params request.Params, objects []domain.Object, i *infrastructure.Infrastructure) (any, error) {
+			requestParams, err := request.ToConcrete[*mini_carousel_config.EnabledOrDisableJsonBody](params)
+			if err != nil {
+				return nil, err
+			}
+			err = database.Transaction(i.DBExecutor(), func(tx database.Executor) error {
+				err = database.Update(tx, &sql.UpdateExecuteParams{
+					TableName:  domain.TableName(dbSchema, &mini_carousel_config.Entity{}),
+					Conditions: sql.NewConditions().Equal(entity.ColumnID, requestParams.ID),
+					TableRow:   sql.NewTableRow().Add(mini_carousel_config.ColumnIsEnabled, requestParams.IsEnabled),
+				})
+				//这个启用 别的都关掉
+				if requestParams.IsEnabled == Enabled {
+					err = database.Update(tx, &sql.UpdateExecuteParams{
+						TableName:  domain.TableName(dbSchema, &mini_carousel_config.Entity{}),
+						Conditions: sql.NewConditions().Not(entity.ColumnID, requestParams.ID),
+						TableRow:   sql.NewTableRow().Add(mini_carousel_config.ColumnIsEnabled, Disable),
+					})
+					if err != nil {
+						return err
+					}
+				}
+				return nil
+			})
+
+			return nil, nil
+		},
+	})
+
+}
+
+func (svc *MiniCarouselConfigService) queryByKeyFields(e *mini_carousel_config.Entity, dbExecutor database.Executor) (*mini_carousel_config.Entity, error) {
+	result, err := database.QueryOne(dbExecutor, &sql.QueryOneExecuteParams{
+		TableName:  domain.TableName(dbSchema, e),
+		Conditions: sql.NewConditions().Equal(entity.ColumnID, e.ID),
+	})
+	if err != nil {
+		if database.IsErrorDBRecordNotExist(err) {
+			return nil, errors.New(e.DomainCNName() + "不存在")
+		}
+
+		return nil, err
+	}
+
+	existEntity := new(mini_carousel_config.Entity)
+	err = sql.ParseSqlResult(result, existEntity)
+	if err != nil {
+		return nil, err
+	}
+
+	return existEntity, nil
+}
+
+func (svc *MiniCarouselConfigService) checkExistByKeyFields(e *mini_carousel_config.Entity, dbExecutor database.Executor) error {
+	exist, err := database.CheckExist(dbExecutor, &sql.CheckExistExecuteParams{
+		TableName:  domain.TableName(dbSchema, e),
+		Conditions: sql.NewConditions().Equal(entity.ColumnID, e.ID),
+	})
+	if err != nil {
+		return err
+	}
+
+	if !exist {
+		return errors.New(e.DomainCNName() + "不存在")
+	}
+
+	return nil
+}

+ 237 - 0
application/service/mini_component_type.go

@@ -0,0 +1,237 @@
+package service
+
+import (
+	"ecos/application/domain/mini_component_type"
+	"git.sxidc.com/go-framework/baize/convenient/entity_crud"
+	"git.sxidc.com/go-framework/baize/framework/binding"
+	"git.sxidc.com/go-framework/baize/framework/core/api"
+	"git.sxidc.com/go-framework/baize/framework/core/api/request"
+	"git.sxidc.com/go-framework/baize/framework/core/api/response"
+	"git.sxidc.com/go-framework/baize/framework/core/application"
+	"git.sxidc.com/go-framework/baize/framework/core/domain"
+	"git.sxidc.com/go-framework/baize/framework/core/domain/entity"
+	"git.sxidc.com/go-framework/baize/framework/core/infrastructure"
+	"git.sxidc.com/go-framework/baize/framework/core/infrastructure/database"
+	"git.sxidc.com/go-framework/baize/framework/core/infrastructure/database/sql"
+	"git.sxidc.com/go-tools/utils/strutils"
+	"github.com/pkg/errors"
+)
+
+const (
+	Enabled = "1"
+	Disable = "2"
+)
+
+var miniComponentTypeService = &MiniComponentTypeService{}
+
+type MiniComponentTypeService struct{}
+
+func (svc *MiniComponentTypeService) Init(appInstance *application.App) error {
+	svc.v1(appInstance)
+	return nil
+}
+
+func (svc *MiniComponentTypeService) Destroy() error {
+	return nil
+}
+
+func (svc *MiniComponentTypeService) v1(appInstance *application.App) {
+	v1Binder := binding.NewBinder(appInstance.ChooseRouter(api.RouterPrefix, "v1"),
+		appInstance.Infrastructure())
+
+	entity_crud.BindSimple[mini_component_type.Info](v1Binder, &entity_crud.Simple[mini_component_type.Info]{
+		Entity:             &mini_component_type.Entity{},
+		Schema:             dbSchema,
+		CreateJsonBody:     &mini_component_type.CreateMiniComponentTypeJsonBody{},
+		DeleteQueryParams:  &mini_component_type.DeleteMiniComponentTypeQueryParams{},
+		UpdateJsonBody:     &mini_component_type.UpdateMiniComponentTypeJsonBody{},
+		QueryQueryParams:   &mini_component_type.GetMiniComponentTypesQueryParams{},
+		GetByIDQueryParams: &mini_component_type.GetMiniComponentTypeQueryParams{},
+	},
+		entity_crud.WithCreateTx(),
+		entity_crud.WithUpdateTx(),
+		entity_crud.WithCreateCallbacks(&entity_crud.CreateCallbacks{
+			Before: func(c *api.Context, params request.Params, e entity.Entity, prepared map[string]any, i *infrastructure.Infrastructure, tx database.Executor) error {
+				//code 唯一  同code 只有1个启用
+				requestParams, err := request.ToConcrete[*mini_component_type.CreateMiniComponentTypeJsonBody](params)
+				if err != nil {
+					return err
+				}
+				exist, err := database.CheckExist(tx, &sql.CheckExistExecuteParams{
+					TableName:  domain.TableName(dbSchema, &mini_component_type.Entity{}),
+					Conditions: sql.NewConditions().Equal(mini_component_type.ColumnTypeCode, requestParams.TypeCode),
+				})
+
+				if err != nil {
+					return err
+				}
+				if exist {
+					return errors.New("组件类型编码已存在")
+				}
+				return nil
+			},
+			After: func(c *api.Context, params request.Params, e entity.Entity, prepared map[string]any, i *infrastructure.Infrastructure, tx database.Executor) error {
+				record, err := domain.ToConcrete[*mini_component_type.Entity](e)
+				if err != nil {
+					return err
+				}
+				if record.IsEnabled == Enabled {
+					//当前启用 把别的同code的关掉
+					err = database.Update(tx, &sql.UpdateExecuteParams{
+						TableName:  domain.TableName(dbSchema, &mini_component_type.Entity{}),
+						Conditions: sql.NewConditions().Not(entity.ColumnID, e.GetID()).Equal(mini_component_type.ColumnTypeCode, record.TypeCode),
+						TableRow:   sql.NewTableRow().Add(mini_component_type.ColumnIsEnabled, Disable),
+					})
+					if err != nil {
+						return err
+					}
+				}
+				return nil
+			},
+		}),
+		entity_crud.WithUpdateCallbacks(&entity_crud.UpdateCallbacks{
+			Before: func(c *api.Context, params request.Params, e entity.Entity, prepared map[string]any, i *infrastructure.Infrastructure, tx database.Executor) error {
+				requestParams, err := request.ToConcrete[*mini_component_type.UpdateMiniComponentTypeJsonBody](params)
+				if err != nil {
+					return err
+				}
+				results, i2, err := database.Query(tx, &sql.QueryExecuteParams{
+					TableName:  domain.TableName(dbSchema, &mini_component_type.Entity{}),
+					Conditions: sql.NewConditions().Equal(mini_component_type.ColumnTypeCode, requestParams.TypeCode),
+				})
+				if err != nil {
+					return err
+				}
+				if i2 > 0 {
+					entities := make([]mini_component_type.Entity, 0)
+					err = sql.ParseSqlResult(results, &entities)
+					if err != nil {
+						return err
+					}
+					record := entities[0]
+					if record.ID != requestParams.ID {
+						return errors.New("组件类型编码已存在")
+					}
+				}
+				return nil
+			},
+			After: func(c *api.Context, params request.Params, e entity.Entity, prepared map[string]any, i *infrastructure.Infrastructure, tx database.Executor) error {
+
+				record, err := domain.ToConcrete[*mini_component_type.Entity](e)
+				if err != nil {
+					return err
+				}
+				if record.IsEnabled == Enabled {
+					//当前启用 把别的同code的关掉
+					err = database.Update(tx, &sql.UpdateExecuteParams{
+						TableName:  domain.TableName(dbSchema, &mini_component_type.Entity{}),
+						Conditions: sql.NewConditions().Not(entity.ColumnID, e.GetID()).Equal(mini_component_type.ColumnTypeCode, record.TypeCode),
+						TableRow:   sql.NewTableRow().Add(mini_component_type.ColumnIsEnabled, Disable),
+					})
+					if err != nil {
+						return err
+					}
+				}
+				return nil
+			},
+		}),
+		entity_crud.WithQueryFormCustomConditionFunc[mini_component_type.Info](func(c *api.Context, params request.Params, e entity.Entity, i *infrastructure.Infrastructure) (*entity_crud.CustomCondition, error) {
+			requestParams, err := request.ToConcrete[*mini_component_type.GetMiniComponentTypesQueryParams](params)
+			if err != nil {
+				return nil, err
+			}
+			conditions := sql.NewConditions()
+			if strutils.IsStringNotEmpty(requestParams.TenantID) {
+				conditions.Equal(entity.ColumnTenantID, requestParams.TenantID)
+			}
+
+			if strutils.IsStringNotEmpty(requestParams.IsEnabled) {
+				conditions.Equal(mini_component_type.ColumnIsEnabled, requestParams.IsEnabled)
+			}
+
+			if strutils.IsStringNotEmpty(requestParams.TypeCode) {
+				conditions.Equal(mini_component_type.ColumnTypeCode, requestParams.TypeCode)
+			}
+			if strutils.IsStringNotEmpty(requestParams.TypeName) {
+				conditions.Like(mini_component_type.ColumnTypeName, "%"+requestParams.TypeName+"%")
+			}
+			return &entity_crud.CustomCondition{
+				Conditions: conditions,
+				OrderBy:    mini_component_type.ColumnSortOrder,
+			}, nil
+
+		}),
+	)
+
+	binding.PutBind(v1Binder, &binding.SimpleBindItem[any]{
+		Path:             "/miniComponentType/enabledOrDisable",
+		SendResponseFunc: response.SendMsgResponse,
+		RequestParams:    &mini_component_type.EnabledOrDisableJsonBody{},
+		ServiceFunc: func(c *api.Context, params request.Params, objects []domain.Object, i *infrastructure.Infrastructure) (any, error) {
+			requestParams, err := request.ToConcrete[*mini_component_type.EnabledOrDisableJsonBody](params)
+			if err != nil {
+				return nil, err
+			}
+			err = database.Transaction(i.DBExecutor(), func(tx database.Executor) error {
+				err = database.Update(tx, &sql.UpdateExecuteParams{
+					TableName:  domain.TableName(dbSchema, &mini_component_type.Entity{}),
+					Conditions: sql.NewConditions().Equal(entity.ColumnID, requestParams.ID),
+					TableRow:   sql.NewTableRow().Add(mini_component_type.ColumnIsEnabled, requestParams.IsEnabled),
+				})
+				//这个启用 别的都关掉
+				if requestParams.IsEnabled == Enabled {
+					err = database.Update(tx, &sql.UpdateExecuteParams{
+						TableName:  domain.TableName(dbSchema, &mini_component_type.Entity{}),
+						Conditions: sql.NewConditions().Not(entity.ColumnID, requestParams.ID).Equal(mini_component_type.ColumnTypeCode, requestParams.TypeCode),
+						TableRow:   sql.NewTableRow().Add(mini_component_type.ColumnIsEnabled, Disable),
+					})
+					if err != nil {
+						return err
+					}
+				}
+				return nil
+			})
+
+			return nil, nil
+		},
+	})
+
+}
+
+func (svc *MiniComponentTypeService) queryByKeyFields(e *mini_component_type.Entity, dbExecutor database.Executor) (*mini_component_type.Entity, error) {
+	result, err := database.QueryOne(dbExecutor, &sql.QueryOneExecuteParams{
+		TableName:  domain.TableName(dbSchema, e),
+		Conditions: sql.NewConditions().Equal(entity.ColumnID, e.ID),
+	})
+	if err != nil {
+		if database.IsErrorDBRecordNotExist(err) {
+			return nil, errors.New(e.DomainCNName() + "不存在")
+		}
+
+		return nil, err
+	}
+
+	existEntity := new(mini_component_type.Entity)
+	err = sql.ParseSqlResult(result, existEntity)
+	if err != nil {
+		return nil, err
+	}
+
+	return existEntity, nil
+}
+
+func (svc *MiniComponentTypeService) checkExistByKeyFields(e *mini_component_type.Entity, dbExecutor database.Executor) error {
+	exist, err := database.CheckExist(dbExecutor, &sql.CheckExistExecuteParams{
+		TableName:  domain.TableName(dbSchema, e),
+		Conditions: sql.NewConditions().Equal(entity.ColumnID, e.ID),
+	})
+	if err != nil {
+		return err
+	}
+
+	if !exist {
+		return errors.New(e.DomainCNName() + "不存在")
+	}
+
+	return nil
+}

+ 234 - 0
application/service/mini_live_config.go

@@ -0,0 +1,234 @@
+package service
+
+import (
+	"ecos/application/domain/mini_live_config"
+	"ecos/osm"
+	"git.sxidc.com/go-framework/baize/convenient/entity_crud"
+	"git.sxidc.com/go-framework/baize/framework/binding"
+	"git.sxidc.com/go-framework/baize/framework/core/api"
+	"git.sxidc.com/go-framework/baize/framework/core/api/request"
+	"git.sxidc.com/go-framework/baize/framework/core/api/response"
+	"git.sxidc.com/go-framework/baize/framework/core/application"
+	"git.sxidc.com/go-framework/baize/framework/core/domain"
+	"git.sxidc.com/go-framework/baize/framework/core/domain/entity"
+	"git.sxidc.com/go-framework/baize/framework/core/infrastructure"
+	"git.sxidc.com/go-framework/baize/framework/core/infrastructure/database"
+	"git.sxidc.com/go-framework/baize/framework/core/infrastructure/database/sql"
+	"git.sxidc.com/go-tools/utils/strutils"
+	"github.com/pkg/errors"
+)
+
+var miniLiveConfigService = &MiniLiveConfigService{}
+
+type MiniLiveConfigService struct{}
+
+func (svc *MiniLiveConfigService) Init(appInstance *application.App) error {
+	svc.v1(appInstance)
+	return nil
+}
+
+func (svc *MiniLiveConfigService) Destroy() error {
+	return nil
+}
+
+func (svc *MiniLiveConfigService) v1(appInstance *application.App) {
+	v1Binder := binding.NewBinder(appInstance.ChooseRouter(api.RouterPrefix, "v1"),
+		appInstance.Infrastructure())
+
+	entity_crud.BindSimple[mini_live_config.Info](v1Binder, &entity_crud.Simple[mini_live_config.Info]{
+		Entity:             &mini_live_config.Entity{},
+		Schema:             dbSchema,
+		CreateJsonBody:     &mini_live_config.CreateMiniLiveConfigJsonBody{},
+		DeleteQueryParams:  &mini_live_config.DeleteMiniLiveConfigQueryParams{},
+		UpdateJsonBody:     &mini_live_config.UpdateMiniLiveConfigJsonBody{},
+		QueryQueryParams:   &mini_live_config.GetMiniLiveConfigsQueryParams{},
+		GetByIDQueryParams: &mini_live_config.GetMiniLiveConfigQueryParams{},
+	},
+		entity_crud.WithCreateTx(),
+		entity_crud.WithUpdateTx(),
+		entity_crud.WithCreateCallbacks(&entity_crud.CreateCallbacks{
+			Before: func(c *api.Context, params request.Params, e entity.Entity, prepared map[string]any, i *infrastructure.Infrastructure, tx database.Executor) error {
+				requestParams, err := request.ToConcrete[*mini_live_config.CreateMiniLiveConfigJsonBody](params)
+				if err != nil {
+					return err
+				}
+				record, err := domain.ToConcrete[*mini_live_config.Entity](e)
+				if err != nil {
+					return err
+				}
+				if strutils.IsStringNotEmpty(requestParams.PlaceholderImage) {
+					newFilePath, err := osm.MultipleFileMv(requestParams.PlaceholderImage)
+					if err != nil {
+						return err
+					}
+					record.PlaceholderImage = newFilePath
+				}
+				if strutils.IsStringNotEmpty(requestParams.LiveCoverUrl) {
+					newFilePath, err := osm.MultipleFileMv(requestParams.LiveCoverUrl)
+					if err != nil {
+						return err
+					}
+					record.LiveCoverUrl = newFilePath
+				}
+				return nil
+			},
+		}),
+		entity_crud.WithUpdateCallbacks(&entity_crud.UpdateCallbacks{
+			Before: func(c *api.Context, params request.Params, e entity.Entity, prepared map[string]any, i *infrastructure.Infrastructure, tx database.Executor) error {
+				requestParams, err := request.ToConcrete[*mini_live_config.UpdateMiniLiveConfigJsonBody](params)
+				if err != nil {
+					return err
+				}
+
+				record, err := domain.ToConcrete[*mini_live_config.Entity](e)
+				if err != nil {
+					return err
+				}
+				if strutils.IsStringNotEmpty(requestParams.PlaceholderImage) {
+					newFilePath, err := osm.MultipleFileMv(requestParams.PlaceholderImage)
+					if err != nil {
+						return err
+					}
+					record.PlaceholderImage = newFilePath
+				}
+				if strutils.IsStringNotEmpty(requestParams.LiveCoverUrl) {
+					newFilePath, err := osm.MultipleFileMv(requestParams.LiveCoverUrl)
+					if err != nil {
+						return err
+					}
+					record.LiveCoverUrl = newFilePath
+				}
+				return nil
+			},
+		}),
+		entity_crud.WithQueryFormCustomConditionFunc[mini_live_config.Info](func(c *api.Context, params request.Params, e entity.Entity, i *infrastructure.Infrastructure) (*entity_crud.CustomCondition, error) {
+			requestParams, err := request.ToConcrete[*mini_live_config.GetMiniLiveConfigsQueryParams](params)
+			if err != nil {
+				return nil, err
+			}
+			conditions := sql.NewConditions()
+			if strutils.IsStringNotEmpty(requestParams.TenantID) {
+				conditions.Equal(entity.ColumnTenantID, requestParams.TenantID)
+			}
+			if strutils.IsStringNotEmpty(requestParams.ComponentID) {
+				conditions.Equal(mini_live_config.ColumnComponentID, requestParams.ComponentID)
+			}
+			return &entity_crud.CustomCondition{
+				Conditions: conditions,
+				OrderBy:    entity.ColumnCreatedTime + " DESC",
+			}, nil
+		}),
+		entity_crud.WithGetByIDCallbacks(&entity_crud.GetByIDCallbacks[mini_live_config.Info]{
+			OnSuccessReturn: func(c *api.Context, params request.Params, e entity.Entity, i *infrastructure.Infrastructure, output mini_live_config.Info) (mini_live_config.Info, error) {
+				if strutils.IsStringNotEmpty(output.PlaceholderImageStr) {
+					fileObjects, err := osm.MultipleFileUrl(output.PlaceholderImageStr)
+					if err != nil {
+						return output, err
+					}
+					output.PlaceholderImage = fileObjects
+				}
+				if strutils.IsStringNotEmpty(output.LiveCoverUrlStr) {
+					fileObjects, err := osm.MultipleFileUrl(output.LiveCoverUrlStr)
+					if err != nil {
+						return output, err
+					}
+					output.LiveCoverUrl = fileObjects
+				}
+				return output, nil
+			},
+		}),
+		entity_crud.WithQueryCallbacks(&entity_crud.QueryCallbacks[mini_live_config.Info]{
+			OnSuccessReturn: func(c *api.Context, params request.Params, e entity.Entity, i *infrastructure.Infrastructure, output response.InfosData[mini_live_config.Info]) (response.InfosData[mini_live_config.Info], error) {
+				infos := output.Infos
+				for i1 := range infos {
+					info := &infos[i1]
+					if strutils.IsStringNotEmpty(info.PlaceholderImageStr) {
+						fileObjects, err := osm.MultipleFileUrl(info.PlaceholderImageStr)
+						if err != nil {
+							return output, err
+						}
+						info.PlaceholderImage = fileObjects
+					}
+					if strutils.IsStringNotEmpty(info.LiveCoverUrlStr) {
+						fileObjects, err := osm.MultipleFileUrl(info.LiveCoverUrlStr)
+						if err != nil {
+							return output, err
+						}
+						info.LiveCoverUrl = fileObjects
+					}
+				}
+				return output, nil
+			},
+		}),
+	)
+
+	binding.PutBind(v1Binder, &binding.SimpleBindItem[any]{
+		Path:             "/miniLiveConfig/enabledOrDisable",
+		SendResponseFunc: response.SendMsgResponse,
+		RequestParams:    &mini_live_config.EnabledOrDisableJsonBody{},
+		ServiceFunc: func(c *api.Context, params request.Params, objects []domain.Object, i *infrastructure.Infrastructure) (any, error) {
+			requestParams, err := request.ToConcrete[*mini_live_config.EnabledOrDisableJsonBody](params)
+			if err != nil {
+				return nil, err
+			}
+			err = database.Transaction(i.DBExecutor(), func(tx database.Executor) error {
+				err = database.Update(tx, &sql.UpdateExecuteParams{
+					TableName:  domain.TableName(dbSchema, &mini_live_config.Entity{}),
+					Conditions: sql.NewConditions().Equal(entity.ColumnID, requestParams.ID),
+					TableRow:   sql.NewTableRow().Add(mini_live_config.ColumnIsEnabled, requestParams.IsEnabled),
+				})
+				if requestParams.IsEnabled == Enabled {
+					err = database.Update(tx, &sql.UpdateExecuteParams{
+						TableName:  domain.TableName(dbSchema, &mini_live_config.Entity{}),
+						Conditions: sql.NewConditions().Not(entity.ColumnID, requestParams.ID),
+						TableRow:   sql.NewTableRow().Add(mini_live_config.ColumnIsEnabled, Disable),
+					})
+					if err != nil {
+						return err
+					}
+				}
+				return nil
+			})
+
+			return nil, nil
+		},
+	})
+}
+
+func (svc *MiniLiveConfigService) queryByKeyFields(e *mini_live_config.Entity, dbExecutor database.Executor) (*mini_live_config.Entity, error) {
+	result, err := database.QueryOne(dbExecutor, &sql.QueryOneExecuteParams{
+		TableName:  domain.TableName(dbSchema, e),
+		Conditions: sql.NewConditions().Equal(entity.ColumnID, e.ID),
+	})
+	if err != nil {
+		if database.IsErrorDBRecordNotExist(err) {
+			return nil, errors.New(e.DomainCNName() + "不存在")
+		}
+
+		return nil, err
+	}
+
+	existEntity := new(mini_live_config.Entity)
+	err = sql.ParseSqlResult(result, existEntity)
+	if err != nil {
+		return nil, err
+	}
+
+	return existEntity, nil
+}
+
+func (svc *MiniLiveConfigService) checkExistByKeyFields(e *mini_live_config.Entity, dbExecutor database.Executor) error {
+	exist, err := database.CheckExist(dbExecutor, &sql.CheckExistExecuteParams{
+		TableName:  domain.TableName(dbSchema, e),
+		Conditions: sql.NewConditions().Equal(entity.ColumnID, e.ID),
+	})
+	if err != nil {
+		return err
+	}
+
+	if !exist {
+		return errors.New(e.DomainCNName() + "不存在")
+	}
+
+	return nil
+}

+ 583 - 0
application/service/mini_page_component.go

@@ -0,0 +1,583 @@
+package service
+
+import (
+	"ecos/application/domain/mini_carousel_config"
+	"ecos/application/domain/mini_live_config"
+	"ecos/application/domain/mini_page_component"
+	"ecos/application/domain/mini_quality_product_config"
+	"ecos/application/domain/mini_video_config"
+	"ecos/osm"
+	"encoding/json"
+	"git.sxidc.com/go-framework/baize/convenient/entity_crud"
+	"git.sxidc.com/go-framework/baize/framework/binding"
+	"git.sxidc.com/go-framework/baize/framework/core/api"
+	"git.sxidc.com/go-framework/baize/framework/core/api/request"
+	"git.sxidc.com/go-framework/baize/framework/core/api/response"
+	"git.sxidc.com/go-framework/baize/framework/core/application"
+	"git.sxidc.com/go-framework/baize/framework/core/domain"
+	"git.sxidc.com/go-framework/baize/framework/core/domain/entity"
+	"git.sxidc.com/go-framework/baize/framework/core/infrastructure"
+	"git.sxidc.com/go-framework/baize/framework/core/infrastructure/database"
+	"git.sxidc.com/go-framework/baize/framework/core/infrastructure/database/sql"
+	"git.sxidc.com/go-tools/utils/strutils"
+	"github.com/pkg/errors"
+)
+
+var miniPageComponentService = &MiniPageComponentService{}
+
+type MiniPageComponentService struct{}
+
+func (svc *MiniPageComponentService) Init(appInstance *application.App) error {
+	svc.v1(appInstance)
+	return nil
+}
+
+func (svc *MiniPageComponentService) Destroy() error {
+	return nil
+}
+
+func (svc *MiniPageComponentService) v1(appInstance *application.App) {
+	v1Binder := binding.NewBinder(appInstance.ChooseRouter(api.RouterPrefix, "v1"),
+		appInstance.Infrastructure())
+
+	entity_crud.BindSimple[mini_page_component.Info](v1Binder, &entity_crud.Simple[mini_page_component.Info]{
+		Entity:             &mini_page_component.Entity{},
+		Schema:             dbSchema,
+		CreateJsonBody:     &mini_page_component.CreateMiniPageComponentJsonBody{},
+		DeleteQueryParams:  &mini_page_component.DeleteMiniPageComponentQueryParams{},
+		UpdateJsonBody:     &mini_page_component.UpdateMiniPageComponentJsonBody{},
+		QueryQueryParams:   &mini_page_component.GetMiniPageComponentsQueryParams{},
+		GetByIDQueryParams: &mini_page_component.GetMiniPageComponentQueryParams{},
+	},
+		entity_crud.WithCreateTx(),
+		entity_crud.WithUpdateTx(),
+		entity_crud.WithCreateCallbacks(&entity_crud.CreateCallbacks{
+			Before: func(c *api.Context, params request.Params, e entity.Entity, prepared map[string]any, i *infrastructure.Infrastructure, tx database.Executor) error {
+				requestParams, err := request.ToConcrete[*mini_page_component.CreateMiniPageComponentJsonBody](params)
+				if err != nil {
+					return err
+				}
+				record, err := domain.ToConcrete[*mini_page_component.Entity](e)
+				if err != nil {
+					return err
+				}
+				if strutils.IsStringNotEmpty(requestParams.ComponentConfig) {
+					if requestParams.ComponentTypeID == "1" { //轮播图
+						var config mini_page_component.CarouselConfig
+						if err := json.Unmarshal([]byte(requestParams.ComponentConfig), &config); err != nil {
+							return err
+						}
+						if len(config.Items) > 0 {
+							for idx := range config.Items {
+								if strutils.IsStringNotEmpty(config.Items[idx].ImageUrl) {
+									newFilePath, err := osm.MultipleFileMv(config.Items[idx].ImageUrl)
+									if err != nil {
+										return err
+									}
+									config.Items[idx].ImageUrl = newFilePath
+								}
+							}
+						}
+						updatedConfig, err := json.Marshal(config)
+						if err != nil {
+							return err
+						}
+						record.ComponentConfig = string(updatedConfig)
+					} else if requestParams.ComponentTypeID == "2" { //2是直播
+						var config mini_page_component.LiveWindowConfig
+						if err := json.Unmarshal([]byte(requestParams.ComponentConfig), &config); err != nil {
+							return err
+						}
+						if strutils.IsStringNotEmpty(config.LiveCoverUrl) {
+							newFilePath, err := osm.MultipleFileMv(config.LiveCoverUrl)
+							if err != nil {
+								return err
+							}
+							config.LiveCoverUrl = newFilePath
+						}
+						updatedConfig, err := json.Marshal(config)
+						if err != nil {
+							return err
+						}
+						record.ComponentConfig = string(updatedConfig)
+					} else if requestParams.ComponentTypeID == "3" { //3是宣传视频
+						var config mini_page_component.VideoComponentConfig
+						if err := json.Unmarshal([]byte(requestParams.ComponentConfig), &config); err != nil {
+							return err
+						}
+						if strutils.IsStringNotEmpty(config.VideoUrlStr) {
+							newFilePath, err := osm.MultipleFileMv(config.VideoUrlStr)
+							if err != nil {
+								return err
+							}
+							config.VideoUrlStr = newFilePath
+						}
+						if strutils.IsStringNotEmpty(config.VideoCoverStr) {
+							newFilePath, err := osm.MultipleFileMv(config.VideoCoverStr)
+							if err != nil {
+								return err
+							}
+							config.VideoCoverStr = newFilePath
+						}
+						updatedConfig, err := json.Marshal(config)
+						if err != nil {
+							return err
+						}
+						record.ComponentConfig = string(updatedConfig)
+					}
+
+				}
+				return nil
+			},
+			After: func(c *api.Context, params request.Params, e entity.Entity, prepared map[string]any, i *infrastructure.Infrastructure, tx database.Executor) error {
+				record, err := domain.ToConcrete[*mini_page_component.Entity](e)
+				if err != nil {
+					return err
+				}
+				if record.IsEnabled == Enabled {
+					//当前启用 把别的关掉
+					err = database.Update(tx, &sql.UpdateExecuteParams{
+						TableName:  domain.TableName(dbSchema, &mini_page_component.Entity{}),
+						Conditions: sql.NewConditions().Not(entity.ColumnID, e.GetID()).Equal(mini_page_component.ColumnComponentTypeID, record.ComponentTypeID),
+						TableRow:   sql.NewTableRow().Add(mini_page_component.ColumnIsEnabled, Disable),
+					})
+					if err != nil {
+						return err
+					}
+				}
+				return nil
+			},
+		}),
+		entity_crud.WithUpdateCallbacks(&entity_crud.UpdateCallbacks{
+			Before: func(c *api.Context, params request.Params, e entity.Entity, prepared map[string]any, i *infrastructure.Infrastructure, tx database.Executor) error {
+				requestParams, err := request.ToConcrete[*mini_page_component.UpdateMiniPageComponentJsonBody](params)
+				if err != nil {
+					return err
+				}
+				record, err := domain.ToConcrete[*mini_page_component.Entity](e)
+				if err != nil {
+					return err
+				}
+				if strutils.IsStringNotEmpty(requestParams.ComponentConfig) {
+					if requestParams.ComponentTypeID == "1" { //轮播图
+						var config mini_page_component.CarouselConfig
+						if err := json.Unmarshal([]byte(requestParams.ComponentConfig), &config); err != nil {
+							return err
+						}
+						if len(config.Items) > 0 {
+							for idx := range config.Items {
+								if strutils.IsStringNotEmpty(config.Items[idx].ImageUrl) {
+									newFilePath, err := osm.MultipleFileMv(config.Items[idx].ImageUrl)
+									if err != nil {
+										return err
+									}
+									config.Items[idx].ImageUrl = newFilePath
+								}
+							}
+						}
+						updatedConfig, err := json.Marshal(config)
+						if err != nil {
+							return err
+						}
+						record.ComponentConfig = string(updatedConfig)
+					} else if requestParams.ComponentTypeID == "2" { //2是直播
+						var config mini_page_component.LiveWindowConfig
+						if err := json.Unmarshal([]byte(requestParams.ComponentConfig), &config); err != nil {
+							return err
+						}
+						if strutils.IsStringNotEmpty(config.LiveCoverUrl) {
+							newFilePath, err := osm.MultipleFileMv(config.LiveCoverUrl)
+							if err != nil {
+								return err
+							}
+							config.LiveCoverUrl = newFilePath
+						}
+						updatedConfig, err := json.Marshal(config)
+						if err != nil {
+							return err
+						}
+						record.ComponentConfig = string(updatedConfig)
+					} else if requestParams.ComponentTypeID == "3" { //3是宣传视频
+						var config mini_page_component.VideoComponentConfig
+						if err := json.Unmarshal([]byte(requestParams.ComponentConfig), &config); err != nil {
+							return err
+						}
+						if strutils.IsStringNotEmpty(config.VideoUrlStr) {
+							newFilePath, err := osm.MultipleFileMv(config.VideoUrlStr)
+							if err != nil {
+								return err
+							}
+							config.VideoUrlStr = newFilePath
+						}
+						if strutils.IsStringNotEmpty(config.VideoCoverStr) {
+							newFilePath, err := osm.MultipleFileMv(config.VideoCoverStr)
+							if err != nil {
+								return err
+							}
+							config.VideoCoverStr = newFilePath
+						}
+						updatedConfig, err := json.Marshal(config)
+						if err != nil {
+							return err
+						}
+						record.ComponentConfig = string(updatedConfig)
+					}
+				}
+				return nil
+			},
+			After: func(c *api.Context, params request.Params, e entity.Entity, prepared map[string]any, i *infrastructure.Infrastructure, tx database.Executor) error {
+				record, err := domain.ToConcrete[*mini_page_component.Entity](e)
+				if err != nil {
+					return err
+				}
+				if record.IsEnabled == Enabled {
+					//当前启用 把别的同code的关掉
+					err = database.Update(tx, &sql.UpdateExecuteParams{
+						TableName:  domain.TableName(dbSchema, &mini_page_component.Entity{}),
+						Conditions: sql.NewConditions().Not(entity.ColumnID, e.GetID()).Equal(mini_page_component.ColumnComponentTypeID, record.ComponentTypeID),
+						TableRow:   sql.NewTableRow().Add(mini_page_component.ColumnIsEnabled, Disable),
+					})
+					if err != nil {
+						return err
+					}
+				}
+				return nil
+			},
+		}),
+		entity_crud.WithQueryFormCustomConditionFunc[mini_page_component.Info](func(c *api.Context, params request.Params, e entity.Entity, i *infrastructure.Infrastructure) (*entity_crud.CustomCondition, error) {
+			requestParams, err := request.ToConcrete[*mini_page_component.GetMiniPageComponentsQueryParams](params)
+			if err != nil {
+				return nil, err
+			}
+			conditions := sql.NewConditions()
+
+			if strutils.IsStringNotEmpty(requestParams.TenantID) {
+				conditions = conditions.Equal(entity.ColumnTenantID, requestParams.TenantID)
+			}
+			if strutils.IsStringNotEmpty(requestParams.PageID) {
+				conditions = conditions.Equal(mini_page_component.ColumnPageID, requestParams.PageID)
+			}
+			if strutils.IsStringNotEmpty(requestParams.ComponentTypeID) {
+				conditions = conditions.Equal(mini_page_component.ColumnComponentTypeID, requestParams.ComponentTypeID)
+			}
+			if strutils.IsStringNotEmpty(requestParams.TypeName) {
+				conditions = conditions.Like(mini_page_component.ColumnTypeName, "%"+requestParams.TypeName+"%")
+			}
+
+			if strutils.IsStringNotEmpty(requestParams.IsEnabled) {
+				conditions = conditions.Equal(mini_page_component.ColumnPageID, requestParams.IsEnabled)
+			}
+
+			return &entity_crud.CustomCondition{
+				Conditions: conditions,
+				OrderBy:    mini_page_component.ColumnSortOrder,
+			}, nil
+		}),
+		entity_crud.WithGetByIDCallbacks(&entity_crud.GetByIDCallbacks[mini_page_component.Info]{
+			OnSuccessReturn: func(c *api.Context, params request.Params, e entity.Entity, i *infrastructure.Infrastructure, output mini_page_component.Info) (mini_page_component.Info, error) {
+				if strutils.IsStringNotEmpty(output.ComponentConfig) {
+					if output.ComponentTypeID == "1" { //轮播图
+						var config mini_page_component.CarouselConfig
+						if err := json.Unmarshal([]byte(output.ComponentConfig), &config); err != nil {
+							return output, nil
+						}
+						if len(config.Items) > 0 {
+							for idx := range config.Items {
+								if strutils.IsStringNotEmpty(config.Items[idx].ImageUrl) {
+									fileObjects, err := osm.MultipleFileUrl(config.Items[idx].ImageUrl)
+									if err != nil {
+										return output, err
+									}
+									config.Items[idx].ImageUrls = fileObjects
+								}
+							}
+						}
+						updatedConfig, err := json.Marshal(config)
+						if err != nil {
+							return output, nil
+						}
+						output.ComponentConfig = string(updatedConfig)
+					} else if output.ComponentTypeID == "2" { //2是直播
+
+						var config mini_page_component.LiveWindowConfig
+						if err := json.Unmarshal([]byte(output.ComponentConfig), &config); err != nil {
+							return output, nil
+						}
+
+						if strutils.IsStringNotEmpty(config.LiveCoverUrl) {
+							fileObjects, err := osm.MultipleFileUrl(config.LiveCoverUrl)
+							if err != nil {
+								return output, err
+							}
+							config.LiveCoverUrlFile = fileObjects
+						}
+
+						updatedConfig, err := json.Marshal(config)
+						if err != nil {
+							return output, nil
+						}
+						output.ComponentConfig = string(updatedConfig)
+
+					} else if output.ComponentTypeID == "3" { //3是宣传视频
+						var config mini_page_component.VideoComponentConfig
+						if err := json.Unmarshal([]byte(output.ComponentConfig), &config); err != nil {
+							return output, nil
+						}
+
+						if strutils.IsStringNotEmpty(config.VideoUrlStr) {
+							fileObjects, err := osm.MultipleFileUrl(config.VideoUrlStr)
+							if err != nil {
+								return output, err
+							}
+							config.VideoUrlFile = fileObjects
+						}
+
+						if strutils.IsStringNotEmpty(config.VideoCoverStr) {
+							fileObjects, err := osm.MultipleFileUrl(config.VideoCoverStr)
+							if err != nil {
+								return output, err
+							}
+							config.VideoCoverFile = fileObjects
+						}
+						updatedConfig, err := json.Marshal(config)
+						if err != nil {
+							return output, nil
+						}
+						output.ComponentConfig = string(updatedConfig)
+					}
+				}
+				return output, nil
+			},
+		}),
+		entity_crud.WithQueryCallbacks(&entity_crud.QueryCallbacks[mini_page_component.Info]{
+			OnSuccessReturn: func(c *api.Context, params request.Params, e entity.Entity, i *infrastructure.Infrastructure, output response.InfosData[mini_page_component.Info]) (response.InfosData[mini_page_component.Info], error) {
+				infos := output.Infos
+				for i1 := range infos {
+					info := &infos[i1]
+					if strutils.IsStringNotEmpty(info.ComponentConfig) {
+						if info.ComponentTypeID == "1" { //轮播图
+							var config mini_page_component.CarouselConfig
+							if err := json.Unmarshal([]byte(info.ComponentConfig), &config); err != nil {
+								return output, nil
+							}
+							if len(config.Items) > 0 {
+								for idx := range config.Items {
+									if strutils.IsStringNotEmpty(config.Items[idx].ImageUrl) {
+										fileObjects, err := osm.MultipleFileUrl(config.Items[idx].ImageUrl)
+										if err != nil {
+											return output, err
+										}
+										config.Items[idx].ImageUrls = fileObjects
+									}
+								}
+							}
+							updatedConfig, err := json.Marshal(config)
+							if err != nil {
+								return output, nil
+							}
+							info.ComponentConfig = string(updatedConfig)
+						} else if info.ComponentTypeID == "2" { //2是直播
+
+							var config mini_page_component.LiveWindowConfig
+							if err := json.Unmarshal([]byte(info.ComponentConfig), &config); err != nil {
+								return output, nil
+							}
+
+							if strutils.IsStringNotEmpty(config.LiveCoverUrl) {
+								fileObjects, err := osm.MultipleFileUrl(config.LiveCoverUrl)
+								if err != nil {
+									return output, err
+								}
+								config.LiveCoverUrlFile = fileObjects
+							}
+
+							updatedConfig, err := json.Marshal(config)
+							if err != nil {
+								return output, nil
+							}
+							info.ComponentConfig = string(updatedConfig)
+
+						} else if info.ComponentTypeID == "3" { //3是宣传视频
+							var config mini_page_component.VideoComponentConfig
+							if err := json.Unmarshal([]byte(info.ComponentConfig), &config); err != nil {
+								return output, nil
+							}
+
+							if strutils.IsStringNotEmpty(config.VideoUrlStr) {
+								fileObjects, err := osm.MultipleFileUrl(config.VideoUrlStr)
+								if err != nil {
+									return output, err
+								}
+								config.VideoUrlFile = fileObjects
+							}
+
+							if strutils.IsStringNotEmpty(config.VideoCoverStr) {
+								fileObjects, err := osm.MultipleFileUrl(config.VideoCoverStr)
+								if err != nil {
+									return output, err
+								}
+								config.VideoCoverFile = fileObjects
+							}
+							updatedConfig, err := json.Marshal(config)
+							if err != nil {
+								return output, nil
+							}
+							info.ComponentConfig = string(updatedConfig)
+
+						}
+
+					}
+				}
+				return output, nil
+			},
+		}),
+		entity_crud.WithDeleteTx(),
+		entity_crud.WithDeleteCallbacks(&entity_crud.DeleteCallbacks{
+			After: func(c *api.Context, params request.Params, e entity.Entity, prepared map[string]any, i *infrastructure.Infrastructure, tx database.Executor) error {
+
+				requestParams, err := request.ToConcrete[*mini_page_component.DeleteMiniPageComponentQueryParams](params)
+				if err != nil {
+					return err
+				}
+
+				err = database.Delete(tx, &sql.DeleteExecuteParams{
+					TableName:  domain.TableName(dbSchema, &mini_carousel_config.Entity{}),
+					Conditions: sql.NewConditions().Equal(mini_carousel_config.ColumnComponentID, requestParams.ID),
+				})
+				if err != nil {
+					return err
+				}
+
+				err = database.Delete(tx, &sql.DeleteExecuteParams{
+					TableName:  domain.TableName(dbSchema, &mini_live_config.Entity{}),
+					Conditions: sql.NewConditions().Equal(mini_live_config.ColumnComponentID, requestParams.ID),
+				})
+				if err != nil {
+					return err
+				}
+
+				err = database.Delete(tx, &sql.DeleteExecuteParams{
+					TableName:  domain.TableName(dbSchema, &mini_quality_product_config.Entity{}),
+					Conditions: sql.NewConditions().Equal(mini_quality_product_config.ColumnComponentID, requestParams.ID),
+				})
+				if err != nil {
+					return err
+				}
+
+				err = database.Delete(tx, &sql.DeleteExecuteParams{
+					TableName:  domain.TableName(dbSchema, &mini_video_config.Entity{}),
+					Conditions: sql.NewConditions().Equal(mini_video_config.ColumnComponentID, requestParams.ID),
+				})
+				if err != nil {
+					return err
+				}
+
+				return nil
+
+			},
+		}),
+	)
+
+	binding.PutBind(v1Binder, &binding.SimpleBindItem[any]{
+		Path:             "/miniPageComponent/enabledOrDisable",
+		SendResponseFunc: response.SendMsgResponse,
+		RequestParams:    &mini_page_component.EnabledOrDisableJsonBody{},
+		ServiceFunc: func(c *api.Context, params request.Params, objects []domain.Object, i *infrastructure.Infrastructure) (any, error) {
+			requestParams, err := request.ToConcrete[*mini_page_component.EnabledOrDisableJsonBody](params)
+			if err != nil {
+				return nil, err
+			}
+			err = database.Transaction(i.DBExecutor(), func(tx database.Executor) error {
+				err = database.Update(tx, &sql.UpdateExecuteParams{
+					TableName:  domain.TableName(dbSchema, &mini_page_component.Entity{}),
+					Conditions: sql.NewConditions().Equal(entity.ColumnID, requestParams.ID),
+					TableRow:   sql.NewTableRow().Add(mini_page_component.ColumnIsEnabled, requestParams.IsEnabled),
+				})
+				//这个启用 别的都关掉
+				if requestParams.IsEnabled == Enabled {
+					err = database.Update(tx, &sql.UpdateExecuteParams{
+						TableName:  domain.TableName(dbSchema, &mini_page_component.Entity{}),
+						Conditions: sql.NewConditions().Not(entity.ColumnID, requestParams.ID).Equal(mini_page_component.ColumnComponentTypeID, requestParams.ComponentTypeID),
+						TableRow:   sql.NewTableRow().Add(mini_page_component.ColumnIsEnabled, Disable),
+					})
+					if err != nil {
+						return err
+					}
+				}
+				return nil
+			})
+			return nil, nil
+		},
+	})
+
+	binding.PutBind(v1Binder, &binding.SimpleBindItem[any]{
+		Path:             "/miniPageComponent/sortOrder",
+		SendResponseFunc: response.SendMsgResponse,
+		RequestParams:    &mini_page_component.SortOrderJsonBody{},
+		ServiceFunc: func(c *api.Context, params request.Params, objects []domain.Object, i *infrastructure.Infrastructure) (any, error) {
+			requestParams, err := request.ToConcrete[*mini_page_component.SortOrderJsonBody](params)
+			if err != nil {
+				return nil, err
+			}
+
+			err = database.Transaction(i.DBExecutor(), func(tx database.Executor) error {
+				for i2 := range requestParams.SortOrders {
+					sortOrder := requestParams.SortOrders[i2]
+					err = database.Update(tx, &sql.UpdateExecuteParams{
+						TableName:  domain.TableName(dbSchema, &mini_page_component.Entity{}),
+						Conditions: sql.NewConditions().Equal(entity.ColumnID, sortOrder.ID),
+						TableRow:   sql.NewTableRow().Add(mini_page_component.ColumnSortOrder, sortOrder.SortOrder),
+					})
+					if err != nil {
+						return err
+					}
+				}
+				return nil
+			})
+			if err != nil {
+				return nil, err
+			}
+			return nil, nil
+
+		},
+	})
+
+}
+
+func (svc *MiniPageComponentService) queryByKeyFields(e *mini_page_component.Entity, dbExecutor database.Executor) (*mini_page_component.Entity, error) {
+	result, err := database.QueryOne(dbExecutor, &sql.QueryOneExecuteParams{
+		TableName:  domain.TableName(dbSchema, e),
+		Conditions: sql.NewConditions().Equal(entity.ColumnID, e.ID),
+	})
+	if err != nil {
+		if database.IsErrorDBRecordNotExist(err) {
+			return nil, errors.New(e.DomainCNName() + "不存在")
+		}
+
+		return nil, err
+	}
+
+	existEntity := new(mini_page_component.Entity)
+	err = sql.ParseSqlResult(result, existEntity)
+	if err != nil {
+		return nil, err
+	}
+
+	return existEntity, nil
+}
+
+func (svc *MiniPageComponentService) checkExistByKeyFields(e *mini_page_component.Entity, dbExecutor database.Executor) error {
+	exist, err := database.CheckExist(dbExecutor, &sql.CheckExistExecuteParams{
+		TableName:  domain.TableName(dbSchema, e),
+		Conditions: sql.NewConditions().Equal(entity.ColumnID, e.ID),
+	})
+	if err != nil {
+		return err
+	}
+
+	if !exist {
+		return errors.New(e.DomainCNName() + "不存在")
+	}
+
+	return nil
+}

+ 134 - 0
application/service/mini_page_config.go

@@ -0,0 +1,134 @@
+package service
+
+import (
+	"ecos/application/domain/mini_page_config"
+	"git.sxidc.com/go-framework/baize/convenient/entity_crud"
+	"git.sxidc.com/go-framework/baize/framework/binding"
+	"git.sxidc.com/go-framework/baize/framework/core/api"
+	"git.sxidc.com/go-framework/baize/framework/core/api/request"
+	"git.sxidc.com/go-framework/baize/framework/core/api/response"
+	"git.sxidc.com/go-framework/baize/framework/core/application"
+	"git.sxidc.com/go-framework/baize/framework/core/domain"
+	"git.sxidc.com/go-framework/baize/framework/core/domain/entity"
+	"git.sxidc.com/go-framework/baize/framework/core/infrastructure"
+	"git.sxidc.com/go-framework/baize/framework/core/infrastructure/database"
+	"git.sxidc.com/go-framework/baize/framework/core/infrastructure/database/sql"
+	"git.sxidc.com/go-tools/utils/strutils"
+	"github.com/pkg/errors"
+)
+
+var miniPageConfigService = &MiniPageConfigService{}
+
+type MiniPageConfigService struct{}
+
+func (svc *MiniPageConfigService) Init(appInstance *application.App) error {
+	svc.v1(appInstance)
+	return nil
+}
+
+func (svc *MiniPageConfigService) Destroy() error {
+	return nil
+}
+
+func (svc *MiniPageConfigService) v1(appInstance *application.App) {
+	v1Binder := binding.NewBinder(appInstance.ChooseRouter(api.RouterPrefix, "v1"),
+		appInstance.Infrastructure())
+
+	entity_crud.BindSimple[mini_page_config.Info](v1Binder, &entity_crud.Simple[mini_page_config.Info]{
+		Entity:             &mini_page_config.Entity{},
+		Schema:             dbSchema,
+		CreateJsonBody:     &mini_page_config.CreateMiniPageConfigJsonBody{},
+		DeleteQueryParams:  &mini_page_config.DeleteMiniPageConfigQueryParams{},
+		UpdateJsonBody:     &mini_page_config.UpdateMiniPageConfigJsonBody{},
+		QueryQueryParams:   &mini_page_config.GetMiniPageConfigsQueryParams{},
+		GetByIDQueryParams: &mini_page_config.GetMiniPageConfigQueryParams{},
+	},
+		entity_crud.WithQueryFormCustomConditionFunc[mini_page_config.Info](func(c *api.Context, params request.Params, e entity.Entity, i *infrastructure.Infrastructure) (*entity_crud.CustomCondition, error) {
+			requestParams, err := request.ToConcrete[*mini_page_config.GetMiniPageConfigsQueryParams](params)
+			if err != nil {
+				return nil, err
+			}
+			conditions := sql.NewConditions()
+			if strutils.IsStringNotEmpty(requestParams.TenantID) {
+				conditions.Equal(entity.ColumnTenantID, requestParams.TenantID)
+			}
+			if strutils.IsStringNotEmpty(requestParams.PageCode) {
+				conditions.Equal(mini_page_config.ColumnPageCode, requestParams.PageCode)
+			}
+			return &entity_crud.CustomCondition{
+				Conditions: conditions,
+				OrderBy:    mini_page_config.ColumnSortOrder,
+			}, nil
+		}),
+	)
+
+	binding.PutBind(v1Binder, &binding.SimpleBindItem[any]{
+		Path:             "/miniPageConfig/enabledOrDisable",
+		SendResponseFunc: response.SendMsgResponse,
+		RequestParams:    &mini_page_config.EnabledOrDisableJsonBody{},
+		ServiceFunc: func(c *api.Context, params request.Params, objects []domain.Object, i *infrastructure.Infrastructure) (any, error) {
+			requestParams, err := request.ToConcrete[*mini_page_config.EnabledOrDisableJsonBody](params)
+			if err != nil {
+				return nil, err
+			}
+			err = database.Transaction(i.DBExecutor(), func(tx database.Executor) error {
+				err = database.Update(tx, &sql.UpdateExecuteParams{
+					TableName:  domain.TableName(dbSchema, &mini_page_config.Entity{}),
+					Conditions: sql.NewConditions().Equal(entity.ColumnID, requestParams.ID),
+					TableRow:   sql.NewTableRow().Add(mini_page_config.ColumnIsEnabled, requestParams.IsEnabled),
+				})
+				if requestParams.IsEnabled == Enabled {
+					err = database.Update(tx, &sql.UpdateExecuteParams{
+						TableName:  domain.TableName(dbSchema, &mini_page_config.Entity{}),
+						Conditions: sql.NewConditions().Not(entity.ColumnID, requestParams.ID),
+						TableRow:   sql.NewTableRow().Add(mini_page_config.ColumnIsEnabled, Disable),
+					})
+					if err != nil {
+						return err
+					}
+				}
+				return nil
+			})
+			return nil, nil
+		},
+	})
+
+}
+
+func (svc *MiniPageConfigService) queryByKeyFields(e *mini_page_config.Entity, dbExecutor database.Executor) (*mini_page_config.Entity, error) {
+	result, err := database.QueryOne(dbExecutor, &sql.QueryOneExecuteParams{
+		TableName:  domain.TableName(dbSchema, e),
+		Conditions: sql.NewConditions().Equal(entity.ColumnID, e.ID),
+	})
+	if err != nil {
+		if database.IsErrorDBRecordNotExist(err) {
+			return nil, errors.New(e.DomainCNName() + "不存在")
+		}
+
+		return nil, err
+	}
+
+	existEntity := new(mini_page_config.Entity)
+	err = sql.ParseSqlResult(result, existEntity)
+	if err != nil {
+		return nil, err
+	}
+
+	return existEntity, nil
+}
+
+func (svc *MiniPageConfigService) checkExistByKeyFields(e *mini_page_config.Entity, dbExecutor database.Executor) error {
+	exist, err := database.CheckExist(dbExecutor, &sql.CheckExistExecuteParams{
+		TableName:  domain.TableName(dbSchema, e),
+		Conditions: sql.NewConditions().Equal(entity.ColumnID, e.ID),
+	})
+	if err != nil {
+		return err
+	}
+
+	if !exist {
+		return errors.New(e.DomainCNName() + "不存在")
+	}
+
+	return nil
+}

+ 206 - 0
application/service/mini_quality_product_config.go

@@ -0,0 +1,206 @@
+package service
+
+import (
+	"ecos/application/domain/mini_quality_product_config"
+	"ecos/osm"
+	"git.sxidc.com/go-framework/baize/convenient/entity_crud"
+	"git.sxidc.com/go-framework/baize/framework/binding"
+	"git.sxidc.com/go-framework/baize/framework/core/api"
+	"git.sxidc.com/go-framework/baize/framework/core/api/request"
+	"git.sxidc.com/go-framework/baize/framework/core/api/response"
+	"git.sxidc.com/go-framework/baize/framework/core/application"
+	"git.sxidc.com/go-framework/baize/framework/core/domain"
+	"git.sxidc.com/go-framework/baize/framework/core/domain/entity"
+	"git.sxidc.com/go-framework/baize/framework/core/infrastructure"
+	"git.sxidc.com/go-framework/baize/framework/core/infrastructure/database"
+	"git.sxidc.com/go-framework/baize/framework/core/infrastructure/database/sql"
+	"git.sxidc.com/go-tools/utils/strutils"
+	"github.com/pkg/errors"
+)
+
+var miniQualityProductConfigService = &MiniQualityProductConfigService{}
+
+type MiniQualityProductConfigService struct{}
+
+func (svc *MiniQualityProductConfigService) Init(appInstance *application.App) error {
+	svc.v1(appInstance)
+	return nil
+}
+
+func (svc *MiniQualityProductConfigService) Destroy() error {
+	return nil
+}
+
+func (svc *MiniQualityProductConfigService) v1(appInstance *application.App) {
+	v1Binder := binding.NewBinder(appInstance.ChooseRouter(api.RouterPrefix, "v1"),
+		appInstance.Infrastructure())
+
+	entity_crud.BindSimple[mini_quality_product_config.Info](v1Binder, &entity_crud.Simple[mini_quality_product_config.Info]{
+		Entity:             &mini_quality_product_config.Entity{},
+		Schema:             dbSchema,
+		CreateJsonBody:     &mini_quality_product_config.CreateMiniQualityProductConfigJsonBody{},
+		DeleteQueryParams:  &mini_quality_product_config.DeleteMiniQualityProductConfigQueryParams{},
+		UpdateJsonBody:     &mini_quality_product_config.UpdateMiniQualityProductConfigJsonBody{},
+		QueryQueryParams:   &mini_quality_product_config.GetMiniQualityProductConfigsQueryParams{},
+		GetByIDQueryParams: &mini_quality_product_config.GetMiniQualityProductConfigQueryParams{},
+	},
+		entity_crud.WithQueryFormCustomConditionFunc[mini_quality_product_config.Info](func(c *api.Context, params request.Params, e entity.Entity, i *infrastructure.Infrastructure) (*entity_crud.CustomCondition, error) {
+			requestParams, err := request.ToConcrete[*mini_quality_product_config.GetMiniQualityProductConfigsQueryParams](params)
+			if err != nil {
+				return nil, err
+			}
+			conditions := sql.NewConditions()
+			if strutils.IsStringNotEmpty(requestParams.TenantID) {
+				conditions.Equal(entity.ColumnTenantID, requestParams.TenantID)
+			}
+			if strutils.IsStringNotEmpty(requestParams.ComponentID) {
+				conditions.Equal(mini_quality_product_config.ColumnComponentID, requestParams.ComponentID)
+			}
+			return &entity_crud.CustomCondition{
+				Conditions: conditions,
+				OrderBy:    mini_quality_product_config.ColumnSortOrder,
+			}, nil
+		}),
+		entity_crud.WithCreateTx(),
+		entity_crud.WithUpdateTx(),
+		entity_crud.WithCreateCallbacks(&entity_crud.CreateCallbacks{
+			Before: func(c *api.Context, params request.Params, e entity.Entity, prepared map[string]any, i *infrastructure.Infrastructure, tx database.Executor) error {
+				requestParams, err := request.ToConcrete[*mini_quality_product_config.CreateMiniQualityProductConfigJsonBody](params)
+				if err != nil {
+					return err
+				}
+				record, err := domain.ToConcrete[*mini_quality_product_config.Entity](e)
+				if err != nil {
+					return err
+				}
+				if strutils.IsStringNotEmpty(requestParams.CustomImage) {
+					newFilePath, err := osm.MultipleFileMv(requestParams.CustomImage)
+					if err != nil {
+						return err
+					}
+					record.CustomImage = newFilePath
+				}
+				return nil
+			},
+		}),
+		entity_crud.WithUpdateCallbacks(&entity_crud.UpdateCallbacks{
+			Before: func(c *api.Context, params request.Params, e entity.Entity, prepared map[string]any, i *infrastructure.Infrastructure, tx database.Executor) error {
+				requestParams, err := request.ToConcrete[*mini_quality_product_config.UpdateMiniQualityProductConfigJsonBody](params)
+				if err != nil {
+					return err
+				}
+
+				record, err := domain.ToConcrete[*mini_quality_product_config.Entity](e)
+				if err != nil {
+					return err
+				}
+				if strutils.IsStringNotEmpty(requestParams.CustomImage) {
+					newFilePath, err := osm.MultipleFileMv(requestParams.CustomImage)
+					if err != nil {
+						return err
+					}
+					record.CustomImage = newFilePath
+				}
+				return nil
+			},
+		}),
+		entity_crud.WithGetByIDCallbacks(&entity_crud.GetByIDCallbacks[mini_quality_product_config.Info]{
+			OnSuccessReturn: func(c *api.Context, params request.Params, e entity.Entity, i *infrastructure.Infrastructure, output mini_quality_product_config.Info) (mini_quality_product_config.Info, error) {
+				if strutils.IsStringNotEmpty(output.CustomImageStr) {
+					fileObjects, err := osm.MultipleFileUrl(output.CustomImageStr)
+					if err != nil {
+						return output, err
+					}
+					output.CustomImage = fileObjects
+				}
+				return output, nil
+			},
+		}),
+		entity_crud.WithQueryCallbacks(&entity_crud.QueryCallbacks[mini_quality_product_config.Info]{
+			OnSuccessReturn: func(c *api.Context, params request.Params, e entity.Entity, i *infrastructure.Infrastructure, output response.InfosData[mini_quality_product_config.Info]) (response.InfosData[mini_quality_product_config.Info], error) {
+				infos := output.Infos
+				for i1 := range infos {
+					info := &infos[i1]
+					if strutils.IsStringNotEmpty(info.CustomImageStr) {
+						fileObjects, err := osm.MultipleFileUrl(info.CustomImageStr)
+						if err != nil {
+							return output, err
+						}
+						info.CustomImage = fileObjects
+					}
+				}
+				return output, nil
+			},
+		}),
+	)
+
+	binding.PutBind(v1Binder, &binding.SimpleBindItem[any]{
+		Path:             "/miniQualityProductConfig/enabledOrDisable",
+		SendResponseFunc: response.SendMsgResponse,
+		RequestParams:    &mini_quality_product_config.EnabledOrDisableJsonBody{},
+		ServiceFunc: func(c *api.Context, params request.Params, objects []domain.Object, i *infrastructure.Infrastructure) (any, error) {
+			requestParams, err := request.ToConcrete[*mini_quality_product_config.EnabledOrDisableJsonBody](params)
+			if err != nil {
+				return nil, err
+			}
+			err = database.Transaction(i.DBExecutor(), func(tx database.Executor) error {
+				err = database.Update(tx, &sql.UpdateExecuteParams{
+					TableName:  domain.TableName(dbSchema, &mini_quality_product_config.Entity{}),
+					Conditions: sql.NewConditions().Equal(entity.ColumnID, requestParams.ID),
+					TableRow:   sql.NewTableRow().Add(mini_quality_product_config.ColumnIsEnabled, requestParams.IsEnabled),
+				})
+				if requestParams.IsEnabled == Enabled {
+					err = database.Update(tx, &sql.UpdateExecuteParams{
+						TableName:  domain.TableName(dbSchema, &mini_quality_product_config.Entity{}),
+						Conditions: sql.NewConditions().Not(entity.ColumnID, requestParams.ID),
+						TableRow:   sql.NewTableRow().Add(mini_quality_product_config.ColumnIsEnabled, Disable),
+					})
+					if err != nil {
+						return err
+					}
+				}
+				return nil
+			})
+			return nil, nil
+		},
+	})
+
+}
+
+func (svc *MiniQualityProductConfigService) queryByKeyFields(e *mini_quality_product_config.Entity, dbExecutor database.Executor) (*mini_quality_product_config.Entity, error) {
+	result, err := database.QueryOne(dbExecutor, &sql.QueryOneExecuteParams{
+		TableName:  domain.TableName(dbSchema, e),
+		Conditions: sql.NewConditions().Equal(entity.ColumnID, e.ID),
+	})
+	if err != nil {
+		if database.IsErrorDBRecordNotExist(err) {
+			return nil, errors.New(e.DomainCNName() + "不存在")
+		}
+
+		return nil, err
+	}
+
+	existEntity := new(mini_quality_product_config.Entity)
+	err = sql.ParseSqlResult(result, existEntity)
+	if err != nil {
+		return nil, err
+	}
+
+	return existEntity, nil
+}
+
+func (svc *MiniQualityProductConfigService) checkExistByKeyFields(e *mini_quality_product_config.Entity, dbExecutor database.Executor) error {
+	exist, err := database.CheckExist(dbExecutor, &sql.CheckExistExecuteParams{
+		TableName:  domain.TableName(dbSchema, e),
+		Conditions: sql.NewConditions().Equal(entity.ColumnID, e.ID),
+	})
+	if err != nil {
+		return err
+	}
+
+	if !exist {
+		return errors.New(e.DomainCNName() + "不存在")
+	}
+
+	return nil
+}

+ 226 - 0
application/service/mini_video_config.go

@@ -0,0 +1,226 @@
+package service
+
+import (
+	"ecos/application/domain/mini_video_config"
+	"ecos/osm"
+	"git.sxidc.com/go-framework/baize/convenient/entity_crud"
+	"git.sxidc.com/go-framework/baize/framework/binding"
+	"git.sxidc.com/go-framework/baize/framework/core/api"
+	"git.sxidc.com/go-framework/baize/framework/core/api/request"
+	"git.sxidc.com/go-framework/baize/framework/core/api/response"
+	"git.sxidc.com/go-framework/baize/framework/core/application"
+	"git.sxidc.com/go-framework/baize/framework/core/domain"
+	"git.sxidc.com/go-framework/baize/framework/core/domain/entity"
+	"git.sxidc.com/go-framework/baize/framework/core/infrastructure"
+	"git.sxidc.com/go-framework/baize/framework/core/infrastructure/database"
+	"git.sxidc.com/go-framework/baize/framework/core/infrastructure/database/sql"
+	"git.sxidc.com/go-tools/utils/strutils"
+	"github.com/pkg/errors"
+)
+
+var miniVideoConfigService = &MiniVideoConfigService{}
+
+type MiniVideoConfigService struct{}
+
+func (svc *MiniVideoConfigService) Init(appInstance *application.App) error {
+	svc.v1(appInstance)
+	return nil
+}
+
+func (svc *MiniVideoConfigService) Destroy() error {
+	return nil
+}
+
+func (svc *MiniVideoConfigService) v1(appInstance *application.App) {
+	v1Binder := binding.NewBinder(appInstance.ChooseRouter(api.RouterPrefix, "v1"),
+		appInstance.Infrastructure())
+
+	entity_crud.BindSimple[mini_video_config.Info](v1Binder, &entity_crud.Simple[mini_video_config.Info]{
+		Entity:             &mini_video_config.Entity{},
+		Schema:             dbSchema,
+		CreateJsonBody:     &mini_video_config.CreateMiniVideoConfigJsonBody{},
+		DeleteQueryParams:  &mini_video_config.DeleteMiniVideoConfigQueryParams{},
+		UpdateJsonBody:     &mini_video_config.UpdateMiniVideoConfigJsonBody{},
+		QueryQueryParams:   &mini_video_config.GetMiniVideoConfigsQueryParams{},
+		GetByIDQueryParams: &mini_video_config.GetMiniVideoConfigQueryParams{},
+	},
+		entity_crud.WithQueryFormCustomConditionFunc[mini_video_config.Info](func(c *api.Context, params request.Params, e entity.Entity, i *infrastructure.Infrastructure) (*entity_crud.CustomCondition, error) {
+			requestParams, err := request.ToConcrete[*mini_video_config.GetMiniVideoConfigsQueryParams](params)
+			if err != nil {
+				return nil, err
+			}
+			conditions := sql.NewConditions()
+			if strutils.IsStringNotEmpty(requestParams.TenantID) {
+				conditions.Equal(entity.ColumnTenantID, requestParams.TenantID)
+			}
+			if strutils.IsStringNotEmpty(requestParams.ComponentID) {
+				conditions.Equal(mini_video_config.ColumnComponentID, requestParams.ComponentID)
+			}
+			return &entity_crud.CustomCondition{
+				Conditions: conditions,
+				OrderBy:    entity.ColumnCreatedTime + " DESC",
+			}, nil
+		}),
+		entity_crud.WithCreateTx(),
+		entity_crud.WithUpdateTx(),
+		entity_crud.WithCreateCallbacks(&entity_crud.CreateCallbacks{
+			Before: func(c *api.Context, params request.Params, e entity.Entity, prepared map[string]any, i *infrastructure.Infrastructure, tx database.Executor) error {
+				requestParams, err := request.ToConcrete[*mini_video_config.CreateMiniVideoConfigJsonBody](params)
+				if err != nil {
+					return err
+				}
+				record, err := domain.ToConcrete[*mini_video_config.Entity](e)
+				if err != nil {
+					return err
+				}
+				if strutils.IsStringNotEmpty(requestParams.VideoCover) {
+					newFilePath, err := osm.MultipleFileMv(requestParams.VideoCover)
+					if err != nil {
+						return err
+					}
+					record.VideoCover = newFilePath
+				}
+				if strutils.IsStringNotEmpty(requestParams.VideoUrl) {
+					newFilePath, err := osm.MultipleFileMv(requestParams.VideoUrl)
+					if err != nil {
+						return err
+					}
+					record.VideoUrl = newFilePath
+				}
+				return nil
+			},
+		}),
+		entity_crud.WithUpdateCallbacks(&entity_crud.UpdateCallbacks{
+			Before: func(c *api.Context, params request.Params, e entity.Entity, prepared map[string]any, i *infrastructure.Infrastructure, tx database.Executor) error {
+				requestParams, err := request.ToConcrete[*mini_video_config.UpdateMiniVideoConfigJsonBody](params)
+				if err != nil {
+					return err
+				}
+
+				record, err := domain.ToConcrete[*mini_video_config.Entity](e)
+				if err != nil {
+					return err
+				}
+				if strutils.IsStringNotEmpty(requestParams.VideoCover) {
+					newFilePath, err := osm.MultipleFileMv(requestParams.VideoCover)
+					if err != nil {
+						return err
+					}
+					record.VideoCover = newFilePath
+				}
+				if strutils.IsStringNotEmpty(requestParams.VideoUrl) {
+					newFilePath, err := osm.MultipleFileMv(requestParams.VideoUrl)
+					if err != nil {
+						return err
+					}
+					record.VideoUrl = newFilePath
+				}
+				return nil
+			},
+		}),
+		entity_crud.WithGetByIDCallbacks(&entity_crud.GetByIDCallbacks[mini_video_config.Info]{
+			OnSuccessReturn: func(c *api.Context, params request.Params, e entity.Entity, i *infrastructure.Infrastructure, output mini_video_config.Info) (mini_video_config.Info, error) {
+				if strutils.IsStringNotEmpty(output.VideoCoverStr) {
+					fileObjects, err := osm.MultipleFileUrl(output.VideoCoverStr)
+					if err != nil {
+						return output, err
+					}
+					output.VideoCover = fileObjects
+				}
+				if strutils.IsStringNotEmpty(output.VideoUrlStr) {
+					fileObjects, err := osm.MultipleFileUrl(output.VideoUrlStr)
+					if err != nil {
+						return output, err
+					}
+					output.VideoUrl = fileObjects
+				}
+				return output, nil
+			},
+		}),
+		entity_crud.WithQueryCallbacks(&entity_crud.QueryCallbacks[mini_video_config.Info]{
+			OnSuccessReturn: func(c *api.Context, params request.Params, e entity.Entity, i *infrastructure.Infrastructure, output response.InfosData[mini_video_config.Info]) (response.InfosData[mini_video_config.Info], error) {
+				infos := output.Infos
+				for i1 := range infos {
+					info := &infos[i1]
+					if strutils.IsStringNotEmpty(info.VideoUrlStr) {
+						fileObjects, err := osm.MultipleFileUrl(info.VideoUrlStr)
+						if err != nil {
+							return output, err
+						}
+						info.VideoUrl = fileObjects
+					}
+				}
+				return output, nil
+			},
+		}),
+	)
+
+	binding.PutBind(v1Binder, &binding.SimpleBindItem[any]{
+		Path:             "/miniVideoConfig/enabledOrDisable",
+		SendResponseFunc: response.SendMsgResponse,
+		RequestParams:    &mini_video_config.EnabledOrDisableJsonBody{},
+		ServiceFunc: func(c *api.Context, params request.Params, objects []domain.Object, i *infrastructure.Infrastructure) (any, error) {
+			requestParams, err := request.ToConcrete[*mini_video_config.EnabledOrDisableJsonBody](params)
+			if err != nil {
+				return nil, err
+			}
+			err = database.Transaction(i.DBExecutor(), func(tx database.Executor) error {
+				err = database.Update(tx, &sql.UpdateExecuteParams{
+					TableName:  domain.TableName(dbSchema, &mini_video_config.Entity{}),
+					Conditions: sql.NewConditions().Equal(entity.ColumnID, requestParams.ID),
+					TableRow:   sql.NewTableRow().Add(mini_video_config.ColumnIsEnabled, requestParams.IsEnabled),
+				})
+				if requestParams.IsEnabled == Enabled {
+					err = database.Update(tx, &sql.UpdateExecuteParams{
+						TableName:  domain.TableName(dbSchema, &mini_video_config.Entity{}),
+						Conditions: sql.NewConditions().Not(entity.ColumnID, requestParams.ID),
+						TableRow:   sql.NewTableRow().Add(mini_video_config.ColumnIsEnabled, Disable),
+					})
+					if err != nil {
+						return err
+					}
+				}
+				return nil
+			})
+			return nil, nil
+		},
+	})
+}
+
+func (svc *MiniVideoConfigService) queryByKeyFields(e *mini_video_config.Entity, dbExecutor database.Executor) (*mini_video_config.Entity, error) {
+	result, err := database.QueryOne(dbExecutor, &sql.QueryOneExecuteParams{
+		TableName:  domain.TableName(dbSchema, e),
+		Conditions: sql.NewConditions().Equal(entity.ColumnID, e.ID),
+	})
+	if err != nil {
+		if database.IsErrorDBRecordNotExist(err) {
+			return nil, errors.New(e.DomainCNName() + "不存在")
+		}
+
+		return nil, err
+	}
+
+	existEntity := new(mini_video_config.Entity)
+	err = sql.ParseSqlResult(result, existEntity)
+	if err != nil {
+		return nil, err
+	}
+
+	return existEntity, nil
+}
+
+func (svc *MiniVideoConfigService) checkExistByKeyFields(e *mini_video_config.Entity, dbExecutor database.Executor) error {
+	exist, err := database.CheckExist(dbExecutor, &sql.CheckExistExecuteParams{
+		TableName:  domain.TableName(dbSchema, e),
+		Conditions: sql.NewConditions().Equal(entity.ColumnID, e.ID),
+	})
+	if err != nil {
+		return err
+	}
+
+	if !exist {
+		return errors.New(e.DomainCNName() + "不存在")
+	}
+
+	return nil
+}

+ 8 - 1
application/service/service.go

@@ -5,7 +5,7 @@ import (
 )
 )
 
 
 const (
 const (
-	dbSchema = "pcs"
+	dbSchema = "ecos"
 )
 )
 
 
 type Service interface {
 type Service interface {
@@ -20,5 +20,12 @@ var RegisteredServices = []Service{
 	configurationService,
 	configurationService,
 	operateLogService,
 	operateLogService,
 	shopDecorationService,
 	shopDecorationService,
+	miniCarouselConfigService,
+	miniComponentTypeService,
+	miniLiveConfigService,
+	miniPageComponentService,
+	miniPageConfigService,
+	miniQualityProductConfigService,
+	miniVideoConfigService,
 	/* HAC: END REGISTER SERVICE */
 	/* HAC: END REGISTER SERVICE */
 }
 }

+ 11 - 0
config/config.go

@@ -8,10 +8,12 @@ import (
 	"git.sxidc.com/service-supports/scm-sdk"
 	"git.sxidc.com/service-supports/scm-sdk"
 	"gopkg.in/yaml.v3"
 	"gopkg.in/yaml.v3"
 	"os"
 	"os"
+	"time"
 )
 )
 
 
 type Config struct {
 type Config struct {
 	ApplicationConfig application.Config
 	ApplicationConfig application.Config
+	OsmConfig         OsmConfig `json:"osm" yaml:"osm"`
 }
 }
 
 
 var conf Config
 var conf Config
@@ -25,6 +27,15 @@ func init() {
 	}
 	}
 }
 }
 
 
+type OsmConfig struct {
+	Namespace  string        `yaml:"namespace"`
+	Name       string        `yaml:"name"`
+	Prefix     string        `yaml:"prefix"`
+	TmpPrefix  string        `yaml:"tmp_prefix"`
+	BaseUrl    string        `yaml:"base_url"`
+	TimeoutSec time.Duration `yaml:"timeout_sec"`
+}
+
 func GetConfig() Config {
 func GetConfig() Config {
 	return conf
 	return conf
 }
 }

+ 7 - 0
deployment/config/config.yaml

@@ -13,3 +13,10 @@ infrastructure:
       database: "traceability"
       database: "traceability"
       max_connections: 50
       max_connections: 50
       max_idle_connections: 10
       max_idle_connections: 10
+
+osm:
+  namespace: 溯源
+  name: OBS
+  prefix: yunji/test
+  tmp_prefix: yunji/test/temp
+  base_url: http://localhost:30657

+ 77 - 0
deployment/data_service/data_containers/mini_carousel_config.yaml

@@ -0,0 +1,77 @@
+kind: DataContainer
+spec:
+  namespace: ecos
+  data_source: ecos
+  name: ecos.mini_carousel_configs
+  spec:
+    table_name: ecos.mini_carousel_configs
+    columns:
+      - name: id
+        type: "varchar(32)"
+        comment: id
+        primary_key: true
+      - name: component_id
+        type: "varchar(32)"
+        comment: 组件实例ID
+        not_null: true
+        index: true
+      - name: image_url
+        type: "varchar(500)"
+        comment: 图片地址
+        not_null: true
+        index: true
+      - name: image_alt
+        type: "varchar(200)"
+        comment: 图片描述
+        not_null: true
+        index: true
+      - name: link_type
+        type: "integer"
+        comment: 链接类型
+        not_null: true
+        index: true
+      - name: link_url
+        type: "varchar(500)"
+        comment: 链接地址
+        not_null: true
+        index: true
+      - name: link_params
+        type: "text"
+        comment: 链接参数
+        not_null: true
+        index: true
+      - name: sort_order
+        type: "integer"
+        comment: 排序
+        not_null: true
+        index: true
+      - name: is_enabled
+        type: "varchar(10)"
+        comment: 是否启用
+        not_null: true
+        index: true
+      - name: tenant_id
+        type: "varchar(32)"
+        comment: 租户ID
+        not_null: true
+        index: true
+      - name: create_user_id
+        type: "varchar(32)"
+        comment: 创建者ID
+        not_null: true
+        index: true
+      - name: last_update_user_id
+        type: "varchar(32)"
+        comment: 最后修改者ID
+        not_null: true
+        index: true
+      - name: created_time
+        type: "timestamp with time zone"
+        comment: 创建时间
+        not_null: true
+      - name: last_updated_time
+        type: "timestamp with time zone"
+        comment: 最近更新时间
+        not_null: true
+# HAC: DB TABLE MINICAROUSELCONFIG RELATION COLUMNS #
+# HAC: END DB TABLE MINICAROUSELCONFIG RELATION COLUMNS #

+ 67 - 0
deployment/data_service/data_containers/mini_component_type.yaml

@@ -0,0 +1,67 @@
+kind: DataContainer
+spec:
+  namespace: ecos
+  data_source: ecos
+  name: ecos.mini_component_types
+  spec:
+    table_name: ecos.mini_component_types
+    columns:
+      - name: id
+        type: "varchar(32)"
+        comment: id
+        primary_key: true
+      - name: type_code
+        type: "varchar(50)"
+        comment: 组件类型编码
+        not_null: true
+        index: true
+      - name: type_name
+        type: "varchar(100)"
+        comment: 组件类型名称
+        not_null: true
+        index: true
+      - name: description
+        type: "text"
+        comment: 组件描述
+        not_null: true
+        index: true
+      - name: component_config
+        type: "text"
+        comment: 组件默认配置模板
+        not_null: true
+        index: true
+      - name: is_enabled
+        type: "varchar(10)"
+        comment: 是否启用
+        not_null: true
+        index: true
+      - name: sort_order
+        type: "integer"
+        comment: 排序
+        not_null: true
+        index: true
+      - name: tenant_id
+        type: "varchar(32)"
+        comment: 租户ID
+        not_null: true
+        index: true
+      - name: create_user_id
+        type: "varchar(32)"
+        comment: 创建者ID
+        not_null: true
+        index: true
+      - name: last_update_user_id
+        type: "varchar(32)"
+        comment: 最后修改者ID
+        not_null: true
+        index: true
+      - name: created_time
+        type: "timestamp with time zone"
+        comment: 创建时间
+        not_null: true
+      - name: last_updated_time
+        type: "timestamp with time zone"
+        comment: 最近更新时间
+        not_null: true
+# HAC: DB TABLE MINICOMPONENTTYPE RELATION COLUMNS #
+# HAC: END DB TABLE MINICOMPONENTTYPE RELATION COLUMNS #

+ 77 - 0
deployment/data_service/data_containers/mini_live_config.yaml

@@ -0,0 +1,77 @@
+kind: DataContainer
+spec:
+  namespace: ecos
+  data_source: ecos
+  name: ecos.mini_live_configs
+  spec:
+    table_name: ecos.mini_live_configs
+    columns:
+      - name: id
+        type: "varchar(32)"
+        comment: id
+        primary_key: true
+      - name: component_id
+        type: "varchar(32)"
+        comment: 组件实例ID
+        not_null: true
+        index: true
+      - name: live_title
+        type: "varchar(200)"
+        comment: 直播标题
+        not_null: true
+        index: true
+      - name: live_cover_url
+        type: "varchar(500)"
+        comment: 直播封面图
+        not_null: true
+        index: true
+      - name: live_room_id
+        type: "varchar(32)"
+        comment: 直播间ID
+        not_null: true
+        index: true
+      - name: live_status
+        type: "integer"
+        comment: 直播状态
+        not_null: true
+        index: true
+      - name: placeholder_image
+        type: "varchar(500)"
+        comment: 占位图片
+        not_null: true
+        index: true
+      - name: placeholder_text
+        type: "varchar(200)"
+        comment: 占位文本
+        not_null: true
+        index: true
+      - name: is_enabled
+        type: "varchar(10)"
+        comment: 是否启用
+        not_null: true
+        index: true
+      - name: tenant_id
+        type: "varchar(32)"
+        comment: 租户ID
+        not_null: true
+        index: true
+      - name: create_user_id
+        type: "varchar(32)"
+        comment: 创建者ID
+        not_null: true
+        index: true
+      - name: last_update_user_id
+        type: "varchar(32)"
+        comment: 最后修改者ID
+        not_null: true
+        index: true
+      - name: created_time
+        type: "timestamp with time zone"
+        comment: 创建时间
+        not_null: true
+      - name: last_updated_time
+        type: "timestamp with time zone"
+        comment: 最近更新时间
+        not_null: true
+# HAC: DB TABLE MINILIVECONFIG RELATION COLUMNS #
+# HAC: END DB TABLE MINILIVECONFIG RELATION COLUMNS #

+ 67 - 0
deployment/data_service/data_containers/mini_page_component.yaml

@@ -0,0 +1,67 @@
+kind: DataContainer
+spec:
+  namespace: ecos
+  data_source: ecos
+  name: ecos.mini_page_components
+  spec:
+    table_name: ecos.mini_page_components
+    columns:
+      - name: id
+        type: "varchar(32)"
+        comment: id
+        primary_key: true
+      - name: page_id
+        type: "varchar(32)"
+        comment: 页面ID
+        not_null: true
+        index: true
+      - name: component_type_id
+        type: "varchar(32)"
+        comment: 组件类型ID
+        not_null: true
+        index: true
+      - name: type_name
+        type: "varchar(100)"
+        comment: 组件类型名称
+        not_null: true
+        index: true
+      - name: component_config
+        type: "text"
+        comment: 组件配置数据
+        not_null: true
+        index: true
+      - name: sort_order
+        type: "integer"
+        comment: 排序
+        not_null: true
+        index: true
+      - name: is_enabled
+        type: "varchar(10)"
+        comment: 是否启用
+        not_null: true
+        index: true
+      - name: tenant_id
+        type: "varchar(32)"
+        comment: 租户ID
+        not_null: true
+        index: true
+      - name: create_user_id
+        type: "varchar(32)"
+        comment: 创建者ID
+        not_null: true
+        index: true
+      - name: last_update_user_id
+        type: "varchar(32)"
+        comment: 最后修改者ID
+        not_null: true
+        index: true
+      - name: created_time
+        type: "timestamp with time zone"
+        comment: 创建时间
+        not_null: true
+      - name: last_updated_time
+        type: "timestamp with time zone"
+        comment: 最近更新时间
+        not_null: true
+# HAC: DB TABLE MINIPAGECOMPONENT RELATION COLUMNS #
+# HAC: END DB TABLE MINIPAGECOMPONENT RELATION COLUMNS #

+ 62 - 0
deployment/data_service/data_containers/mini_page_config.yaml

@@ -0,0 +1,62 @@
+kind: DataContainer
+spec:
+  namespace: ecos
+  data_source: ecos
+  name: ecos.mini_page_configs
+  spec:
+    table_name: ecos.mini_page_configs
+    columns:
+      - name: id
+        type: "varchar(32)"
+        comment: id
+        primary_key: true
+      - name: page_code
+        type: "varchar(50)"
+        comment: 页面编码
+        not_null: true
+        index: true
+      - name: page_name
+        type: "varchar(100)"
+        comment: 页面名称
+        not_null: true
+        index: true
+      - name: description
+        type: "text"
+        comment: 页面描述
+        not_null: true
+        index: true
+      - name: is_enabled
+        type: "varchar(10)"
+        comment: 是否启用
+        not_null: true
+        index: true
+      - name: sort_order
+        type: "integer"
+        comment: 排序
+        not_null: true
+        index: true
+      - name: tenant_id
+        type: "varchar(32)"
+        comment: 租户ID
+        not_null: true
+        index: true
+      - name: create_user_id
+        type: "varchar(32)"
+        comment: 创建者ID
+        not_null: true
+        index: true
+      - name: last_update_user_id
+        type: "varchar(32)"
+        comment: 最后修改者ID
+        not_null: true
+        index: true
+      - name: created_time
+        type: "timestamp with time zone"
+        comment: 创建时间
+        not_null: true
+      - name: last_updated_time
+        type: "timestamp with time zone"
+        comment: 最近更新时间
+        not_null: true
+# HAC: DB TABLE MINIPAGECONFIG RELATION COLUMNS #
+# HAC: END DB TABLE MINIPAGECONFIG RELATION COLUMNS #

+ 77 - 0
deployment/data_service/data_containers/mini_quality_product_config.yaml

@@ -0,0 +1,77 @@
+kind: DataContainer
+spec:
+  namespace: ecos
+  data_source: ecos
+  name: ecos.mini_quality_product_configs
+  spec:
+    table_name: ecos.mini_quality_product_configs
+    columns:
+      - name: id
+        type: "varchar(32)"
+        comment: id
+        primary_key: true
+      - name: component_id
+        type: "varchar(32)"
+        comment: 组件实例ID
+        not_null: true
+        index: true
+      - name: product_id
+        type: "varchar(32)"
+        comment: 关联的商品ID
+        not_null: true
+        index: true
+      - name: custom_title
+        type: "varchar(200)"
+        comment: 自定义标题
+        not_null: true
+        index: true
+      - name: custom_subtitle
+        type: "varchar(200)"
+        comment: 自定义副标题
+        not_null: true
+        index: true
+      - name: custom_image
+        type: "varchar(500)"
+        comment: 自定义图片
+        not_null: true
+        index: true
+      - name: background_color
+        type: "varchar(20)"
+        comment: 背景颜色
+        not_null: true
+        index: true
+      - name: sort_order
+        type: "integer"
+        comment: 排序
+        not_null: true
+        index: true
+      - name: is_enabled
+        type: "varchar(10)"
+        comment: 是否启用
+        not_null: true
+        index: true
+      - name: tenant_id
+        type: "varchar(32)"
+        comment: 租户ID
+        not_null: true
+        index: true
+      - name: create_user_id
+        type: "varchar(32)"
+        comment: 创建者ID
+        not_null: true
+        index: true
+      - name: last_update_user_id
+        type: "varchar(32)"
+        comment: 最后修改者ID
+        not_null: true
+        index: true
+      - name: created_time
+        type: "timestamp with time zone"
+        comment: 创建时间
+        not_null: true
+      - name: last_updated_time
+        type: "timestamp with time zone"
+        comment: 最近更新时间
+        not_null: true
+# HAC: DB TABLE MINIQUALITYPRODUCTCONFIG RELATION COLUMNS #
+# HAC: END DB TABLE MINIQUALITYPRODUCTCONFIG RELATION COLUMNS #

+ 77 - 0
deployment/data_service/data_containers/mini_video_config.yaml

@@ -0,0 +1,77 @@
+kind: DataContainer
+spec:
+  namespace: ecos
+  data_source: ecos
+  name: ecos.mini_video_configs
+  spec:
+    table_name: ecos.mini_video_configs
+    columns:
+      - name: id
+        type: "varchar(32)"
+        comment: id
+        primary_key: true
+      - name: component_id
+        type: "varchar(32)"
+        comment: 组件实例ID
+        not_null: true
+        index: true
+      - name: video_title
+        type: "varchar(200)"
+        comment: 视频标题
+        not_null: true
+        index: true
+      - name: video_url
+        type: "varchar(500)"
+        comment: 视频地址
+        not_null: true
+        index: true
+      - name: video_cover
+        type: "varchar(500)"
+        comment: 视频封面
+        not_null: true
+        index: true
+      - name: video_duration
+        type: "integer"
+        comment: 视频时长(秒)
+        not_null: true
+        index: true
+      - name: auto_play
+        type: "varchar(10)"
+        comment: 是否自动播放
+        not_null: true
+        index: true
+      - name: show_controls
+        type: "varchar(10)"
+        comment: 是否显示控制器
+        not_null: true
+        index: true
+      - name: is_enabled
+        type: "varchar(10)"
+        comment: 是否启用
+        not_null: true
+        index: true
+      - name: tenant_id
+        type: "varchar(32)"
+        comment: 租户ID
+        not_null: true
+        index: true
+      - name: create_user_id
+        type: "varchar(32)"
+        comment: 创建者ID
+        not_null: true
+        index: true
+      - name: last_update_user_id
+        type: "varchar(32)"
+        comment: 最后修改者ID
+        not_null: true
+        index: true
+      - name: created_time
+        type: "timestamp with time zone"
+        comment: 创建时间
+        not_null: true
+      - name: last_updated_time
+        type: "timestamp with time zone"
+        comment: 最近更新时间
+        not_null: true
+# HAC: DB TABLE MINIVIDEOCONFIG RELATION COLUMNS #
+# HAC: END DB TABLE MINIVIDEOCONFIG RELATION COLUMNS #

+ 0 - 0
datactl/.offline/.database/.trace.yaml → deployment/data_service/datactl/.offline/.database/.trtest.yaml


+ 1 - 0
go.mod

@@ -6,6 +6,7 @@ require (
 	git.sxidc.com/go-framework/baize v1.7.3
 	git.sxidc.com/go-framework/baize v1.7.3
 	git.sxidc.com/go-tools/utils v1.5.32
 	git.sxidc.com/go-tools/utils v1.5.32
 	git.sxidc.com/service-supports/fslog v0.5.9
 	git.sxidc.com/service-supports/fslog v0.5.9
+	git.sxidc.com/service-supports/osm_sdk v1.0.18
 	git.sxidc.com/service-supports/scm-sdk v0.1.0
 	git.sxidc.com/service-supports/scm-sdk v0.1.0
 	github.com/pkg/errors v0.9.1
 	github.com/pkg/errors v0.9.1
 	github.com/stretchr/testify v1.10.0
 	github.com/stretchr/testify v1.10.0

+ 2 - 0
go.sum

@@ -6,6 +6,8 @@ git.sxidc.com/service-supports/ds-sdk v0.10.12 h1:xg8uuSBPMVcPXXx7snPhZithgqxfJS
 git.sxidc.com/service-supports/ds-sdk v0.10.12/go.mod h1:QS5FgT3fyPbDl4ak6BO5IF7X4B6Z2uQWpRPskYb/oto=
 git.sxidc.com/service-supports/ds-sdk v0.10.12/go.mod h1:QS5FgT3fyPbDl4ak6BO5IF7X4B6Z2uQWpRPskYb/oto=
 git.sxidc.com/service-supports/fslog v0.5.9 h1:q2XIK2o/fk/qmByy4x5kKLC+k7kolT5LrXHcWRSffXQ=
 git.sxidc.com/service-supports/fslog v0.5.9 h1:q2XIK2o/fk/qmByy4x5kKLC+k7kolT5LrXHcWRSffXQ=
 git.sxidc.com/service-supports/fslog v0.5.9/go.mod h1:/m03ATmmOle75qtEgvEw8a1+Dcg6iHp08M1bGFXJTBU=
 git.sxidc.com/service-supports/fslog v0.5.9/go.mod h1:/m03ATmmOle75qtEgvEw8a1+Dcg6iHp08M1bGFXJTBU=
+git.sxidc.com/service-supports/osm_sdk v1.0.18 h1:6Ggbpf2gNQC3/YHYkWlYcilnsZKxASv96xiioksjDuI=
+git.sxidc.com/service-supports/osm_sdk v1.0.18/go.mod h1:fRTV7L7tn4OD4cI33n8uDEMfA1ZD8hde+qXVzHVmBXI=
 git.sxidc.com/service-supports/scm-sdk v0.1.0 h1:198qs/XxffOrHioKEWXyPfsQLoO3E8Ifj4idOWJxIe0=
 git.sxidc.com/service-supports/scm-sdk v0.1.0 h1:198qs/XxffOrHioKEWXyPfsQLoO3E8Ifj4idOWJxIe0=
 git.sxidc.com/service-supports/scm-sdk v0.1.0/go.mod h1:F0DLFok92zElZZRxJujSk6KmRoVGN8bkrbXFdq19uwI=
 git.sxidc.com/service-supports/scm-sdk v0.1.0/go.mod h1:F0DLFok92zElZZRxJujSk6KmRoVGN8bkrbXFdq19uwI=
 github.com/Masterminds/goutils v1.1.1 h1:5nUrii3FMTL5diU80unEVvNevw1nH4+ZV4DSLVJLSYI=
 github.com/Masterminds/goutils v1.1.1 h1:5nUrii3FMTL5diU80unEVvNevw1nH4+ZV4DSLVJLSYI=

+ 1 - 2
main.go

@@ -2,9 +2,8 @@ package main
 
 
 import (
 import (
 	"ecos/application"
 	"ecos/application"
-	DEATH "gith
 	DEATH "github.com/vrecan/death"
 	DEATH "github.com/vrecan/death"
-	"ecos/application"
+	"syscall"
 )
 )
 
 
 func main() {
 func main() {

+ 105 - 0
osm/osm.go

@@ -0,0 +1,105 @@
+package osm
+
+import (
+	ossDomain "ecos/application/domain/oss"
+	"ecos/config"
+	"ecos/utils"
+	"git.sxidc.com/service-supports/fslog"
+	"git.sxidc.com/service-supports/osm_sdk"
+	"github.com/pkg/errors"
+	"strings"
+)
+
+func ExistWithoutPrefix(obj string) (bool, error) {
+	if utils.HasBlank(obj) {
+		return false, nil
+	}
+
+	return osm_sdk.Exist(obj)
+}
+
+func UrlWithoutPrefix(obj string) (string, string, error) {
+	if utils.HasBlank(obj) {
+		fslog.Warn("oss获取Url发现违规参数")
+		return "", "", nil
+	}
+	metaData, err := osm_sdk.GetUrlWithMetaData(obj)
+	if err != nil {
+		return "", "", err
+	}
+	println(metaData.Url, metaData.FileType, metaData.FileName, metaData.MetaData.FileName, metaData.MetaData.FileType)
+
+	return metaData.Url, metaData.FileName, nil
+}
+
+func MultipleFileUrl(filePath string) ([]ossDomain.FileObject, error) {
+	filePathArr := strings.Split(filePath, ",")
+	picture := make([]ossDomain.FileObject, 0)
+	for _, file := range filePathArr {
+
+		exist, err := ExistWithoutPrefix(file)
+		if err != nil {
+			fslog.Error(err)
+			picture = append(picture, ossDomain.FileObject{
+				Url:  file,
+				Temp: "",
+			})
+			continue
+		}
+		if !exist {
+			fslog.Error("文件【" + file + "】不存在")
+			picture = append(picture, ossDomain.FileObject{
+				Url:  file,
+				Temp: "",
+			})
+			continue
+		}
+		url, fileName, err := UrlWithoutPrefix(file)
+		if err != nil {
+			fslog.Error("文件【" + file + "】链接生成失败")
+			picture = append(picture, ossDomain.FileObject{
+				Url:  file,
+				Temp: "",
+			})
+			continue
+		}
+		picture = append(picture, ossDomain.FileObject{
+			Url:  file,
+			Name: fileName,
+			Temp: url,
+		})
+	}
+	return picture, nil
+}
+
+func MultipleFileMv(filePath string) (string, error) {
+	endPicture := make([]string, 0)
+	files := strings.Split(filePath, ",")
+	for _, file := range files {
+		//文件名
+		tmpFx := config.GetConfig().OsmConfig.TmpPrefix
+		pfx := config.GetConfig().OsmConfig.Prefix
+		if utils.HasText(file) && strings.Contains(file, "/temp/") {
+			fileName, found := strings.CutPrefix(file, tmpFx)
+			if !found {
+				return "", errors.New("文件名处理失败")
+			}
+			err := MvWithoutPrefix(file, pfx+fileName)
+			if err != nil {
+				return "", errors.New("文件移动失败")
+			}
+			endPicture = append(endPicture, pfx+fileName)
+			continue
+		}
+		endPicture = append(endPicture, file)
+	}
+	return strings.Join(endPicture, ","), nil
+}
+
+func MvWithoutPrefix(f, t string) error {
+	if _, err := osm_sdk.Copy(f, t); err != nil {
+		return err
+	}
+
+	return osm_sdk.DeleteMulti(f)
+}

+ 25 - 0
utils/utils.go

@@ -0,0 +1,25 @@
+package utils
+
+import (
+	"strings"
+)
+
+func HasBlank(str ...string) bool {
+	for _, s := range str {
+		if strings.Trim(s, " ") == "" {
+			return true
+		}
+	}
+
+	return false
+}
+
+func HasText(str ...string) bool {
+	for _, s := range str {
+		if strings.Trim(s, " ") != "" {
+			return true
+		}
+	}
+
+	return false
+}