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
17194762
Commit
17194762
authored
Mar 16, 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
f4a51463
853679d8
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
85 additions
and
11 deletions
+85
-11
register.ts
src/biz/register.ts
+77
-4
router.ts
src/routers/member/router.ts
+8
-7
No files found.
src/biz/register.ts
View file @
17194762
...
@@ -2,16 +2,16 @@
...
@@ -2,16 +2,16 @@
* 注册流程
* 注册流程
*/
*/
import
{
BANXUELEIXING
,
CODETYPE
,
DOCUMENTTYPE
,
MEMBERLEVEL
,
MEMBERTYPE
,
NATION
,
OPERATIONREHAVIOR
,
PROFCATEGORY
,
REGISTERFLOW
,
SEX
,
STATE
,
UNIT
INFO
TYPE
,
USERREGISTERSTATE
}
from
"../config/enum"
;
import
{
BANXUELEIXING
,
CODETYPE
,
DOCUMENTTYPE
,
MEMBERLEVEL
,
MEMBERTYPE
,
NATION
,
OPERATIONREHAVIOR
,
PROFCATEGORY
,
REGISTERFLOW
,
SEX
,
STATE
,
UNIT
MEMBER
TYPE
,
USERREGISTERSTATE
}
from
"../config/enum"
;
import
{
ERRORENUM
}
from
"../config/errorEnum"
;
import
{
ERRORENUM
}
from
"../config/errorEnum"
;
import
{
addManyData
,
addOneData
}
from
"../data/add"
;
import
{
addManyData
,
addOneData
}
from
"../data/add"
;
import
{
TABLEENUM
}
from
"../data/models/model"
;
import
{
TABLEENUM
}
from
"../data/models/model"
;
import
{
findCount
,
findOnce
,
findOnceToSort
}
from
"../data/select"
;
import
{
find
,
find
Count
,
findOnce
,
findOnceToSort
}
from
"../data/select"
;
import
{
updateOneData
}
from
"../data/update"
;
import
{
updateOneData
}
from
"../data/update"
;
import
*
as
sysTools
from
"../tools/system"
;
import
*
as
sysTools
from
"../tools/system"
;
import
{
BizError
}
from
"../util/bizError"
;
import
{
BizError
}
from
"../util/bizError"
;
import
{
extractData
}
from
"../util/piecemeal"
;
import
{
extractData
}
from
"../util/piecemeal"
;
import
{
eccEnumValue
}
from
"../util/verificationEnum"
;
import
{
changeEnumValue
,
eccEnumValue
}
from
"../util/verificationEnum"
;
/**
/**
...
@@ -175,7 +175,7 @@ export async function unitMemberRegister2({form, keyanForm, userId}) {
...
@@ -175,7 +175,7 @@ export async function unitMemberRegister2({form, keyanForm, userId}) {
const
EccFuncName
=
'注册单位会员流程2'
;
const
EccFuncName
=
'注册单位会员流程2'
;
eccEnumValue
(
EccFuncName
,
'专业类别'
,
PROFCATEGORY
,
form
.
profCategory
);
eccEnumValue
(
EccFuncName
,
'专业类别'
,
PROFCATEGORY
,
form
.
profCategory
);
eccEnumValue
(
EccFuncName
,
'院校办学类型'
,
BANXUELEIXING
,
form
.
yuanXiaoBanXueLeiXing
);
eccEnumValue
(
EccFuncName
,
'院校办学类型'
,
BANXUELEIXING
,
form
.
yuanXiaoBanXueLeiXing
);
eccEnumValue
(
EccFuncName
,
'单位
信息类型'
,
UNITINFOTYPE
,
form
.
unitInfo
Type
);
eccEnumValue
(
EccFuncName
,
'单位
会员类型'
,
UNITMEMBERTYPE
,
form
.
unitMember
Type
);
form
.
registerFlow
=
REGISTERFLOW
.
完成第二步
;
form
.
registerFlow
=
REGISTERFLOW
.
完成第二步
;
await
updateOneData
(
TABLEENUM
.
用户表
,
{
userId
},
form
);
await
updateOneData
(
TABLEENUM
.
用户表
,
{
userId
},
form
);
...
@@ -271,3 +271,76 @@ export async function memberRegisterSendCode({phone}) {
...
@@ -271,3 +271,76 @@ export async function memberRegisterSendCode({phone}) {
return
{
code
:
Code
};
return
{
code
:
Code
};
}
}
/**
* 单位会员回显【流程二】
* @param userId
* @returns {基本信息, 单位信息, 单位所获得科研成果}
*/
const
UnitBasicConfig
=
[
"userId"
,
"unitName"
,
"sheng"
,
"shi"
,
"qu"
,
"addres"
,
"uscc"
,
"legalPerson"
,
"legalPersonPhone"
,
"legalPersonMail"
,
"unitMail"
,
"contactPerson"
,
"contactPersonDuties"
,
"contactPersonPhone"
,
"uusinessLicenseUrl"
];
const
UnitConfig
=
[
"unitMemberType"
,
"yuanXiaoBanXueLeiXing"
,
"yuanXiaoZhuGuanBuMen"
,
"yuanXiaoFuZeRen"
,
"yuanXiaoFuZeRenZhiWu"
,
"yuanXiaoBanGongFuZeRenZhiWu"
,
"yuanXiaoFuZeRenDianHua"
,
"yuanXiaoBanGongFuZeRen"
,
"yuanXiaoBanGongFuZeRenDianHua"
,
"ZhuYaoFuZeRenYouXiang"
,
"yuanXiaoKeYanFuZeRen"
,
"yuanXiaoKeYanFuZeRenDianHua"
,
"jiaoXueFuZeRenXinMing"
,
"yuanXiaoXueShengZongRenShu"
,
"yuanXiaoJiaoZhiGongZongRenShu"
,
"jiaoXueFuZeRenDianHua"
];
export
async
function
unitMemberEcho2
({
userId
})
{
let
oldInfo
=
await
findOnce
(
TABLEENUM
.
用户表
,
{
userId
});
if
(
!
oldInfo
||
!
oldInfo
.
userId
)
throw
new
BizError
(
ERRORENUM
.
目标数据不存在
);
let
basicInfo
:
any
=
extractData
(
oldInfo
,
UnitBasicConfig
);
let
unitInfo
:
any
=
extractData
(
oldInfo
,
UnitConfig
);
/**处理枚举值 */
unitInfo
.
unitMemberType
=
changeEnumValue
(
UNITMEMBERTYPE
,
unitInfo
.
unitMemberType
);
unitInfo
.
yuanXiaoBanXueLeiXing
=
changeEnumValue
(
BANXUELEIXING
,
unitInfo
.
yuanXiaoBanXueLeiXing
);
let
oldKeYanInfo
=
await
find
(
TABLEENUM
.
单位所获得科研成果表
,
{
userId
});
let
scientificResearch
=
extractData
(
oldKeYanInfo
,
[
"id"
,
"startTime"
,
"endTime"
,
"describe"
]);
return
{
basicInfo
,
unitInfo
,
scientificResearch
};
}
/**
* 单位会员回显【流程三】
* @param userId
* @returns
*/
export
async
function
unitMemberEcho3
({
userId
})
{
let
oldInfo
=
await
findOnce
(
TABLEENUM
.
用户表
,
{
userId
},
[
"applicationForm"
]);
if
(
!
oldInfo
||
!
oldInfo
.
applicationForm
)
throw
new
BizError
(
ERRORENUM
.
目标数据不存在
);
return
{
dataInfo
:
oldInfo
};
}
/**
* 个人会员回显【流程二】
* @param param0
* @returns {基本信息, 专业信息, 其他附件}
*/
const
IndividualBasicConfig
=
[
"name"
,
"sex"
,
"documentType"
,
"documentId"
,
"birth"
,
"nation"
,
"sheng"
,
"shi"
,
"qu"
,
"addres"
,
"education"
,
"photoUrl"
];
const
SpecialityConfig
=
[
"unitName"
,
"memberLevel"
,
"workTitle"
,
"profCategory"
,
"studyResume"
,
"workResume"
,
"profAchievement"
,
"otherEMP"
,
"otherPROF"
];
export
async
function
individualMemberDetails
({
userId
})
{
let
oldInfo
=
await
findOnce
(
TABLEENUM
.
用户表
,
{
userId
});
if
(
!
oldInfo
||
!
oldInfo
.
userId
)
throw
new
BizError
(
ERRORENUM
.
目标数据不存在
);
let
topInfo
:
any
=
extractData
(
oldInfo
,
[
"session"
,
"memberLevel"
]);
topInfo
.
memberLevel
=
changeEnumValue
(
MEMBERLEVEL
,
topInfo
.
memberLevel
);
let
basicInfo
:
any
=
extractData
(
oldInfo
,
IndividualBasicConfig
);
basicInfo
.
documentType
=
changeEnumValue
(
DOCUMENTTYPE
,
basicInfo
.
documentType
);
basicInfo
.
nation
=
changeEnumValue
(
NATION
,
basicInfo
.
nation
);
let
specialityInfo
:
any
=
extractData
(
oldInfo
,
SpecialityConfig
);
basicInfo
.
profCategory
=
changeEnumValue
(
PROFCATEGORY
,
basicInfo
.
profCategory
);
let
otherAttachment
:
any
=
extractData
(
oldInfo
,
[
"cardUrl"
,
"academicCERTUrl"
,
"professionalCERTUrl"
,
"auxiliaryMaterial"
]);
return
{
topInfo
,
basicInfo
,
specialityInfo
,
otherAttachment
};
}
src/routers/member/router.ts
View file @
17194762
...
@@ -3,6 +3,7 @@ import * as memberBiz from "../../biz/member/member";
...
@@ -3,6 +3,7 @@ import * as memberBiz from "../../biz/member/member";
import
*
as
examineBiz
from
"../../biz/member/examine"
;
import
*
as
examineBiz
from
"../../biz/member/examine"
;
import
*
as
memberFeesBiz
from
"../../biz/member/memberFees"
;
import
*
as
memberFeesBiz
from
"../../biz/member/memberFees"
;
import
*
as
authorityBiz
from
"../../biz/member/authority"
;
import
*
as
authorityBiz
from
"../../biz/member/authority"
;
import
*
as
registerBiz
from
"../../biz/register"
;
export
const
FirstName
=
'会员管理路由'
;
export
const
FirstName
=
'会员管理路由'
;
export
const
FirstRouter
=
'/manage/member'
;
export
const
FirstRouter
=
'/manage/member'
;
...
@@ -24,7 +25,7 @@ export const Config = {
...
@@ -24,7 +25,7 @@ export const Config = {
}
}
}
}
],
],
bindBiz
:
memb
erBiz
.
memberRegister1
bindBiz
:
regist
erBiz
.
memberRegister1
},
},
{
{
apiName
:
"个人入会流程2"
,
apiName
:
"个人入会流程2"
,
...
@@ -64,7 +65,7 @@ export const Config = {
...
@@ -64,7 +65,7 @@ export const Config = {
key
:
"userId"
,
type
:
"String"
,
desc
:
"用户id"
key
:
"userId"
,
type
:
"String"
,
desc
:
"用户id"
}
}
],
],
bindBiz
:
memb
erBiz
.
memberRegister2
bindBiz
:
regist
erBiz
.
memberRegister2
},
},
{
{
apiName
:
"单位入会流程1"
,
apiName
:
"单位入会流程1"
,
...
@@ -83,7 +84,7 @@ export const Config = {
...
@@ -83,7 +84,7 @@ export const Config = {
},
},
{
key
:
"codeId"
,
type
:
"String"
,
desc
:
"验证码Id"
}
{
key
:
"codeId"
,
type
:
"String"
,
desc
:
"验证码Id"
}
],
],
bindBiz
:
memb
erBiz
.
unitMemberRegister1
bindBiz
:
regist
erBiz
.
unitMemberRegister1
},
},
{
{
apiName
:
"单位入会流程2"
,
apiName
:
"单位入会流程2"
,
...
@@ -131,7 +132,7 @@ export const Config = {
...
@@ -131,7 +132,7 @@ export const Config = {
key
:
"userId"
,
type
:
"String"
,
desc
:
"用户id"
key
:
"userId"
,
type
:
"String"
,
desc
:
"用户id"
}
}
],
],
bindBiz
:
memb
erBiz
.
unitMemberRegister2
bindBiz
:
regist
erBiz
.
unitMemberRegister2
},
},
{
{
apiName
:
"单位入会流程3"
,
apiName
:
"单位入会流程3"
,
...
@@ -144,7 +145,7 @@ export const Config = {
...
@@ -144,7 +145,7 @@ export const Config = {
key
:
"userId"
,
type
:
"String"
,
desc
:
"用户id"
key
:
"userId"
,
type
:
"String"
,
desc
:
"用户id"
}
}
],
],
bindBiz
:
memb
erBiz
.
unitMemberRegister3
bindBiz
:
regist
erBiz
.
unitMemberRegister3
},
},
{
{
apiName
:
"发送短信验证码"
,
apiName
:
"发送短信验证码"
,
...
@@ -154,7 +155,7 @@ export const Config = {
...
@@ -154,7 +155,7 @@ export const Config = {
{
key
:
"phone"
,
type
:
"String"
,
desc
:
"联系人手机号"
},
{
key
:
"phone"
,
type
:
"String"
,
desc
:
"联系人手机号"
},
{
key
:
"codeType"
,
type
:
"Number"
,
desc
:
"验证码类型枚举"
}
{
key
:
"codeType"
,
type
:
"Number"
,
desc
:
"验证码类型枚举"
}
],
],
bindBiz
:
memb
erBiz
.
memberRegisterSendCode
bindBiz
:
regist
erBiz
.
memberRegisterSendCode
},
},
{
{
apiName
:
"获取当前会员注册流程"
,
apiName
:
"获取当前会员注册流程"
,
...
@@ -162,7 +163,7 @@ export const Config = {
...
@@ -162,7 +163,7 @@ export const Config = {
param
:[
param
:[
{
key
:
"userId"
,
type
:
"String"
,
desc
:
"用户id"
},
{
key
:
"userId"
,
type
:
"String"
,
desc
:
"用户id"
},
],
],
bindBiz
:
memb
erBiz
.
registerFlowType
bindBiz
:
regist
erBiz
.
registerFlowType
}
}
],
],
"登陆相关"
:[
"登陆相关"
:[
...
...
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