Browse Source

feat: 修复错误参数

zhangxinlei1996 2 năm trước cách đây
mục cha
commit
597bad4ed0
1 tập tin đã thay đổi với 3 bổ sung2 xóa
  1. 3 2
      service/power.go

+ 3 - 2
service/power.go

@@ -186,15 +186,16 @@ func (this *PowerService) Power(userid string, baseUserId, accountId, entId, pos
 				entnicheUserId := this.GetEntnicheUserId(entId, phone)
 				//免费
 				fdata, _ := this.Conn.MgoJy.FindOne("entniche_rule", map[string]interface{}{
-					"i_ent":    entId,
+					"i_entid":  entId,
 					"i_userid": entnicheUserId,
 					"i_type":   2, //0:商机管理 1:超级订阅/大会员 2:免费
 				})
 				o_jy, _ := (*fdata)["o_entniche"].(map[string]interface{})
+
 				free.OjyLength = int64(len(o_jy))
 				a_key, _ := o_jy["a_key"].([]interface{})
 				free.FreeHasKey = len(a_key) > 0
-				if common.IntAll((o_jy)["i_newfree"]) > 0 || entity.IsNewFreeTimeCell < registeDate { //IsNewFreeTimeCell dev3.6.4版本之前发了个紧急版本处理老用户订阅问题,i_newfree字段必须用户选择地区才能生成,不能作为判断是否是新用户得唯一标识,在此版本添加了常量:IsNewFreeTimeCell作为判断标准;--ws
+				if common.IntAll(o_jy["i_newfree"]) > 0 || entity.IsNewFreeTimeCell < registeDate { //IsNewFreeTimeCell dev3.6.4版本之前发了个紧急版本处理老用户订阅问题,i_newfree字段必须用户选择地区才能生成,不能作为判断是否是新用户得唯一标识,在此版本添加了常量:IsNewFreeTimeCell作为判断标准;--ws
 					free.IsUpgrade = true //新免费用户
 				}
 				//企业