互动
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
749 B

5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
  1. package upper_wall
  2. import (
  3. "hudongzhuanjia/models"
  4. "github.com/ouxuanserver/osmanthuswine/src/core"
  5. )
  6. type UpperWallResult struct {
  7. Id int `json:"id"`
  8. Content string `json:"content"`
  9. Img string `json:"img"`
  10. Category string `json:"category"`
  11. Status int `json:"status"`
  12. }
  13. func GetUpperWallResult(userId, activityId, rehearsalId, archId interface{}) ([]*UpperWallResult, error) {
  14. result := make([]*UpperWallResult, 0)
  15. err := core.GetXormAuto().Table(new(models.UpperWall)).
  16. Select("id, content, img, category, status").
  17. Where("is_delete=0 and user_id=? and activity_id=? and rehearsal_id=? and arch_id=?",
  18. userId, activityId, rehearsalId, archId).
  19. OrderBy("created_at desc").Find(&result)
  20. return result, err
  21. }