|
@@ -186,15 +186,16 @@ func (this *PowerService) Power(userid string, baseUserId, accountId, entId, pos
|
|
entnicheUserId := this.GetEntnicheUserId(entId, phone)
|
|
entnicheUserId := this.GetEntnicheUserId(entId, phone)
|
|
//免费
|
|
//免费
|
|
fdata, _ := this.Conn.MgoJy.FindOne("entniche_rule", map[string]interface{}{
|
|
fdata, _ := this.Conn.MgoJy.FindOne("entniche_rule", map[string]interface{}{
|
|
- "i_ent": entId,
|
|
|
|
|
|
+ "i_entid": entId,
|
|
"i_userid": entnicheUserId,
|
|
"i_userid": entnicheUserId,
|
|
"i_type": 2, //0:商机管理 1:超级订阅/大会员 2:免费
|
|
"i_type": 2, //0:商机管理 1:超级订阅/大会员 2:免费
|
|
})
|
|
})
|
|
o_jy, _ := (*fdata)["o_entniche"].(map[string]interface{})
|
|
o_jy, _ := (*fdata)["o_entniche"].(map[string]interface{})
|
|
|
|
+
|
|
free.OjyLength = int64(len(o_jy))
|
|
free.OjyLength = int64(len(o_jy))
|
|
a_key, _ := o_jy["a_key"].([]interface{})
|
|
a_key, _ := o_jy["a_key"].([]interface{})
|
|
free.FreeHasKey = len(a_key) > 0
|
|
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 //新免费用户
|
|
free.IsUpgrade = true //新免费用户
|
|
}
|
|
}
|
|
//企业
|
|
//企业
|