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
d857ce82
Commit
d857ce82
authored
Mar 21, 2024
by
chenjinjing
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
no message
parent
c9901473
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
8 deletions
+11
-8
homePage.ts
src/biz/member/homePage.ts
+11
-8
No files found.
src/biz/member/homePage.ts
View file @
d857ce82
...
@@ -26,7 +26,7 @@ export async function getMemberData({userId}) {
...
@@ -26,7 +26,7 @@ export async function getMemberData({userId}) {
let
oldInfo
=
await
findOnce
(
TABLEENUM
.
用户表
,
{
userId
});
let
oldInfo
=
await
findOnce
(
TABLEENUM
.
用户表
,
{
userId
});
if
(
!
oldInfo
||
!
oldInfo
.
userId
)
throw
new
BizError
(
ERRORENUM
.
目标数据不存在
);
if
(
!
oldInfo
||
!
oldInfo
.
userId
)
throw
new
BizError
(
ERRORENUM
.
目标数据不存在
);
let
topSelectFiles
=
[
"loginId"
,
"memberType"
,
"userRegisterState"
,
"integral"
,
"lifespanStartTime"
,
"lifespanEndTime"
,
"memberLevel"
];
let
topSelectFiles
=
[
"loginId"
,
"memberType"
,
"userRegisterState"
,
"integral"
,
"
joinTime"
,
"
lifespanStartTime"
,
"lifespanEndTime"
,
"memberLevel"
];
let
baseSelectFiles
=
[];
let
baseSelectFiles
=
[];
let
majorSelectFiles
=
[];
let
majorSelectFiles
=
[];
/**判断会员类型,个人会员与单位会员返回不同字段 */
/**判断会员类型,个人会员与单位会员返回不同字段 */
...
@@ -47,13 +47,16 @@ export async function getMemberData({userId}) {
...
@@ -47,13 +47,16 @@ export async function getMemberData({userId}) {
let
majorInfo
:
any
=
extractData
(
oldInfo
,
majorSelectFiles
);
let
majorInfo
:
any
=
extractData
(
oldInfo
,
majorSelectFiles
);
/**处理枚举值 */
/**处理枚举值 */
if
(
topInfo
.
memberLevel
)
topInfo
.
memberLevel
=
changeEnumValue
(
MEMBERLEVEL
,
topInfo
.
memberLevel
);
topInfo
.
integral
=
0
;
if
(
baseInfo
.
sex
)
baseInfo
.
sex
=
changeEnumValue
(
SEX
,
baseInfo
.
sex
);
if
(
topInfo
.
joinTime
)
topInfo
.
joinTime
=
moment
(
topInfo
.
joinTime
).
format
(
"YYYY-MM-DD"
);
if
(
baseInfo
.
documentType
)
baseInfo
.
documentType
=
changeEnumValue
(
DOCUMENTTYPE
,
baseInfo
.
documentType
);
if
(
topInfo
.
lifespanEndTime
)
topInfo
.
lifespanEndTime
=
moment
(
topInfo
.
lifespanEndTime
).
format
(
"YYYY-MM-DD"
);
if
(
baseInfo
.
nation
)
baseInfo
.
nation
=
changeEnumValue
(
NATION
,
baseInfo
.
nation
);
// if(topInfo.memberLevel) topInfo.memberLevel = changeEnumValue(MEMBERLEVEL, topInfo.memberLevel);
if
(
majorInfo
.
profCategory
)
majorInfo
.
profCategory
=
changeEnumValue
(
PROFCATEGORY
,
majorInfo
.
profCategory
);
// if(baseInfo.sex) baseInfo.sex = changeEnumValue(SEX, baseInfo.sex);
if
(
majorInfo
.
unitMemberType
)
majorInfo
.
unitMemberType
=
changeEnumValue
(
UNITMEMBERTYPE
,
majorInfo
.
unitMemberType
);
// if(baseInfo.documentType) baseInfo.documentType = changeEnumValue(DOCUMENTTYPE, baseInfo.documentType);
if
(
majorInfo
.
yuanXiaoBanXueLeiXing
)
majorInfo
.
yuanXiaoBanXueLeiXing
=
changeEnumValue
(
BANXUELEIXING
,
majorInfo
.
yuanXiaoBanXueLeiXing
);
// if(baseInfo.nation) baseInfo.nation = changeEnumValue(NATION, baseInfo.nation);
// if(majorInfo.profCategory) majorInfo.profCategory = changeEnumValue(PROFCATEGORY, majorInfo.profCategory);
// if(majorInfo.unitMemberType) majorInfo.unitMemberType = changeEnumValue(UNITMEMBERTYPE, majorInfo.unitMemberType);
// if(majorInfo.yuanXiaoBanXueLeiXing) majorInfo.yuanXiaoBanXueLeiXing = changeEnumValue(BANXUELEIXING, majorInfo.yuanXiaoBanXueLeiXing);
return
{
topInfo
,
baseInfo
,
majorInfo
};
return
{
topInfo
,
baseInfo
,
majorInfo
};
}
}
...
...
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