Commit 8a58fc7d authored by qinhaitao's avatar qinhaitao

feat: 🎸 access 增加记录

parent 19706925
......@@ -69,15 +69,15 @@ var User = /** @class */ (function () {
if (!!userInfo) return [3 /*break*/, 2];
return [4 /*yield*/, userService.initUserData(vipInfo, activityInfo)];
case 1:
_c.sent();
userInfo = _c.sent();
return [3 /*break*/, 4];
case 2: return [4 /*yield*/, userService.updateUserData(vipInfo, userInfo, activityInfo)];
case 3:
_c.sent();
userInfo = _c.sent();
_c.label = 4;
case 4:
// access表
return [4 /*yield*/, accessService.addAccess(isFollow, vipInfo.isVip)];
return [4 /*yield*/, accessService.addAccess(userInfo)];
case 5:
// access表
_c.sent();
......
{"version":3,"file":"user.controller.js","sourceRoot":"","sources":["../../src/controller/user.controller.ts"],"names":[],"mappings":";AAAA,cAAc;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAEd,0CAAuE;AAEvE,8BAAqC;AACrC,sCAAuD;AAEvD,4CAAqD;AAcrD;IAAA;IA6CA,CAAC;IA5CC;;OAEG;IAIG,oBAAK,GAAX,UACE,OAA+B,EAC/B,EAAqD,EACrD,EAA0D;YADxD,QAAQ,cAAA,EAAE,OAAO,aAAA,EAAE,YAAY,kBAAA;YAChC,WAAW,QAAA,EAAE,aAAa,QAAA;;;;;;wBAEnB,MAAM,GAAK,OAAO,OAAZ,CAAY;wBAElB,QAAQ,GAAK,OAAO,CAAC,IAAI,SAAjB,CAAiB;6BAE7B,CAAC,QAAQ,EAAT,wBAAS;wBACX,qBAAM,WAAW,CAAC,YAAY,CAAC,OAAO,EAAE,YAAY,CAAC,EAAA;;wBAArD,SAAqD,CAAA;;4BAErD,qBAAM,WAAW,CAAC,cAAc,CAAC,OAAO,EAAE,QAAQ,EAAE,YAAY,CAAC,EAAA;;wBAAjE,SAAiE,CAAA;;;oBAGnE,UAAU;oBACV,qBAAM,aAAa,CAAC,SAAS,CAAC,QAAQ,EAAE,OAAO,CAAC,KAAK,CAAC,EAAA;;wBADtD,UAAU;wBACV,SAAsD,CAAA;wBAEtD,sBAAO,kBAAY,CAAC,OAAO,CAAC;gCAC1B,MAAM,QAAA;6BACP,CAAC,EAAA;;;;KACH;IACD;;OAEG;IAGG,yBAAU,GAAhB,UACE,OAA6B,EAC7B,EAA+C,EAC/C,EAA4B;YAD1B,OAAO,aAAA,EAAE,gBAAgB,sBAAA;YAC1B,WAAW,QAAA;;;;;;wBAEJ,WAAW,GAAK,OAAO,CAAC,IAAI,YAAjB,CAAiB;wBAErB,qBAAM,WAAW,CAAC,UAAU,CAAC,OAAO,EAAE,WAAW,IAAI,oBAAc,CAAC,OAAO,CAAC,EAAE,gBAAgB,CAAC,EAAA;;wBAAxG,MAAM,GAAG,SAA+F;wBAE9G,sBAAO,kBAAY,CAAC,OAAO,CAAC,MAAM,CAAC,EAAA;;;;KACpC;IArCD;QAHC,uBAAW,CAAC,CAAC,YAAY,EAAE,UAAU,EAAE,QAAQ,EAAE,UAAU,CAAC,CAAC;QAC7D,6BAAiB;QACjB,oBAAQ,CAAC,CAAC,qBAAW,EAAE,uBAAa,CAAC,CAAC;;;;qCAsBtC;IAMD;QAFC,uBAAW,CAAC,CAAC,YAAY,CAAC,CAAC;QAC3B,oBAAQ,CAAC,CAAC,qBAAW,CAAC,CAAC;;;;0CAWvB;IACH,WAAC;CAAA,AA7CD,IA6CC;kBA7CoB,IAAI"}
\ No newline at end of file
{"version":3,"file":"user.controller.js","sourceRoot":"","sources":["../../src/controller/user.controller.ts"],"names":[],"mappings":";AAAA,cAAc;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAEd,0CAAuE;AAEvE,8BAAqC;AACrC,sCAAuD;AAEvD,4CAAqD;AAcrD;IAAA;IA6CA,CAAC;IA5CC;;OAEG;IAIG,oBAAK,GAAX,UACE,OAA+B,EAC/B,EAAqD,EACrD,EAA0D;YADxD,QAAQ,cAAA,EAAE,OAAO,aAAA,EAAE,YAAY,kBAAA;YAChC,WAAW,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BAAW,CAAC,CAAC;;;;0CAWvB;IACH,WAAC;CAAA,AA7CD,IA6CC;kBA7CoB,IAAI"}
\ No newline at end of file
......@@ -11,6 +11,6 @@ export default class UserAccessService {
* 增加访问记录
* @param {是否关注店铺} isFollow
*/
addAccess(isFollow: boolean, isVip: boolean): Promise<number>;
addAccess(userInfo: IUserInfo): Promise<number>;
getAccessCount(): Promise<number>;
}
......@@ -53,7 +53,7 @@ var UserAccessService = /** @class */ (function () {
* 增加访问记录
* @param {是否关注店铺} isFollow
*/
UserAccessService.prototype.addAccess = function (isFollow, isVip) {
UserAccessService.prototype.addAccess = function (userInfo) {
return __awaiter(this, void 0, void 0, function () {
var _a, openId, data, activityId, userNick, avatar, inviteId;
return __generator(this, function (_b) {
......@@ -68,8 +68,10 @@ var UserAccessService = /** @class */ (function () {
avatar: avatar,
isReceiveShare: !!inviteId,
inviteId: inviteId,
isFollow: isFollow,
isVip: isVip,
isFollow: userInfo.follow.flag || userInfo.follow.newFollow,
isVip: userInfo.member.flag || userInfo.member.newMember,
follow: userInfo.follow,
member: userInfo.member,
accessTime: Date.now(),
createTime: Date.now(),
updateTime: Date.now(),
......
{"version":3,"file":"access.service.js","sourceRoot":"","sources":["../../src/service/access.service.ts"],"names":[],"mappings":";AAAA;;;;GAIG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAEH,8BAAgC;AAChC,kCAAmC;AACnC,4BAAsC;AAEtC;IAGE,2BAAY,OAA0B;QACpC,IAAI,CAAC,OAAO,GAAG,OAAO,CAAA;QACtB,IAAI,CAAC,SAAS,GAAG,IAAI,aAAO,CAAC,OAAO,EAAE,mBAAc,CAAC,CAAA;IACvD,CAAC;IACD;;;OAGG;IACG,qCAAS,GAAf,UAAgB,QAAiB,EAAE,KAAc;;;;;;wBAC3C,KAAmB,IAAI,CAAC,OAAO,EAA7B,MAAM,YAAA,EAAE,IAAI,UAAA,CAAiB;wBAC7B,UAAU,GAAiC,IAAI,WAArC,EAAE,QAAQ,GAAuB,IAAI,SAA3B,EAAE,MAAM,GAAe,IAAI,OAAnB,EAAE,QAAQ,GAAK,IAAI,SAAT,CAAS;wBAE9C,qBAAM,IAAI,CAAC,SAAS,CAAC,SAAS,CAAC;gCACpC,MAAM,QAAA;gCACN,UAAU,YAAA;gCACV,QAAQ,UAAA;gCACR,MAAM,QAAA;gCACN,cAAc,EAAE,CAAC,CAAC,QAAQ;gCAC1B,QAAQ,UAAA;gCACR,QAAQ,UAAA;gCACR,KAAK,OAAA;gCACL,UAAU,EAAE,IAAI,CAAC,GAAG,EAAE;gCACtB,UAAU,EAAE,IAAI,CAAC,GAAG,EAAE;gCACtB,UAAU,EAAE,IAAI,CAAC,GAAG,EAAE;gCACtB,SAAS,EAAE,gBAAQ,EAAE;6BACtB,CAAC,EAAA;4BAbF,sBAAO,SAaL,EAAA;;;;KACH;IAEK,0CAAc,GAApB;;;;;;wBACM,KAAmB,IAAI,CAAC,OAAO,EAA7B,MAAM,YAAA,EAAE,IAAI,UAAA,CAAiB;wBAC7B,UAAU,GAAK,IAAI,WAAT,CAAS;wBAClB,qBAAM,IAAI,CAAC,SAAS,CAAC,KAAK,CAAC;gCAChC,MAAM,QAAA;gCACN,UAAU,YAAA;6BACX,CAAC,EAAA;4BAHF,sBAAO,SAGL,EAAA;;;;KACH;IACH,wBAAC;AAAD,CAAC,AAvCD,IAuCC"}
\ No newline at end of file
{"version":3,"file":"access.service.js","sourceRoot":"","sources":["../../src/service/access.service.ts"],"names":[],"mappings":";AAAA;;;;GAIG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAEH,8BAAgC;AAChC,kCAAmC;AACnC,4BAAsC;AAEtC;IAGE,2BAAY,OAA0B;QACpC,IAAI,CAAC,OAAO,GAAG,OAAO,CAAA;QACtB,IAAI,CAAC,SAAS,GAAG,IAAI,aAAO,CAAC,OAAO,EAAE,mBAAc,CAAC,CAAA;IACvD,CAAC;IACD;;;OAGG;IACG,qCAAS,GAAf,UAAgB,Q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 @@ declare class UserService extends BaseService {
* @returns
* @memberof UserService
*/
initUserData(vipInfo: IVipInfo, activityInfo: IActivityInfo): Promise<number>;
updateUserData(vipInfo: IVipInfo, userInfo: IUserInfo, activityInfo: IActivityInfo): Promise<void>;
initUserData(vipInfo: IVipInfo, activityInfo: IActivityInfo): Promise<IUserInfo>;
updateUserData(vipInfo: IVipInfo, userInfo: IUserInfo, activityInfo: IActivityInfo): Promise<IUserInfo>;
/**
* @desc 更新用户表
* @param {用户的主键id} _id
......
......@@ -225,7 +225,9 @@ var UserService = /** @class */ (function (_super) {
user.taskInfo[today].follow = [{ createTime: Date.now() }];
}
return [4 /*yield*/, this.userdao.insertOne(user)];
case 1: return [2 /*return*/, _d.sent()];
case 1:
_d.sent();
return [2 /*return*/, user];
}
});
});
......@@ -269,7 +271,11 @@ var UserService = /** @class */ (function (_super) {
return [4 /*yield*/, this.updateUser(userInfo._id, projection)];
case 1:
_b.sent();
return [2 /*return*/];
return [2 /*return*/, __assign(__assign({}, userInfo), {
// @ts-ignore
follow: projection.$set.follow || userInfo.follow,
// @ts-ignore
member: projection.$set.member || userInfo.member })];
}
});
});
......
{"version":3,"file":"user.service.js","sourceRoot":"","sources":["../../src/service/user.service.ts"],"names":[],"mappings":";AAAA;;;;GAIG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAEH,8BAAwC;AACxC,+CAAwC;AACxC,4BAAoC;AACpC,kCAAiD;AACjD,sCAAqC;AAErC;IAA0B,+BAAW;IAEnC,qBAAY,OAA0B;QAAtC,YACE,kBAAM,OAAO,CAAC,SAEf;QADC,KAAI,CAAC,OAAO,GAAG,IAAI,aAAO,CAAC,OAAO,EAAE,iBAAY,CAAC,CAAA;;IACnD,CAAC;IACD;;;OAGG;IACG,iCAAW,GAAjB;;;;;;wBACM,KAAmB,IAAI,CAAC,OAAO,EAA7B,MAAM,YAAA,EAAE,IAAI,UAAA,CAAiB;wBAC7B,UAAU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;IACH,iCAAW,GAAX,UAAY,QAAmB,EAAE,OAAiB;QAEpC,IAAA,IAAI,GACZ,QAAQ,YADI,CACJ;QAEJ,IAAA,KAAK,GAAK,OAAO,MAAZ,CAAY;QAEzB,OAAO,CAAC,IAAI,IAAI,KAAK,CAAA;IACvB,CAAC;IAED,uCAAiB,GAAjB,UAAkB,MAAmB;QACnC,IAAM,KAAK,GAAG,gBAAQ,EAAE,CAAA;QACxB,6BACK,MAAM,KACT,SAAS,EAAE,IAAI,EACf,YAAY,EAAE,IAAI,CAAC,GAAG,EAAE,EACxB,WAAW,EAAE,KAAK,IACnB;IACH,CAAC;IAED,0CAAoB,GAApB,UAAqB,MAAmB;QACtC,IAAM,KAAK,GAAG,gBAAQ,EAAE,CAAA;QACxB,6BACK,MAAM,KACT,SAAS,EAAE,IAAI,EACf,UAAU,EAAE,IAAI,CAAC,GAAG,EAAE,EACtB,SAAS,EAAE,KAAK,IACjB;IACH,CAAC;IACH,kBAAC;AAAD,CAAC,AAxSD,CAA0B,sBAAW,GAwSpC;AAED,kBAAe,WAAW,CAAA"}
\ No newline at end of file
{"version":3,"file":"user.service.js","sourceRoot":"","sources":["../../src/service/user.service.ts"],"names":[],"mappings":";AAAA;;;;GAIG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAEH,8BAAwC;AACxC,+CAAwC;AACxC,4BAAoC;AACpC,kCAAiD;AACjD,sCAAqC;AAErC;IAA0B,+BAAW;IAEnC,qBAAY,OAA0B;QAAtC,YACE,kBAAM,OAAO,CAAC,SAEf;QADC,KAAI,CAAC,OAAO,GAAG,IAAI,aAAO,CAAC,OAAO,EAAE,iBAAY,CAAC,CAAA;;IACnD,CAAC;IACD;;;OAGG;IACG,iCAAW,GAAjB;;;;;;wBACM,KAAmB,IAAI,CAAC,OAAO,EAA7B,MAAM,YAAA,EAAE,IAAI,UAAA,CAAiB;wBAC7B,UAAU,GAAK,IAAI,WAAT,CAA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IACD;;;;OAIG;IACG,qCAAe,GAArB,UAAsB,GAAW;;;;4BACxB,qBAAM,IAAI,CAAC,OAAO,CAAC,OAAO,CAAC,EAAE,GAAG,KAAA,EAAE,CAAC,EAAA;4BAA1C,sBAAO,SAAmC,EAAA;;;;KAC3C;IAED;;;;;;;OAOG;IACH,iCAAW,GAAX,UAAY,QAAmB,EAAE,OAAiB;QAEpC,IAAA,IAAI,GACZ,QAAQ,YADI,CACJ;QAEJ,IAAA,KAAK,GAAK,OAAO,MAAZ,CAAY;QAEzB,OAAO,CAAC,IAAI,IAAI,KAAK,CAAA;IACvB,CAAC;IAED,uCAAiB,GAAjB,UAAkB,MAAmB;QACnC,IAAM,KAAK,GAAG,gBAAQ,EAAE,CAAA;QACxB,6BACK,MAAM,KACT,SAAS,EAAE,IAAI,EACf,YAAY,EAAE,IAAI,CAAC,GAAG,EAAE,EACxB,WAAW,EAAE,KAAK,IACnB;IACH,CAAC;IAED,0CAAoB,GAApB,UAAqB,MAAmB;QACtC,IAAM,KAAK,GAAG,gBAAQ,EAAE,CAAA;QACxB,6BACK,MAAM,KACT,SAAS,EAAE,IAAI,EACf,UAAU,EAAE,IAAI,CAAC,GAAG,EAAE,EACtB,SAAS,EAAE,KAAK,IACjB;IACH,CAAC;IACH,kBAAC;AAAD,CAAC,AAlTD,CAA0B,sBAAW,GAkTpC;AAED,kBAAe,WAAW,CAAA"}
\ No newline at end of file
......@@ -36,13 +36,13 @@ export default class User {
const { isFollow } = context.data
if (!userInfo) {
await userService.initUserData(vipInfo, activityInfo)
userInfo = await userService.initUserData(vipInfo, activityInfo)
} else {
await userService.updateUserData(vipInfo, userInfo, activityInfo)
userInfo = await userService.updateUserData(vipInfo, userInfo, activityInfo)
}
// access表
await accessService.addAccess(isFollow, vipInfo.isVip)
await accessService.addAccess(userInfo)
return resultsModel.success({
openId
......
......@@ -19,7 +19,7 @@ export default class UserAccessService {
* 增加访问记录
* @param {是否关注店铺} isFollow
*/
async addAccess(isFollow: boolean, isVip: boolean) {
async addAccess(userInfo: IUserInfo) {
let { openId, data } = this.context
let { activityId, userNick, avatar, inviteId } = data
......@@ -30,8 +30,10 @@ export default class UserAccessService {
avatar,
isReceiveShare: !!inviteId,
inviteId,
isFollow,
isVip,
isFollow: userInfo.follow.flag || userInfo.follow.newFollow,
isVip: userInfo.member.flag || userInfo.member.newMember,
follow: userInfo.follow,
member: userInfo.member,
accessTime: Date.now(),
createTime: Date.now(),
updateTime: Date.now(),
......
......@@ -129,10 +129,12 @@ class UserService extends BaseService {
user.taskInfo[today].follow = [{ createTime: Date.now() }]
}
return await this.userdao.insertOne(user)
await this.userdao.insertOne(user)
return user
}
async updateUserData(vipInfo: IVipInfo, userInfo: IUserInfo, activityInfo: IActivityInfo) {
async updateUserData(vipInfo: IVipInfo, userInfo: IUserInfo, activityInfo: IActivityInfo): Promise<IUserInfo> {
const { data } = this.context
const { isFollow } = data
......@@ -171,6 +173,14 @@ class UserService extends BaseService {
}
await this.updateUser(userInfo._id, projection)
return {
...userInfo,
// @ts-ignore
follow: projection.$set.follow || userInfo.follow,
// @ts-ignore
member: projection.$set.member || userInfo.member
}
}
/**
......
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