|
@@ -39,14 +39,14 @@ func (obj *Custom) GetCustomTotal(condition string, pars []interface{}) (list []
|
|
|
databaseName = "hongze_rddp"
|
|
|
}
|
|
|
|
|
|
- sql = `SELECT company_status,COUNT(1) AS total FROM (
|
|
|
+ sql = `SELECT company_status,COUNT(1) AS total,is_hide FROM (
|
|
|
SELECT a.company_id,a.company_name,a.nation,b.seller_id,b.seller_name,
|
|
|
CASE b.status
|
|
|
WHEN '正式' THEN '正式'
|
|
|
WHEN '永续' THEN '正式'
|
|
|
WHEN '试用' THEN '试用'
|
|
|
ELSE '关闭' END AS company_status,
|
|
|
- b.view_total,b.road_show_total,a.created_time AS create_time,b.last_view_time,b.overseas_label
|
|
|
+ b.view_total,b.road_show_total,a.created_time AS create_time,b.last_view_time,a.is_hide,a.overseas_status,b.overseas_label
|
|
|
FROM company AS a
|
|
|
INNER JOIN company_product AS b ON a.company_id=b.company_id
|
|
|
INNER JOIN overseas_custom_seller AS c ON b.seller_id=c.seller_id
|
|
@@ -56,7 +56,7 @@ func (obj *Custom) GetCustomTotal(condition string, pars []interface{}) (list []
|
|
|
CASE t.enabled
|
|
|
WHEN 0 THEN '关闭'
|
|
|
ELSE '试用' END AS company_status,
|
|
|
- t.view_total,0 AS road_show_total,t.create_time,'' AS last_view_time,t.overseas_label
|
|
|
+ t.view_total,0 AS road_show_total,t.create_time,'' AS last_view_time,t.is_hide,t.overseas_status,t.overseas_label
|
|
|
FROM %s.english_company AS t
|
|
|
INNER JOIN overseas_custom_seller AS n ON t.seller_id=n.seller_id
|
|
|
)AS m
|
|
@@ -102,7 +102,7 @@ func (obj *Custom) GetCustomListCount(condition string, pars []interface{}, comp
|
|
|
WHEN '永续' THEN '正式'
|
|
|
WHEN '试用' THEN '试用'
|
|
|
ELSE '关闭' END AS company_status,
|
|
|
- b.view_total,b.road_show_total,a.created_time AS create_time,b.last_view_time,b.overseas_label
|
|
|
+ b.view_total,b.road_show_total,a.created_time AS create_time,b.last_view_time,a.is_hide,a.overseas_status,b.overseas_label
|
|
|
FROM company AS a
|
|
|
INNER JOIN company_product AS b ON a.company_id=b.company_id
|
|
|
INNER JOIN overseas_custom_seller AS c ON b.seller_id=c.seller_id
|
|
@@ -120,7 +120,7 @@ func (obj *Custom) GetCustomListCount(condition string, pars []interface{}, comp
|
|
|
CASE t.enabled
|
|
|
WHEN 0 THEN '关闭'
|
|
|
ELSE '试用' END AS company_status,
|
|
|
- t.view_total,0 AS road_show_total,t.create_time,'' AS last_view_time,t.overseas_label
|
|
|
+ t.view_total,0 AS road_show_total,t.create_time,'' AS last_view_time,t.is_hide,t.overseas_status,t.overseas_label
|
|
|
FROM %s.english_company AS t
|
|
|
INNER JOIN overseas_custom_seller AS n ON t.seller_id=n.seller_id
|
|
|
WHERE 1=1 `
|
|
@@ -229,7 +229,7 @@ type CustomHideReq struct {
|
|
|
CompanyId int `description:"客户ID"`
|
|
|
}
|
|
|
|
|
|
-func (obj *Custom) GetCustomByCompanyId(companyId int) (list *Custom, err error) {
|
|
|
+func (obj *Custom) GetCustomByCompanyId(companyId int) (item *Custom, err error) {
|
|
|
o := orm.NewOrm()
|
|
|
sql := ``
|
|
|
var databaseName string
|
|
@@ -239,9 +239,9 @@ func (obj *Custom) GetCustomByCompanyId(companyId int) (list *Custom, err error)
|
|
|
databaseName = "hongze_rddp"
|
|
|
}
|
|
|
|
|
|
- if companyId > utils.EnCompanyIdStep {
|
|
|
- companyId = companyId - utils.EnCompanyIdStep
|
|
|
- }
|
|
|
+ //if companyId > utils.EnCompanyIdStep {
|
|
|
+ // companyId = companyId - utils.EnCompanyIdStep
|
|
|
+ //}
|
|
|
|
|
|
sql = `SELECT * FROM (
|
|
|
SELECT a.company_id,a.company_name,a.nation,b.seller_id,b.seller_name,
|
|
@@ -260,7 +260,7 @@ func (obj *Custom) GetCustomByCompanyId(companyId int) (list *Custom, err error)
|
|
|
CASE t.enabled
|
|
|
WHEN 0 THEN '关闭'
|
|
|
ELSE '试用' END AS company_status,
|
|
|
- t.view_total,0 AS road_show_total,t.create_time,'' AS last_view_time,a.is_hide,a.overseas_status
|
|
|
+ t.view_total,0 AS road_show_total,t.create_time,'' AS last_view_time,t.is_hide,t.overseas_status
|
|
|
FROM %s.english_company AS t
|
|
|
INNER JOIN overseas_custom_seller AS n ON t.seller_id=n.seller_id
|
|
|
WHERE 1=1 `
|
|
@@ -269,7 +269,7 @@ func (obj *Custom) GetCustomByCompanyId(companyId int) (list *Custom, err error)
|
|
|
|
|
|
sql += ` AND m.company_id=? `
|
|
|
sql = fmt.Sprintf(sql, databaseName)
|
|
|
- _, err = o.Raw(sql, companyId).QueryRows(&list)
|
|
|
+ err = o.Raw(sql, companyId).QueryRow(&item)
|
|
|
return
|
|
|
}
|
|
|
|
|
@@ -295,7 +295,7 @@ func (obj *Custom) GetCustomOverseasLabelTotal(condition string, pars []interfac
|
|
|
WHEN '永续' THEN '正式'
|
|
|
WHEN '试用' THEN '试用'
|
|
|
ELSE '关闭' END AS company_status,
|
|
|
- b.view_total,b.road_show_total,a.created_time AS create_time,b.last_view_time,b.overseas_label
|
|
|
+ b.view_total,b.road_show_total,a.created_time AS create_time,b.last_view_time,a.is_hide,a.overseas_status,b.overseas_label
|
|
|
FROM company AS a
|
|
|
INNER JOIN company_product AS b ON a.company_id=b.company_id
|
|
|
INNER JOIN overseas_custom_seller AS c ON b.seller_id=c.seller_id
|
|
@@ -305,7 +305,7 @@ func (obj *Custom) GetCustomOverseasLabelTotal(condition string, pars []interfac
|
|
|
CASE t.enabled
|
|
|
WHEN 0 THEN '关闭'
|
|
|
ELSE '试用' END AS company_status,
|
|
|
- t.view_total,0 AS road_show_total,t.create_time,'' AS last_view_time,t.overseas_label
|
|
|
+ t.view_total,0 AS road_show_total,t.create_time,'' AS last_view_time,t.is_hide,t.overseas_status,t.overseas_label
|
|
|
FROM %s.english_company AS t
|
|
|
INNER JOIN overseas_custom_seller AS n ON t.seller_id=n.seller_id
|
|
|
)AS m
|