|
@@ -1735,7 +1735,6 @@ func (this *ActivityController) ActivityListSearch() {
|
|
|
// @Description 我的日程列表接口
|
|
|
// @Param PageSize query int true "每页数据条数"
|
|
|
// @Param CurrentIndex query int true "当前页页码,从1开始"
|
|
|
-// @Param Source query int false "来源 0:手机 ,1:Pc 默认0"
|
|
|
// @Success 200 {object} models.GetCygxActivityListRep
|
|
|
// @router /scheduleList [get]
|
|
|
func (this *ActivityController) ScheduleList() {
|
|
@@ -1753,7 +1752,7 @@ func (this *ActivityController) ScheduleList() {
|
|
|
uid := user.UserId
|
|
|
pageSize, _ := this.GetInt("PageSize")
|
|
|
currentIndex, _ := this.GetInt("CurrentIndex")
|
|
|
- source, _ := this.GetInt("Source")
|
|
|
+ //source, _ := this.GetInt("Source")
|
|
|
var startSize int
|
|
|
if pageSize <= 0 {
|
|
|
pageSize = utils.PageSize20
|
|
@@ -1766,10 +1765,10 @@ func (this *ActivityController) ScheduleList() {
|
|
|
var conditionCount string
|
|
|
var pars []interface{}
|
|
|
condition += ` AND art.publish_status = 1 `
|
|
|
- if source == 1 {
|
|
|
- condition += ` AND art.yidong_activity_id = '' `
|
|
|
- conditionCount += ` AND art.yidong_activity_id = '' `
|
|
|
- }
|
|
|
+ //if source == 1 {
|
|
|
+ // condition += ` AND art.yidong_activity_id = '' `
|
|
|
+ // conditionCount += ` AND art.yidong_activity_id = '' `
|
|
|
+ //}
|
|
|
total, err := models.GetScheduleCount(conditionCount, uid)
|
|
|
page := paging.GetPaging(currentIndex, pageSize, total)
|
|
|
if err != nil {
|
|
@@ -1788,9 +1787,9 @@ func (this *ActivityController) ScheduleList() {
|
|
|
//全部都是进行中的活动
|
|
|
if totalCount > currentIndex*pageSize {
|
|
|
condition += ` AND art.active_state IN(2) `
|
|
|
- if source == 1 {
|
|
|
- condition += ` AND art.yidong_activity_id = '' `
|
|
|
- }
|
|
|
+ //if source == 1 {
|
|
|
+ // condition += ` AND art.yidong_activity_id = '' `
|
|
|
+ //}
|
|
|
listHave, errList := models.GetScheduleList(condition, pars, uid, startSize, pageSize)
|
|
|
list = listHave
|
|
|
if errList != nil {
|
|
@@ -1800,9 +1799,9 @@ func (this *ActivityController) ScheduleList() {
|
|
|
}
|
|
|
} else if totalCount > currentIndex-1*pageSize && totalCount < currentIndex*pageSize { //部分是进行中的活动
|
|
|
condition = ` AND art.publish_status = 1 AND art.active_state IN(2) `
|
|
|
- if source == 1 {
|
|
|
- condition += ` AND art.yidong_activity_id = '' `
|
|
|
- }
|
|
|
+ //if source == 1 {
|
|
|
+ // condition += ` AND art.yidong_activity_id = '' `
|
|
|
+ //}
|
|
|
listHave, errList := models.GetScheduleList(condition, pars, uid, startSize, pageSize)
|
|
|
list = listHave
|
|
|
if errList != nil {
|
|
@@ -1812,9 +1811,9 @@ func (this *ActivityController) ScheduleList() {
|
|
|
}
|
|
|
pageSize = pageSize - len(listHave)
|
|
|
condition = ` AND art.publish_status = 1 AND art.active_state IN(1,3) `
|
|
|
- if source == 1 {
|
|
|
- condition += ` AND art.yidong_activity_id = '' `
|
|
|
- }
|
|
|
+ //if source == 1 {
|
|
|
+ // condition += ` AND art.yidong_activity_id = '' `
|
|
|
+ //}
|
|
|
//listOther, errList := models.GetScheduleList(condition, pars, uid, startSize, pageSize)
|
|
|
listOther, errList := services.GetScheduleAndSpecilList(user, condition, startSize, pageSize)
|
|
|
if errList != nil {
|