Browse Source

no message

xingzai 2 years ago
parent
commit
acebdd9df9
3 changed files with 5 additions and 4 deletions
  1. 0 2
      controllers/activity_special.go
  2. 0 1
      controllers/home.go
  3. 5 1
      services/activity_special.go

+ 0 - 2
controllers/activity_special.go

@@ -2,7 +2,6 @@ package controllers
 
 import (
 	"encoding/json"
-	"fmt"
 	"github.com/rdlucklib/rdluck_tools/paging"
 	"hongze/hongze_clpt/models"
 	"hongze/hongze_clpt/services"
@@ -50,7 +49,6 @@ func (this *ActivitySpecialController) SpecialList() {
 	}
 
 	conditionActivity := services.ActivityLabelSpecialSql(chartPermissionIds, whichDay, activeState)
-	fmt.Println(conditionActivity)
 	list, total, errList := services.GetActivitySpecialList(user, currentIndex, pageSize, "", conditionActivity)
 	if errList != nil {
 		br.Msg = "获取失败"

+ 0 - 1
controllers/home.go

@@ -92,7 +92,6 @@ func (this *MobileHomeController) List() {
 				br.ErrMsg = "获取用户信息失败,Err:" + err.Error()
 				return
 			}
-
 		}
 	} else if listType == 3 {
 		if chartPermissionId > 0 {

+ 5 - 1
services/activity_special.go

@@ -66,6 +66,10 @@ func ActivityLabelSpecialSql(chartPermissionIds, whichDay, activeState string) (
 		condition += `   AND art.activity_time_end <= ` + "'" + time.Now().Format(utils.FormatDateTime) + " '"
 	}
 
+	if activeState == "" {
+		condition += ` AND art.activity_time_end > ` + "'" + time.Now().Format(utils.FormatDateTime) + " '"
+	}
+
 	if activeState != "" || whichDay != "" {
 		condition += `  AND art.days > 0  `
 	}
@@ -400,7 +404,7 @@ func GetSpecialTripUserSchedule(userId int) (total int, err error) {
 
 //GetActivitySpecialList 获取专项调研列表
 func GetActivitySpecialList(user *models.WxUserItem, currentIndex, pageSize int, keywords, conditionActivity string) (list []*models.CygxActivitySpecialDetail, total int, err error) {
-	listConfirm, totalConfirm, e := GetActivityLabelSpecialConfirmList(user, (currentIndex-1)*pageSize, pageSize, 4, keywords, conditionActivity)
+	listConfirm, totalConfirm, e := GetActivityLabelSpecialConfirmList(user, (currentIndex-1)*pageSize, pageSize, 0, keywords, conditionActivity)
 	if e != nil {
 		err = errors.New("GetActivityLabelSpecialConfirmList, Err: " + e.Error())
 		return