瀏覽代碼

fix:删除判断信息条件

zhangxinlei1996 3 年之前
父節點
當前提交
f5bc25287c
共有 1 個文件被更改,包括 26 次插入26 次删除
  1. 26 26
      entity/subscribe.go

+ 26 - 26
entity/subscribe.go

@@ -55,13 +55,12 @@ func (this *UserInfoReq) GetUserInfo() (ret map[string]interface{}, msg string)
 	switch this.Types {
 	case "m":
 		//大会员
-		if (*data)["o_member_jy"] == nil || member_status <= 0 {
-			return nil, "未查询到用户信息"
+		if (*data)["o_member_jy"] != nil {
+			memberJy := common.ObjToMap((*data)["o_member_jy"])
+			object = this.format(memberJy)
+			(*object)["starttime"] = (*data)["i_member_starttime"]
+			(*object)["endtime"] = (*data)["i_member_endtime"]
 		}
-		memberJy := common.ObjToMap((*data)["o_member_jy"])
-		object = this.format(memberJy)
-		(*object)["starttime"] = (*data)["i_member_starttime"]
-		(*object)["endtime"] = (*data)["i_member_endtime"]
 	case "e":
 		//商机管理
 		entnicheJy := this.EntnicheSub()
@@ -72,28 +71,29 @@ func (this *UserInfoReq) GetUserInfo() (ret map[string]interface{}, msg string)
 		object = this.format(entnicheJy)
 	case "v":
 		//超级订阅
-		if (*data)["o_vipjy"] == nil || vip_status <= 0 {
-			return nil, "未查询到用户信息"
+		if (*data)["o_vipjy"] != nil {
+			vipJy := common.ObjToMap((*data)["o_vipjy"])
+			object = this.format(vipJy)
+			(*object)["starttime"] = (*data)["l_vip_starttime"]
+			(*object)["endtime"] = (*data)["l_vip_endtime"]
 		}
-		vipJy := common.ObjToMap((*data)["o_vipjy"])
-		object = this.format(vipJy)
-		(*object)["starttime"] = (*data)["l_vip_starttime"]
-		(*object)["endtime"] = (*data)["l_vip_endtime"]
+
 	case "f":
-		if (*data)["o_jy"] == nil {
-			return nil, "未查询到用户信息"
-		}
-		ojy := common.ObjToMap((*data)["o_jy"])
-		akey := common.ObjArrToMapArr((*ojy)["a_key"].([]interface{}))
-		(*object)["a_items"] = []map[string]interface{}{ //转换至和其它结构一致
-			map[string]interface{}{
-				"a_key": akey,
-			},
-		}
-		if (*ojy)["o_area"] == nil {
-			(*object)["o_area"] = map[string]interface{}{}
-		} else {
-			(*object)["o_area"] = (*ojy)["o_area"]
+		if (*data)["o_jy"] != nil {
+			ojy := common.ObjToMap((*data)["o_jy"])
+			if (*ojy)["a_key"] != nil {
+				akey := common.ObjArrToMapArr((*ojy)["a_key"].([]interface{}))
+				(*object)["a_items"] = []map[string]interface{}{ //转换至和其它结构一致
+					map[string]interface{}{
+						"a_key": akey,
+					},
+				}
+			}
+			if (*ojy)["o_area"] == nil {
+				(*object)["o_area"] = map[string]interface{}{}
+			} else {
+				(*object)["o_area"] = (*ojy)["o_area"]
+			}
 		}
 	}
 	//