|
@@ -4,20 +4,14 @@ import (
|
|
|
"app.yhyue.com/moapp/MessageCenter/entity"
|
|
|
"app.yhyue.com/moapp/MessageCenter/rpc/message"
|
|
|
"app.yhyue.com/moapp/MessageCenter/util"
|
|
|
+ "fmt"
|
|
|
"strconv"
|
|
|
)
|
|
|
|
|
|
func FindUserBuoyMsg(this *message.FindUserBuoyMsgReq) *message.FindUserBuoyMsgRes {
|
|
|
var err error
|
|
|
- query := map[string]interface{}{
|
|
|
- "receive_userid": this.UserId,
|
|
|
- "isdel": 1,
|
|
|
- "appid": this.Appid,
|
|
|
- "isRead": 0,
|
|
|
- "show_buoy": 1,
|
|
|
- }
|
|
|
data := message.FindUserBuoyMsgRes{}
|
|
|
- res := entity.Mysql.Find("message", query, "", "createtime desc", 0, int(this.PageSize))
|
|
|
+ res := entity.Mysql.SelectBySql(fmt.Sprintf(`SELECT * FROM message WHERE receive_userid = "%s" and isdel = 1 and appid = %s and isRead =0 and show_buoy = 1 and show_content != "" ORDER BY createtime DESC LIMIT 0,%d`, this.UserId, this.Appid, int(this.PageSize)))
|
|
|
//log.Println("数据:", res)
|
|
|
if res != nil && len(*res) > 0 {
|
|
|
for _, v := range *res {
|