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
18aaad4d
Commit
18aaad4d
authored
Oct 15, 2024
by
lixinming
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
no message
parent
7920c10f
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
10 changed files
with
101 additions
and
19 deletions
+101
-19
memberFees.ts
src/biz/member/memberFees.ts
+1
-1
order.ts
src/biz/member/order.ts
+0
-0
user.ts
src/biz/member/user.ts
+9
-3
provide.ts
src/biz/provide.ts
+2
-0
enum.ts
src/config/enum.ts
+11
-0
errorEnum.ts
src/config/errorEnum.ts
+4
-1
model.ts
src/data/models/model.ts
+21
-1
router.ts
src/routers/order/router.ts
+45
-11
router.ts
src/routers/router.ts
+1
-1
system.ts
src/tools/system.ts
+7
-1
No files found.
src/biz/member/memberFees.ts
View file @
18aaad4d
...
@@ -195,7 +195,7 @@ export async function unpaidList({name, memberType, documentId, phone, mail, joi
...
@@ -195,7 +195,7 @@ export async function unpaidList({name, memberType, documentId, phone, mail, joi
* 会员级别/职务:【普通会员、理事会员、常务理事会员】
* 会员级别/职务:【普通会员、理事会员、常务理事会员】
* @param pageNumber 当前页
* @param pageNumber 当前页
*/
*/
export
async
function
getRenewalPeriod
({
name
,
memberType
,
documentId
,
phone
,
mail
,
joinStartTime
,
joinEndTime
,
memberLevel
,
duties
,
pageNumber
})
{
export
async
function
getRenewalPeriod
({
name
,
memberType
,
documentId
,
phone
,
mail
,
joinStartTime
,
joinEndTime
,
memberLevel
,
pageNumber
})
{
const
NowMs
=
new
Date
().
valueOf
();
const
NowMs
=
new
Date
().
valueOf
();
let
selectParam
:
any
=
{
let
selectParam
:
any
=
{
"$or"
:[
"$or"
:[
...
...
src/biz/member/order.ts
View file @
18aaad4d
This diff is collapsed.
Click to expand it.
src/biz/member/user.ts
View file @
18aaad4d
...
@@ -24,10 +24,10 @@ export async function login({loginId, pwd}) {
...
@@ -24,10 +24,10 @@ export async function login({loginId, pwd}) {
let
selectParam
=
{
"$or"
:[{
loginId
:
loginId
},
{
phone
:
loginId
}]
};
let
selectParam
=
{
"$or"
:[{
loginId
:
loginId
},
{
phone
:
loginId
}]
};
let
userInfo
=
await
findOnce
(
TABLEENUM
.
用户表
,
selectParam
);
let
userInfo
=
await
findOnce
(
TABLEENUM
.
用户表
,
selectParam
);
if
(
userInfo
.
isBlackUser
==
STATE
.
是
)
throw
new
BizError
(
ERRORENUM
.
黑名单用户不允许登录
,
"您的会员服务已过期,如需恢复请联系秘书处:010-86208681"
);
if
(
!
userInfo
||
!
userInfo
.
userId
)
throw
new
BizError
(
ERRORENUM
.
账号或密码错误
);
if
(
!
userInfo
||
!
userInfo
.
userId
)
throw
new
BizError
(
ERRORENUM
.
账号或密码错误
);
if
(
userInfo
.
isBlackUser
==
STATE
.
是
)
throw
new
BizError
(
ERRORENUM
.
黑名单用户不允许登录
,
"您的会员服务已过期,如需恢复请联系秘书处:010-86208681"
);
if
(
userInfo
.
isInput
&&
!
userInfo
.
inputUserChangePwd
)
{
if
(
userInfo
.
isInput
&&
!
userInfo
.
inputUserChangePwd
)
{
return
{
return
{
isInput
:
userInfo
.
isInput
,
isInput
:
userInfo
.
isInput
,
...
@@ -85,7 +85,12 @@ export async function changePwd({phone, pwd, confirmation, code}) {
...
@@ -85,7 +85,12 @@ export async function changePwd({phone, pwd, confirmation, code}) {
if
(
pwd
.
search
(
/^
[
A-Za-z0-9
]{6,18}
$/
)
<
0
)
throw
new
BizError
(
ERRORENUM
.
密码只能由
6
至
18
位字符和数字组成
);
if
(
pwd
.
search
(
/^
[
A-Za-z0-9
]{6,18}
$/
)
<
0
)
throw
new
BizError
(
ERRORENUM
.
密码只能由
6
至
18
位字符和数字组成
);
if
(
pwd
!=
confirmation
)
throw
new
BizError
(
ERRORENUM
.
两次密码不一致
);
if
(
pwd
!=
confirmation
)
throw
new
BizError
(
ERRORENUM
.
两次密码不一致
);
let
userInfo
=
await
findOnce
(
TABLEENUM
.
用户表
,
{
phone
},
[
"userId"
]);
let
codeInfo
=
await
findOnce
(
TABLEENUM
.
验证码表
,
{
codeNum
:
code
,
phone
,
type
:
CODETYPE
.
修改密码
,
isUse
:
false
});
if
(
!
codeInfo
||
!
codeInfo
.
codeNum
)
{
throw
new
BizError
(
ERRORENUM
.
验证码错误
);
}
let
userInfo
=
await
findOnce
(
TABLEENUM
.
用户表
,
{
phone
},
[
"userId"
,
"isInput"
,
"inputUserChangePwd"
]);
if
(
!
userInfo
||
!
userInfo
.
userId
)
throw
new
BizError
(
ERRORENUM
.
手机号不正确
);
if
(
!
userInfo
||
!
userInfo
.
userId
)
throw
new
BizError
(
ERRORENUM
.
手机号不正确
);
// let pwdStr = generatePwd(userInfo.userId, pwd); todo
// let pwdStr = generatePwd(userInfo.userId, pwd); todo
let
pwdStr
=
pwd
;
let
pwdStr
=
pwd
;
...
@@ -95,6 +100,7 @@ export async function changePwd({phone, pwd, confirmation, code}) {
...
@@ -95,6 +100,7 @@ export async function changePwd({phone, pwd, confirmation, code}) {
}
}
await
updateOneData
(
TABLEENUM
.
用户表
,
{
userId
:
userInfo
.
userId
},
updateInfo
);
await
updateOneData
(
TABLEENUM
.
用户表
,
{
userId
:
userInfo
.
userId
},
updateInfo
);
await
updateOneData
(
TABLEENUM
.
验证码表
,
{
codeNum
:
code
,
phone
,
type
:
CODETYPE
.
修改密码
,
isUse
:
false
},
{
isUse
:
true
});
return
successResult
();
return
successResult
();
}
}
...
...
src/biz/provide.ts
View file @
18aaad4d
...
@@ -60,3 +60,5 @@ function getExcel(filePath) {
...
@@ -60,3 +60,5 @@ function getExcel(filePath) {
return
{
sheetMap
,
sheetList
}
return
{
sheetMap
,
sheetList
}
}
}
src/config/enum.ts
View file @
18aaad4d
...
@@ -686,6 +686,7 @@ export enum OOSCODE {
...
@@ -686,6 +686,7 @@ export enum OOSCODE {
单位会员详情
,
单位会员详情
,
注册信息
,
注册信息
,
退款凭证
=
18
,
退款凭证
=
18
,
退款确认
}
}
...
@@ -748,3 +749,12 @@ export enum ISRECEIVE {
...
@@ -748,3 +749,12 @@ export enum ISRECEIVE {
未收到款项
_xg
其他
=
1
,
未收到款项
_xg
其他
=
1
,
提供账户
_zkh
需退款
_ykh
提供账户
_zkh
需退款
_ykh
}
}
/**
* 订单审批
*/
export
enum
ORDEREXAMINE
{
用户提交
=
1
,
退回
}
\ No newline at end of file
src/config/errorEnum.ts
View file @
18aaad4d
...
@@ -60,7 +60,10 @@ export enum ERRORENUM {
...
@@ -60,7 +60,10 @@ export enum ERRORENUM {
线下活动的活动时间必填
,
线下活动的活动时间必填
,
用户没有在此活动对象内
,
用户没有在此活动对象内
,
黑名单用户不允许登录
,
黑名单用户不允许登录
,
该订单未被退回
该订单未被退回
,
不可重复提交
,
订单非退回状态
,
该类型退款无需确认
}
}
export
enum
ERRORCODEENUM
{
export
enum
ERRORCODEENUM
{
...
...
src/data/models/model.ts
View file @
18aaad4d
...
@@ -494,10 +494,18 @@ const ModelArray = [
...
@@ -494,10 +494,18 @@ const ModelArray = [
//2.0新加
//2.0新加
invoiceMail
:
'String'
,
//发票邮箱
invoiceMail
:
'String'
,
//发票邮箱
desc
:
'String'
,
//描述
desc
:
'String'
,
//描述
isReceive
:{
type
:
"Number"
},
//退回理由中的是否受到款项【财务核对页收款退回】 ISRECEIVE
isReceive
:{
type
:
"Number"
,
default
:
0
},
//退回理由中的是否受到款项【财务核对页收款退回】 ISRECEIVE
returnsReasons
:
'String'
,
//退回理由中的退回理由描述【财务核对页收款退回】
returnsReasons
:
'String'
,
//退回理由中的退回理由描述【财务核对页收款退回】
//退款信息
refundName
:
"String"
,
refundBankCarId
:
"String"
,
refundBankName
:
"String"
,
refundDesc
:
"String"
,
isReplenishReturnInfo
:{
type
:
'Boolean'
,
default
:
false
},
//是否补充退款信息
isReplenishReturnInfo
:{
type
:
'Boolean'
,
default
:
false
},
//是否补充退款信息
refundSuccessful
:{
type
:
"Boolean"
,
default
:
false
},
//退款确认
refundImgUrl
:
"String"
}
}
},
},
{
{
...
@@ -583,7 +591,19 @@ const ModelArray = [
...
@@ -583,7 +591,19 @@ const ModelArray = [
userId
:{
type
:
'String'
},
//活动报名用户id
userId
:{
type
:
'String'
},
//活动报名用户id
enrollUrl
:{
type
:
'String'
}
//报名表位置
enrollUrl
:{
type
:
'String'
}
//报名表位置
}
}
},
{
tableName
:
TABLEENUM
.
订单审批历史表
,
//会员
source
:
TABLESOURCEENUM
.
mongo
,
schema
:{
orderId
:{
type
:
'String'
,
index
:
true
},
//订单表 外键
operationTime
:{
type
:
'Number'
},
//操作时间
operationBehavior
:{
type
:
'Number'
},
//操作行为 枚举 ORDEREXAMINE
isReceiveMoney
:{
type
:
'Boolean'
,
default
:
false
},
//是否收到款项
remarks
:{
type
:
'String'
},
//备注
refundImgUrl
:
"String"
//退款确认发票地址
}
}
},
];
];
...
...
src/routers/order/router.ts
View file @
18aaad4d
...
@@ -95,18 +95,18 @@ export const Config = {
...
@@ -95,18 +95,18 @@ export const Config = {
subUrl
:
'/order/invoice/examine/upinvoice'
,
subUrl
:
'/order/invoice/examine/upinvoice'
,
param
:[
param
:[
{
key
:
"id"
,
type
:
"String"
,
desc
:
"订单id"
},
{
key
:
"id"
,
type
:
"String"
,
desc
:
"订单id"
},
{
key
:
"invoiceUrl"
,
type
:
"String"
,
desc
:
"发票地址"
},
//
{key:"invoiceUrl", type:"String", desc:"发票地址"},
],
],
bindBiz
:
orderBiz
.
upInvoice
bindBiz
:
orderBiz
.
upInvoice
},
},
{
//
{
apiName
:
"待开发票-退回发票"
,
// apiName:"待开发票-退回发票", 弃用
subUrl
:
'/order/invoice/examine/backinvoice'
,
//
subUrl:'/order/invoice/examine/backinvoice',
param
:[
//
param:[
{
key
:
"id"
,
type
:
"String"
,
desc
:
"订单id"
}
//
{key:"id", type:"String", desc:"订单id"}
],
//
],
bindBiz
:
orderBiz
.
backInvoice
//
bindBiz:orderBiz.backInvoice
},
//
},
{
{
apiName
:
"发票管理-已开发票"
,
apiName
:
"发票管理-已开发票"
,
subUrl
:
'/order/invoice/examine/invoicedlist'
,
subUrl
:
'/order/invoice/examine/invoicedlist'
,
...
@@ -141,6 +141,31 @@ export const Config = {
...
@@ -141,6 +141,31 @@ export const Config = {
],
],
bindBiz
:
orderBiz
.
invoicePop
bindBiz
:
orderBiz
.
invoicePop
},
},
{
apiName
:
"退款列表"
,
subUrl
:
'/order/refundlist'
,
param
:[
{
key
:
"pageNumber"
,
type
:
"Number"
,
desc
:
"当前页"
},
],
bindBiz
:
orderBiz
.
refundList
},
{
apiName
:
"退款确认"
,
subUrl
:
'/order/refundapprove'
,
param
:[
{
key
:
"id"
,
type
:
"String"
,
desc
:
"订单id"
},
{
key
:
"refundImgUrl"
,
type
:
"String"
,
desc
:
"订单id"
},
],
bindBiz
:
orderBiz
.
refundApprove
},
// {
// apiName:"审批历史",
// subUrl:'/order/approve/log',
// param:[
// {key:"id", type:"String", desc:"订单id"},
// ],
// bindBiz:orderBiz.
// },
],
],
"会员个人页"
:[
"会员个人页"
:[
{
{
...
@@ -204,15 +229,24 @@ export const Config = {
...
@@ -204,15 +229,24 @@ export const Config = {
param
:[
param
:[
{
key
:
"id"
,
type
:
"String"
,
desc
:
"会员缴费列表返回id"
},
{
key
:
"id"
,
type
:
"String"
,
desc
:
"会员缴费列表返回id"
},
],
],
bindBiz
:
orderBiz
.
bindBiz
:
orderBiz
.
reasonInfo
},
},
{
{
apiName
:
"退款信息"
,
apiName
:
"退款信息"
,
subUrl
:
'/order/refund/accountinfo'
,
subUrl
:
'/order/refund/accountinfo'
,
param
:[
param
:[
{
key
:
"id"
,
type
:
"String"
,
desc
:
"会员缴费列表返回id"
},
{
key
:
"id"
,
type
:
"String"
,
desc
:
"会员缴费列表返回id"
},
{
key
:
"form"
,
type
:
"Object"
,
sub
:
{
refundName
:{
type
:
"String"
,
desc
:
"姓名"
},
refundBankCarId
:{
typs
:
"String"
,
desc
:
"银行账号"
},
refundBankName
:{
type
:
"String"
,
desc
:
"银行开户行"
},
refundDesc
:{
type
:
"String"
,
desc
:
"备注"
},
},
desc
:
"表单"
}
],
],
bindBiz
:
orderBiz
.
bindBiz
:
orderBiz
.
accountInfo
},
},
],
],
...
...
src/routers/router.ts
View file @
18aaad4d
...
@@ -28,7 +28,7 @@ export async function setRouter(httpServer){
...
@@ -28,7 +28,7 @@ export async function setRouter(httpServer){
if
(
Look
)
{
if
(
Look
)
{
await
getDoc
();
await
getDoc
();
// await initDoc(portalRouter.FirstName, portalRouter.Config, portalRouter.FirstRouter);//网站编辑
// await initDoc(portalRouter.FirstName, portalRouter.Config, portalRouter.FirstRouter);//网站编辑
await
initDoc
(
publicRouter
.
FirstName
,
publicRouter
.
Config
,
publicRouter
.
FirstRouter
);
//公用组件
//
await initDoc(publicRouter.FirstName, publicRouter.Config, publicRouter.FirstRouter);//公用组件
// await initDoc(memberRouter.FirstName, memberRouter.Config, memberRouter.FirstRouter);//用户路由
// await initDoc(memberRouter.FirstName, memberRouter.Config, memberRouter.FirstRouter);//用户路由
// await initDoc(officalWebsiteRouter.FirstName, officalWebsiteRouter.Config, officalWebsiteRouter.FirstRouter);//官网路由
// await initDoc(officalWebsiteRouter.FirstName, officalWebsiteRouter.Config, officalWebsiteRouter.FirstRouter);//官网路由
await
initDoc
(
orderRouter
.
FirstName
,
orderRouter
.
Config
,
orderRouter
.
FirstRouter
);
//会费相关
await
initDoc
(
orderRouter
.
FirstName
,
orderRouter
.
Config
,
orderRouter
.
FirstRouter
);
//会费相关
...
...
src/tools/system.ts
View file @
18aaad4d
...
@@ -99,9 +99,15 @@ export function getTodayMs() {
...
@@ -99,9 +99,15 @@ export function getTodayMs() {
export
function
generateWXOrderId
(
memberType
,
userId
)
{
export
function
generateWXOrderId
(
memberType
,
userId
)
{
let
thisDate
=
new
Date
();
let
thisDate
=
new
Date
();
return
`
${
md5
(
`
${
memberType
}${
userId
}${
Math
.
random
()
*
100
}${
thisDate
.
valueOf
()}${
Math
.
floor
(
Math
.
random
()
*
1000
)}
`
)}
`
return
`
${
md5
(
`
${
memberType
}${
userId
}${
Math
.
random
()
*
100
}${
thisDate
.
valueOf
()}${
Math
.
floor
(
Math
.
random
()
*
1000
)}
`
)}
`
;
}
}
/**
* 倒推 届次
*/
export
function
getSessionByEdition
(
jie
,
ci
)
{
}
/**
/**
...
...
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