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
94924216
Commit
94924216
authored
Mar 20, 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
# Conflicts: # src/config/enum.ts
parents
c3990f6c
e728d999
Hide whitespace changes
Inline
Side-by-side
Showing
13 changed files
with
356 additions
and
213 deletions
+356
-213
authority.ts
src/biz/member/authority.ts
+31
-29
examine.ts
src/biz/member/examine.ts
+7
-7
homePage.ts
src/biz/member/homePage.ts
+6
-86
member.ts
src/biz/member/member.ts
+5
-5
memberFees.ts
src/biz/member/memberFees.ts
+33
-17
order.ts
src/biz/member/order.ts
+93
-15
rightsMgmt.ts
src/biz/member/rightsMgmt.ts
+9
-6
register.ts
src/biz/register.ts
+1
-1
enum.ts
src/config/enum.ts
+13
-3
router.ts
src/routers/member/router.ts
+94
-37
router.ts
src/routers/order/router.ts
+45
-2
router.ts
src/routers/public/router.ts
+18
-4
router.ts
src/routers/router.ts
+1
-1
No files found.
src/biz/member/authority.ts
View file @
94924216
...
...
@@ -41,11 +41,11 @@ export async function getAuthority({unitName, memberLevel, memberCategory, pageN
let
item
:
any
=
extractData
(
info
,
ResultFiles
);
if
(
info
.
memberType
==
MEMBERTYPE
.
个人会员
)
{
item
.
unitName
=
info
.
name
;
item
.
memberCategory
=
changeEnumValue
(
INDIVIDUALMEMBERTYPE
,
i
tem
.
individualMemberType
);
//会员类别/级别
item
.
memberCategory
=
changeEnumValue
(
INDIVIDUALMEMBERTYPE
,
i
nfo
.
individualMemberType
);
//会员类别/级别
}
else
{
item
.
unitName
=
info
.
unitName
;
item
.
memberCategory
=
changeEnumValue
(
UNITMEMBERTYPE
,
i
tem
.
unitMemberType
);
//会员类别/级别
item
.
memberCategory
=
changeEnumValue
(
UNITMEMBERTYPE
,
i
nfo
.
unitMemberType
);
//会员类别/级别
}
item
.
memberState
=
changeEnumValue
(
MEMBERSTATE
,
item
.
memberState
);
item
.
memberLevel
=
changeEnumValue
(
MEMBERLEVEL
,
item
.
memberLevel
);
//会员等级、职务
...
...
@@ -59,11 +59,11 @@ export async function getAuthority({unitName, memberLevel, memberCategory, pageN
/**
* 变更权限 success
* @param
param0
* @param
id 列表返回的userId
*/
export
async
function
updateAuthority
({
form
,
userI
d
})
{
export
async
function
updateAuthority
({
form
,
i
d
})
{
let
{
memberLevel
,
memberCategory
}
=
form
;
let
userInfo
=
await
findOnce
(
TABLEENUM
.
用户表
,
{
userId
});
let
userInfo
=
await
findOnce
(
TABLEENUM
.
用户表
,
{
userId
:
id
});
if
(
!
userInfo
||
!
userInfo
.
userId
)
throw
new
BizError
(
ERRORENUM
.
目标数据不存在
);
let
updateInfo
:
any
=
{};
...
...
@@ -77,7 +77,7 @@ export async function updateAuthority({form, userId}) {
updateInfo
.
unitMemberType
=
memberCategory
;
}
await
updateOneData
(
TABLEENUM
.
用户表
,
{
userId
},
updateInfo
);
await
updateOneData
(
TABLEENUM
.
用户表
,
{
userId
:
id
},
updateInfo
);
return
successResult
();
}
...
...
@@ -85,44 +85,46 @@ export async function updateAuthority({form, userId}) {
/**
* 冻结 success
* @param
param0
* @param
id 列表返回的userId
*/
export
async
function
freeze
({
userI
d
})
{
let
userInfo
=
await
findOnce
(
TABLEENUM
.
用户表
,
{
userId
});
export
async
function
freeze
({
i
d
})
{
let
userInfo
=
await
findOnce
(
TABLEENUM
.
用户表
,
{
userId
:
id
});
if
(
!
userInfo
||
!
userInfo
.
userId
)
throw
new
BizError
(
ERRORENUM
.
目标数据不存在
);
await
updateOneData
(
TABLEENUM
.
用户表
,
{
userId
},
{
memberState
:
MEMBERSTATE
.
冻结
});
if
(
userInfo
.
memberState
==
MEMBERSTATE
.
冻结
)
{
await
updateOneData
(
TABLEENUM
.
用户表
,
{
userId
:
id
},
{
memberState
:
MEMBERSTATE
.
正常
});
}
else
{
await
updateOneData
(
TABLEENUM
.
用户表
,
{
userId
:
id
},
{
memberState
:
MEMBERSTATE
.
冻结
});
}
return
successResult
();
}
/**
* 变更权限回显
* @param id
列表返回的userId
* @param id 列表返回的userId
* @returns
*/
export
async
function
authorityEcho
({
id
})
{
const
SelectFiles
=
[
"unitName"
,
"name"
,
"memberLevel"
,
"memberType"
,
"individualMemberType"
,
"unitMemberType"
];
const
SelectFiles
=
[
"u
serId"
,
"u
nitName"
,
"name"
,
"memberLevel"
,
"memberType"
,
"individualMemberType"
,
"unitMemberType"
];
let
dbList
=
await
findOnce
(
TABLEENUM
.
用户表
,
{
userId
:
id
},
SelectFiles
);
if
(
!
dbList
||
!
dbList
.
userId
)
throw
new
BizError
(
ERRORENUM
.
目标数据不存在
);
const
ResultFiles
=
[
"unitName"
,
"memberLevel"
,
"memberType"
];
let
dataList
=
[];
dbList
.
forEach
(
info
=>
{
let
item
:
any
=
extractData
(
info
,
ResultFiles
);
if
(
info
.
memberType
==
MEMBERTYPE
.
个人会员
)
{
item
.
unitName
=
info
.
name
;
item
.
memberCategory
=
changeEnumValue
(
INDIVIDUALMEMBERTYPE
,
item
.
individualMemberType
);
//会员类别/级别
}
else
{
item
.
unitName
=
info
.
unitName
;
item
.
memberCategory
=
changeEnumValue
(
UNITMEMBERTYPE
,
item
.
unitMemberType
);
//会员类别/级别
}
item
.
memberLevel
=
changeEnumValue
(
MEMBERLEVEL
,
item
.
memberLevel
);
//会员等级、职务
const
ResultFiles
=
[
"unitName"
,
"name"
,
"memberLevel"
,
"memberType"
];
dataList
.
push
(
item
);
});
let
dataInfo
:
any
=
extractData
(
dbList
,
ResultFiles
);
if
(
dataInfo
.
memberType
==
MEMBERTYPE
.
个人会员
)
{
dataInfo
.
unitName
=
dataInfo
.
name
;
dataInfo
.
memberCategory
=
changeEnumValue
(
INDIVIDUALMEMBERTYPE
,
dataInfo
.
individualMemberType
);
//会员类别/级别
}
else
{
dataInfo
.
unitName
=
dataInfo
.
unitName
;
dataInfo
.
memberCategory
=
changeEnumValue
(
UNITMEMBERTYPE
,
dataInfo
.
unitMemberType
);
//会员类别/级别
}
dataInfo
.
memberLevel
=
changeEnumValue
(
MEMBERLEVEL
,
dataInfo
.
memberLevel
);
//会员等级、职务
return
{
data
List
};
return
{
data
Info
};
}
...
...
src/biz/member/examine.ts
View file @
94924216
...
...
@@ -54,11 +54,11 @@ export async function pendingReviewList({unitName, joinTime, memberType, sheng,
/**
* 通过审核 success
* @param
userI
d
* @param
id 待审核列表返回的用户i
d
* @returns
*/
export
async
function
adopt
({
userI
d
})
{
let
userInfo
=
await
findOnce
(
TABLEENUM
.
用户表
,
{
userId
,
isAdmin
:
STATE
.
否
},
[
"userId"
,
"registerFlow"
,
"userRegisterState"
,
"memberType"
,
"unitName"
,
"name"
]);
export
async
function
adopt
({
i
d
})
{
let
userInfo
=
await
findOnce
(
TABLEENUM
.
用户表
,
{
userId
:
id
,
isAdmin
:
STATE
.
否
},
[
"userId"
,
"registerFlow"
,
"userRegisterState"
,
"memberType"
,
"unitName"
,
"name"
]);
if
(
!
userInfo
||
!
userInfo
.
userId
)
throw
new
BizError
(
ERRORENUM
.
目标数据不存在
);
if
(
userInfo
.
memberType
==
MEMBERTYPE
.
个人会员
&&
userInfo
.
registerFlow
!=
REGISTERFLOW
.
完成第二步
)
{
throw
new
BizError
(
ERRORENUM
.
不具备审批条件
,
`
${
userInfo
.
userId
}
为个人会员,并没有完成第二步`
);
...
...
@@ -95,16 +95,16 @@ export async function adopt({userId}) {
subType
=
userInfo
.
individualMemberType
;
}
await
updateOneData
(
TABLEENUM
.
用户表
,
{
userId
},
addInfo
);
await
updateOneData
(
TABLEENUM
.
用户表
,
{
userId
:
id
},
addInfo
);
//todo 创建一条初始订单
await
createOrder
(
userI
d
,
unitName
,
NowMs
,
MEMBERLEVEL
.
普通会员
,
userInfo
.
memberType
,
subType
,
true
);
await
createOrder
(
i
d
,
unitName
,
NowMs
,
MEMBERLEVEL
.
普通会员
,
userInfo
.
memberType
,
subType
,
true
);
/**提交审批历史信息 */
let
addApprovalHistory
=
{
id
:
generateSystemId
(
TABLEENUM
.
审批历史表
,
userI
d
),
userId
,
id
:
generateSystemId
(
TABLEENUM
.
审批历史表
,
i
d
),
userId
:
id
,
operationTime
:
NowMs
,
operationBehavior
:
OPERATIONREHAVIOR
.
通过
,
remarks
:
"通过"
...
...
src/biz/member/homePage.ts
View file @
94924216
...
...
@@ -19,7 +19,7 @@ import { changeEnumValue, eccEnumValue } from "../../util/verificationEnum";
/**
* 会员信息展示
* @param userId
* @param userId
登录的用户id
* @returns {头部数据, 基本信息, 专业信息}
*/
export
async
function
getMemberData
({
userId
})
{
...
...
@@ -63,7 +63,7 @@ export async function getMemberData({userId}) {
* 单位会员 修改
* @param form 修改信息表单
* @param keyanForm 修改科研信息表单
* @param userId
* @param userId
登录的用户id
* @returns
*/
export
async
function
unitMemberUpdate
({
form
,
keyanForm
,
userId
})
{
...
...
@@ -97,7 +97,7 @@ export async function unitMemberUpdate({form, keyanForm, userId}) {
/**
* 个人会员 修改
* @param userId
* @param userId
登录的用户id
* @param form 修改信息表单
* @returns
*/
...
...
@@ -113,6 +113,7 @@ export async function unitMemberUpdate({form, keyanForm, userId}) {
/**
* 消息中心列表
* 缴费消息提醒
* @param userId 登录的用户id
*/
export
async
function
getXiaoXiZhongXin
({
userId
})
{
let
oldInfo
=
await
findOnce
(
TABLEENUM
.
用户表
,
{
userId
},
[
"lifespanEndTime"
,
"isGracePeriod"
,
"gracePeriodEndTime"
]);
...
...
@@ -157,7 +158,7 @@ export async function getXiaoXiZhongXin ({userId}) {
/**
* 地图省数量统计
* @param
param0
* @param
userId 登录的用户id
* @returns
*/
export
async
function
getSheng
({
userId
})
{
...
...
@@ -170,7 +171,7 @@ export async function getSheng ({userId}) {
let
allDataList
=
{};
allOldList
.
forEach
(
info
=>
{
//
过滤省份为undefined的数据,
统计省份个数
//
初始数据包含没有填省份的,过滤省份为undefined的数据,
统计省份个数
if
(
info
.
sheng
)
{
if
(
!
allDataList
[
info
.
sheng
])
allDataList
[
info
.
sheng
]
=
0
;
allDataList
[
info
.
sheng
]
+=
1
;
...
...
@@ -198,87 +199,6 @@ export async function getSheng ({userId}) {
}
/**
* 会员缴费列表
* @param userId
* @param state
* @returns dataList:[{data:列表, proofLetterInfo:证明函}]
*/
export
async
function
memberPayment
({
userId
,
state
})
{
let
selectParam
:
any
=
{
userId
};
if
(
state
)
selectParam
.
state
=
state
;
let
oldList
=
await
find
(
TABLEENUM
.
订单表
,
selectParam
,
[
"id"
,
"userId"
,
"unitName"
,
"orderCycleStart"
,
"orderCycleEnd"
,
"money"
,
"state"
]);
if
(
!
oldList
||
oldList
.
length
<
1
)
throw
new
BizError
(
ERRORENUM
.
目标数据不存在
);
/**查询证明函需要字段会员等级 */
let
myOldInfo
=
await
findOnce
(
TABLEENUM
.
用户表
,
{
userId
:
oldList
.
userId
},
[
"memberLevel"
]);
if
(
!
myOldInfo
||
!
myOldInfo
.
userId
)
throw
new
BizError
(
ERRORENUM
.
目标数据不存在
);
//证明函返回数据配置
const
proofLetterFiles
=
[
"userId"
,
"unitName"
,
"orderCycleStart"
,
"orderCycleEnd"
,
"money"
];
let
dataList
=
[];
oldList
.
forEach
(
async
info
=>
{
/**处理列表返回数据字段 */
let
item
:
any
=
extractData
(
info
,
[
"id"
,
"orderCycleStart"
,
"orderCycleEnd"
,
"money"
,
"state"
]);
item
.
state
=
changeEnumValue
(
ORDERSTATE
,
item
.
state
);
/**处理证明函返回数据字段 */
let
proofLetterInfo
:
any
=
extractData
(
info
,
proofLetterFiles
);
proofLetterInfo
.
memberLevel
=
changeEnumValue
(
MEMBERLEVEL
,
myOldInfo
.
memberLevel
);
proofLetterInfo
.
orderCycleStart
=
moment
(
proofLetterInfo
.
orderCycleStart
).
format
(
"YYYY"
);
proofLetterInfo
.
orderCycleEnd
=
moment
(
proofLetterInfo
.
orderCycleEnd
).
format
(
"YYYY"
);
dataList
.
push
({
list
:
item
,
proofLetterInfo
});
})
return
{
dataList
};
}
/**
* 申请发票
* @param id 会员缴费列表返回的id
*/
export
async
function
applicationInvoice
({
id
})
{
let
oldInfo
=
await
findOnce
(
TABLEENUM
.
订单表
,
{
id
,
invoiceStatus
:
INVOICESTATUS
.
未开发票
},
[
"invoiceAdd"
]);
if
(
!
oldInfo
||
!
oldInfo
.
invoiceAdd
)
throw
new
BizError
(
ERRORENUM
.
目标数据不存在
);
let
dataInfo
=
extractData
(
oldInfo
,
[
"invoiceAdd"
]);
return
{
dataInfo
};
}
/**
* 下载发票
* @param id 会员缴费列表返回的id
*/
export
async
function
downInvoice
({
id
})
{
let
oldInfo
=
await
findOnce
(
TABLEENUM
.
订单表
,
{
id
,
invoiceStatus
:
INVOICESTATUS
.
已开发票
},
[
"invoiceAdd"
]);
if
(
!
oldInfo
||
!
oldInfo
.
invoiceAdd
)
throw
new
BizError
(
ERRORENUM
.
目标数据不存在
);
let
dataInfo
=
extractData
(
oldInfo
,
[
"invoiceAdd"
]);
return
{
dataInfo
};
}
/**
* 上传转账截图
* @param param0
*/
export
async
function
upTransferImg
({
id
,
weChartPR
,
offlinePaymentUrl
})
{
let
oldInfo
=
await
findOnce
(
TABLEENUM
.
订单表
,
{
id
});
if
(
!
oldInfo
||
!
oldInfo
.
id
)
throw
new
BizError
(
ERRORENUM
.
目标数据不存在
);
await
updateOneData
(
TABLEENUM
.
订单表
,
{
id
},
{
weChartPR
,
offlinePaymentUrl
});
return
successResult
();
}
...
...
src/biz/member/member.ts
View file @
94924216
...
...
@@ -65,7 +65,7 @@ export async function unitMemberList({unitName, joinTime, unitMemberType, member
/**
* 单位会员详情
* @param userId
* @param
id 会员列表返回的
userId
* @returns {顶部数据, 基本信息, 单位信息, 单位所获得科研成果}
*/
...
...
@@ -95,7 +95,7 @@ export async function unitMemberDetails({id}) {
* 单位会员 修改
* @param form 修改信息表单
* @param keyanForm 修改科研信息表单
* @param
userId
* @param
id 会员列表返回的userId
* @returns
*/
export
async
function
unitMemberUpdate
({
form
,
keyanForm
,
id
})
{
...
...
@@ -129,7 +129,7 @@ export async function unitMemberUpdate({form, keyanForm, id}) {
/**
* 删除单位所获得科研成果
* @param
param0
* @param
id 科研成果返回的id
* @returns
*/
export
async
function
delResearch
({
id
})
{
...
...
@@ -183,7 +183,7 @@ export async function individualMemberList({name, documentId, phone, individualM
/**
* 个人会员详情
* @param
param0
* @param
id 会员列表返回的userId
* @returns {顶部数据, 基本信息, 专业信息, 其他附件}
*/
...
...
@@ -212,7 +212,7 @@ export async function individualMemberDetails({id}) {
/**
* 个人会员 修改
* @param
userId
* @param
id 会员列表返回的userId
* @param form
* @returns
*/
...
...
src/biz/member/memberFees.ts
View file @
94924216
...
...
@@ -31,11 +31,11 @@ export async function getPaid({unitName, joinStartTime, joinEndTime, memberType,
}
if
(
unitName
)
selectParam
.
unitName
=
unitName
;
if
(
joinStartTime
&&
joinEndTime
)
{
selectParam
[
"$and"
].
push
(
{
"joinTime"
:{
"$gt"
:
joinStartTime
}
},
{
"joinTime"
:{
"$lt"
:
joinEndTime
}
}
)
if
(
joinStartTime
)
{
selectParam
[
"$and"
].
push
(
{
"joinTime"
:{
"$gt"
:
joinStartTime
}
}
)
}
if
(
joinEndTime
)
{
selectParam
[
"$and"
].
push
(
{
"joinTime"
:{
"$lt"
:
joinEndTime
}
}
)
}
if
(
memberType
)
selectParam
.
memberType
=
memberType
;
...
...
@@ -49,7 +49,7 @@ export async function getPaid({unitName, joinStartTime, joinEndTime, memberType,
let
item
:
any
=
extractData
(
info
,
itemFiles
);
item
.
lifespanTime
=
`
${
moment
(
info
.
lifespanStartTime
).
format
(
"YYYY-MM-DD"
)}
至
${
moment
(
info
.
lifespanEndTime
).
format
(
"YYYY-MM-DD"
)}
`
;
item
.
nextLifespanTime
=
"大于90天"
;
item
.
joinTime
=
moment
(
info
.
joinTime
).
format
(
"YYYY-MM-DD"
);
item
.
memberState
=
changeEnumValue
(
MEMBERSTATE
,
item
.
memberState
);
item
.
memberType
=
changeEnumValue
(
MEMBERTYPE
,
item
.
memberType
);
dataList
.
push
(
item
);
...
...
@@ -60,11 +60,10 @@ export async function getPaid({unitName, joinStartTime, joinEndTime, memberType,
/**
* 已缴费列表中的订单日志 success
* @param
param0
* @param
id 会员列表返回的userId
*/
export
async
function
paidOrderList
({
userId
})
{
let
dbList
=
await
findToSort
(
TABLEENUM
.
订单表
,
{
userId
},
{
payTime
:
-
1
},
[
"orderCycleStart"
,
"orderCycleEnd"
,
"money"
,
"paymentMethod"
,
"state"
]);
export
async
function
paidOrderList
({
id
})
{
let
dbList
=
await
findToSort
(
TABLEENUM
.
订单表
,
{
userId
:
id
},
{
payTime
:
-
1
},
[
"orderCycleStart"
,
"orderCycleEnd"
,
"money"
,
"paymentMethod"
,
"state"
]);
let
dataList
=
[];
dbList
.
forEach
(
info
=>
{
...
...
@@ -89,7 +88,7 @@ export async function paidOrderList({userId}) {
* 待缴费列表 success
* @param param0
*/
export
async
function
unpaidList
({
unitName
,
joinTime
,
memberType
,
pageNumber
})
{
export
async
function
unpaidList
({
unitName
,
join
StartTime
,
joinEnd
Time
,
memberType
,
pageNumber
})
{
const
NowMs
=
new
Date
().
valueOf
();
/**到期时间距离今天大于90天 */
let
selectParam
:
any
=
{
...
...
@@ -102,7 +101,12 @@ export async function unpaidList({unitName, joinTime, memberType, pageNumber}) {
}
if
(
unitName
)
selectParam
.
unitName
=
unitName
;
if
(
joinTime
)
selectParam
.
joinTime
=
joinTime
;
if
(
joinStartTime
)
{
selectParam
[
"$and"
].
push
(
{
"joinTime"
:{
"$gt"
:
joinStartTime
}
}
)
}
if
(
joinEndTime
)
{
selectParam
[
"$and"
].
push
(
{
"joinTime"
:{
"$lt"
:
joinEndTime
}
}
)
}
if
(
memberType
)
selectParam
.
memberType
=
memberType
;
const
SelectFiles
=
[
"userId"
,
"memberState"
,
"unitName"
,
"loginId"
,
"phone"
,
"joinTime"
,
"memberType"
,
"lifespanStartTime"
,
"lifespanEndTime"
];
...
...
@@ -129,7 +133,7 @@ export async function unpaidList({unitName, joinTime, memberType, pageNumber}) {
/**
* 会费管理-欠费 success
*/
export
async
function
getRenewalPeriod
({
unitName
,
joinTime
,
memberType
,
pageNumber
})
{
export
async
function
getRenewalPeriod
({
unitName
,
join
StartTime
,
joinEnd
Time
,
memberType
,
pageNumber
})
{
const
NowMs
=
new
Date
().
valueOf
();
/**到期时间距离今天大于90天 */
let
selectParam
:
any
=
{
...
...
@@ -147,7 +151,14 @@ export async function getRenewalPeriod({unitName, joinTime, memberType, pageNumb
}
if
(
unitName
)
selectParam
.
unitName
=
unitName
;
if
(
joinTime
)
selectParam
.
joinTime
=
joinTime
;
if
(
joinStartTime
)
{
if
(
!
selectParam
[
"$and"
])
selectParam
[
"$and"
]
=
[];
selectParam
[
"$and"
].
push
(
{
"joinTime"
:{
"$gt"
:
joinStartTime
}
}
)
}
if
(
joinEndTime
)
{
if
(
!
selectParam
[
"$and"
])
selectParam
[
"$and"
]
=
[];
selectParam
[
"$and"
].
push
(
{
"joinTime"
:{
"$lt"
:
joinEndTime
}
}
)
}
if
(
memberType
)
selectParam
.
memberType
=
memberType
;
const
SelectFiles
=
[
"userId"
,
"memberState"
,
"unitName"
,
"loginId"
,
"phone"
,
"joinTime"
,
"memberType"
,
"lifespanStartTime"
,
"lifespanEndTime"
];
...
...
@@ -256,7 +267,7 @@ export async function setGracePeriod({id, gracePeriodEndTime}) {
/**
* 宽限期列表 success
*/
export
async
function
getGracePeriod
({
unitName
,
joinTime
,
memberType
,
pageNumber
})
{
export
async
function
getGracePeriod
({
unitName
,
join
StartTime
,
joinEnd
Time
,
memberType
,
pageNumber
})
{
const
NowMs
=
new
Date
().
valueOf
();
/**到期时间距离今天大于90天 */
let
selectParam
:
any
=
{
...
...
@@ -266,7 +277,12 @@ export async function getGracePeriod({unitName, joinTime, memberType, pageNumber
}
if
(
unitName
)
selectParam
.
unitName
=
unitName
;
if
(
joinTime
)
selectParam
.
joinTime
=
joinTime
;
if
(
joinStartTime
)
{
selectParam
[
"$and"
].
push
(
{
"joinTime"
:{
"$gt"
:
joinStartTime
}
}
)
}
if
(
joinEndTime
)
{
selectParam
[
"$and"
].
push
(
{
"joinTime"
:{
"$lt"
:
joinEndTime
}
}
)
}
if
(
memberType
)
selectParam
.
memberType
=
memberType
;
const
SelectFiles
=
[
"userId"
,
"memberState"
,
"unitName"
,
"loginId"
,
"phone"
,
"joinTime"
,
"memberType"
,
"lifespanStartTime"
,
"lifespanEndTime"
];
...
...
@@ -291,7 +307,7 @@ export async function getGracePeriod({unitName, joinTime, memberType, pageNumber
/**
* 移除宽限期
* @param
param0
* @param
id 宽限期列表返回的userId
* @returns
*/
export
async
function
delGracePeriod
({
id
})
{
...
...
src/biz/member/order.ts
View file @
94924216
...
...
@@ -2,7 +2,7 @@
* 订单相关 success
*/
import
moment
=
require
(
"moment"
);
import
{
COSTTYPE
,
INDIVIDUALMEMBERTYPE
,
INVOICESTATUS
,
ISPAYENUM
,
MEMBERLEVEL
,
MEMBERTYPE
,
ORDERSTATE
,
PAYMENTSTATUS
,
PAYMENTTYPE
,
RECEIPTCONFIRMATION
,
STATE
,
UNITMEMBERTYPE
}
from
"../../config/enum"
;
import
{
AUDITINGCLIENT
,
COSTTYPE
,
INDIVIDUALMEMBERTYPE
,
INVOICESTATUS
,
ISPAYENUM
,
MEMBERLEVEL
,
MEMBERTYPE
,
OPERATIONREHAVIOR
,
ORDERSTATE
,
PAYMENTSTATUS
,
PAYMENTTYPE
,
RECEIPTCONFIRMATION
,
STATE
,
UNITMEMBERTYPE
}
from
"../../config/enum"
;
import
{
generateOrderId
,
successResult
}
from
"../../tools/system"
;
import
{
changeEnumValue
,
eccEnumValue
}
from
"../../util/verificationEnum"
;
import
{
addOneData
}
from
"../../data/add"
;
...
...
@@ -16,7 +16,7 @@ import { updateOneData } from "../../data/update";
/**
* 对内使用 创建一条订单
* @param
userId 会员id
* @param
id userId
* @param unitName 单位名称
* @param orderStartMs 订单开始时间
* @param memberLv 会员等级 MEMBERLEVEL
...
...
@@ -25,11 +25,11 @@ import { updateOneData } from "../../data/update";
* @param isFirst 是否首次缴费
* @returns
*/
export
async
function
createOrder
(
userI
d
:
string
,
unitName
:
string
,
orderStartMs
:
number
,
memberLv
:
number
,
memberType
:
number
,
subType
:
number
,
isFirst
:
boolean
)
{
export
async
function
createOrder
(
i
d
:
string
,
unitName
:
string
,
orderStartMs
:
number
,
memberLv
:
number
,
memberType
:
number
,
subType
:
number
,
isFirst
:
boolean
)
{
/**计算订单周期 */
const
EndMs
=
moment
(
orderStartMs
).
add
(
1
,
'years'
).
valueOf
();
/**订单id */
const
OrderId
=
generateOrderId
(
userI
d
);
const
OrderId
=
generateOrderId
(
i
d
);
/**计算会费 */
let
money
=
0
;
if
(
memberType
==
MEMBERTYPE
.
个人会员
)
{
...
...
@@ -56,7 +56,7 @@ export async function createOrder(userId:string, unitName:string, orderStartMs:n
unitName
,
money
,
paymentMethod
:
0
,
memberId
:
userI
d
,
userId
:
i
d
,
memberCategory
:
memberType
,
paymentNum
:
0
,
invoiceAdd
:
''
,
...
...
@@ -108,7 +108,7 @@ export async function firstOrderList({unitName, joinTime, memberType, orderState
/**
* 会员管理-待支付页-通过审核 success
* @param
param0
* @param
id 订单id
*/
export
async
function
checkOrder
({
id
})
{
let
orderInfo
=
await
findOnce
(
TABLEENUM
.
订单表
,
{
id
});
...
...
@@ -161,7 +161,7 @@ export async function paidList({unitName, paymentType, costType, pageNumber }) {
/**
* 发票管理-财务核对页-收款确认 success
* @param
param0
* @param
id 订单id
*/
export
async
function
confirmReceiptPass
({
id
})
{
let
orderInfo
=
await
findOnce
(
TABLEENUM
.
订单表
,
{
id
});
...
...
@@ -320,18 +320,38 @@ export async function orderList({userId, type}) {
if
(
type
==
ORDERSTATE
.
已支付
)
findParam
.
state
=
ORDERSTATE
.
已支付
;
else
if
(
type
==
ORDERSTATE
.
未支付
)
findParam
.
state
=
ORDERSTATE
.
未支付
;
const
SelectFile
=
[
"orderCycleStart"
,
"orderCycleEnd"
,
"money"
,
"state"
,
"id"
];
const
SelectFile
=
[
"orderCycleStart"
,
"orderCycleEnd"
,
"money"
,
"state"
,
"id"
,
"advanceInvoice"
,
"invoiceStatus"
];
let
dbList
=
await
find
(
TABLEENUM
.
订单表
,
findParam
,
SelectFile
);
/**查询证明函需要字段会员等级 */
let
myOldInfo
=
await
findOnce
(
TABLEENUM
.
用户表
,
{
userId
},
[
"memberLevel"
]);
if
(
!
myOldInfo
||
!
myOldInfo
.
userId
)
throw
new
BizError
(
ERRORENUM
.
目标数据不存在
);
//证明函返回数据配置
const
proofLetterFiles
=
[
"unitName"
,
"orderCycleStart"
,
"orderCycleEnd"
,
"money"
];
let
dataList
=
[];
dbList
.
forEach
(
info
=>
{
let
{
orderCycleStart
,
orderCycleEnd
,
money
,
state
,
id
}
=
info
;
let
moneyStr
=
state
==
ORDERSTATE
.
已支付
?
"已缴金额"
:
"待缴金额"
;
dataList
.
push
({
let
invoiceStr
=
""
;
if
(
info
.
invoiceStatus
==
INVOICESTATUS
.
已开发票
)
invoiceStr
=
"下载发票"
;
if
(
info
.
invoiceStatus
!=
INVOICESTATUS
.
已开发票
&&
info
.
advanceInvoice
)
invoiceStr
=
"申请进度"
;
if
(
info
.
invoiceStatus
!=
INVOICESTATUS
.
已开发票
&&
!
info
.
advanceInvoice
)
invoiceStr
=
"申请发票"
;
let
item
=
{
cycle
:
`
${
moment
(
orderCycleStart
).
format
(
"YYYY-MM-DD"
)}
至
${
moment
(
orderCycleEnd
).
format
(
"YYYY-MM-DD"
)}
`
,
money
:
`
${
moneyStr
}
:
${
money
}
`
,
id
});
id
,
invoiceStatus
:
invoiceStr
};
/**处理证明函返回数据字段 */
let
proofLetterInfo
:
any
=
extractData
(
info
,
proofLetterFiles
);
proofLetterInfo
.
memberLevel
=
changeEnumValue
(
MEMBERLEVEL
,
myOldInfo
.
memberLevel
);
proofLetterInfo
.
orderCycleStart
=
moment
(
proofLetterInfo
.
orderCycleStart
).
format
(
"YYYY"
);
proofLetterInfo
.
orderCycleEnd
=
moment
(
proofLetterInfo
.
orderCycleEnd
).
format
(
"YYYY"
);
dataList
.
push
({
list
:
item
,
proofLetterInfo
});
});
return
{
dataList
}
...
...
@@ -340,14 +360,17 @@ export async function orderList({userId, type}) {
/**
* 个人页申请开发票(提前开票)
* @param id 会员缴费列表返回的id
* @param newUscc 社会信用代码
* @param newUnitName 发票抬头
*/
export
async
function
applicationInvoice
({
id
})
{
export
async
function
applicationInvoice
({
id
,
newUscc
,
newUnitName
})
{
let
orderInfo
=
await
find
(
TABLEENUM
.
订单表
,
{
id
},
[
"id"
,
"invoiceStatus"
,
"advanceInvoice"
,
"invoiceAdd"
,
"state"
,
"advanceInvoice"
]);
if
(
!
orderInfo
||
!
orderInfo
.
id
)
throw
new
BizError
(
ERRORENUM
.
目标数据不存在
);
if
(
orderInfo
.
invoiceStatus
==
INVOICESTATUS
.
已开发票
)
throw
new
BizError
(
ERRORENUM
.
发票已开具不可重复提交
);
if
(
orderInfo
.
invoiceStatus
==
INVOICESTATUS
.
退回
)
throw
new
BizError
(
ERRORENUM
.
请求已被退回请重新申请
);
let
updateInfo
:
any
=
{
invoiceStatus
:
INVOICESTATUS
.
未开发票
};
let
updateInfo
:
any
=
{
invoiceStatus
:
INVOICESTATUS
.
未开发票
,
newUscc
,
newUnitName
};
if
(
orderInfo
.
state
!=
ORDERSTATE
.
已支付
)
updateInfo
.
advanceInvoice
=
true
;
await
updateOneData
(
TABLEENUM
.
订单表
,
{
id
},
updateInfo
);
...
...
@@ -358,6 +381,7 @@ export async function applicationInvoice({id}) {
/**
* 重新申请发票
* @param id 会员缴费列表返回的id
*/
export
async
function
reapplyInvoice
({
id
})
{
let
orderInfo
=
await
find
(
TABLEENUM
.
订单表
,
{
id
},
[
"id"
,
"invoiceStatus"
,
"advanceInvoice"
,
"invoiceAdd"
,
"state"
,
"advanceInvoice"
]);
...
...
@@ -370,4 +394,59 @@ export async function reapplyInvoice({id}) {
await
updateOneData
(
TABLEENUM
.
订单表
,
{
id
},
updateInfo
);
return
successResult
();
}
\ No newline at end of file
}
/**
* 下载发票
* @param id 会员缴费列表返回的id
*/
export
async
function
downInvoice
({
id
})
{
let
oldInfo
=
await
findOnce
(
TABLEENUM
.
订单表
,
{
id
,
invoiceStatus
:
INVOICESTATUS
.
已开发票
},
[
"invoiceAdd"
]);
if
(
!
oldInfo
||
!
oldInfo
.
invoiceAdd
)
throw
new
BizError
(
ERRORENUM
.
目标数据不存在
);
let
dataInfo
=
extractData
(
oldInfo
,
[
"invoiceAdd"
]);
return
{
dataInfo
};
}
/**
* 发票后台审批进度
* @param id 会员缴费列表返回的id
*/
export
async
function
getInvoiceStatus
({
id
})
{
let
oldInfo
=
await
findOnce
(
TABLEENUM
.
订单表
,
{
id
},
[
"invoiceStatus"
,
"userId"
]);
if
(
!
oldInfo
||
!
oldInfo
.
invoiceAdd
)
throw
new
BizError
(
ERRORENUM
.
目标数据不存在
);
let
dataInfo
=
{
state
:
AUDITINGCLIENT
.
已申请
,
remark
:
""
};
if
(
oldInfo
.
invoiceStatus
==
INVOICESTATUS
.
已开发票
)
dataInfo
.
state
=
AUDITINGCLIENT
.
审核通过
;
if
(
oldInfo
.
invoiceStatus
!=
INVOICESTATUS
.
未开发票
)
dataInfo
.
state
=
AUDITINGCLIENT
.
后台审批中
;
if
(
oldInfo
.
invoiceStatus
!=
INVOICESTATUS
.
退回
)
dataInfo
.
state
=
AUDITINGCLIENT
.
审核失败
;
/**获取驳回理由 */
let
userOldInfo
=
await
findOnce
(
TABLEENUM
.
审批历史表
,
{
userId
:
oldInfo
.
userId
,
operationBehavior
:
OPERATIONREHAVIOR
.
驳回修改
},
[
"remarks"
]);
dataInfo
.
remark
=
userOldInfo
.
remark
;
return
{
dataInfo
};
}
/**
* 上传转账截图
* @param param0
*/
export
async
function
upTransferImg
({
id
,
weChartPR
,
offlinePaymentUrl
})
{
let
oldInfo
=
await
findOnce
(
TABLEENUM
.
订单表
,
{
id
});
if
(
!
oldInfo
||
!
oldInfo
.
id
)
throw
new
BizError
(
ERRORENUM
.
目标数据不存在
);
await
updateOneData
(
TABLEENUM
.
订单表
,
{
id
},
{
weChartPR
,
offlinePaymentUrl
});
return
successResult
();
}
src/biz/member/rightsMgmt.ts
View file @
94924216
...
...
@@ -71,7 +71,7 @@ export async function addAdmin({userId, form}) {
export
async
function
changeAdminPwd
({
userId
,
form
})
{
let
{
pwd
,
confirmation
}
=
form
;
let
userInfo
=
await
findOnce
(
TABLEENUM
.
用户表
,
{
userId
:
form
.
userI
d
},
[
"id"
]);
let
userInfo
=
await
findOnce
(
TABLEENUM
.
用户表
,
{
userId
:
form
.
i
d
},
[
"id"
]);
if
(
!
userInfo
||
!
userInfo
.
id
)
throw
new
BizError
(
ERRORENUM
.
目标数据不存在
);
/**校验密码 */
...
...
@@ -136,12 +136,15 @@ export async function mgmtSelectList() {
let
anyKey
:
any
=
key
;
if
(
isNaN
(
anyKey
))
{
//字符
let
keyStr
=
key
;
let
value
:
any
=
ADMIN
FIRSTDIR
[
key
];
let
value
:
any
=
ADMIN
LV
[
key
];
let
firstKey
=
Math
.
floor
(
value
/
100
);
distinctMap
[
firstKey
].
subList
.
push
({
key
:
keyStr
,
value
});
if
(
distinctMap
[
firstKey
])
{
distinctMap
[
firstKey
].
subList
.
push
({
key
:
keyStr
,
value
});
}
}
}
let
dataList
=
Object
.
values
(
distinctMap
);
...
...
src/biz/register.ts
View file @
94924216
...
...
@@ -36,7 +36,7 @@ export async function memberRegister1({form}) {
/**比对验证码 */
let
codeInfo
=
await
findOnceToSort
(
TABLEENUM
.
验证码表
,
{
phone
,
isUse
:
false
,
type
:
CODETYPE
.
用户注册
,
sendMs
:{
"$gt"
:
sysTools
.
getTodayMs
()
}},
{
sendMs
:
-
1
});
if
(
!
codeInfo
)
throw
new
BizError
(
ERRORENUM
.
code
无效
,
`
${
phone
}
在注册时,code表中不存在该手机号的验证码`
);
if
(
codeInfo
!=
codeNum
)
throw
new
BizError
(
ERRORENUM
.
验证码错误
,
`
${
phone
}
不存在
${
codeNum
}
`
);
if
(
codeInfo
.
codeNum
!=
codeNum
)
throw
new
BizError
(
ERRORENUM
.
验证码错误
,
`
${
phone
}
不存在
${
codeNum
}
`
);
if
((
codeInfo
.
sendMs
+
(
30
*
60
*
1000
)
)
<
NowMs
)
throw
new
BizError
(
ERRORENUM
.
验证码过期
);
/**初始化账号信息 */
...
...
src/config/enum.ts
View file @
94924216
...
...
@@ -425,6 +425,7 @@ export enum INVOICESTATUSCLIENT{
* 审核状态 前端用
*/
export
enum
AUDITINGCLIENT
{
已申请
=
0
,
审核通过
=
2
,
后台审批中
=
3
,
审核失败
=
4
...
...
@@ -539,7 +540,8 @@ export enum ADMINLV {
审批管理
,
会费管理
,
发票管理
,
权限管理
会员管理
,
管理设置
}
/**
...
...
@@ -549,4 +551,13 @@ export enum WEICHARTPAYSTATE{
未提交
=
0
,
未支付
,
已支付
}
\ No newline at end of file
}
/**
* 学历
*/
export
enum
EDUCATION
{
大专
=
1
,
本科
,
}
src/routers/member/router.ts
View file @
94924216
...
...
@@ -5,6 +5,7 @@ import * as memberFeesBiz from "../../biz/member/memberFees";
import
*
as
authorityBiz
from
"../../biz/member/authority"
;
import
*
as
registerBiz
from
"../../biz/register"
;
import
*
as
homePageBiz
from
"../../biz/member/homePage"
;
import
*
as
rightsMgmtBiz
from
"../../biz/member/rightsMgmt"
;
export
const
FirstName
=
'会员管理路由'
;
export
const
FirstRouter
=
'/manage/member'
;
...
...
@@ -359,7 +360,7 @@ export const Config = {
apiName
:
"通过审批"
,
subUrl
:
'/examine/adopt'
,
param
:[
{
key
:
"
userI
d"
,
type
:
"String"
,
desc
:
"待审核列表返回的用户id"
}
{
key
:
"
i
d"
,
type
:
"String"
,
desc
:
"待审核列表返回的用户id"
}
],
bindBiz
:
examineBiz
.
adopt
},
...
...
@@ -367,7 +368,7 @@ export const Config = {
apiName
:
"驳回审批"
,
subUrl
:
'/examine/pendingreview'
,
param
:[
{
key
:
"
userI
d"
,
type
:
"String"
,
desc
:
"待审核列表返回的用户id"
},
{
key
:
"
i
d"
,
type
:
"String"
,
desc
:
"待审核列表返回的用户id"
},
{
key
:
"remarks"
,
type
:
"String"
,
desc
:
"驳回理由"
}
],
bindBiz
:
examineBiz
.
reject
...
...
@@ -383,7 +384,7 @@ export const Config = {
],
"会费管理"
:[
{
apiName
:
"已
交
费名单列表"
,
apiName
:
"已
缴
费名单列表"
,
subUrl
:
'/memberfees/paid'
,
param
:[
{
key
:
"unitName"
,
type
:
"String"
,
desc
:
"单位名称"
,
isNull
:
true
},
...
...
@@ -398,7 +399,7 @@ export const Config = {
apiName
:
"已缴费列表的订单日志"
,
subUrl
:
'/memberfees/paidorderlist'
,
param
:[
{
key
:
"
userI
d"
,
type
:
"String"
,
desc
:
"用户id"
},
{
key
:
"
i
d"
,
type
:
"String"
,
desc
:
"用户id"
},
],
bindBiz
:
memberFeesBiz
.
paidOrderList
},
...
...
@@ -407,7 +408,8 @@ export const Config = {
subUrl
:
'/memberfees/unpaidlist'
,
param
:[
{
key
:
"unitName"
,
type
:
"String"
,
desc
:
"单位名称"
,
isNull
:
true
},
{
key
:
"joinTime"
,
type
:
"Number"
,
desc
:
"入会时间"
,
isNull
:
true
},
{
key
:
"joinStartTime"
,
type
:
"Number"
,
desc
:
"入会开始时间"
,
isNull
:
true
},
{
key
:
"joinEndTime"
,
type
:
"Number"
,
desc
:
"入会结束时间"
,
isNull
:
true
},
{
key
:
"memberType"
,
type
:
"Number"
,
desc
:
"会员类别"
,
isNull
:
true
},
{
key
:
"pageNumber"
,
type
:
"Number"
,
desc
:
"当前页"
}
],
...
...
@@ -418,7 +420,8 @@ export const Config = {
subUrl
:
'/memberfees/getrenewalperiod'
,
param
:[
{
key
:
"unitName"
,
type
:
"String"
,
desc
:
"单位名称"
,
isNull
:
true
},
{
key
:
"joinTime"
,
type
:
"Number"
,
desc
:
"入会时间"
,
isNull
:
true
},
{
key
:
"joinStartTime"
,
type
:
"Number"
,
desc
:
"入会开始时间"
,
isNull
:
true
},
{
key
:
"joinEndTime"
,
type
:
"Number"
,
desc
:
"入会结束时间"
,
isNull
:
true
},
{
key
:
"memberType"
,
type
:
"Number"
,
desc
:
"会员类别"
,
isNull
:
true
},
{
key
:
"pageNumber"
,
type
:
"Number"
,
desc
:
"当前页"
}
],
...
...
@@ -456,7 +459,8 @@ export const Config = {
subUrl
:
'/memberfees/getgraceperiod'
,
param
:[
{
key
:
"unitName"
,
type
:
"String"
,
desc
:
"单位名称"
,
isNull
:
true
},
{
key
:
"joinTime"
,
type
:
"Number"
,
desc
:
"入会时间"
,
isNull
:
true
},
{
key
:
"joinStartTime"
,
type
:
"Number"
,
desc
:
"入会开始时间"
,
isNull
:
true
},
{
key
:
"joinEndTime"
,
type
:
"Number"
,
desc
:
"入会结束时间"
,
isNull
:
true
},
{
key
:
"memberType"
,
type
:
"Number"
,
desc
:
"会员类别"
,
isNull
:
true
},
{
key
:
"pageNumber"
,
type
:
"Number"
,
desc
:
"当前页"
}
],
...
...
@@ -496,7 +500,7 @@ export const Config = {
}
},
{
key
:
"
userI
d"
,
type
:
"String"
,
desc
:
"用户id"
key
:
"
i
d"
,
type
:
"String"
,
desc
:
"用户id"
}
],
bindBiz
:
authorityBiz
.
updateAuthority
...
...
@@ -506,7 +510,7 @@ export const Config = {
subUrl
:
'/authority/freeze'
,
param
:[
{
key
:
"
userI
d"
,
type
:
"String"
,
desc
:
"用户id"
key
:
"
i
d"
,
type
:
"String"
,
desc
:
"用户id"
}
],
bindBiz
:
authorityBiz
.
freeze
...
...
@@ -516,18 +520,90 @@ export const Config = {
subUrl
:
'/authority/authorityecho'
,
param
:[
{
key
:
"id"
,
type
:
"String"
,
desc
:
"
列表返回的userI
d"
key
:
"id"
,
type
:
"String"
,
desc
:
"
用户i
d"
}
],
bindBiz
:
authorityBiz
.
authorityEcho
}
],
"权限管理"
:[
{
apiName
:
"管理员列表"
,
subUrl
:
'/rightsmgmt/adminlist'
,
param
:[
{
key
:
"pageNumber"
,
type
:
"Number"
,
desc
:
"当前页"
}
],
bindBiz
:
rightsMgmtBiz
.
adminList
},
{
apiName
:
"添加管理员"
,
subUrl
:
'/rightsmgmt/addadmin'
,
param
:[
{
key
:
"form"
,
type
:
"Object"
,
sub
:
{
loginId
:{
type
:
'String'
,
desc
:
'用户名'
},
pwd
:{
type
:
'String'
,
desc
:
'密码'
},
confirmation
:{
type
:
'String'
,
desc
:
'确认密码'
},
adminType
:{
type
:
'Number'
,
desc
:
'管理员类别'
},
adminLv
:{
type
:
'[Number]'
,
desc
:
'管理员等级'
},
}
},
{
key
:
"userId"
,
type
:
"String"
,
desc
:
"登录用户id"
}
],
bindBiz
:
rightsMgmtBiz
.
addAdmin
},
{
apiName
:
"修改密码"
,
subUrl
:
'/rightsmgmt/changeadminpwd'
,
param
:[
{
key
:
"form"
,
type
:
"Object"
,
sub
:
{
userId
:{
type
:
'String'
,
desc
:
'用户id'
},
pwd
:{
type
:
'String'
,
desc
:
'密码'
},
confirmation
:{
type
:
'String'
,
desc
:
'确认密码'
},
}
},
{
key
:
"userId"
,
type
:
"String"
,
desc
:
"登录用户id"
}
],
bindBiz
:
rightsMgmtBiz
.
changeAdminPwd
},
{
apiName
:
"修改权限"
,
subUrl
:
'/rightsmgmt/updatemgmt'
,
param
:[
{
key
:
"userId"
,
type
:
"String"
,
desc
:
"登录用户id"
},
{
key
:
"adminLv"
,
type
:
"[Number]"
,
desc
:
"管理员等级"
},
],
bindBiz
:
rightsMgmtBiz
.
updateMGMT
},
{
apiName
:
"回显"
,
subUrl
:
'/rightsmgmt/info'
,
param
:[
{
key
:
"id"
,
type
:
"String"
,
desc
:
"用户id"
},
],
bindBiz
:
rightsMgmtBiz
.
info
},
{
apiName
:
"权限下拉列表"
,
subUrl
:
'/rightsmgmt/mgmtselectlist'
,
param
:[
],
bindBiz
:
rightsMgmtBiz
.
mgmtSelectList
},
],
"个人首页展示"
:[
{
apiName
:
"会员信息展示"
,
subUrl
:
'/homepage/list'
,
param
:[
{
key
:
"
userI
d"
,
type
:
"String"
,
desc
:
"用户id"
}
{
key
:
"
i
d"
,
type
:
"String"
,
desc
:
"用户id"
}
],
bindBiz
:
homePageBiz
.
getMemberData
},
...
...
@@ -581,7 +657,7 @@ export const Config = {
desc
:
"单位所获得科研成果表单"
},
{
key
:
"
userI
d"
,
type
:
"String"
,
desc
:
"用户id"
key
:
"
i
d"
,
type
:
"String"
,
desc
:
"用户id"
}
],
bindBiz
:
homePageBiz
.
unitMemberUpdate
...
...
@@ -630,11 +706,11 @@ export const Config = {
},
{
apiName
:
"消息中心列表"
,
subUrl
:
'/homepage/
huodongtongzhi
'
,
subUrl
:
'/homepage/
xiaoxizhongxin
'
,
param
:[
{}
{
key
:
"userId"
,
type
:
"String"
,
desc
:
"用户id"
}
],
bindBiz
:
homePageBiz
.
get
HuoDongTongZhi
bindBiz
:
homePageBiz
.
get
XiaoXiZhongXin
},
{
apiName
:
"地图信息"
,
...
...
@@ -645,31 +721,12 @@ export const Config = {
bindBiz
:
homePageBiz
.
getSheng
},
{
apiName
:
"会员缴费列表"
,
subUrl
:
'/homepage/memberpayment'
,
param
:[
{
key
:
"userId"
,
type
:
"String"
,
desc
:
"用户id"
},
{
key
:
"state"
,
type
:
"Number"
,
desc
:
"缴费状态"
,
isNull
:
true
}
],
bindBiz
:
homePageBiz
.
memberPayment
},
{
apiName
:
"申请发票"
,
subUrl
:
'/homepage/applicationinvoice'
,
param
:[
{
key
:
"id"
,
type
:
"String"
,
desc
:
"缴费列表返回id"
}
],
bindBiz
:
homePageBiz
.
applicationInvoice
},
{
apiName
:
"下载发票"
,
subUrl
:
'/homepage/downinvoice'
,
apiName
:
"活动列表"
,
subUrl
:
'/homepage/huodongtongzhi'
,
param
:[
{
key
:
"id"
,
type
:
"String"
,
desc
:
"缴费列表返回id"
}
],
bindBiz
:
homePageBiz
.
downInvoice
bindBiz
:
homePageBiz
.
getHuoDongTongZhi
},
]
}
src/routers/order/router.ts
View file @
94924216
...
...
@@ -70,12 +70,55 @@ export const Config = {
"会员个人页"
:[
{
apiName
:
"会员缴费列表"
,
subUrl
:
'/order/
list'
,
subUrl
:
'/order/
memberpayment'
,
param
:[
{
key
:
"type"
,
type
:
"Number"
,
desc
:
"会员类别 枚举参考公用组件[会员缴费列表类型]"
,
isNull
:
true
},
{
key
:
"userId"
,
type
:
"String"
,
desc
:
"用户id"
},
{
key
:
"type"
,
type
:
"Number"
,
desc
:
"缴费状态"
,
isNull
:
true
}
],
bindBiz
:
orderBiz
.
orderList
},
{
apiName
:
"申请发票"
,
subUrl
:
'/order/applicationinvoice'
,
param
:[
{
key
:
"id"
,
type
:
"String"
,
desc
:
"会员缴费列表返回id"
}
],
bindBiz
:
orderBiz
.
applicationInvoice
},
{
apiName
:
"重新申请发票"
,
subUrl
:
'/order/applicationinvoice'
,
param
:[
{
key
:
"id"
,
type
:
"String"
,
desc
:
"会员缴费列表返回id"
}
],
bindBiz
:
orderBiz
.
reapplyInvoice
},
{
apiName
:
"下载发票"
,
subUrl
:
'/order/downinvoice'
,
param
:[
{
key
:
"id"
,
type
:
"String"
,
desc
:
"会员缴费列表返回id"
}
],
bindBiz
:
orderBiz
.
downInvoice
},
{
apiName
:
"上传转账截图"
,
subUrl
:
'/order/uptransferimg'
,
param
:[
{
key
:
"id"
,
type
:
"String"
,
desc
:
"会员缴费列表返回id"
},
{
key
:
"weChartPR"
,
type
:
"String"
,
desc
:
"转账单号"
},
{
key
:
"offlinePaymentUrl"
,
type
:
"String"
,
desc
:
"截图上传"
},
],
bindBiz
:
orderBiz
.
upTransferImg
},
{
apiName
:
"发票审核进度"
,
subUrl
:
'/order/getinvoicestatus'
,
param
:[
{
key
:
"id"
,
type
:
"String"
,
desc
:
"会员缴费列表返回id"
},
],
bindBiz
:
orderBiz
.
getInvoiceStatus
},
],
}
src/routers/public/router.ts
View file @
94924216
...
...
@@ -152,31 +152,45 @@ export const Config = {
},
{
apiName
:
"单位会员类别"
,
subUrl
:
'/unit
MemberT
ype'
,
subUrl
:
'/unit
membert
ype'
,
param
:[],
defaultParam
:
enumConfig
.
UNITMEMBERTYPE
,
bindBiz
:
publicBiz
.
setEnumInterface
},
{
apiName
:
"个人会员类别"
,
subUrl
:
'/individual
MemberT
ype'
,
subUrl
:
'/individual
nembert
ype'
,
param
:[],
defaultParam
:
enumConfig
.
INDIVIDUALMEMBERTYPE
,
bindBiz
:
publicBiz
.
setEnumInterface
},
{
apiName
:
"会员职务"
,
subUrl
:
'/member
L
evel'
,
subUrl
:
'/member
l
evel'
,
param
:[],
defaultParam
:
enumConfig
.
MEMBERLEVEL
,
bindBiz
:
publicBiz
.
setEnumInterface
},
{
apiName
:
"会员类别"
,
//前端用
subUrl
:
'/member
TypeE
cc'
,
subUrl
:
'/member
typee
cc'
,
param
:[],
defaultParam
:
enumConfig
.
MEMBERTYPEECCENUM
,
bindBiz
:
publicBiz
.
setEnumInterface
},
{
apiName
:
"管理员类别"
,
subUrl
:
'/admintype'
,
param
:[],
defaultParam
:
enumConfig
.
ADMINTYPE
,
bindBiz
:
publicBiz
.
setEnumInterface
},
{
apiName
:
"学历"
,
subUrl
:
'/education'
,
param
:[],
defaultParam
:
enumConfig
.
EDUCATION
,
bindBiz
:
publicBiz
.
setEnumInterface
},
],
}
src/routers/router.ts
View file @
94924216
...
...
@@ -17,7 +17,7 @@ import * as orderRouter from "./order/router";
import
*
as
asyncHandler
from
'express-async-handler'
;
import
{
payCallback
}
from
"../biz/member/cost"
;
const
Look
=
fals
e
;
//true更新文档
const
Look
=
tru
e
;
//true更新文档
export
async
function
setRouter
(
httpServer
){
if
(
Look
)
{
...
...
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