|
@@ -46,7 +46,7 @@ func AddCygxTagHistory(user *models.WxUserItem, tagId int) (err error) {
|
|
|
// fmt.Println(conditionInit)
|
|
|
//}
|
|
|
|
|
|
-func GetConditionInitByTagIds(tagIds string) (conditionInit string, err error) {
|
|
|
+func GetConditionInitByTagIds(tagIds string, chartPermissionId int) (conditionInit string, err error) {
|
|
|
if tagIds == "" {
|
|
|
return
|
|
|
}
|
|
@@ -243,7 +243,12 @@ func GetConditionInitByTagIds(tagIds string) (conditionInit string, err error) {
|
|
|
for _, v := range listActivity {
|
|
|
activityIds = append(activityIds, strconv.Itoa(v.ActivityId))
|
|
|
}
|
|
|
- conditionInit = " AND ( source_id IN ( " + strings.Join(articleIds, ",") + ") AND source = '" + utils.CYGX_OBJ_ARTICLE + "') OR (source_id IN ( " + strings.Join(activityIds, ",") + ") AND source = '" + utils.CYGX_OBJ_ACTIVITY + " ' )"
|
|
|
+ var conditionchartInit string
|
|
|
+ //行业筛选
|
|
|
+ if chartPermissionId > 0 {
|
|
|
+ conditionchartInit += " AND chart_permission_id = " + strconv.Itoa(chartPermissionId)
|
|
|
+ }
|
|
|
+ conditionInit = " AND ( source_id IN ( " + strings.Join(articleIds, ",") + ") " + conditionchartInit + " AND source = '" + utils.CYGX_OBJ_ARTICLE + "') OR (source_id IN ( " + strings.Join(activityIds, ",") + ") " + conditionchartInit + " AND source = '" + utils.CYGX_OBJ_ACTIVITY + " ' )"
|
|
|
}
|
|
|
|
|
|
case 3: // 路演回放
|