|
@@ -596,27 +596,25 @@ func (this *vipSubscribeStruct) CanTrial(userId string, session *httpsession.Ses
|
|
|
|
|
|
// 订阅修改
|
|
|
func (this *vipSubscribeStruct) SubChange(userId string, oldVip, areaNew *map[string]interface{}, industryNew []string, session *httpsession.Session) bool {
|
|
|
- updateOk := false
|
|
|
- util.Compatible.Update(userId, bson.M{"$set": bson.M{
|
|
|
+ updateOk := util.Compatible.Update(userId, bson.M{"$set": bson.M{
|
|
|
"o_vipjy.o_area": areaNew, //设置地区
|
|
|
"o_vipjy.a_buyerclass": industryNew, //设置行业
|
|
|
}})
|
|
|
if !updateOk {
|
|
|
return false
|
|
|
- } else {
|
|
|
- //保存修改日志
|
|
|
- go func() {
|
|
|
- util.MQFW.Save("subvip_edit_log", map[string]interface{}{
|
|
|
- "s_userid": userId,
|
|
|
- "o_area_old": (*oldVip)["o_area"],
|
|
|
- "a_buyerclass_old": (*oldVip)["a_buyerclass"],
|
|
|
- "o_area": areaNew,
|
|
|
- "a_buyerclass": industryNew,
|
|
|
- "l_changeTime": time.Now().Unix(),
|
|
|
- })
|
|
|
- }()
|
|
|
}
|
|
|
- return true
|
|
|
+ //保存修改日志
|
|
|
+ go func() {
|
|
|
+ util.MQFW.Save("subvip_edit_log", map[string]interface{}{
|
|
|
+ "s_userid": userId,
|
|
|
+ "o_area_old": (*oldVip)["o_area"],
|
|
|
+ "a_buyerclass_old": (*oldVip)["a_buyerclass"],
|
|
|
+ "o_area": areaNew,
|
|
|
+ "a_buyerclass": industryNew,
|
|
|
+ "l_changeTime": time.Now().Unix(),
|
|
|
+ })
|
|
|
+ }()
|
|
|
+ return true
|
|
|
}
|
|
|
|
|
|
// 获取省份,城市,行业购买内容
|