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
6e7ebf51
Commit
6e7ebf51
authored
Mar 22, 2024
by
lixinming
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
no message
parent
d259e89f
Hide whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
75 additions
and
14 deletions
+75
-14
examine.ts
src/biz/member/examine.ts
+1
-1
order.ts
src/biz/member/order.ts
+5
-3
user.ts
src/biz/member/user.ts
+2
-1
officialWebsite.ts
src/biz/officialWebsite.ts
+2
-1
register.ts
src/biz/register.ts
+3
-3
model.ts
src/data/models/model.ts
+1
-1
dataScript.ts
src/dataScript.ts
+52
-2
router.ts
src/routers/member/router.ts
+8
-1
router.ts
src/routers/public/router.ts
+1
-1
No files found.
src/biz/member/examine.ts
View file @
6e7ebf51
...
...
@@ -71,7 +71,7 @@ export async function pendingReviewList({unitName, joinTime, memberType, sheng,
* @returns
*/
export
async
function
adopt
({
id
,
session
})
{
let
userInfo
=
await
findOnce
(
TABLEENUM
.
用户表
,
{
userId
:
id
,
isAdmin
:
STATE
.
否
},
[
"userId"
,
"registerFlow"
,
"loginId"
,
"userRegisterState"
,
"memberType"
,
"unitName"
,
"name"
]);
let
userInfo
=
await
findOnce
(
TABLEENUM
.
用户表
,
{
userId
:
id
,
isAdmin
:
STATE
.
否
},
[
"userId"
,
"registerFlow"
,
"loginId"
,
"userRegisterState"
,
"memberType"
,
"unitName"
,
"name"
,
"phone"
]);
if
(
!
userInfo
||
!
userInfo
.
userId
)
throw
new
BizError
(
ERRORENUM
.
目标数据不存在
);
if
(
userInfo
.
memberType
==
MEMBERTYPE
.
个人会员
&&
userInfo
.
registerFlow
!=
REGISTERFLOW
.
完成第二步
)
{
throw
new
BizError
(
ERRORENUM
.
不具备审批条件
,
`
${
userInfo
.
userId
}
为个人会员,并没有完成第二步`
);
...
...
src/biz/member/order.ts
View file @
6e7ebf51
...
...
@@ -88,7 +88,7 @@ export async function firstOrderList({unitName, joinTime, memberType, orderState
let
dbList
=
await
findToPage
(
TABLEENUM
.
订单表
,
findParam
,
selectFile
,
pageNumber
);
let
dataCount
=
await
findCount
(
TABLEENUM
.
订单表
,
findParam
);
let
dataList
=
[];
let
itemFile
=
[
"id"
,
"unitName"
,
"loginId"
,
"phone"
];
let
itemFile
=
[
"id"
,
"unitName"
,
"loginId"
,
"phone"
,
"memberCategory"
];
dbList
.
forEach
(
info
=>
{
let
itemData
:
any
=
extractData
(
info
,
itemFile
);
itemData
.
joinTime
=
moment
(
info
.
orderCycleStart
).
format
(
"YYYY-MM-DD"
);
...
...
@@ -266,12 +266,14 @@ export async function billStateList({unitName, paymentType, isPay, pageNumber})
let
dataList
=
[];
let
itemFile
=
[
"
userId"
,
"unitName"
,
"money"
,
"paymentNum
"
];
let
itemFile
=
[
"
id"
,
"userId"
,
"unitName"
,
"money"
,
"paymentNum"
,
"memberCategory"
,
"state"
,
"paymentMethod
"
];
dbList
.
forEach
(
info
=>
{
let
itemData
:
any
=
extractData
(
info
,
itemFile
);
itemData
.
joinTime
=
moment
(
info
.
orderCycleStart
).
format
(
"YYYY-MM-DD"
);
itemData
.
memberType
=
changeEnumValue
(
MEMBERTYPE
,
itemData
.
memberCategory
);
itemData
.
paymentMethod
=
changeEnumValue
(
MEMBERTYPE
,
itemData
.
paymentMethod
);
itemData
.
paymentMethod
=
changeEnumValue
(
PAYMENTTYPE
,
itemData
.
paymentMethod
);
itemData
.
isPay
=
changeEnumValue
(
ORDERSTATE
,
itemData
.
state
);
itemData
.
memberState
=
"正常"
;
//todo 后面要连接用户表
itemData
.
cycle
=
`
${
moment
(
info
.
orderCycleStart
).
format
(
"YYYY-MM-DD"
)}
至
${
moment
(
info
.
orderCycleEnd
).
format
(
"YYYY-MM-DD"
)}
`
dataList
.
push
(
itemData
);
});
...
...
src/biz/member/user.ts
View file @
6e7ebf51
...
...
@@ -34,7 +34,8 @@ export async function login({loginId, pwd}) {
name
:
userInfo
.
name
,
userId
:
userInfo
.
userId
,
token
:
token
,
adminLv
:
userInfo
.
adminLv
adminLv
:
userInfo
.
adminLv
,
timeMs
:
new
Date
().
valueOf
()
};
return
{
dataInfo
}
...
...
src/biz/officialWebsite.ts
View file @
6e7ebf51
...
...
@@ -601,7 +601,8 @@ export async function fenHuiInfo({id}) {
export
async
function
fenHuiDongTaiInfo
({
id
})
{
let
dongTaiInfo
=
await
findOnce
(
TABLEENUM
.
工作动态
,
{
id
,
isUse
:
true
},
[
"id"
,
"title"
,
"activityTime"
,
"imgUrl"
,
"desc"
]);
if
(
!
dongTaiInfo
||
!
dongTaiInfo
.
id
)
throw
new
BizError
(
ERRORENUM
.
目标数据不存在
);
let
dataInfo
=
extractData
(
dongTaiInfo
,
[
"title"
,
"activityTime"
,
"imgUrl"
,
"desc"
]);
let
dataInfo
:
any
=
extractData
(
dongTaiInfo
,
[
"title"
,
"activityTime"
,
"imgUrl"
,
"desc"
]);
dataInfo
.
activityTime
=
moment
(
dataInfo
.
activityTime
).
format
(
"YYYY-MM-DD"
);
return
{
dataInfo
}
}
...
...
src/biz/register.ts
View file @
6e7ebf51
...
...
@@ -238,9 +238,9 @@ export async function unitMemberRegister3({application, userId}) {
* userRegisterState:用户注册状态 USERREGISTERSTATE 会员注册是否已审批通过
* 前端通过该方法获取注册流程状态,流程1通过返回状态【完成第一步】,流程2通过返回状态【完成第二步】,流程3通过返回状态【完成第三步】
*/
export
async
function
registerFlowType
({
userI
d
})
{
if
(
!
userI
d
)
return
{};
let
oldInfo
=
await
findOnce
(
TABLEENUM
.
用户表
,
{
userId
,
isAdmin
:
STATE
.
否
},
[
"userId"
,
"registerFlow"
,
"userRegisterState"
,
"memberType"
]);
export
async
function
registerFlowType
({
i
d
})
{
if
(
!
i
d
)
return
{};
let
oldInfo
=
await
findOnce
(
TABLEENUM
.
用户表
,
{
userId
:
id
,
isAdmin
:
STATE
.
否
},
[
"userId"
,
"registerFlow"
,
"userRegisterState"
,
"memberType"
]);
if
(
!
oldInfo
||
!
oldInfo
.
userId
)
throw
new
BizError
(
ERRORENUM
.
目标数据不存在
);
if
(
oldInfo
.
userRegisterState
==
USERREGISTERSTATE
.
通过
)
{
return
{
code
:
601
,
msg
:
"用户已注册"
}
...
...
src/data/models/model.ts
View file @
6e7ebf51
...
...
@@ -53,7 +53,7 @@
},
*/
import
{
INVOICESTATUS
,
MEMBERLEVEL
,
MEMBERSTATE
,
RE
CEIPTCONFIRMATION
,
RE
GISTERFLOW
,
STATE
,
USERREGISTERSTATE
,
WEICHARTPAYSTATE
}
from
"../../config/enum"
;
import
{
INVOICESTATUS
,
MEMBERLEVEL
,
MEMBERSTATE
,
REGISTERFLOW
,
STATE
,
USERREGISTERSTATE
,
WEICHARTPAYSTATE
}
from
"../../config/enum"
;
...
...
src/dataScript.ts
View file @
6e7ebf51
...
...
@@ -31,7 +31,7 @@ export async function test1() {
"userId"
:
generateUserId
(),
"memberType"
:
1
,
"askForTime"
:
1711095028440.0
,
"loginId"
:
`
赵今麦
${
i
}
`
,
"loginId"
:
`
${
i
}
`
,
"mail"
:
"18120935727@163.com"
,
"pwd"
:
"123456"
,
"phone"
:
`1812093
${
Math
.
ceil
(
Math
.
random
()
*
10
)}${
Math
.
ceil
(
Math
.
random
()
*
10
)}${
Math
.
ceil
(
Math
.
random
()
*
10
)}${
Math
.
ceil
(
Math
.
random
()
*
10
)}
`
,
...
...
@@ -43,7 +43,7 @@ export async function test1() {
"documentType"
:
1
,
"duties"
:
"吃的蔬菜生产"
,
"education"
:
2
,
"name"
:
`
赵今麦
${
i
}
`
,
"name"
:
`
%
${
i
}
`
,
"nation"
:
1
,
"otherEMP"
:
"村上春树"
,
"otherPROF"
:
"村上春树"
,
...
...
@@ -63,4 +63,53 @@ export async function test1() {
}
await
addManyData
(
TABLEENUM
.
用户表
,
dataList
);
console
.
log
(
"初始化成功"
);
}
export
async
function
initOrderData
()
{
let
randomNum
=
parseInt
(
`
${
moment
().
hour
()}${
moment
().
minute
()}${
moment
().
second
()}${
Math
.
ceil
(
Math
.
random
()
*
100
)}
`
);
let
userInfo
=
{
"adminLv"
:
[],
"registerFlow"
:
2
,
"isAdmin"
:
0
,
"userRegisterState"
:
1
,
"memberState"
:
1
,
"memberLevel"
:
1
,
"isGracePeriod"
:
0
,
"cardUrl"
:
[
"http://192.168.0.105:40012/whb/files/12/vue2024-03-22_16-11-873169.png"
],
"auxiliaryMaterial"
:
[],
"userId"
:
generateUserId
(),
"memberType"
:
1
,
"askForTime"
:
1711095028440.0
,
"loginId"
:
`
${
randomNum
}
`
,
"mail"
:
"18120935727@163.com"
,
"pwd"
:
"123456"
,
"phone"
:
`1812093
${
Math
.
ceil
(
Math
.
random
()
*
10
)}${
Math
.
ceil
(
Math
.
random
()
*
10
)}${
Math
.
ceil
(
Math
.
random
()
*
10
)}${
Math
.
ceil
(
Math
.
random
()
*
10
)}
`
,
"__v"
:
0
,
"academicCERTUrl"
:
"http://192.168.0.105:40012/whb/files/12/vue2024-03-22_16-11-356620.png"
,
"addres"
:
"才能实现但是"
,
"birth"
:
1711036800000.0
,
"documentId"
:
"340822199901012333"
,
"documentType"
:
1
,
"duties"
:
"吃的蔬菜生产"
,
"education"
:
2
,
"name"
:
`%
${
randomNum
}
`
,
"nation"
:
1
,
"otherEMP"
:
"去年注册"
,
"otherPROF"
:
"去年注册"
,
"photoUrl"
:
"http://192.168.0.105:40012/whb/files/12/vue2024-03-22_16-11-624049.png"
,
"profAchievement"
:
"去年注册"
,
"profCategory"
:
1
,
"professionalCERTUrl"
:
"http://192.168.0.105:40012/whb/files/12/vue2024-03-22_16-11-603763.png"
,
"qu"
:
"130524"
,
"sex"
:
2
,
"sheng"
:
"130000"
,
"shi"
:
"130500"
,
"studyResume"
:
"去年注册"
,
"unitName"
:
"去年注册"
,
"workResume"
:
"去年注册"
,
"workTitle"
:
"去年注册"
};
}
\ No newline at end of file
src/routers/member/router.ts
View file @
6e7ebf51
...
...
@@ -32,6 +32,7 @@ export const Config = {
},
{
apiName
:
"个人入会流程2"
,
notMiddleware
:
true
,
subUrl
:
'/memberdb/memberregister2'
,
param
:[
{
...
...
@@ -69,6 +70,7 @@ export const Config = {
},
{
apiName
:
"单位入会流程1"
,
notMiddleware
:
true
,
subUrl
:
'/memberdb/unitmemberregister1'
,
param
:[
{
...
...
@@ -87,6 +89,7 @@ export const Config = {
},
{
apiName
:
"单位入会流程2"
,
notMiddleware
:
true
,
subUrl
:
'/memberdb/unitmemberregister2'
,
param
:[
{
...
...
@@ -132,6 +135,7 @@ export const Config = {
},
{
apiName
:
"单位入会流程3"
,
notMiddleware
:
true
,
subUrl
:
'/memberdb/unitmemberregister3'
,
param
:[
{
...
...
@@ -142,6 +146,7 @@ export const Config = {
},
{
apiName
:
"发送短信验证码"
,
notMiddleware
:
true
,
subUrl
:
'/memberdb/registersendcode'
,
param
:[
{
key
:
"loginId"
,
type
:
"String"
,
desc
:
"用户名"
},
...
...
@@ -154,7 +159,9 @@ export const Config = {
apiName
:
"获取当前会员注册流程"
,
notMiddleware
:
true
,
subUrl
:
'/memberdb/registerflowtype'
,
param
:[],
param
:[
{
key
:
"id"
,
type
:
"String"
,
desc
:
"用户id"
}],
bindBiz
:
registerBiz
.
registerFlowType
},
{
...
...
src/routers/public/router.ts
View file @
6e7ebf51
...
...
@@ -217,7 +217,7 @@ export const Config = {
subUrl
:
'/banxueleixing'
,
param
:[],
defaultParam
:
enumConfig
.
BANXUELEIXING
,
bindBiz
:
publicBiz
.
getSession
bindBiz
:
publicBiz
.
setEnumInterface
}
],
}
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