ziwen %!s(int64=2) %!d(string=hai) anos
pai
achega
cbfa7e7910
Modificáronse 3 ficheiros con 18 adicións e 17 borrados
  1. 14 15
      controllers/activity.go
  2. 3 2
      controllers/user.go
  3. 1 0
      models/db.go

+ 14 - 15
controllers/activity.go

@@ -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 {

+ 3 - 2
controllers/user.go

@@ -154,6 +154,7 @@ func (this *UserController) Detail() {
 	}
 	resp := new(models.UserDetailResp)
 	resp.UserId = user.UserId
+	resp.UserName = user.RealName
 	resp.Headimgurl = user.Headimgurl
 	resp.Mobile = user.Mobile
 	resp.Email = user.Email
@@ -878,8 +879,8 @@ func (this *UserController) CommnetList() {
 	br.Data = resp
 }
 
-// @Title 获取浏览历史列表
-// @Description 获取浏览历史列表
+// @Title 我的足迹
+// @Description 获取我的足迹列表
 // @Param   PageSize    query   int true       "PageSize"
 // @Param   CurrentIndex    query   int true       "CurrentIndex"
 // @Success 200 {object} models.ArticleBrowseHistoryListResp

+ 1 - 0
models/db.go

@@ -54,6 +54,7 @@ func init() {
 		new(CygxActivityHelpAsk),
 		new(UserTemplateRecord),
 		new(CygxAdvice),
+		new(CygxPageHistoryRecord),
 	)
 	// 记录ORM查询日志
 	orm.Debug = true