소스 검색

Merge branch 'feature/v1.2.36_ws' of BaseService/userCenter into feature/v1.2.36

wangshan 11 달 전
부모
커밋
f97c4f1475
1개의 변경된 파일3개의 추가작업 그리고 2개의 파일을 삭제
  1. 3 2
      entity/subscribe.go

+ 3 - 2
entity/subscribe.go

@@ -270,12 +270,13 @@ func (this *UserInfoReq) EntnicheSub() *map[string]interface{} {
 				}
 			}
 		}
-		res, _ = this.Mgo.FindOne("entniche_rule", map[string]interface{}{
+		var ok bool
+		res, ok = this.Mgo.FindOne("entniche_rule", map[string]interface{}{
 			"i_deptid": deptId,
 			"i_entid":  this.EntId,
 		})
 		log.Println(res_, "+++")
-		if len(res_) > 0 {
+		if ok && res != nil && len(res_) > 0 {
 			oenitche, ok := (*res)["o_entniche"].(map[string]interface{})
 			if ok && oenitche != nil {
 				oenitche["a_buyerclass"] = res_["a_buyerclass"]