Bläddra i källkod

change ads to dws

jason 1 år sedan
förälder
incheckning
7eda9360b6

+ 1 - 1
model/ads14.go

@@ -23,7 +23,7 @@ type Ads14 struct {
 }
 
 func (Ads14) TableName() string {
-	return "db_adm_ads.t_adm_ads14"
+	return "db_adm_dws.t_adm_ads14"
 }
 
 // Insert 插入一条记录

+ 1 - 1
model/c2_item.go

@@ -21,7 +21,7 @@ type defaultC2ItemModel struct {
 
 func NewC2ItemModel() C2ItemModel {
 	return &defaultC2ItemModel{
-		tabname: "db_adm_ads.t_adm_ads6",
+		tabname: "db_adm_dws.t_adm_ads6",
 		fields:  "id, name",
 	}
 }

+ 2 - 2
model/maintain_detail.go

@@ -47,7 +47,7 @@ type defaultGdMaintain struct {
 
 func NewMaintainDetailModel() MaintainDetailModel {
 	return &defaultGdMaintain{
-		tableName: "db_adm_ads.t_adm_ads7",
+		tableName: "db_adm_dws.t_adm_ads7",
 		fields:    "id, style_id, item_id, start_mile, mile_cycle, start_date, date_cycle, created_at, updated_at",
 	}
 }
@@ -57,7 +57,7 @@ func (d *defaultGdMaintain) MaintainDetailList(db *gorm.DB) ([]MaintainDetailIte
 	err := database.List(db, &res, database.Option{
 		TableName: d.tableName + " AS t1",
 		Fields:    "t1.id, style_id, t1.start_mile, mile_cycle, start_date, date_cycle, t2.item_name, t2.item_type, t1.item_id",
-		Joins:     []string{"LEFT JOIN db_adm_ads.t_adm_ads12 AS t2 ON t1.item_id = t2.item_id"},
+		Joins:     []string{"LEFT JOIN db_adm_dws.t_adm_ads12 AS t2 ON t1.item_id = t2.item_id"},
 	})
 
 	return res, err

+ 1 - 1
model/maintain_detail_template.go

@@ -72,7 +72,7 @@ func (d *defaultMaintainDetailTemplateModel) ListByItem(db *gorm.DB) ([]Maintena
 	err := database.List(db, &res, database.Option{
 		TableName: d.tableName + " AS t1",
 		Fields:    "t1.id, t1.start_mile, mile_cycle, start_date, date_cycle, t2.item_name, t2.item_type, t1.item_id",
-		Joins:     []string{"LEFT JOIN db_adm_ads.t_adm_ads12 AS t2 ON t1.item_id = t2.item_id"},
+		Joins:     []string{"LEFT JOIN db_adm_dws.t_adm_ads12 AS t2 ON t1.item_id = t2.item_id"},
 		OrderBy:   "t1.item_id",
 	})
 

+ 1 - 1
model/maintain_item.go

@@ -24,7 +24,7 @@ type defaultMaintainItem struct {
 
 func NewMaintainItemModel() MaintainItemModel {
 	return &defaultMaintainItem{
-		tableName: "db_adm_ads.t_adm_ads12",
+		tableName: "db_adm_dws.t_adm_ads12",
 		fields: "id, item_id, item_name, item_type",
 	}
 }

+ 1 - 1
model/maintain_title.go

@@ -34,7 +34,7 @@ type defalutMaintainTitleModel struct {
 
 func NewMaintainTitleModel() MaintainTitleModel {
 	return &defalutMaintainTitleModel{
-		tableName: "db_adm_ads.t_adm_ads13",
+		tableName: "db_adm_dws.t_adm_ads13",
 		fileds:    "id, style_id, start_mile, start_date, maintain_mile_min_cycle, maintain_date_min_cycle, wash_cycle, repair_cycle, created_at, updated_at",
 	}
 }

+ 2 - 2
model/style_item.go

@@ -40,7 +40,7 @@ type defaultStyleItemModel struct {
 
 func NewStyleItemModel() StyleItemModel {
 	return &defaultStyleItemModel{
-		tableName: "db_adm_ads.t_adm_ads14",
+		tableName: "db_adm_dws.t_adm_ads14",
 		fields:    "id, style_id, c2_id, attribute_rule, useage, detail, created_at, updated_at",
 	}
 }
@@ -50,7 +50,7 @@ func (d *defaultStyleItemModel) List(db *gorm.DB) ([]StyleItem, error) {
 	err := database.List(db, &res, database.Option{
 		TableName: d.tableName + " AS t1",
 		Fields:    "t1.id, style_id, c2_id, useage, attribute_rule, detail, t2.name AS c2_name",
-		Joins:     []string{"LEFT JOIN db_adm_ads.t_adm_ads6 AS t2 ON t1.c2_id = t2.id"},
+		Joins:     []string{"LEFT JOIN db_adm_dws.t_adm_ads6 AS t2 ON t1.c2_id = t2.id"},
 	})
 
 	return res, err

+ 1 - 1
model/sy_brand.go

@@ -31,7 +31,7 @@ type defaultSyBrand struct {
 
 func NewSyBrand() SyBrandModel {
 	return &defaultSyBrand{
-		tableName: "db_adm_ads.t_adm_ads2",
+		tableName: "db_adm_dws.t_adm_dws20",
 		fields:    "id, initial, brand_name, brand_id, weight, has_img, status,old_brand_name, update_time",
 	}
 }

+ 3 - 3
model/sy_series.go

@@ -53,7 +53,7 @@ type defalutSySerieModel struct {
 
 func NewSySerieModel() SySeriesModel {
 	return &defalutSySerieModel{
-		tableName: "db_adm_ads.t_adm_ads4",
+		tableName: "db_adm_dws.t_adm_dws21",
 		fields:    "id, series_id,series_name, brand_id, maker, maker_id, lowest_price, highest_price, has_img,old_series_name, update_time",
 	}
 }
@@ -79,7 +79,7 @@ func (d *defalutSySerieModel) List(db *gorm.DB, pagination *Pagination, join boo
 
 	option := database.Option{
 		TableName: d.tableName + " AS t1",
-		Joins:     []string{"LEFT JOIN db_adm_ads.t_adm_ads2 AS t2 ON t1.brand_id = t2.brand_id"},
+		Joins:     []string{"LEFT JOIN db_adm_dws.t_adm_dws20 AS t2 ON t1.brand_id = t2.brand_id"},
 		Fields:    "t1.id, t1.series_id, t1.series_name, t1.maker, t1.status, t1.has_img,t1.old_series_name, t2.brand_name, t1.brand_id",
 		Limit:     pagination.Limit,
 		OffSet:    pagination.Offset,
@@ -100,7 +100,7 @@ func (d *defalutSySerieModel) Count(db *gorm.DB, join bool) (int64, error) {
 	}
 
 	if join {
-		option.Joins = []string{"LEFT JOIN db_adm_ads.t_adm_ads2 AS t2 ON t1.brand_id = t2.brand_id"}
+		option.Joins = []string{"LEFT JOIN db_adm_dws.t_adm_dws20 AS t2 ON t1.brand_id = t2.brand_id"}
 	}
 
 	return database.Count(db, option)

+ 3 - 3
model/sy_style.go

@@ -311,7 +311,7 @@ type defalutSyStyleModel struct {
 
 func NewSyStyleModel() SyStyleModel {
 	return &defalutSyStyleModel{
-		tableName: "db_adm_ads.t_adm_ads5",
+		tableName: "db_adm_dws.t_adm_dws22",
 	}
 }
 
@@ -326,7 +326,7 @@ func (d *defalutSyStyleModel) List(db *gorm.DB, pagination *Pagination, join boo
 
 	option := database.Option{
 		TableName: d.tableName + " AS t1",
-		Joins:     []string{"LEFT JOIN db_adm_ads.t_adm_ads13 AS t2 ON t1.style_id = t2.style_id"},
+		Joins:     []string{"LEFT JOIN db_adm_dws.t_adm_ads13 AS t2 ON t1.style_id = t2.style_id"},
 		Fields:    "t1.id, brand_name, series_id, series_name, t1.style_id, style_name, maker, is_on, t2.id AS maintain_id",
 		Limit:     pagination.Limit,
 		OffSet:    pagination.Offset,
@@ -345,7 +345,7 @@ func (d *defalutSyStyleModel) Count(db *gorm.DB, join bool) (int64, error) {
 	if join {
 		option = database.Option{
 			TableName: d.tableName + " AS t1",
-			Joins:     []string{"LEFT JOIN db_adm_ads.t_adm_ads13 AS t2 ON t1.style_id = t2.style_id"},
+			Joins:     []string{"LEFT JOIN db_adm_dws.t_adm_ads13 AS t2 ON t1.style_id = t2.style_id"},
 		}
 	} else {
 		option = database.Option{