|
@@ -237,18 +237,7 @@ func (p *Pcsearch) GetNewBids() error {
|
|
|
userId, _ := p.GetSession("userId").(string)
|
|
|
baseUserId := p.GetSession("base_user_id")
|
|
|
vipStatus := jy.GetVipState(public.Mysql, public.MQFW, userId)
|
|
|
- isPayedUser := vipStatus.IsPayedUser()
|
|
|
- if !isPayedUser {
|
|
|
- p.T["list"] = []map[string]interface{}{}
|
|
|
- p.ServeJson(map[string]interface{}{
|
|
|
- "list": []map[string]interface{}{},
|
|
|
- "count": 0,
|
|
|
- "totalPage": 0,
|
|
|
- })
|
|
|
- return nil
|
|
|
- }
|
|
|
- // 如果没有权限
|
|
|
- if !jy.HasBidFieldPower(config.ResourceApi.HasPowers, fmt.Sprintf("%v", baseUserId), MedicalFunctionCode) {
|
|
|
+ if (vipStatus.BigMember <= 0 && vipStatus.VipState <= 0) || (!jy.HasBidFieldPower(config.ResourceApi.HasPowers, fmt.Sprintf("%v", baseUserId), MedicalFunctionCode)) {
|
|
|
p.T["list"] = []map[string]interface{}{}
|
|
|
p.ServeJson(map[string]interface{}{
|
|
|
"list": []map[string]interface{}{},
|
|
@@ -370,18 +359,17 @@ func (p *Pcsearch) PcSearchIndex(module string) error {
|
|
|
var count, totalPage int64
|
|
|
secondFlag := ""
|
|
|
secondKWS := ""
|
|
|
- if bidField != "" { // 如果是领域化数据 判断是否是付费用户 是否有权限
|
|
|
+ isSearch := true
|
|
|
+ if bidField != "" {
|
|
|
+ isSearch = false
|
|
|
vipStatus := jy.GetVipState(public.Mysql, public.MQFW, userId)
|
|
|
- isPayedUser1 := vipStatus.IsPayedUser()
|
|
|
- if !isPayedUser1 {
|
|
|
- list = &[]map[string]interface{}{}
|
|
|
-
|
|
|
- }
|
|
|
- // 是否开通过领域化权益
|
|
|
- if !jy.HasBidFieldPower(config.ResourceApi.HasPowers, fmt.Sprintf("%v", baseUserId), MedicalFunctionCode) {
|
|
|
- list = &[]map[string]interface{}{}
|
|
|
+ if vipStatus.BigMember > 0 || vipStatus.VipState > 0 {
|
|
|
+ if jy.HasBidFieldPower(config.ResourceApi.HasPowers, fmt.Sprintf("%v", baseUserId), MedicalFunctionCode) {
|
|
|
+ isSearch = true
|
|
|
+ }
|
|
|
}
|
|
|
- } else {
|
|
|
+ }
|
|
|
+ if isSearch {
|
|
|
if len(s_word) > 0 || len(industry) > 0 {
|
|
|
searchTypeSwitch, _ := config.Sysconfig["searchTypeSwitch"].(bool)
|
|
|
status = 2
|