xingzai 6 mēneši atpakaļ
vecāks
revīzija
a29dd6c83f

+ 13 - 3
controllers/yanxuan_special_message.go

@@ -100,6 +100,7 @@ func (this *YanxuanSpecialMessageController) MessageAdd() {
 // @Param   PageSize   query   int  true       "每页数据条数"
 // @Param   CurrentIndex   query   int  true       "当前页页码,从1开始"
 // @Param   MessageType   query   int  false       "留言类型1:普通留言、2:公开留言"
+// @Param   MessageId   query   int  false       "留言ID"
 // @Success 200 {object} models.SpecialListResp
 // @router /message/manage/list [get]
 func (this *YanxuanSpecialMessageController) MessageManageList() {
@@ -119,7 +120,17 @@ func (this *YanxuanSpecialMessageController) MessageManageList() {
 	pageSize, _ := this.GetInt("PageSize")
 	currentIndex, _ := this.GetInt("CurrentIndex")
 	messageType, _ := this.GetInt("MessageType", 1)
-
+	messageId, _ := this.GetInt("MessageId")
+	messagerDetail, err := models.GetCygxYanxuanSpecialMessagerDetailById(messageId)
+	if err != nil {
+		br.Msg = "获取失败"
+		br.ErrMsg = "获取失败, Err:" + err.Error()
+		return
+	}
+	resp := new(models.YanxuanSpecialMessageManageRespListResp)
+	if messagerDetail.Status == -1 {
+		resp.IsDelete = true
+	}
 	var startSize int
 	if pageSize <= 0 {
 		pageSize = utils.PageSize20
@@ -128,7 +139,6 @@ func (this *YanxuanSpecialMessageController) MessageManageList() {
 		currentIndex = 1
 	}
 	startSize = utils.StartIndex(currentIndex, pageSize)
-	resp := new(models.YanxuanSpecialMessageManageRespListResp)
 	var condition string
 	var pars []interface{}
 	userId := user.UserId
@@ -531,7 +541,7 @@ func (this *YanxuanSpecialMessageController) MessageSpecialList() {
 		br.ErrMsg = "获取失败, Err:" + err.Error()
 		return
 	}
-	condition += ` ORDER BY message_id DESC `
+	condition += `  ORDER BY  top_time DESC , message_id DESC  `
 	list, err := models.GetCygxYanxuanSpecialMessageList(condition, pars, startSize, pageSize)
 	if err != nil {
 		br.Msg = "获取失败"

+ 1 - 0
models/cygx_yanxuan_special_message.go

@@ -157,6 +157,7 @@ type CygxYanxuanSpecialMessageManageChildResp struct {
 
 type YanxuanSpecialMessageManageRespListResp struct {
 	PublicMessageTotal int                `comment:"公开留言数量"`
+	IsDelete           bool               `comment:"是否删除"`
 	Paging             *paging.PagingItem `description:"分页数据"`
 	List               []*CygxYanxuanSpecialMessageManageResp
 }

+ 1 - 1
utils/constants.go

@@ -214,7 +214,7 @@ const (
 	WX_MSG_PATH_YX_SIGNUP_DETAIL               = "pages-message/activityTemplate/activityTemplate?id="         //研选报名详情
 	WX_MSG_PATH_YX_ARTICLE_DETAIL              = "pages-user/reportDetail/reportDetail?IsSendWx=1&id="         //研选纪要详情
 	WX_MSG_PATH_YX_SPECIAL_MASSAGE_DETAIL      = "pages-purchaser/replyDetailsPage/replyDetailsPage?msgId="    //研选专栏留言详情
-	WX_MSG_PATH_YX_SPECIAL_MASSAGE_MANAGE_LIST = "pages-purchaser/commentManagement/commentManagement"         //研选专栏留言管理列表
+	WX_MSG_PATH_YX_SPECIAL_MASSAGE_MANAGE_LIST = "pages-purchaser/commentManagement/commentManagement?msgId="  //研选专栏留言管理列表
 )
 
 //2:文章详情  https://web.hzinsights.com/material/info/8436  小程序路径:/pageMy/reportDetail/reportDetail?id=