|
@@ -457,6 +457,22 @@ func (this *OverseasCustomController) CustomStatistics() {
|
|
|
if len(companyIds) > 0 {
|
|
|
condition += fmt.Sprintf(` AND m.company_id IN (%s) `, utils.GetOrmInReplace(len(companyIds)))
|
|
|
pars = append(pars, companyIds)
|
|
|
+ } else {
|
|
|
+ statisticsDataStatusList := make([]*overseas_custom.CustomTotal, 0)
|
|
|
+
|
|
|
+ var statusArr = [3]string{"试用", "正式", "关闭"}
|
|
|
+
|
|
|
+ for _, v := range statusArr {
|
|
|
+ item := new(overseas_custom.CustomTotal)
|
|
|
+ item.CompanyStatus = v
|
|
|
+ statisticsDataStatusList = append(statisticsDataStatusList, item)
|
|
|
+ }
|
|
|
+
|
|
|
+ br.Ret = 200
|
|
|
+ br.Success = true
|
|
|
+ br.Msg = "获取成功"
|
|
|
+ br.Data = statisticsDataStatusList
|
|
|
+ return
|
|
|
}
|
|
|
}
|
|
|
if sellerId > 0 {
|
|
@@ -562,6 +578,19 @@ func (this *OverseasCustomController) CustomLabelStatistics() {
|
|
|
if len(companyIds) > 0 {
|
|
|
condition += fmt.Sprintf(` AND m.company_id IN (%s) `, utils.GetOrmInReplace(len(companyIds)))
|
|
|
pars = append(pars, companyIds)
|
|
|
+ } else {
|
|
|
+ var labelArr = [4]int{1, 2, 3, 4}
|
|
|
+ labelList := make([]*overseas_custom.OverseasLabelTotal, 0)
|
|
|
+ for _, v := range labelArr {
|
|
|
+ item := new(overseas_custom.OverseasLabelTotal)
|
|
|
+ item.OverseasLabel = v
|
|
|
+ labelList = append(labelList, item)
|
|
|
+ }
|
|
|
+ br.Ret = 200
|
|
|
+ br.Success = true
|
|
|
+ br.Msg = "获取成功"
|
|
|
+ br.Data = labelList
|
|
|
+ return
|
|
|
}
|
|
|
}
|
|
|
if sellerId > 0 {
|