|
@@ -100,6 +100,7 @@ func (this *PowerService) Power(userid string, baseUserId, accountId, entId, pos
|
|
"s_m_phone": 1,
|
|
"s_m_phone": 1,
|
|
"base_user_id": 1,
|
|
"base_user_id": 1,
|
|
}
|
|
}
|
|
|
|
+ var userId = userid
|
|
//大会员权益表查询条件
|
|
//大会员权益表查询条件
|
|
bigmemberServiceUserQuery := map[string]interface{}{"s_userid": userid, "i_status": 0}
|
|
bigmemberServiceUserQuery := map[string]interface{}{"s_userid": userid, "i_status": 0}
|
|
//个人身份 取user表中权益
|
|
//个人身份 取user表中权益
|
|
@@ -231,6 +232,7 @@ func (this *PowerService) Power(userid string, baseUserId, accountId, entId, pos
|
|
FreeDownload: common.Int64All((*data)["i_doc_free_download"]),
|
|
FreeDownload: common.Int64All((*data)["i_doc_free_download"]),
|
|
}
|
|
}
|
|
} else if positionType == 1 {
|
|
} else if positionType == 1 {
|
|
|
|
+ userId = strconv.FormatInt(positionId, 10)
|
|
entnicheUserId := this.GetEntnicheUserId(entId, phone)
|
|
entnicheUserId := this.GetEntnicheUserId(entId, phone)
|
|
//免费
|
|
//免费
|
|
fdata, _ := this.Conn.MgoJy.FindOne("entniche_rule", map[string]interface{}{
|
|
fdata, _ := this.Conn.MgoJy.FindOne("entniche_rule", map[string]interface{}{
|
|
@@ -433,7 +435,7 @@ func (this *PowerService) Power(userid string, baseUserId, accountId, entId, pos
|
|
//文库 非文库会员,确认免费下载机会状态 免费下载机会没有被消耗
|
|
//文库 非文库会员,确认免费下载机会状态 免费下载机会没有被消耗
|
|
//FreeDownload 0:未留资 有一次留资免费机会;2:已留资 下载机会未使用
|
|
//FreeDownload 0:未留资 有一次留资免费机会;2:已留资 下载机会未使用
|
|
if docs.DocStatus <= 0 && docs.FreeDownload == 0 {
|
|
if docs.DocStatus <= 0 && docs.FreeDownload == 0 {
|
|
- sc := this.MgoJy.Count("saleLeads", map[string]interface{}{"userid": userid, "source": map[string]interface{}{"$in": []string{"pc_library_details_free", "app_library_details_free", "wx_library_details_free", "h5_library_details_free"}}})
|
|
|
|
|
|
+ sc := this.MgoJy.Count("saleLeads", map[string]interface{}{"userid": userId, "source": map[string]interface{}{"$in": []string{"pc_library_details_free", "app_library_details_free", "wx_library_details_free", "h5_library_details_free"}}})
|
|
if sc > 0 {
|
|
if sc > 0 {
|
|
docs.FreeDownload = 2 //已留资 下载机会未使用
|
|
docs.FreeDownload = 2 //已留资 下载机会未使用
|
|
}
|
|
}
|