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.
24 lines
720 B
24 lines
720 B
package upper_wall
|
|
|
|
import (
|
|
"github.com/ouxuanserver/osmanthuswine/src/core"
|
|
"hudongzhuanjia/models"
|
|
)
|
|
|
|
type UpperWallResult struct {
|
|
Id int64 `json:"id"`
|
|
Content string `json:"content"`
|
|
Img string `json:"img"`
|
|
Category string `json:"category"`
|
|
Status int `json:"status"`
|
|
}
|
|
|
|
func GetUpperWallResult(userId, activityId, rehearsalId 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=?",
|
|
userId, activityId, rehearsalId).
|
|
OrderBy("created_at desc").Find(&result)
|
|
return result, err
|
|
}
|