Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
T
taobao-mini-template
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
2
Issues
2
List
Board
Labels
Milestones
Merge Requests
1
Merge Requests
1
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
qinhaitao
taobao-mini-template
Commits
8a58fc7d
Commit
8a58fc7d
authored
Sep 16, 2020
by
qinhaitao
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat:
🎸
access 增加记录
parent
19706925
Changes
11
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
11 changed files
with
42 additions
and
22 deletions
+42
-22
user.controller.js
v2.0/dist/controller/user.controller.js
+3
-3
user.controller.js.map
v2.0/dist/controller/user.controller.js.map
+1
-1
access.service.d.ts
v2.0/dist/service/access.service.d.ts
+1
-1
access.service.js
v2.0/dist/service/access.service.js
+5
-3
access.service.js.map
v2.0/dist/service/access.service.js.map
+1
-1
user.service.d.ts
v2.0/dist/service/user.service.d.ts
+2
-2
user.service.js
v2.0/dist/service/user.service.js
+8
-2
user.service.js.map
v2.0/dist/service/user.service.js.map
+1
-1
user.controller.ts
v2.0/src/controller/user.controller.ts
+3
-3
access.service.ts
v2.0/src/service/access.service.ts
+5
-3
user.service.ts
v2.0/src/service/user.service.ts
+12
-2
No files found.
v2.0/dist/controller/user.controller.js
View file @
8a58fc7d
...
@@ -69,15 +69,15 @@ var User = /** @class */ (function () {
...
@@ -69,15 +69,15 @@ var User = /** @class */ (function () {
if
(
!!
userInfo
)
return
[
3
/*break*/
,
2
];
if
(
!!
userInfo
)
return
[
3
/*break*/
,
2
];
return
[
4
/*yield*/
,
userService
.
initUserData
(
vipInfo
,
activityInfo
)];
return
[
4
/*yield*/
,
userService
.
initUserData
(
vipInfo
,
activityInfo
)];
case
1
:
case
1
:
_c
.
sent
();
userInfo
=
_c
.
sent
();
return
[
3
/*break*/
,
4
];
return
[
3
/*break*/
,
4
];
case
2
:
return
[
4
/*yield*/
,
userService
.
updateUserData
(
vipInfo
,
userInfo
,
activityInfo
)];
case
2
:
return
[
4
/*yield*/
,
userService
.
updateUserData
(
vipInfo
,
userInfo
,
activityInfo
)];
case
3
:
case
3
:
_c
.
sent
();
userInfo
=
_c
.
sent
();
_c
.
label
=
4
;
_c
.
label
=
4
;
case
4
:
case
4
:
// access表
// access表
return
[
4
/*yield*/
,
accessService
.
addAccess
(
isFollow
,
vipInfo
.
isVip
)];
return
[
4
/*yield*/
,
accessService
.
addAccess
(
userInfo
)];
case
5
:
case
5
:
// access表
// access表
_c
.
sent
();
_c
.
sent
();
...
...
v2.0/dist/controller/user.controller.js.map
View file @
8a58fc7d
{"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,O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B;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
\ No newline at end of file
v2.0/dist/service/access.service.d.ts
View file @
8a58fc7d
...
@@ -11,6 +11,6 @@ export default class UserAccessService {
...
@@ -11,6 +11,6 @@ export default class UserAccessService {
* 增加访问记录
* 增加访问记录
* @param {是否关注店铺} isFollow
* @param {是否关注店铺} isFollow
*/
*/
addAccess
(
isFollow
:
boolean
,
isVip
:
boolean
):
Promise
<
number
>
;
addAccess
(
userInfo
:
IUserInfo
):
Promise
<
number
>
;
getAccessCount
():
Promise
<
number
>
;
getAccessCount
():
Promise
<
number
>
;
}
}
v2.0/dist/service/access.service.js
View file @
8a58fc7d
...
@@ -53,7 +53,7 @@ var UserAccessService = /** @class */ (function () {
...
@@ -53,7 +53,7 @@ var UserAccessService = /** @class */ (function () {
* 增加访问记录
* 增加访问记录
* @param {是否关注店铺} isFollow
* @param {是否关注店铺} isFollow
*/
*/
UserAccessService
.
prototype
.
addAccess
=
function
(
isFollow
,
isVip
)
{
UserAccessService
.
prototype
.
addAccess
=
function
(
userInfo
)
{
return
__awaiter
(
this
,
void
0
,
void
0
,
function
()
{
return
__awaiter
(
this
,
void
0
,
void
0
,
function
()
{
var
_a
,
openId
,
data
,
activityId
,
userNick
,
avatar
,
inviteId
;
var
_a
,
openId
,
data
,
activityId
,
userNick
,
avatar
,
inviteId
;
return
__generator
(
this
,
function
(
_b
)
{
return
__generator
(
this
,
function
(
_b
)
{
...
@@ -68,8 +68,10 @@ var UserAccessService = /** @class */ (function () {
...
@@ -68,8 +68,10 @@ var UserAccessService = /** @class */ (function () {
avatar
:
avatar
,
avatar
:
avatar
,
isReceiveShare
:
!!
inviteId
,
isReceiveShare
:
!!
inviteId
,
inviteId
:
inviteId
,
inviteId
:
inviteId
,
isFollow
:
isFollow
,
isFollow
:
userInfo
.
follow
.
flag
||
userInfo
.
follow
.
newFollow
,
isVip
:
isVip
,
isVip
:
userInfo
.
member
.
flag
||
userInfo
.
member
.
newMember
,
follow
:
userInfo
.
follow
,
member
:
userInfo
.
member
,
accessTime
:
Date
.
now
(),
accessTime
:
Date
.
now
(),
createTime
:
Date
.
now
(),
createTime
:
Date
.
now
(),
updateTime
:
Date
.
now
(),
updateTime
:
Date
.
now
(),
...
...
v2.0/dist/service/access.service.js.map
View file @
8a58fc7d
{"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,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AA;gCACR,MAAM,QAAA;gCACN,cAAc,EAAE,CAAC,CAAC,QAAQ;gCAC1B,QAAQ,UAAA;gCACR,QAAQ,EAAE,QAAQ,CAAC,MAAM,CAAC,IAAI,IAAI,QAAQ,CAAC,MAAM,CAAC,SAAS;gCAC3D,KAAK,EAAE,QAAQ,CAAC,MAAM,CAAC,IAAI,IAAI,QAAQ,CAAC,MAAM,CAAC,SAAS;gCACxD,MAAM,EAAE,QAAQ,CAAC,MAAM;gCACvB,MAAM,EAAE,QAAQ,CAAC,MAAM;gCACvB,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;4BAfF,sBAAO,SAeL,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,AAzCD,IAyCC"}
\ No newline at end of file
\ No newline at end of file
v2.0/dist/service/user.service.d.ts
View file @
8a58fc7d
...
@@ -33,8 +33,8 @@ declare class UserService extends BaseService {
...
@@ -33,8 +33,8 @@ declare class UserService extends BaseService {
* @returns
* @returns
* @memberof UserService
* @memberof UserService
*/
*/
initUserData
(
vipInfo
:
IVipInfo
,
activityInfo
:
IActivityInfo
):
Promise
<
number
>
;
initUserData
(
vipInfo
:
IVipInfo
,
activityInfo
:
IActivityInfo
):
Promise
<
IUserInfo
>
;
updateUserData
(
vipInfo
:
IVipInfo
,
userInfo
:
IUserInfo
,
activityInfo
:
IActivityInfo
):
Promise
<
void
>
;
updateUserData
(
vipInfo
:
IVipInfo
,
userInfo
:
IUserInfo
,
activityInfo
:
IActivityInfo
):
Promise
<
IUserInfo
>
;
/**
/**
* @desc 更新用户表
* @desc 更新用户表
* @param {用户的主键id} _id
* @param {用户的主键id} _id
...
...
v2.0/dist/service/user.service.js
View file @
8a58fc7d
...
@@ -225,7 +225,9 @@ var UserService = /** @class */ (function (_super) {
...
@@ -225,7 +225,9 @@ var UserService = /** @class */ (function (_super) {
user
.
taskInfo
[
today
].
follow
=
[{
createTime
:
Date
.
now
()
}];
user
.
taskInfo
[
today
].
follow
=
[{
createTime
:
Date
.
now
()
}];
}
}
return
[
4
/*yield*/
,
this
.
userdao
.
insertOne
(
user
)];
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) {
...
@@ -269,7 +271,11 @@ var UserService = /** @class */ (function (_super) {
return
[
4
/*yield*/
,
this
.
updateUser
(
userInfo
.
_id
,
projection
)];
return
[
4
/*yield*/
,
this
.
updateUser
(
userInfo
.
_id
,
projection
)];
case
1
:
case
1
:
_b
.
sent
();
_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
})];
}
}
});
});
});
});
...
...
v2.0/dist/service/user.service.js.map
View file @
8a58fc7d
This diff is collapsed.
Click to expand it.
v2.0/src/controller/user.controller.ts
View file @
8a58fc7d
...
@@ -36,13 +36,13 @@ export default class User {
...
@@ -36,13 +36,13 @@ export default class User {
const
{
isFollow
}
=
context
.
data
const
{
isFollow
}
=
context
.
data
if
(
!
userInfo
)
{
if
(
!
userInfo
)
{
await
userService
.
initUserData
(
vipInfo
,
activityInfo
)
userInfo
=
await
userService
.
initUserData
(
vipInfo
,
activityInfo
)
}
else
{
}
else
{
await
userService
.
updateUserData
(
vipInfo
,
userInfo
,
activityInfo
)
userInfo
=
await
userService
.
updateUserData
(
vipInfo
,
userInfo
,
activityInfo
)
}
}
// access表
// access表
await
accessService
.
addAccess
(
isFollow
,
vipInfo
.
isVip
)
await
accessService
.
addAccess
(
userInfo
)
return
resultsModel
.
success
({
return
resultsModel
.
success
({
openId
openId
...
...
v2.0/src/service/access.service.ts
View file @
8a58fc7d
...
@@ -19,7 +19,7 @@ export default class UserAccessService {
...
@@ -19,7 +19,7 @@ export default class UserAccessService {
* 增加访问记录
* 增加访问记录
* @param {是否关注店铺} isFollow
* @param {是否关注店铺} isFollow
*/
*/
async
addAccess
(
isFollow
:
boolean
,
isVip
:
boolean
)
{
async
addAccess
(
userInfo
:
IUserInfo
)
{
let
{
openId
,
data
}
=
this
.
context
let
{
openId
,
data
}
=
this
.
context
let
{
activityId
,
userNick
,
avatar
,
inviteId
}
=
data
let
{
activityId
,
userNick
,
avatar
,
inviteId
}
=
data
...
@@ -30,8 +30,10 @@ export default class UserAccessService {
...
@@ -30,8 +30,10 @@ export default class UserAccessService {
avatar
,
avatar
,
isReceiveShare
:
!!
inviteId
,
isReceiveShare
:
!!
inviteId
,
inviteId
,
inviteId
,
isFollow
,
isFollow
:
userInfo
.
follow
.
flag
||
userInfo
.
follow
.
newFollow
,
isVip
,
isVip
:
userInfo
.
member
.
flag
||
userInfo
.
member
.
newMember
,
follow
:
userInfo
.
follow
,
member
:
userInfo
.
member
,
accessTime
:
Date
.
now
(),
accessTime
:
Date
.
now
(),
createTime
:
Date
.
now
(),
createTime
:
Date
.
now
(),
updateTime
:
Date
.
now
(),
updateTime
:
Date
.
now
(),
...
...
v2.0/src/service/user.service.ts
View file @
8a58fc7d
...
@@ -129,10 +129,12 @@ class UserService extends BaseService {
...
@@ -129,10 +129,12 @@ class UserService extends BaseService {
user
.
taskInfo
[
today
].
follow
=
[{
createTime
:
Date
.
now
()
}]
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
{
data
}
=
this
.
context
const
{
isFollow
}
=
data
const
{
isFollow
}
=
data
...
@@ -171,6 +173,14 @@ class UserService extends BaseService {
...
@@ -171,6 +173,14 @@ class UserService extends BaseService {
}
}
await
this
.
updateUser
(
userInfo
.
_id
,
projection
)
await
this
.
updateUser
(
userInfo
.
_id
,
projection
)
return
{
...
userInfo
,
// @ts-ignore
follow
:
projection
.
$set
.
follow
||
userInfo
.
follow
,
// @ts-ignore
member
:
projection
.
$set
.
member
||
userInfo
.
member
}
}
}
/**
/**
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment