Commit 2a281977 by mushishixian

fix

parent 8acb8405
Showing with 5 additions and 2 deletions
......@@ -106,6 +106,9 @@ func (t *RecvPro) Consumer(dataByte []byte) (err error) {
//mysql数据操作
var result model.ActivityViewStatistics
err = specialDb.Reset().Table(&result).Where("activity_id", viewData.ActivityId).Select()
if err != nil {
fmt.Println("110", err)
}
if result.ActivityId == 0 {
//先去数据库插入
activityViewStatistics := model.ActivityViewStatistics{
......@@ -163,7 +166,7 @@ func (t *RecvPro) Consumer(dataByte []byte) (err error) {
var user model.UserMain
err = db.Reset().Table(&user).Where("user_id", viewData.UserId).Select()
if err != nil {
fmt.Println(err)
fmt.Println("用户相关的信息为空 : ", err)
logger.Error(err.Error())
}
mobile = user.Mobile
......@@ -202,7 +205,7 @@ func (t *RecvPro) Consumer(dataByte []byte) (err error) {
selector := bson.M{"unique_id": historyData.UniqueId}
err = mongoConn.DB("ichunt").C("activity_view_history").Update(selector, &historyData)
if err != nil {
fmt.Println("205 : ", err)
fmt.Println("205", err)
logger.Error(err.Error())
}
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment