黄梓健
5 years ago
18 changed files with 68 additions and 55 deletions
-
6controllers/author.go
-
12controllers/client/upper_wall.go
-
2controllers/pc/auction.go
-
2controllers/pc/calorie.go
-
4controllers/pc/lottery_draw.go
-
2controllers/pc/order_draw.go
-
8controllers/pc/reward.go
-
2controllers/pc/shake_red_envelope.go
-
2controllers/pc/sign.go
-
22controllers/pc/tug_war.go
-
12controllers/pc/upper_wall.go
-
2controllers/pc/vote.go
-
3log/hdzj.log
-
4models/area_store.go
-
9models/upper_wall.go
-
2services/activity/module.go
-
5services/lottery/lottery.go
-
24services/upper_wall/upper_wall.go
@ -0,0 +1,24 @@ |
|||||
|
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 |
||||
|
} |
Write
Preview
Loading…
Cancel
Save
Reference in new issue