|
@@ -313,10 +313,10 @@ func (this *PowerService) Power(userid string, baseUserId, accountId, entId, pos
|
|
|
}
|
|
|
//文库
|
|
|
docs = &entity.Docs{
|
|
|
- DocStatus: common.Int64All((*data)["i_doc_status"]),
|
|
|
- StartDate: common.Int64All((*data)["l_doc_starttime"]),
|
|
|
- EndDate: common.Int64All((*data)["l_doc_endtime"]),
|
|
|
- FreeDownload: common.Int64All((*data)["i_doc_free_download"]),
|
|
|
+ DocStatus: common.Int64All((*eudata)["i_doc_status"]),
|
|
|
+ StartDate: common.Int64All((*eudata)["l_doc_starttime"]),
|
|
|
+ EndDate: common.Int64All((*eudata)["l_doc_endtime"]),
|
|
|
+ FreeDownload: common.Int64All((*eudata)["i_doc_free_download"]),
|
|
|
}
|
|
|
}
|
|
|
}
|
|
@@ -435,7 +435,7 @@ func (this *PowerService) Power(userid string, baseUserId, accountId, entId, pos
|
|
|
if userPower.Docs.DocStatus <= 0 && userPower.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"}}})
|
|
|
if sc > 0 {
|
|
|
- userPower.Docs.FreeDownload = 1 //已留资 未使用下载机会
|
|
|
+ userPower.Docs.FreeDownload = 2 //已留资 下载机会未使用
|
|
|
}
|
|
|
}
|
|
|
}
|