Commit ab4044c2 authored by qinhaitao's avatar qinhaitao

fix: 会员,关注任务

parent 5c9d93e1
......@@ -151,7 +151,7 @@ class UserService extends BaseService {
if (!followBefore && followNow && !userInfo.follow.newFollow) {
projection.$set.follow = setNewFollowUserData(userInfo.follow)
projection.$push[`taskInfo.${today}.follow`] = { createTime: Date.now() }
projection.$inc[`remainTimes.follow`] = follow.value
follow?.value && (projection.$inc[`remainTimes.follow`] = follow.value)
}
// 之前进入活动非会员,现在进入会员,则视为新会员用户
......@@ -159,7 +159,7 @@ class UserService extends BaseService {
if (newVip) {
projection.$set.member = setNewVipUserData(userInfo.member)
projection.$push[`taskInfo.${today}.member`] = { createTime: Date.now() }
projection.$inc[`remainTimes.member`] = member.value
member?.value && (projection.$inc[`remainTimes.member`] = member.value)
}
projection = merge({}, projection, updateUserWhenLogin(this.context, activityInfo, userInfo))
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment