|
@@ -53,7 +53,7 @@ type defalutSySerieModel struct {
|
|
|
|
|
|
func NewSySerieModel() SySeriesModel {
|
|
func NewSySerieModel() SySeriesModel {
|
|
return &defalutSySerieModel{
|
|
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",
|
|
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{
|
|
option := database.Option{
|
|
TableName: d.tableName + " AS t1",
|
|
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",
|
|
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,
|
|
Limit: pagination.Limit,
|
|
OffSet: pagination.Offset,
|
|
OffSet: pagination.Offset,
|
|
@@ -100,7 +100,7 @@ func (d *defalutSySerieModel) Count(db *gorm.DB, join bool) (int64, error) {
|
|
}
|
|
}
|
|
|
|
|
|
if join {
|
|
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)
|
|
return database.Count(db, option)
|