Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wenHuaBu_adminServer
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
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
node_server
wenHuaBu_adminServer
Commits
90944b9e
Commit
90944b9e
authored
Mar 26, 2024
by
lixinming
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'master' of
http://123.207.147.179:8888/node_server/wenHuaBu_adminServer
parents
93d17f3a
21649c8c
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
39 additions
and
4 deletions
+39
-4
homePage.ts
src/biz/member/homePage.ts
+31
-1
enum.ts
src/config/enum.ts
+0
-1
router.ts
src/routers/member/router.ts
+8
-2
No files found.
src/biz/member/homePage.ts
View file @
90944b9e
...
...
@@ -4,7 +4,7 @@
*/
import
moment
=
require
(
"moment"
);
import
{
MEMBERTYPE
,
STATE
,
UNITMEMBERTYPE
,
USERREGISTERSTATE
}
from
"../../config/enum"
;
import
{
INDIVIDUALMEMBERTYPE
,
MEMBERTYPE
,
PAYMENTSTATUS
,
STATE
,
UNITMEMBERTYPE
,
USERREGISTERSTATE
}
from
"../../config/enum"
;
import
{
ERRORENUM
}
from
"../../config/errorEnum"
;
import
{
addManyData
}
from
"../../data/add"
;
import
{
deleteManyData
}
from
"../../data/delete"
;
...
...
@@ -233,6 +233,36 @@ export async function getSheng ({userId}) {
}
/**
* 根据会员类别返回对应可下载的证书类型
* @param param0
* @returns
*/
export
async
function
getCertificate
({
userId
})
{
let
userInfo
=
await
findOnce
(
TABLEENUM
.
用户表
,
{
userId
},
[
"userId"
,
"memberType"
,
"userRegisterState"
,
"paymentStatus"
,
"individualMemberType"
,
"unitMemberType"
]);
if
(
!
userInfo
||
!
userInfo
.
userId
)
throw
new
BizError
(
ERRORENUM
.
目标数据不存在
);
let
certificate
=
false
;
//判断是否审批通过
if
(
userInfo
.
userRegisterState
==
USERREGISTERSTATE
.
通过
)
{
if
(
userInfo
.
memberType
==
MEMBERTYPE
.
个人会员
)
{
//个人会员已支付可下载
if
(
userInfo
.
individualMemberType
==
INDIVIDUALMEMBERTYPE
.
个人会员
&&
userInfo
.
paymentStatus
!=
PAYMENTSTATUS
.
未支付
)
certificate
=
true
;
//个人会员专家无需支付可下载
if
(
userInfo
.
individualMemberType
==
INDIVIDUALMEMBERTYPE
.
个人会员专家
)
certificate
=
true
;
}
else
if
(
userInfo
.
memberType
==
MEMBERTYPE
.
单位会员
)
{
//院校无需支付可下载
if
(
userInfo
.
unitMemberType
==
UNITMEMBERTYPE
.
院校
)
certificate
=
true
;
//机构和其他已支付可下载
if
(
userInfo
.
unitMemberType
==
UNITMEMBERTYPE
.
机构
||
userInfo
.
unitMemberType
==
UNITMEMBERTYPE
.
其他
&&
userInfo
.
paymentStatus
!=
PAYMENTSTATUS
.
未支付
)
{
certificate
=
true
;
}
}
}
return
{
certificate
};
}
...
...
src/config/enum.ts
View file @
90944b9e
...
...
@@ -387,7 +387,6 @@ export enum USERREGISTERSTATE {
*/
export
enum
CERTIFICATETYPE
{
普通会员证书
=
1
,
专家证书
,
理事证书
,
常务理事证书
}
...
...
src/routers/member/router.ts
View file @
90944b9e
...
...
@@ -389,8 +389,7 @@ export const Config = {
subUrl
:
'/memberdb/systembase'
,
param
:[],
bindBiz
:
memberBiz
.
systemBase
},
}
],
"审批管理"
:[
{
...
...
@@ -786,6 +785,13 @@ export const Config = {
],
bindBiz
:
homePageBiz
.
getHuoDongTongZhi
},
{
apiName
:
"获取可下载证书模板"
,
subUrl
:
'/homepage/getcertificate'
,
param
:[
],
bindBiz
:
homePageBiz
.
getCertificate
}
]
}
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