|
@@ -75,6 +75,16 @@ func AddSpecialRecord(user *models.WxUserItem, specialId, stopTime int) (err err
|
|
|
go utils.SendAlarmMsg(fmt.Sprint("记录用户阅读时长 失败 AddSpecialRecord Err:"+err.Error(), "userId:", user.UserId, "specialId:", specialId), 2)
|
|
|
}
|
|
|
}()
|
|
|
+ //校验研选专栏权限,以及无权限的时候的对应状态码
|
|
|
+ havePower, e := GetYanxuanSpecialDetailUserPower(user)
|
|
|
+ if e != nil {
|
|
|
+ err = errors.New("GetYanxuanSpecialDetailUserPower, Err: " + e.Error())
|
|
|
+ return
|
|
|
+ }
|
|
|
+
|
|
|
+ if !havePower {
|
|
|
+ return
|
|
|
+ }
|
|
|
var sellerName string
|
|
|
//获取销售信息
|
|
|
sellerName, _ = GetSellerName(user)
|
|
@@ -159,7 +169,7 @@ func AddSpecialRecord(user *models.WxUserItem, specialId, stopTime int) (err err
|
|
|
itemLog.RegisterPlatform = utils.REGISTER_PLATFORM
|
|
|
itemLog.YanxuanSpecialId = specialId
|
|
|
itemLog.StopTime = stopTime
|
|
|
- _, e := models.AddCygxYanxuanSpecialRecordLog(itemLog) // 添加历史记录
|
|
|
+ _, e = models.AddCygxYanxuanSpecialRecordLog(itemLog) // 添加历史记录
|
|
|
if e != nil {
|
|
|
err = errors.New("AddCygxYanxuanSpecialRecordLog, Err: " + e.Error())
|
|
|
return
|