|
@@ -2065,12 +2065,12 @@ func (this *UserController) CompanyTableList() {
|
|
|
conditionIndustryFllow := condition
|
|
|
conditionKeyWord := condition
|
|
|
if classType == 1 {
|
|
|
- conditionArtcile += " AND art.article_type_id > 0 "
|
|
|
+ conditionArtcile += " AND art.article_type_id = 0 "
|
|
|
conditionActivityMeet += " AND a.chart_permission_id != 31 "
|
|
|
conditionIndustryFllow += " AND m.chart_permission_id != 31 "
|
|
|
conditionKeyWord += " AND r.register_platform IN (1,2) "
|
|
|
} else {
|
|
|
- conditionArtcile += " AND art.article_type_id = 0 "
|
|
|
+ conditionArtcile += " AND art.article_type_id > 0 "
|
|
|
conditionActivityMeet += " AND a.chart_permission_id = 31 "
|
|
|
conditionIndustryFllow += " AND m.chart_permission_id = 31 "
|
|
|
conditionKeyWord += " AND r.register_platform IN (5,6) "
|
|
@@ -2219,7 +2219,7 @@ func (this *UserController) CompanyTableList() {
|
|
|
return
|
|
|
}
|
|
|
|
|
|
- departmentFollowNum, err = cygx.GetCygArticleDepartmentFollowCountByCompanyWeekly(conditionIndustryFllow)
|
|
|
+ departmentFollowNum, err = cygx.GetCygArticleDepartmentFollowCountByCompanyWeekly(condition)
|
|
|
if err != nil {
|
|
|
br.Msg = "获取信息失败"
|
|
|
br.ErrMsg = "获取关注作者总数失败,Err:" + err.Error()
|
|
@@ -2324,6 +2324,7 @@ func (this *UserController) CompanyTableList() {
|
|
|
|
|
|
|
|
|
|
|
|
+
|
|
|
|
|
|
|
|
|
func (this *UserController) CompanyTableDetail() {
|
|
@@ -2357,6 +2358,7 @@ func (this *UserController) CompanyTableDetail() {
|
|
|
keyWord := this.GetString("KeyWord")
|
|
|
activityName := this.GetString("ActivityName")
|
|
|
source, _ := this.GetInt("Source")
|
|
|
+ classType, _ := this.GetInt("ClassType", 1)
|
|
|
if companyId < 1 {
|
|
|
br.Msg = "用户不存在"
|
|
|
return
|
|
@@ -2376,6 +2378,22 @@ func (this *UserController) CompanyTableDetail() {
|
|
|
condition += ` AND ( r.mobile LIKE '%` + keyWord + `%' OR r.email LIKE '%` + keyWord + `%' OR r.real_name LIKE '%` + keyWord + `%')`
|
|
|
}
|
|
|
|
|
|
+ conditionArtcile := condition
|
|
|
+ conditionActivityMeet := condition
|
|
|
+ conditionIndustryFllow := condition
|
|
|
+ conditionKeyWord := condition
|
|
|
+ if classType == 1 {
|
|
|
+ conditionArtcile += " AND art.article_type_id = 0 "
|
|
|
+ conditionActivityMeet += " AND a.chart_permission_id != 31 "
|
|
|
+ conditionIndustryFllow += " AND m.chart_permission_id != 31 "
|
|
|
+ conditionKeyWord += " AND r.register_platform IN (1,2) "
|
|
|
+ } else {
|
|
|
+ conditionArtcile += " AND art.article_type_id > 0 "
|
|
|
+ conditionActivityMeet += " AND a.chart_permission_id = 31 "
|
|
|
+ conditionIndustryFllow += " AND m.chart_permission_id = 31 "
|
|
|
+ conditionKeyWord += " AND r.register_platform IN (5,6) "
|
|
|
+ }
|
|
|
+
|
|
|
var isAdminRole bool
|
|
|
|
|
|
if sysUser.Role == utils.ROLE_TYPE_CODE_ADMIN || sysUser.Role == utils.ROLE_TYPE_CODE_RESEARCHR {
|
|
@@ -2391,6 +2409,11 @@ func (this *UserController) CompanyTableDetail() {
|
|
|
endDate += " 23:59:59"
|
|
|
condition += ` AND r.create_time <= '` + endDate + `' `
|
|
|
}
|
|
|
+ if classType == 1 {
|
|
|
+ condition += " AND art.article_type_id = 0 "
|
|
|
+ } else {
|
|
|
+ condition += " AND art.article_type_id > 0 "
|
|
|
+ }
|
|
|
condition += " ORDER BY r.create_time DESC "
|
|
|
var listRecord []*cygx.CygxArticleAndYanxuanRecordResp
|
|
|
if isAdminRole {
|
|
@@ -2455,6 +2478,13 @@ func (this *UserController) CompanyTableDetail() {
|
|
|
if activityName != "" {
|
|
|
condition += ` AND a.activity_name LIKE '%` + activityName + `%' `
|
|
|
}
|
|
|
+
|
|
|
+ if classType == 1 {
|
|
|
+ condition += " AND a.chart_permission_id != 31 "
|
|
|
+ } else {
|
|
|
+ condition += " AND a.chart_permission_id = 31 "
|
|
|
+ }
|
|
|
+
|
|
|
if isAdminRole {
|
|
|
total, err = cygx.GetActivityMeetByCompanyCount(condition)
|
|
|
if err != nil {
|
|
@@ -2505,6 +2535,11 @@ func (this *UserController) CompanyTableDetail() {
|
|
|
}
|
|
|
}
|
|
|
} else if source == 3 {
|
|
|
+ if classType == 1 {
|
|
|
+ condition += " AND art.article_type_id = 0 "
|
|
|
+ } else {
|
|
|
+ condition += " AND art.article_type_id > 0 "
|
|
|
+ }
|
|
|
if isAdminRole {
|
|
|
total, err = cygx.GetCygxArticleCollectCountByCompany(condition)
|
|
|
if err != nil {
|
|
@@ -2598,6 +2633,11 @@ func (this *UserController) CompanyTableDetail() {
|
|
|
}
|
|
|
|
|
|
} else if source == 5 {
|
|
|
+ if classType == 1 {
|
|
|
+ condition += " AND m.chart_permission_id != 31 "
|
|
|
+ } else {
|
|
|
+ condition += " AND m.chart_permission_id = 31 "
|
|
|
+ }
|
|
|
if isAdminRole {
|
|
|
total, err = cygx.GetCygxIndustryFllowCountByCompany(condition)
|
|
|
if err != nil {
|
|
@@ -2669,6 +2709,11 @@ func (this *UserController) CompanyTableDetail() {
|
|
|
}
|
|
|
}
|
|
|
} else if source == 7 {
|
|
|
+ if classType == 1 {
|
|
|
+ condition += " AND r.register_platform IN (1,2) "
|
|
|
+ } else {
|
|
|
+ condition += " AND r.register_platform IN (5,6) "
|
|
|
+ }
|
|
|
if isAdminRole {
|
|
|
total, err = cygx.GetCygxSearchKeyWordCountBuCompany(condition)
|
|
|
if err != nil {
|
|
@@ -2753,11 +2798,6 @@ func (this *UserController) CompanyTableDetail() {
|
|
|
}
|
|
|
}
|
|
|
} else if source == 10 {
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
if isAdminRole {
|
|
|
total, err = cygx.GetCygxTagHistoryCount(condition)
|
|
|
if err != nil {
|
|
@@ -2785,6 +2825,69 @@ func (this *UserController) CompanyTableDetail() {
|
|
|
return
|
|
|
}
|
|
|
}
|
|
|
+ } else if source == 11 {
|
|
|
+ if isAdminRole {
|
|
|
+ total, list, err = cygx.GetCygxYanxuaSspecialHistoryRecordByUser(condition, startSize, pageSize)
|
|
|
+ if err != nil && err.Error() != utils.ErrNoRow() {
|
|
|
+ br.Msg = "获取信息失败"
|
|
|
+ br.ErrMsg = "获取用户阅读记录,Err:" + err.Error()
|
|
|
+ return
|
|
|
+ }
|
|
|
+ } else {
|
|
|
+ total, list, err = cygx.GetCygxYanxuaSspecialHistoryRecordByUserWeekly(condition, startSize, pageSize)
|
|
|
+ if err != nil && err.Error() != utils.ErrNoRow() {
|
|
|
+ br.Msg = "获取信息失败"
|
|
|
+ br.ErrMsg = "获取用户阅读记录,Err:" + err.Error()
|
|
|
+ return
|
|
|
+ }
|
|
|
+ }
|
|
|
+ if len(list) > 0 {
|
|
|
+ for k, v := range list {
|
|
|
+ list[k].RegisterPlatform = cygxService.GetArticleSourcePlatform(v.SourcePlatform)
|
|
|
+ }
|
|
|
+ }
|
|
|
+ } else if source == 12 {
|
|
|
+ if isAdminRole {
|
|
|
+ total, list, err = cygx.GetCygxYanxuanSpecialCollectByUser(condition, startSize, pageSize)
|
|
|
+ if err != nil && err.Error() != utils.ErrNoRow() {
|
|
|
+ br.Msg = "获取信息失败"
|
|
|
+ br.ErrMsg = "获取用户阅读记录,Err:" + err.Error()
|
|
|
+ return
|
|
|
+ }
|
|
|
+ } else {
|
|
|
+ total, list, err = cygx.GetCygxYanxuanSpecialCollectByUserWeekly(condition, startSize, pageSize)
|
|
|
+ if err != nil && err.Error() != utils.ErrNoRow() {
|
|
|
+ br.Msg = "获取信息失败"
|
|
|
+ br.ErrMsg = "获取用户阅读记录,Err:" + err.Error()
|
|
|
+ return
|
|
|
+ }
|
|
|
+ }
|
|
|
+ if len(list) > 0 {
|
|
|
+ for k, v := range list {
|
|
|
+ list[k].RegisterPlatform = cygxService.GetArticleSourcePlatform(v.SourcePlatform)
|
|
|
+ }
|
|
|
+ }
|
|
|
+ } else if source == 13 {
|
|
|
+ if isAdminRole {
|
|
|
+ total, list, err = cygx.GetCygxYanxuanSpecialAuthorByUser(condition, startSize, pageSize)
|
|
|
+ if err != nil && err.Error() != utils.ErrNoRow() {
|
|
|
+ br.Msg = "获取信息失败"
|
|
|
+ br.ErrMsg = "获取用户阅读记录,Err:" + err.Error()
|
|
|
+ return
|
|
|
+ }
|
|
|
+ } else {
|
|
|
+ total, list, err = cygx.GetCygxYanxuanSpecialAuthorByUserWeekly(condition, startSize, pageSize)
|
|
|
+ if err != nil && err.Error() != utils.ErrNoRow() {
|
|
|
+ br.Msg = "获取信息失败"
|
|
|
+ br.ErrMsg = "获取用户阅读记录,Err:" + err.Error()
|
|
|
+ return
|
|
|
+ }
|
|
|
+ }
|
|
|
+ if len(list) > 0 {
|
|
|
+ for k, v := range list {
|
|
|
+ list[k].RegisterPlatform = cygxService.GetArticleSourcePlatform(v.SourcePlatform)
|
|
|
+ }
|
|
|
+ }
|
|
|
}
|
|
|
|
|
|
page := paging.GetPaging(currentIndex, pageSize, total)
|