|
@@ -4,7 +4,9 @@ import (
|
|
|
"errors"
|
|
|
"fmt"
|
|
|
"hongze/hongze_cygx/models"
|
|
|
+ "hongze/hongze_cygx/utils"
|
|
|
"strconv"
|
|
|
+ "time"
|
|
|
)
|
|
|
|
|
|
// 是否展示限免标签
|
|
@@ -79,3 +81,30 @@ func init1231() {
|
|
|
go models.AddCygxActivitySpecialTripBill(itemBill)
|
|
|
}
|
|
|
}
|
|
|
+
|
|
|
+// 添加关于我们浏览记录
|
|
|
+func AddCygxAboutUsVideoHistory(user *models.WxUserItem) (err error) {
|
|
|
+ defer func() {
|
|
|
+ if err != nil {
|
|
|
+ go utils.SendAlarmMsg("产品内测用户浏览信息记录失败"+err.Error(), 2)
|
|
|
+ }
|
|
|
+ }()
|
|
|
+ historyRecord := new(models.CygxAboutUsVideoHistory)
|
|
|
+ historyRecord.UserId = user.UserId
|
|
|
+ historyRecord.CreateTime = time.Now()
|
|
|
+ historyRecord.Mobile = user.Mobile
|
|
|
+ historyRecord.Email = user.Email
|
|
|
+ historyRecord.CompanyId = user.CompanyId
|
|
|
+ historyRecord.CompanyName = user.CompanyName
|
|
|
+ sellerItem, err := models.GetSellerByCompanyIdCheckFicc(user.CompanyId, 2)
|
|
|
+ if err != nil && err.Error() != utils.ErrNoRow() {
|
|
|
+ return
|
|
|
+ }
|
|
|
+ historyRecord.RealName = user.RealName
|
|
|
+ historyRecord.RegisterPlatform = utils.REGISTER_PLATFORM
|
|
|
+ if sellerItem != nil {
|
|
|
+ historyRecord.SellerName = sellerItem.RealName
|
|
|
+ }
|
|
|
+ _, err = models.AddCygxAboutUsVideoHistory(historyRecord)
|
|
|
+ return
|
|
|
+}
|