互动
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

25 lines
748 B

package upper_wall
import (
"hudongzhuanjia/models"
"git.ouxuan.net/tommy/osmanthuswine/src/core"
)
type UpperWallResult struct {
Id int `json:"id"`
Content string `json:"content"`
Img string `json:"img"`
Category string `json:"category"`
Status int `json:"status"`
}
func GetUpperWallResult(userId, activityId, rehearsalId, archId interface{}) ([]*UpperWallResult, error) {
result := make([]*UpperWallResult, 0)
err := core.GetXormAuto().Table(new(models.UpperWall)).
Select("id, content, img, category, status").
Where("is_delete=0 and user_id=? and activity_id=? and rehearsal_id=? and arch_id=?",
userId, activityId, rehearsalId, archId).
OrderBy("created_at desc").Find(&result)
return result, err
}