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
22c214ef
Commit
22c214ef
authored
Mar 12, 2024
by
lixinming
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
no message
parent
5a2430e3
Hide whitespace changes
Inline
Side-by-side
Showing
19 changed files
with
507 additions
and
111 deletions
+507
-111
order.ts
src/biz/member/order.ts
+91
-8
officialWebsite.ts
src/biz/officialWebsite.ts
+149
-20
gongZuoDongTai.ts
src/biz/portal/fenZhiJiGou/gongZuoDongTai.ts
+5
-4
jiGouGuanLi.ts
src/biz/portal/fenZhiJiGou/jiGouGuanLi.ts
+7
-7
weiYuanMingDan.ts
src/biz/portal/fenZhiJiGou/weiYuanMingDan.ts
+5
-4
xiaZaiZhuanQu.ts
src/biz/portal/fenZhiJiGou/xiaZaiZhuanQu.ts
+5
-4
bannerGuanLi.ts
src/biz/portal/neiRongGuanLi/bannerGuanLi.ts
+6
-4
shiPinGuanLi.ts
src/biz/portal/neiRongGuanLi/shiPinGuanLi.ts
+7
-5
wenZhangGuanLi.ts
src/biz/portal/neiRongGuanLi/wenZhangGuanLi.ts
+6
-4
huiYiTongZhi.ts
src/biz/portal/tongZhiGongGao/huiYiTongZhi.ts
+8
-6
huoDongTongZhi.ts
src/biz/portal/tongZhiGongGao/huoDongTongZhi.ts
+6
-4
xiangMuGongGao.ts
src/biz/portal/tongZhiGongGao/xiangMuGongGao.ts
+5
-4
xueHuiLingDao.ts
src/biz/portal/xueHui/xueHuiLingDao.ts
+5
-5
enum.ts
src/config/enum.ts
+46
-3
model.ts
src/data/models/model.ts
+9
-7
router.ts
src/routers/officalWebsite/router.ts
+69
-3
router.ts
src/routers/portal/router.ts
+26
-12
router.ts
src/routers/public/router.ts
+49
-2
router.ts
src/routers/router.ts
+3
-5
No files found.
src/biz/member/order.ts
View file @
22c214ef
...
@@ -2,12 +2,13 @@
...
@@ -2,12 +2,13 @@
* 订单相关
* 订单相关
*/
*/
import
moment
=
require
(
"moment"
);
import
moment
=
require
(
"moment"
);
import
{
MEMBERLEVEL
,
MEMBERTYPE
,
ORDERSTAT
E
}
from
"../../config/enum"
;
import
{
COSTTYPE
,
INVOICESTATUS
,
ISPAYENUM
,
MEMBERLEVEL
,
MEMBERTYPE
,
ORDERSTATE
,
PAYMENTTYP
E
}
from
"../../config/enum"
;
import
{
generateOrderId
}
from
"../../tools/system"
;
import
{
generateOrderId
}
from
"../../tools/system"
;
import
{
eccEnumValue
}
from
"../../util/verificationEnum"
;
import
{
changeEnumValue
,
eccEnumValue
}
from
"../../util/verificationEnum"
;
import
{
addOneData
}
from
"../../data/add"
;
import
{
addOneData
}
from
"../../data/add"
;
import
{
TABLEENUM
}
from
"../../data/models/model"
;
import
{
TABLEENUM
}
from
"../../data/models/model"
;
import
{
findToPage
}
from
"../../data/select"
;
import
{
findCount
,
findToPage
}
from
"../../data/select"
;
import
{
extractData
}
from
"../../util/piecemeal"
;
/**
/**
...
@@ -55,19 +56,100 @@ export async function createOrder(userId:string, unitName:string, orderStartMs:n
...
@@ -55,19 +56,100 @@ export async function createOrder(userId:string, unitName:string, orderStartMs:n
/**
/**
* 初始订单
* 初始订单
*/
*/
export
async
function
firstOrderList
({
unitName
,
joinTime
,
memberType
,
orderState
})
{
export
async
function
firstOrderList
({
unitName
,
joinTime
,
memberType
,
orderState
,
pageNumber
})
{
let
findParam
:
any
=
{
isFirst
:
true
};
let
findParam
:
any
=
{
isFirst
:
true
};
if
(
unitName
)
findParam
.
unitName
=
{
"$regex"
:
unitName
};
if
(
unitName
)
findParam
.
unitName
=
{
"$regex"
:
unitName
};
if
(
memberType
)
findParam
.
memberCategory
=
memberType
;
if
(
memberType
)
findParam
.
memberCategory
=
memberType
;
if
(
orderState
)
findParam
.
state
=
orderState
;
if
(
orderState
)
findParam
.
state
=
orderState
;
// await findToPage(TABLEENUM.订单表, findParam, ["unitName", ""])
let
selectFile
=
[
"unitName"
,
"loginId"
,
"phone"
,
"orderCycleStart"
,
"orderCycleEnd"
,
"memberCategory"
,
"state"
];
let
dbList
=
await
findToPage
(
TABLEENUM
.
订单表
,
findParam
,
selectFile
,
pageNumber
);
let
dataCount
=
await
findCount
(
TABLEENUM
.
订单表
,
findParam
);
let
dataList
=
[];
let
itemFile
=
[
"unitName"
,
"loginId"
,
"phone"
];
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
.
cycle
=
`
${
moment
(
info
.
orderCycleStart
).
format
(
"YYYY-MM-DD"
)}
至
${
moment
(
info
.
orderCycleEnd
).
format
(
"YYYY-MM-DD"
)}
`
dataList
.
push
(
itemData
);
});
return
{
dataList
,
dataCount
}
}
}
/**
/**
*
已缴费名单
*
财务核对列表
*/
*/
export
async
function
paidList
({
unit
,
joinTime
,
memberType
})
{
export
async
function
paidList
({
unitName
,
paymentType
,
costType
,
pageNumber
})
{
eccEnumValue
(
"已缴费名单"
,
"会员类型"
,
MEMBERTYPE
,
memberType
);
eccEnumValue
(
"财务核对列表"
,
"支付类型"
,
PAYMENTTYPE
,
paymentType
);
eccEnumValue
(
"财务核对列表"
,
"会费类别"
,
COSTTYPE
,
costType
);
let
findParam
:
any
=
{
isFirst
:
true
};
if
(
unitName
)
findParam
.
unitName
=
{
"$regex"
:
unitName
};
if
(
paymentType
)
findParam
.
paymentMethod
=
paymentType
;
if
(
costType
)
findParam
.
isFirst
=
costType
==
COSTTYPE
.
首次
;
let
selectFile
=
[
"id"
,
"unitName"
,
"orderCycleStart"
,
"orderCycleEnd"
,
"money"
,
"paymentMethod"
,
"memberCategory"
,
"isFirst"
,
"paymentNum"
];
let
dbList
=
await
findToPage
(
TABLEENUM
.
订单表
,
findParam
,
selectFile
,
pageNumber
);
let
dataCount
=
await
findCount
(
TABLEENUM
.
订单表
,
findParam
);
let
dataList
=
[];
let
itemFile
=
[
"unitName"
,
"money"
,
"paymentNum"
];
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
.
costType
=
info
.
isFirst
==
COSTTYPE
.
首次
?
"首次"
:
"续费"
;
itemData
.
cycle
=
`
${
moment
(
info
.
orderCycleStart
).
format
(
"YYYY-MM-DD"
)}
至
${
moment
(
info
.
orderCycleEnd
).
format
(
"YYYY-MM-DD"
)}
`
dataList
.
push
(
itemData
);
});
return
{
dataList
,
dataCount
};
}
}
/**
* 待开发票和已开发票
*/
export
async
function
nonBillable
({
unitName
,
paymentType
,
isPay
,
pageNumber
,
invoiceStatus
})
{
eccEnumValue
(
"发票列表"
,
"支付类型"
,
PAYMENTTYPE
,
paymentType
);
eccEnumValue
(
"发票列表"
,
"是否支付"
,
ISPAYENUM
,
isPay
);
eccEnumValue
(
"发票列表"
,
"发票类型"
,
INVOICESTATUS
,
invoiceStatus
)
let
findParam
:
any
=
{
isFirst
:
true
};
if
(
unitName
)
findParam
.
unitName
=
{
"$regex"
:
unitName
};
if
(
paymentType
)
findParam
.
paymentMethod
=
paymentType
;
if
(
isPay
)
findParam
.
state
=
isPay
let
selectFile
=
[
"id"
,
"unitName"
,
"orderCycleStart"
,
"orderCycleEnd"
,
"money"
,
"paymentMethod"
,
"memberCategory"
,
"state"
,
"paymentNum"
];
let
dbList
=
await
findToPage
(
TABLEENUM
.
订单表
,
findParam
,
selectFile
,
pageNumber
);
let
dataCount
=
await
findCount
(
TABLEENUM
.
订单表
,
findParam
);
let
dataList
=
[];
let
itemFile
=
[
"unitName"
,
"money"
,
"paymentNum"
];
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
.
cycle
=
`
${
moment
(
info
.
orderCycleStart
).
format
(
"YYYY-MM-DD"
)}
至
${
moment
(
info
.
orderCycleEnd
).
format
(
"YYYY-MM-DD"
)}
`
dataList
.
push
(
itemData
);
});
return
{
dataList
,
dataCount
};
}
/**
* 个人页待付款列表
* @param param0
*/
export
async
function
待付款列表
({
userId
})
{
}
\ No newline at end of file
src/biz/officialWebsite.ts
View file @
22c214ef
...
@@ -3,12 +3,13 @@
...
@@ -3,12 +3,13 @@
*/
*/
import
moment
=
require
(
"moment"
);
import
moment
=
require
(
"moment"
);
import
{
ARTICLEPOSITION
,
BANNERPOSITION
,
CODPARTICIPANT
,
DONGTAIZIXUNSUBTYPE
,
IMGEDITFUNENUM
,
PARTYBUILDSUBTYPEENUM
,
PARTYBUILDTYPEENUM
,
STATE
,
TONGZHIGONGGAO
}
from
"../config/enum"
;
import
{
ARTICLEPOSITION
,
BANNERPOSITION
,
CODPARTICIPANT
,
D
ANGJIANVIDEO
,
D
ONGTAIZIXUNSUBTYPE
,
IMGEDITFUNENUM
,
PARTYBUILDSUBTYPEENUM
,
PARTYBUILDTYPEENUM
,
STATE
,
TONGZHIGONGGAO
}
from
"../config/enum"
;
import
{
TABLEENUM
}
from
"../data/models/model"
;
import
{
TABLEENUM
}
from
"../data/models/model"
;
import
{
find
,
findCount
,
findOnce
,
findToPage
}
from
"../data/select"
;
import
{
find
,
findCount
,
findOnce
,
findToPage
}
from
"../data/select"
;
import
{
extractData
}
from
"../util/piecemeal"
;
import
{
extractData
}
from
"../util/piecemeal"
;
import
{
changeEnumValue
,
eccEnumValue
}
from
"../util/verificationEnum"
;
import
{
changeEnumValue
,
eccEnumValue
}
from
"../util/verificationEnum"
;
import
{
BizError
}
from
"../util/bizError"
;
import
{
BizError
}
from
"../util/bizError"
;
import
{
ERRORENUM
}
from
"../config/errorEnum"
;
export
async
function
banner
()
{
export
async
function
banner
()
{
let
result
=
{
let
result
=
{
...
@@ -358,30 +359,38 @@ export async function zhuTiJiaoYu() {
...
@@ -358,30 +359,38 @@ export async function zhuTiJiaoYu() {
/**
/**
* 学习园地
* 学习园地
视频资料
* @param param0
* @param param0
* @returns
* @returns
*/
*/
export
async
function
xueXiYuanDi
({
type
})
{
export
async
function
xueXiYuanDiShiPin
({
type
})
{
let
reuslt
=
{
let
dataList
=
[];
wenZiZiLiao
:[],
//文字资料
shiPinZiLiao
:[]
//视频资料
};
let
wzDBList
=
await
find
(
TABLEENUM
.
文字资料
,
{
type
});
wzDBList
.
forEach
(
info
=>
{
let
addInfo
:
any
=
extractData
(
info
,
[
"title"
,
"rank"
,
"imgUrl"
,
"articleUrl"
,
"updateTime"
]);
addInfo
.
updateTime
=
moment
(
addInfo
.
updateTime
).
format
(
"YYYY-MM-DD"
);
reuslt
.
wenZiZiLiao
.
push
(
addInfo
);
});
let
spDBList
=
await
find
(
TABLEENUM
.
视频管理
,
{
videoType
:
type
,
display
:
STATE
.
是
});
let
spDBList
=
await
find
(
TABLEENUM
.
视频管理
,
{
videoType
:
type
,
display
:
STATE
.
是
});
spDBList
.
forEach
(
info
=>
{
spDBList
.
forEach
(
info
=>
{
let
addInfo
:
any
=
extractData
(
info
,
[
"title"
,
"videoUrl"
,
"videoTime"
]);
let
addInfo
:
any
=
extractData
(
info
,
[
"title"
,
"videoUrl"
,
"videoTime"
]);
addInfo
.
videoTime
=
moment
(
addInfo
.
videoTime
).
format
(
"YYYY-MM-DD"
);
addInfo
.
videoTime
=
moment
(
addInfo
.
videoTime
).
format
(
"YYYY-MM-DD"
);
reuslt
.
shiPinZiLiao
.
push
(
addInfo
);
dataList
.
push
(
addInfo
);
});
return
{
dataList
};
}
/**
* 学习园地文字资料
* @param param0
* @returns
*/
export
async
function
xueXiYuanDiWenZi
({
type
})
{
let
dataList
=
[];
let
wzDBList
=
await
find
(
TABLEENUM
.
文字资料
,
{
type
});
wzDBList
.
forEach
(
info
=>
{
let
addInfo
:
any
=
extractData
(
info
,
[
"title"
,
"rank"
,
"imgUrl"
,
"articleUrl"
,
"updateTime"
]);
addInfo
.
updateTime
=
moment
(
addInfo
.
updateTime
).
format
(
"YYYY-MM-DD"
);
dataList
.
push
(
addInfo
);
});
});
return
reuslt
;
return
{
dataList
}
;
}
}
...
@@ -392,9 +401,11 @@ export async function xueXiYuanDi({type}) {
...
@@ -392,9 +401,11 @@ export async function xueXiYuanDi({type}) {
*/
*/
export
async
function
dangJianZiYuan
({
first
,
secondary
,
three
,
pageNumber
})
{
export
async
function
dangJianZiYuan
({
first
,
secondary
,
three
,
pageNumber
})
{
let
dataList
=
[];
let
dataList
=
[];
let
dataCount
=
0
;
if
(
first
==
PARTYBUILDTYPEENUM
.
主题教育
)
{
if
(
first
==
PARTYBUILDTYPEENUM
.
主题教育
)
{
let
findParam
=
{
articleType
:{
"$in"
:[
secondary
]},
display
:
STATE
.
是
};
let
findParam
=
{
articleType
:{
"$in"
:[
secondary
]},
display
:
STATE
.
是
};
let
dataBaseList
=
await
findToPage
(
TABLEENUM
.
文章管理
,
findParam
,
[
"title"
,
"desc"
,
"articleTime"
,
"imgUrl"
],
pageNumber
);
let
dataBaseList
=
await
findToPage
(
TABLEENUM
.
文章管理
,
findParam
,
[
"title"
,
"desc"
,
"articleTime"
,
"imgUrl"
],
pageNumber
);
dataCount
=
await
findCount
(
TABLEENUM
.
文章管理
,
findParam
);
dataBaseList
.
forEach
(
item
=>
{
dataBaseList
.
forEach
(
item
=>
{
let
{
title
,
desc
,
articleTime
,
imgUrl
}
=
item
;
let
{
title
,
desc
,
articleTime
,
imgUrl
}
=
item
;
dataList
.
push
({
title
,
desc
,
articleTime
,
imgUrl
});
dataList
.
push
({
title
,
desc
,
articleTime
,
imgUrl
});
...
@@ -402,13 +413,16 @@ export async function dangJianZiYuan({first, secondary, three, pageNumber}) {
...
@@ -402,13 +413,16 @@ export async function dangJianZiYuan({first, secondary, three, pageNumber}) {
}
else
{
//学习园地
}
else
{
//学习园地
if
(
secondary
==
PARTYBUILDSUBTYPEENUM
.
文字资料
)
{
if
(
secondary
==
PARTYBUILDSUBTYPEENUM
.
文字资料
)
{
let
wzDBList
=
await
findToPage
(
TABLEENUM
.
文字资料
,
{
type
:
three
},
[
"title"
,
"rank"
,
"imgUrl"
,
"articleUrl"
,
"updateTime"
],
pageNumber
);
let
wzDBList
=
await
findToPage
(
TABLEENUM
.
文字资料
,
{
type
:
three
},
[
"title"
,
"rank"
,
"imgUrl"
,
"articleUrl"
,
"updateTime"
],
pageNumber
);
dataCount
=
await
findCount
(
TABLEENUM
.
文字资料
,
{
type
:
three
});
wzDBList
.
forEach
(
info
=>
{
wzDBList
.
forEach
(
info
=>
{
let
addInfo
:
any
=
extractData
(
info
,
[
"title"
,
"rank"
,
"imgUrl"
,
"articleUrl"
,
"updateTime"
]);
let
addInfo
:
any
=
extractData
(
info
,
[
"title"
,
"rank"
,
"imgUrl"
,
"articleUrl"
,
"updateTime"
]);
addInfo
.
updateTime
=
moment
(
addInfo
.
updateTime
).
format
(
"YYYY-MM-DD"
);
addInfo
.
updateTime
=
moment
(
addInfo
.
updateTime
).
format
(
"YYYY-MM-DD"
);
dataList
.
push
(
addInfo
);
dataList
.
push
(
addInfo
);
});
});
}
else
{
}
else
{
let
spDBList
=
await
findToPage
(
TABLEENUM
.
视频管理
,
{
videoType
:
three
,
display
:
STATE
.
是
},
[
"title"
,
"videoUrl"
,
"videoTime"
],
pageNumber
);
let
spDBList
=
await
findToPage
(
TABLEENUM
.
视频管理
,
{
videoType
:
three
,
display
:
STATE
.
是
},
[
"title"
,
"videoUrl"
,
"videoTime"
],
pageNumber
);
dataCount
=
await
findCount
(
TABLEENUM
.
视频管理
,
{
videoType
:
three
,
display
:
STATE
.
是
});
spDBList
.
forEach
(
info
=>
{
spDBList
.
forEach
(
info
=>
{
let
addInfo
:
any
=
extractData
(
info
,
[
"title"
,
"videoUrl"
,
"videoTime"
]);
let
addInfo
:
any
=
extractData
(
info
,
[
"title"
,
"videoUrl"
,
"videoTime"
]);
addInfo
.
videoTime
=
moment
(
addInfo
.
videoTime
).
format
(
"YYYY-MM-DD"
);
addInfo
.
videoTime
=
moment
(
addInfo
.
videoTime
).
format
(
"YYYY-MM-DD"
);
...
@@ -417,7 +431,7 @@ export async function dangJianZiYuan({first, secondary, three, pageNumber}) {
...
@@ -417,7 +431,7 @@ export async function dangJianZiYuan({first, secondary, three, pageNumber}) {
}
}
}
}
return
{
dataList
};
return
{
dataList
,
dataCount
};
}
}
/**
/**
...
@@ -434,14 +448,130 @@ export async function tongZhiGongGao({type, pageNumber}) {
...
@@ -434,14 +448,130 @@ export async function tongZhiGongGao({type, pageNumber}) {
case
TONGZHIGONGGAO
.
项目公告
:
tableName
=
TABLEENUM
.
项目公告
;
break
;
case
TONGZHIGONGGAO
.
项目公告
:
tableName
=
TABLEENUM
.
项目公告
;
break
;
}
}
let
dbList
=
await
findToPage
(
tableName
,
{
push
:
STATE
.
是
},
[
"name"
,
"st"
,
"addrest"
,
"members"
],
pageNumber
);
let
dbList
=
await
findToPage
(
tableName
,
{
push
:
STATE
.
是
},
[
"id"
,
"name"
,
"st"
,
"addrest"
,
"members"
,
"desc"
],
pageNumber
);
let
dataCount
=
await
findCount
(
tableName
,
{
push
:
STATE
.
是
});
let
dataList
=
[];
let
dataList
=
[];
dbList
.
forEach
(
info
=>
{
dbList
.
forEach
(
info
=>
{
let
item
:
any
=
extractData
(
info
,
[
"
name"
,
"addrest"
,
]);
let
item
:
any
=
extractData
(
info
,
[
"
id"
,
"name"
,
"addrest"
]);
item
.
time
=
moment
(
info
.
st
).
format
(
"YYYY-MM-DD"
);
item
.
time
=
moment
(
info
.
st
).
format
(
"YYYY-MM-DD"
);
item
.
desc
=
info
.
desc
||
""
;
item
.
members
=
changeEnumValue
(
CODPARTICIPANT
,
info
.
members
);
item
.
members
=
changeEnumValue
(
CODPARTICIPANT
,
info
.
members
);
dataList
.
push
(
item
);
dataList
.
push
(
item
);
});
});
return
{
dataList
,
dataCount
};
}
export
async
function
tongZhiGongGaoInfo
({
id
,
type
})
{
eccEnumValue
(
"通知公告"
,
"类型"
,
TONGZHIGONGGAO
,
type
);
let
tableName
;
switch
(
type
)
{
case
TONGZHIGONGGAO
.
会议通知
:
tableName
=
TABLEENUM
.
会议通知
;
break
;
case
TONGZHIGONGGAO
.
活动通知
:
tableName
=
TABLEENUM
.
活动通知
;
break
;
case
TONGZHIGONGGAO
.
项目公告
:
tableName
=
TABLEENUM
.
项目公告
;
break
;
}
let
dbData
=
await
findOnce
(
tableName
,
{
id
,
push
:
STATE
.
是
},
[
"id"
,
"name"
,
"st"
,
"addrest"
,
"members"
,
"desc"
]);
if
(
!
dbData
||
!
dbData
.
id
)
throw
new
BizError
(
ERRORENUM
.
目标数据不存在
);
let
dataInfo
:
any
=
extractData
(
dbData
,
[
"name"
,
"addrest"
]);
dataInfo
.
time
=
moment
(
dbData
.
st
).
format
(
"YYYY-MM-DD"
);
dataInfo
.
desc
=
dbData
.
desc
||
""
;
dataInfo
.
members
=
changeEnumValue
(
CODPARTICIPANT
,
dbData
.
members
);
return
{
dataInfo
};
}
/**
* 热门排行
*/
export
async
function
reMenPaiHang
({
type
})
{
/**学会动态 每个动态资讯取最新的可见的三个*/
let
wenZhangTypeList
=
[
type
];
let
dongTaiZiXunData
=
await
find
(
TABLEENUM
.
文章管理
,
{
articleType
:{
"$in"
:
wenZhangTypeList
},
display
:
STATE
.
是
});
let
dataList
=
[];
dongTaiZiXunData
.
forEach
(
info
=>
{
let
{
id
,
title
,
articleTime
,
desc
}
=
info
;
dataList
.
push
({
id
,
title
,
articleTime
:
moment
(
articleTime
).
format
(
"YYYY-MM-DD"
),
desc
});
});
return
{
dataList
}
}
export
async
function
fenZhiJiGou
()
{
let
jiGouList
=
await
find
(
TABLEENUM
.
机构管理
,
{},
[
"logoUrl"
,
"id"
,
"name"
]);
let
dataList
=
[];
jiGouList
.
forEach
(
info
=>
{
let
{
id
,
logoUrl
,
name
}
=
info
;
dataList
.
push
({
id
,
logoUrl
,
name
,
count
:
28
});
});
return
{
dataList
};
}
export
async
function
fenHuiDongTai
({
agencyId
,
pageNumber
})
{
let
selectParam
:
any
=
{};
if
(
agencyId
)
selectParam
.
agencyId
=
agencyId
;
let
jiGouList
=
await
findToPage
(
TABLEENUM
.
工作动态
,
selectParam
,
[
"id"
,
"title"
,
"activityTime"
,
"imgUrl"
],
pageNumber
);
let
dataCount
=
await
findCount
(
TABLEENUM
.
工作动态
,
selectParam
);
let
dataList
=
[];
jiGouList
.
forEach
(
info
=>
{
let
{
id
,
title
,
activityTime
,
imgUrl
}
=
info
;
dataList
.
push
({
id
,
title
,
activityTime
:
moment
(
activityTime
).
format
(
"YYYY-MM-DD"
),
imgUrl
});
});
return
{
dataList
,
dataCount
}
}
export
async
function
fenHuiDongTaiInfo
({
id
})
{
let
result
=
{
jiGouXinXi
:{},
weiYuanMingDan
:[],
};
let
dataInfo
=
await
findOnce
(
TABLEENUM
.
机构管理
,
{
id
});
result
.
jiGouXinXi
=
extractData
(
dataInfo
,
[
"name"
,
"createTime"
,
"desc"
]);
result
.
jiGouXinXi
[
"createTime"
]
=
moment
(
dataInfo
.
createTime
).
format
(
"YYYY-MM-DD"
);
return
result
;
}
export
async
function
xueXiYuanDiWenZiType
()
{
let
typeList
=
await
find
(
TABLEENUM
.
党建
,
{
type
:
PARTYBUILDTYPEENUM
.
学习园地
,
subType
:
PARTYBUILDSUBTYPEENUM
.
文字资料
,
display
:
STATE
.
是
});
let
dataList
=
[]
typeList
.
forEach
(
info
=>
{
let
{
id
,
name
}
=
info
;
dataList
.
push
({
key
:
name
,
value
:
id
});
});
return
{
dataList
};
return
{
dataList
};
}
}
\ No newline at end of file
export
async
function
xueXiYuanDiShiPinType
()
{
let
dataList
=
[];
for
(
let
key
in
DANGJIANVIDEO
)
{
let
anyKey
:
any
=
key
;
if
(
isNaN
(
anyKey
))
{
let
keyStr
=
key
;
let
value
=
DANGJIANVIDEO
[
key
];
dataList
.
push
({
key
:
keyStr
,
value
});
}
}
return
{
dataList
};
}
src/biz/portal/fenZhiJiGou/gongZuoDongTai.ts
View file @
22c214ef
...
@@ -6,7 +6,7 @@ import { ERRORENUM } from "../../../config/errorEnum";
...
@@ -6,7 +6,7 @@ import { ERRORENUM } from "../../../config/errorEnum";
import
{
addOneData
}
from
"../../../data/add"
;
import
{
addOneData
}
from
"../../../data/add"
;
import
{
deleteOneData
}
from
"../../../data/delete"
;
import
{
deleteOneData
}
from
"../../../data/delete"
;
import
{
TABLEENUM
}
from
"../../../data/models/model"
;
import
{
TABLEENUM
}
from
"../../../data/models/model"
;
import
{
find
,
find
Onc
e
}
from
"../../../data/select"
;
import
{
find
,
find
Count
,
findOnce
,
findToPag
e
}
from
"../../../data/select"
;
import
{
updateOneData
}
from
"../../../data/update"
;
import
{
updateOneData
}
from
"../../../data/update"
;
import
{
generateSystemId
,
successResult
}
from
"../../../tools/system"
;
import
{
generateSystemId
,
successResult
}
from
"../../../tools/system"
;
import
{
BizError
}
from
"../../../util/bizError"
;
import
{
BizError
}
from
"../../../util/bizError"
;
...
@@ -54,10 +54,11 @@ export async function del({userId, id}) {
...
@@ -54,10 +54,11 @@ export async function del({userId, id}) {
}
}
export
async
function
list
({
userId
,
agencyId
})
{
export
async
function
list
({
userId
,
agencyId
,
pageNumber
})
{
let
jiGouNameMap
=
await
getJiGouMap
();
let
jiGouNameMap
=
await
getJiGouMap
();
let
dbList
=
await
find
(
TABLEENUM
.
工作动态
,
{
agencyId
});
let
dbList
=
await
findToPage
(
TABLEENUM
.
工作动态
,
{
agencyId
},
[
"id"
,
"title"
,
"activityTime"
,
"isUse"
],
pageNumber
);
let
dataCount
=
await
findCount
(
TABLEENUM
.
工作动态
,
{
agencyId
});
let
dataList
=
[];
let
dataList
=
[];
dbList
.
forEach
(
info
=>
{
dbList
.
forEach
(
info
=>
{
...
@@ -66,7 +67,7 @@ export async function list({userId, agencyId}) {
...
@@ -66,7 +67,7 @@ export async function list({userId, agencyId}) {
dataList
.
push
(
item
);
dataList
.
push
(
item
);
});
});
return
{
dataList
};
return
{
dataList
,
dataCount
};
}
}
async
function
getJiGouMap
()
{
async
function
getJiGouMap
()
{
...
...
src/biz/portal/fenZhiJiGou/jiGouGuanLi.ts
View file @
22c214ef
...
@@ -6,7 +6,7 @@ import { ERRORENUM } from "../../../config/errorEnum";
...
@@ -6,7 +6,7 @@ import { ERRORENUM } from "../../../config/errorEnum";
import
{
addOneData
}
from
"../../../data/add"
;
import
{
addOneData
}
from
"../../../data/add"
;
import
{
deleteOneData
}
from
"../../../data/delete"
;
import
{
deleteOneData
}
from
"../../../data/delete"
;
import
{
TABLEENUM
}
from
"../../../data/models/model"
;
import
{
TABLEENUM
}
from
"../../../data/models/model"
;
import
{
find
,
find
Onc
e
}
from
"../../../data/select"
;
import
{
find
,
find
Count
,
findOnce
,
findToPag
e
}
from
"../../../data/select"
;
import
{
updateOneData
}
from
"../../../data/update"
;
import
{
updateOneData
}
from
"../../../data/update"
;
import
{
generateSystemId
,
successResult
}
from
"../../../tools/system"
;
import
{
generateSystemId
,
successResult
}
from
"../../../tools/system"
;
import
{
BizError
}
from
"../../../util/bizError"
;
import
{
BizError
}
from
"../../../util/bizError"
;
...
@@ -60,18 +60,18 @@ export async function del({userId, id}) {
...
@@ -60,18 +60,18 @@ export async function del({userId, id}) {
}
}
export
async
function
list
()
{
export
async
function
list
(
{
pageNumber
}
)
{
let
dbList
=
await
find
(
TABLEENUM
.
机构管理
,
{}
);
let
dbList
=
await
find
ToPage
(
TABLEENUM
.
机构管理
,
{},
[
"id"
,
"rank"
,
"name"
,
"logoUrl"
,
"desc"
,
"createTime"
],
pageNumber
);
let
dataCount
=
await
findCount
(
TABLEENUM
.
机构管理
,
{});
let
dataList
=
[];
let
dataList
=
[];
dbList
.
forEach
(
info
=>
{
dbList
.
forEach
(
info
=>
{
let
item
=
extractData
(
info
,
[
"id"
,
"rank"
,
"name"
,
"
awardsCount"
,
"logoUrl"
,
"desc
"
]);
let
item
=
extractData
(
info
,
[
"id"
,
"rank"
,
"name"
,
"
logoUrl"
,
"desc"
,
"createTime
"
]);
dataList
.
push
(
item
);
dataList
.
push
(
item
);
});
});
dataList
.
sort
((
a
,
b
)
=>
{
return
a
.
rank
-
b
.
rank
});
dataList
.
sort
((
a
,
b
)
=>
{
return
a
.
rank
-
b
.
rank
});
return
{
dataList
};
return
{
dataList
,
dataCount
};
}
}
...
@@ -81,7 +81,7 @@ export async function list() {
...
@@ -81,7 +81,7 @@ export async function list() {
*/
*/
export
async
function
info
({
id
})
{
export
async
function
info
({
id
})
{
let
oldInfo
=
await
findOnce
(
TABLEENUM
.
机构管理
,
{
id
});
let
oldInfo
=
await
findOnce
(
TABLEENUM
.
机构管理
,
{
id
});
let
dataInfo
=
extractData
(
oldInfo
,
[
"id"
,
"rank"
,
"name"
,
"
awardsCount"
,
"desc"
,
"logoUrl
"
]);
let
dataInfo
=
extractData
(
oldInfo
,
[
"id"
,
"rank"
,
"name"
,
"
desc"
,
"logoUrl"
,
"createTime
"
]);
/**获取上下3位的排名列表 */
/**获取上下3位的排名列表 */
return
{
dataInfo
};
return
{
dataInfo
};
...
...
src/biz/portal/fenZhiJiGou/weiYuanMingDan.ts
View file @
22c214ef
...
@@ -6,7 +6,7 @@ import { ERRORENUM } from "../../../config/errorEnum";
...
@@ -6,7 +6,7 @@ import { ERRORENUM } from "../../../config/errorEnum";
import
{
addOneData
}
from
"../../../data/add"
;
import
{
addOneData
}
from
"../../../data/add"
;
import
{
deleteOneData
}
from
"../../../data/delete"
;
import
{
deleteOneData
}
from
"../../../data/delete"
;
import
{
TABLEENUM
}
from
"../../../data/models/model"
;
import
{
TABLEENUM
}
from
"../../../data/models/model"
;
import
{
find
,
find
Onc
e
}
from
"../../../data/select"
;
import
{
find
,
find
Count
,
findOnce
,
findToPag
e
}
from
"../../../data/select"
;
import
{
updateOneData
}
from
"../../../data/update"
;
import
{
updateOneData
}
from
"../../../data/update"
;
import
{
generateSystemId
,
successResult
}
from
"../../../tools/system"
;
import
{
generateSystemId
,
successResult
}
from
"../../../tools/system"
;
import
{
BizError
}
from
"../../../util/bizError"
;
import
{
BizError
}
from
"../../../util/bizError"
;
...
@@ -54,10 +54,11 @@ export async function del({userId, id}) {
...
@@ -54,10 +54,11 @@ export async function del({userId, id}) {
}
}
export
async
function
list
({
userId
,
agencyId
})
{
export
async
function
list
({
userId
,
agencyId
,
pageNumber
})
{
let
jiGouNameMap
=
await
getJiGouMap
();
let
jiGouNameMap
=
await
getJiGouMap
();
let
dbList
=
await
find
(
TABLEENUM
.
委员名单
,
{
agencyId
});
let
dbList
=
await
findToPage
(
TABLEENUM
.
委员名单
,
{
agencyId
},
[
"id"
,
"name"
,
"branchDuties"
,
"unit"
,
"unitDuties"
],
pageNumber
);
let
dataCount
=
await
findCount
(
TABLEENUM
.
委员名单
,
{
agencyId
});
let
dataList
=
[];
let
dataList
=
[];
dbList
.
forEach
(
info
=>
{
dbList
.
forEach
(
info
=>
{
...
@@ -66,7 +67,7 @@ export async function list({userId, agencyId}) {
...
@@ -66,7 +67,7 @@ export async function list({userId, agencyId}) {
dataList
.
push
(
item
);
dataList
.
push
(
item
);
});
});
return
{
dataList
};
return
{
dataList
,
dataCount
};
}
}
async
function
getJiGouMap
()
{
async
function
getJiGouMap
()
{
...
...
src/biz/portal/fenZhiJiGou/xiaZaiZhuanQu.ts
View file @
22c214ef
...
@@ -6,7 +6,7 @@ import { ERRORENUM } from "../../../config/errorEnum";
...
@@ -6,7 +6,7 @@ import { ERRORENUM } from "../../../config/errorEnum";
import
{
addOneData
}
from
"../../../data/add"
;
import
{
addOneData
}
from
"../../../data/add"
;
import
{
deleteOneData
}
from
"../../../data/delete"
;
import
{
deleteOneData
}
from
"../../../data/delete"
;
import
{
TABLEENUM
}
from
"../../../data/models/model"
;
import
{
TABLEENUM
}
from
"../../../data/models/model"
;
import
{
find
,
find
Onc
e
}
from
"../../../data/select"
;
import
{
find
,
find
Count
,
findOnce
,
findToPag
e
}
from
"../../../data/select"
;
import
{
updateOneData
}
from
"../../../data/update"
;
import
{
updateOneData
}
from
"../../../data/update"
;
import
{
generateSystemId
,
successResult
}
from
"../../../tools/system"
;
import
{
generateSystemId
,
successResult
}
from
"../../../tools/system"
;
import
{
BizError
}
from
"../../../util/bizError"
;
import
{
BizError
}
from
"../../../util/bizError"
;
...
@@ -55,10 +55,11 @@ export async function del({userId, id}) {
...
@@ -55,10 +55,11 @@ export async function del({userId, id}) {
}
}
export
async
function
list
({
userId
,
agencyId
})
{
export
async
function
list
({
userId
,
agencyId
,
pageNumber
})
{
let
jiGouNameMap
=
await
getJiGouMap
();
let
jiGouNameMap
=
await
getJiGouMap
();
let
dbList
=
await
find
(
TABLEENUM
.
下载专区
,
{
agencyId
});
let
dbList
=
await
findToPage
(
TABLEENUM
.
下载专区
,
{
agencyId
},[
"id"
,
"name"
,
"ct"
]
,
pageNumber
);
let
dataCount
=
await
findCount
(
TABLEENUM
.
下载专区
,
{
agencyId
});
let
dataList
=
[];
let
dataList
=
[];
dbList
.
forEach
(
info
=>
{
dbList
.
forEach
(
info
=>
{
...
@@ -67,7 +68,7 @@ export async function list({userId, agencyId}) {
...
@@ -67,7 +68,7 @@ export async function list({userId, agencyId}) {
dataList
.
push
(
item
);
dataList
.
push
(
item
);
});
});
return
{
dataList
};
return
{
dataList
,
dataCount
};
}
}
async
function
getJiGouMap
()
{
async
function
getJiGouMap
()
{
...
...
src/biz/portal/neiRongGuanLi/bannerGuanLi.ts
View file @
22c214ef
...
@@ -7,7 +7,7 @@ import { ERRORENUM } from "../../../config/errorEnum";
...
@@ -7,7 +7,7 @@ import { ERRORENUM } from "../../../config/errorEnum";
import
{
addOneData
}
from
"../../../data/add"
;
import
{
addOneData
}
from
"../../../data/add"
;
import
{
deleteOneData
}
from
"../../../data/delete"
;
import
{
deleteOneData
}
from
"../../../data/delete"
;
import
{
TABLEENUM
}
from
"../../../data/models/model"
;
import
{
TABLEENUM
}
from
"../../../data/models/model"
;
import
{
find
,
find
Onc
e
}
from
"../../../data/select"
;
import
{
find
,
find
Count
,
findOnce
,
findToPag
e
}
from
"../../../data/select"
;
import
{
updateOneData
}
from
"../../../data/update"
;
import
{
updateOneData
}
from
"../../../data/update"
;
import
{
generateSystemId
,
successResult
}
from
"../../../tools/system"
;
import
{
generateSystemId
,
successResult
}
from
"../../../tools/system"
;
import
{
BizError
}
from
"../../../util/bizError"
;
import
{
BizError
}
from
"../../../util/bizError"
;
...
@@ -57,19 +57,21 @@ export async function del(secureArgs:any) {
...
@@ -57,19 +57,21 @@ export async function del(secureArgs:any) {
export
async
function
list
(
secureArgs
:
any
)
{
export
async
function
list
(
secureArgs
:
any
)
{
let
{
userId
,
title
}
=
secureArgs
;
let
{
userId
,
title
,
pageNumber
}
=
secureArgs
;
let
selectParam
:
any
=
{};
let
selectParam
:
any
=
{};
if
(
title
)
selectParam
.
title
=
title
;
if
(
title
)
selectParam
.
title
=
title
;
let
dbList
=
await
find
(
TABLEENUM
.
banner
管理
,
selectParam
);
let
dbList
=
await
findToPage
(
TABLEENUM
.
banner
管理
,
selectParam
,
[
"id"
,
"location"
,
"articleTitle"
,
"position"
,
"articleUrl"
,
"display"
,
"desc"
],
pageNumber
);
let
dataCount
=
await
findCount
(
TABLEENUM
.
banner
管理
,
selectParam
);
let
dataList
=
[];
let
dataList
=
[];
dbList
.
forEach
(
info
=>
{
dbList
.
forEach
(
info
=>
{
let
item
=
extractData
(
info
,
[
"id"
,
"location"
,
"articleTitle"
,
"position"
,
"articleUrl"
,
"display"
,
"desc"
]);
let
item
=
extractData
(
info
,
[
"id"
,
"location"
,
"articleTitle"
,
"position"
,
"articleUrl"
,
"display"
,
"desc"
]);
dataList
.
push
(
item
);
dataList
.
push
(
item
);
});
});
return
{
dataList
};
return
{
dataList
,
dataCount
};
}
}
/**
/**
...
...
src/biz/portal/neiRongGuanLi/shiPinGuanLi.ts
View file @
22c214ef
...
@@ -6,7 +6,7 @@ import { ERRORENUM } from "../../../config/errorEnum";
...
@@ -6,7 +6,7 @@ import { ERRORENUM } from "../../../config/errorEnum";
import
{
addOneData
}
from
"../../../data/add"
;
import
{
addOneData
}
from
"../../../data/add"
;
import
{
deleteOneData
}
from
"../../../data/delete"
;
import
{
deleteOneData
}
from
"../../../data/delete"
;
import
{
TABLEENUM
}
from
"../../../data/models/model"
;
import
{
TABLEENUM
}
from
"../../../data/models/model"
;
import
{
find
,
find
Onc
e
}
from
"../../../data/select"
;
import
{
find
,
find
Count
,
findOnce
,
findToPag
e
}
from
"../../../data/select"
;
import
{
updateOneData
}
from
"../../../data/update"
;
import
{
updateOneData
}
from
"../../../data/update"
;
import
{
generateSystemId
,
successResult
}
from
"../../../tools/system"
;
import
{
generateSystemId
,
successResult
}
from
"../../../tools/system"
;
import
{
BizError
}
from
"../../../util/bizError"
;
import
{
BizError
}
from
"../../../util/bizError"
;
...
@@ -56,7 +56,7 @@ export async function del(secureArgs:any) {
...
@@ -56,7 +56,7 @@ export async function del(secureArgs:any) {
export
async
function
list
(
secureArgs
:
any
)
{
export
async
function
list
(
secureArgs
:
any
)
{
let
{
userId
,
videoType
,
title
,
videoTime
}
=
secureArgs
;
let
{
userId
,
videoType
,
title
,
videoTime
,
pageNumber
}
=
secureArgs
;
let
selectParam
:
any
=
{};
let
selectParam
:
any
=
{};
if
(
videoType
)
selectParam
.
videoType
=
videoType
;
if
(
videoType
)
selectParam
.
videoType
=
videoType
;
...
@@ -68,7 +68,9 @@ export async function list(secureArgs:any) {
...
@@ -68,7 +68,9 @@ export async function list(secureArgs:any) {
];
];
}
}
let
dbList
=
await
find
(
TABLEENUM
.
视频管理
,
selectParam
);
let
dbList
=
await
findToPage
(
TABLEENUM
.
视频管理
,
selectParam
,
[
"id"
,
"title"
,
"videoType"
,
"videoTime"
,
"desc"
,
"display"
],
pageNumber
);
let
dataCount
=
await
findCount
(
TABLEENUM
.
视频管理
,
selectParam
);
let
dataList
=
[];
let
dataList
=
[];
dbList
.
forEach
(
info
=>
{
dbList
.
forEach
(
info
=>
{
...
@@ -76,7 +78,7 @@ export async function list(secureArgs:any) {
...
@@ -76,7 +78,7 @@ export async function list(secureArgs:any) {
dataList
.
push
(
item
);
dataList
.
push
(
item
);
});
});
return
{
dataList
};
return
{
dataList
,
dataCount
};
}
}
/**
/**
...
@@ -86,7 +88,7 @@ export async function list(secureArgs:any) {
...
@@ -86,7 +88,7 @@ export async function list(secureArgs:any) {
export
async
function
info
(
secureArgs
:
any
)
{
export
async
function
info
(
secureArgs
:
any
)
{
let
{
id
}
=
secureArgs
;
let
{
id
}
=
secureArgs
;
let
oldInfo
=
await
findOnce
(
TABLEENUM
.
视频管理
,
{
id
});
let
oldInfo
=
await
findOnce
(
TABLEENUM
.
视频管理
,
{
id
});
let
dataInfo
=
extractData
(
oldInfo
,
[
"id"
,
"title"
,
"videoType"
,
"videoUrl"
,
"videoTime"
,
"desc"
]);
let
dataInfo
=
extractData
(
oldInfo
,
[
"id"
,
"title"
,
"videoType"
,
"videoUrl"
,
"videoTime"
,
"desc"
,
"coverUrl"
]);
return
{
dataInfo
};
return
{
dataInfo
};
}
}
...
...
src/biz/portal/neiRongGuanLi/wenZhangGuanLi.ts
View file @
22c214ef
...
@@ -8,7 +8,7 @@ import { ERRORENUM } from "../../../config/errorEnum";
...
@@ -8,7 +8,7 @@ import { ERRORENUM } from "../../../config/errorEnum";
import
{
addOneData
}
from
"../../../data/add"
;
import
{
addOneData
}
from
"../../../data/add"
;
import
{
deleteOneData
}
from
"../../../data/delete"
;
import
{
deleteOneData
}
from
"../../../data/delete"
;
import
{
TABLEENUM
}
from
"../../../data/models/model"
;
import
{
TABLEENUM
}
from
"../../../data/models/model"
;
import
{
find
,
find
Onc
e
}
from
"../../../data/select"
;
import
{
find
,
find
Count
,
findOnce
,
findToPag
e
}
from
"../../../data/select"
;
import
{
updateOneData
}
from
"../../../data/update"
;
import
{
updateOneData
}
from
"../../../data/update"
;
import
{
generateSystemId
,
successResult
}
from
"../../../tools/system"
;
import
{
generateSystemId
,
successResult
}
from
"../../../tools/system"
;
import
{
BizError
}
from
"../../../util/bizError"
;
import
{
BizError
}
from
"../../../util/bizError"
;
...
@@ -58,7 +58,7 @@ export async function del(secureArgs:any) {
...
@@ -58,7 +58,7 @@ export async function del(secureArgs:any) {
export
async
function
list
(
secureArgs
:
any
)
{
export
async
function
list
(
secureArgs
:
any
)
{
let
{
userId
,
articleType
,
title
,
articleTime
}
=
secureArgs
;
let
{
userId
,
articleType
,
title
,
articleTime
,
pageNumber
}
=
secureArgs
;
let
selectParam
:
any
=
{};
let
selectParam
:
any
=
{};
if
(
articleType
)
selectParam
.
articleType
=
articleType
;
if
(
articleType
)
selectParam
.
articleType
=
articleType
;
...
@@ -70,14 +70,15 @@ export async function list(secureArgs:any) {
...
@@ -70,14 +70,15 @@ export async function list(secureArgs:any) {
];
];
}
}
let
dbList
=
await
find
(
TABLEENUM
.
文章管理
,
selectParam
);
let
dbList
=
await
findToPage
(
TABLEENUM
.
文章管理
,
selectParam
,
[
"id"
,
"title"
,
"articleType"
,
"imgUrl"
,
"articleTime"
,
"desc"
,
"display"
],
pageNumber
);
let
dataCount
=
await
findCount
(
TABLEENUM
.
文章管理
,
selectParam
);
let
dataList
=
[];
let
dataList
=
[];
dbList
.
forEach
(
info
=>
{
dbList
.
forEach
(
info
=>
{
let
item
=
extractData
(
info
,
[
"id"
,
"title"
,
"articleType"
,
"imgUrl"
,
"articleTime"
,
"desc"
,
"display"
]);
let
item
=
extractData
(
info
,
[
"id"
,
"title"
,
"articleType"
,
"imgUrl"
,
"articleTime"
,
"desc"
,
"display"
]);
dataList
.
push
(
item
);
dataList
.
push
(
item
);
});
});
return
{
dataList
};
return
{
dataList
,
dataCount
};
}
}
/**
/**
...
@@ -87,6 +88,7 @@ export async function list(secureArgs:any) {
...
@@ -87,6 +88,7 @@ export async function list(secureArgs:any) {
export
async
function
info
(
secureArgs
:
any
)
{
export
async
function
info
(
secureArgs
:
any
)
{
let
{
id
}
=
secureArgs
;
let
{
id
}
=
secureArgs
;
let
oldInfo
=
await
findOnce
(
TABLEENUM
.
文章管理
,
{
id
});
let
oldInfo
=
await
findOnce
(
TABLEENUM
.
文章管理
,
{
id
});
if
(
!
oldInfo
||
!
oldInfo
.
id
)
throw
new
BizError
(
ERRORENUM
.
目标数据不存在
);
let
dataInfo
=
extractData
(
oldInfo
,
[
"id"
,
"title"
,
"articleType"
,
"imgUrl"
,
"articleTime"
,
"desc"
]);
let
dataInfo
=
extractData
(
oldInfo
,
[
"id"
,
"title"
,
"articleType"
,
"imgUrl"
,
"articleTime"
,
"desc"
]);
return
{
dataInfo
};
return
{
dataInfo
};
...
...
src/biz/portal/tongZhiGongGao/huiYiTongZhi.ts
View file @
22c214ef
...
@@ -6,7 +6,7 @@ import { ERRORENUM } from "../../../config/errorEnum";
...
@@ -6,7 +6,7 @@ import { ERRORENUM } from "../../../config/errorEnum";
import
{
addOneData
}
from
"../../../data/add"
;
import
{
addOneData
}
from
"../../../data/add"
;
import
{
deleteOneData
}
from
"../../../data/delete"
;
import
{
deleteOneData
}
from
"../../../data/delete"
;
import
{
TABLEENUM
}
from
"../../../data/models/model"
;
import
{
TABLEENUM
}
from
"../../../data/models/model"
;
import
{
find
,
find
Onc
e
}
from
"../../../data/select"
;
import
{
find
,
find
Count
,
findOnce
,
findToPag
e
}
from
"../../../data/select"
;
import
{
updateOneData
}
from
"../../../data/update"
;
import
{
updateOneData
}
from
"../../../data/update"
;
import
{
generateSystemId
,
successResult
}
from
"../../../tools/system"
;
import
{
generateSystemId
,
successResult
}
from
"../../../tools/system"
;
import
{
BizError
}
from
"../../../util/bizError"
;
import
{
BizError
}
from
"../../../util/bizError"
;
...
@@ -52,19 +52,21 @@ export async function del({userId, id}) {
...
@@ -52,19 +52,21 @@ export async function del({userId, id}) {
}
}
export
async
function
list
({
userId
,
desc
})
{
export
async
function
list
({
userId
,
desc
,
pageNumber
})
{
let
selectParam
:
any
=
{};
let
selectParam
:
any
=
{};
if
(
desc
)
selectParam
.
desc
=
{
"$regex"
:
desc
}
if
(
desc
)
selectParam
.
desc
=
{
"$regex"
:
desc
};
let
dbList
=
await
find
(
TABLEENUM
.
会议通知
,
selectParam
);
let
selectFiles
=
[
"id"
,
"name"
,
"st"
,
"et"
,
"addrest"
,
"members"
,
"push"
,
"desc"
];
let
dbList
=
await
findToPage
(
TABLEENUM
.
会议通知
,
selectParam
,
selectFiles
,
pageNumber
);
let
dataCount
=
await
findCount
(
TABLEENUM
.
会议通知
,
selectParam
);
let
dataList
=
[];
let
dataList
=
[];
dbList
.
forEach
(
info
=>
{
dbList
.
forEach
(
info
=>
{
let
item
=
extractData
(
info
,
[
"id"
,
"name"
,
"st"
,
"et"
,
"addrest"
,
"members"
,
"push"
,
"desc"
]
);
let
item
=
extractData
(
info
,
selectFiles
);
dataList
.
push
(
item
);
dataList
.
push
(
item
);
});
});
dataList
.
sort
((
a
,
b
)
=>
{
return
a
.
rank
-
b
.
rank
});
dataList
.
sort
((
a
,
b
)
=>
{
return
a
.
rank
-
b
.
rank
});
return
dataList
;
return
{
dataList
,
dataCount
}
;
}
}
/**
/**
...
...
src/biz/portal/tongZhiGongGao/huoDongTongZhi.ts
View file @
22c214ef
...
@@ -6,7 +6,7 @@ import { ERRORENUM } from "../../../config/errorEnum";
...
@@ -6,7 +6,7 @@ import { ERRORENUM } from "../../../config/errorEnum";
import
{
addOneData
}
from
"../../../data/add"
;
import
{
addOneData
}
from
"../../../data/add"
;
import
{
deleteOneData
}
from
"../../../data/delete"
;
import
{
deleteOneData
}
from
"../../../data/delete"
;
import
{
TABLEENUM
}
from
"../../../data/models/model"
;
import
{
TABLEENUM
}
from
"../../../data/models/model"
;
import
{
find
,
find
Onc
e
}
from
"../../../data/select"
;
import
{
find
,
find
Count
,
findOnce
,
findToPag
e
}
from
"../../../data/select"
;
import
{
updateOneData
}
from
"../../../data/update"
;
import
{
updateOneData
}
from
"../../../data/update"
;
import
{
generateSystemId
,
successResult
}
from
"../../../tools/system"
;
import
{
generateSystemId
,
successResult
}
from
"../../../tools/system"
;
import
{
BizError
}
from
"../../../util/bizError"
;
import
{
BizError
}
from
"../../../util/bizError"
;
...
@@ -51,10 +51,12 @@ export async function del({userId, id}) {
...
@@ -51,10 +51,12 @@ export async function del({userId, id}) {
}
}
export
async
function
list
({
userId
,
desc
})
{
export
async
function
list
({
userId
,
desc
,
pageNumber
})
{
let
selectParam
:
any
=
{};
let
selectParam
:
any
=
{};
if
(
desc
)
selectParam
.
desc
=
{
"$regex"
:
desc
}
if
(
desc
)
selectParam
.
desc
=
{
"$regex"
:
desc
}
let
dbList
=
await
find
(
TABLEENUM
.
活动通知
,
selectParam
);
let
dbList
=
await
findToPage
(
TABLEENUM
.
活动通知
,
selectParam
,
[
"id"
,
"name"
,
"st"
,
"addrest"
,
"members"
,
"push"
,
"desc"
],
pageNumber
);
let
dataCount
=
await
findCount
(
TABLEENUM
.
活动通知
,
selectParam
);
let
dataList
=
[];
let
dataList
=
[];
dbList
.
forEach
(
info
=>
{
dbList
.
forEach
(
info
=>
{
let
item
=
extractData
(
info
,
[
"id"
,
"name"
,
"st"
,
"addrest"
,
"members"
,
"push"
,
"desc"
]);
let
item
=
extractData
(
info
,
[
"id"
,
"name"
,
"st"
,
"addrest"
,
"members"
,
"push"
,
"desc"
]);
...
@@ -63,7 +65,7 @@ export async function list({userId, desc}) {
...
@@ -63,7 +65,7 @@ export async function list({userId, desc}) {
dataList
.
sort
((
a
,
b
)
=>
{
return
a
.
rank
-
b
.
rank
});
dataList
.
sort
((
a
,
b
)
=>
{
return
a
.
rank
-
b
.
rank
});
return
dataList
;
return
{
dataList
,
dataCount
}
;
}
}
/**
/**
...
...
src/biz/portal/tongZhiGongGao/xiangMuGongGao.ts
View file @
22c214ef
...
@@ -7,7 +7,7 @@ import { ERRORENUM } from "../../../config/errorEnum";
...
@@ -7,7 +7,7 @@ import { ERRORENUM } from "../../../config/errorEnum";
import
{
addOneData
}
from
"../../../data/add"
;
import
{
addOneData
}
from
"../../../data/add"
;
import
{
deleteOneData
}
from
"../../../data/delete"
;
import
{
deleteOneData
}
from
"../../../data/delete"
;
import
{
TABLEENUM
}
from
"../../../data/models/model"
;
import
{
TABLEENUM
}
from
"../../../data/models/model"
;
import
{
find
,
find
Onc
e
}
from
"../../../data/select"
;
import
{
find
,
find
Count
,
findOnce
,
findToPag
e
}
from
"../../../data/select"
;
import
{
updateOneData
}
from
"../../../data/update"
;
import
{
updateOneData
}
from
"../../../data/update"
;
import
{
generateSystemId
,
successResult
}
from
"../../../tools/system"
;
import
{
generateSystemId
,
successResult
}
from
"../../../tools/system"
;
import
{
BizError
}
from
"../../../util/bizError"
;
import
{
BizError
}
from
"../../../util/bizError"
;
...
@@ -52,10 +52,11 @@ export async function del({userId, id}) {
...
@@ -52,10 +52,11 @@ export async function del({userId, id}) {
}
}
export
async
function
list
({
userId
,
desc
})
{
export
async
function
list
({
userId
,
desc
,
pageNumber
})
{
let
selectParam
:
any
=
{};
let
selectParam
:
any
=
{};
if
(
desc
)
selectParam
.
desc
=
{
"$regex"
:
desc
}
if
(
desc
)
selectParam
.
desc
=
{
"$regex"
:
desc
}
let
dbList
=
await
find
(
TABLEENUM
.
项目公告
,
selectParam
);
let
dbList
=
await
findToPage
(
TABLEENUM
.
项目公告
,
selectParam
,
[
"id"
,
"name"
,
"st"
,
"addrest"
,
"members"
,
"push"
,
"desc"
]
,
pageNumber
);
let
dataCount
=
await
findCount
(
TABLEENUM
.
项目公告
,
selectParam
);
let
dataList
=
[];
let
dataList
=
[];
dbList
.
forEach
(
info
=>
{
dbList
.
forEach
(
info
=>
{
let
item
=
extractData
(
info
,
[
"id"
,
"name"
,
"st"
,
"addrest"
,
"members"
,
"push"
,
"desc"
]);
let
item
=
extractData
(
info
,
[
"id"
,
"name"
,
"st"
,
"addrest"
,
"members"
,
"push"
,
"desc"
]);
...
@@ -64,7 +65,7 @@ export async function list({userId, desc}) {
...
@@ -64,7 +65,7 @@ export async function list({userId, desc}) {
dataList
.
sort
((
a
,
b
)
=>
{
return
a
.
rank
-
b
.
rank
});
dataList
.
sort
((
a
,
b
)
=>
{
return
a
.
rank
-
b
.
rank
});
return
dataList
;
return
{
dataList
,
dataCount
}
;
}
}
/**
/**
...
...
src/biz/portal/xueHui/xueHuiLingDao.ts
View file @
22c214ef
...
@@ -7,7 +7,7 @@ import { ERRORENUM } from "../../../config/errorEnum";
...
@@ -7,7 +7,7 @@ import { ERRORENUM } from "../../../config/errorEnum";
import
{
addOneData
}
from
"../../../data/add"
;
import
{
addOneData
}
from
"../../../data/add"
;
import
{
deleteOneData
}
from
"../../../data/delete"
;
import
{
deleteOneData
}
from
"../../../data/delete"
;
import
{
TABLEENUM
}
from
"../../../data/models/model"
;
import
{
TABLEENUM
}
from
"../../../data/models/model"
;
import
{
find
,
find
Onc
e
}
from
"../../../data/select"
;
import
{
find
,
find
Count
,
findOnce
,
findToPag
e
}
from
"../../../data/select"
;
import
{
updateOneData
}
from
"../../../data/update"
;
import
{
updateOneData
}
from
"../../../data/update"
;
import
{
generateSystemId
,
successResult
}
from
"../../../tools/system"
;
import
{
generateSystemId
,
successResult
}
from
"../../../tools/system"
;
import
{
BizError
}
from
"../../../util/bizError"
;
import
{
BizError
}
from
"../../../util/bizError"
;
...
@@ -67,9 +67,9 @@ export async function del(secureArgs:any) {
...
@@ -67,9 +67,9 @@ export async function del(secureArgs:any) {
}
}
export
async
function
list
()
{
export
async
function
list
(
{
pageNumber
}
)
{
let
dbList
=
await
find
(
TABLEENUM
.
学会领导
,
{}
);
let
dbList
=
await
find
ToPage
(
TABLEENUM
.
学会领导
,
{},
[
"id"
,
"rank"
,
"name"
,
"position"
,
"desc"
],
pageNumber
);
let
dataCount
=
await
findCount
(
TABLEENUM
.
活动通知
,
{});
let
dataList
=
[];
let
dataList
=
[];
dbList
.
forEach
(
info
=>
{
dbList
.
forEach
(
info
=>
{
let
item
=
extractData
(
info
,
[
"id"
,
"rank"
,
"name"
,
"position"
,
"desc"
]);
let
item
=
extractData
(
info
,
[
"id"
,
"rank"
,
"name"
,
"position"
,
"desc"
]);
...
@@ -78,7 +78,7 @@ export async function list() {
...
@@ -78,7 +78,7 @@ export async function list() {
dataList
.
sort
((
a
,
b
)
=>
{
return
a
.
rank
-
b
.
rank
});
dataList
.
sort
((
a
,
b
)
=>
{
return
a
.
rank
-
b
.
rank
});
return
{
dataList
};
return
{
dataList
,
dataCount
};
}
}
...
...
src/config/enum.ts
View file @
22c214ef
...
@@ -29,11 +29,12 @@ export enum PARTYBUILDSUBTYPEENUM {
...
@@ -29,11 +29,12 @@ export enum PARTYBUILDSUBTYPEENUM {
* 动态资讯子栏目
* 动态资讯子栏目
*/
*/
export
enum
DONGTAIZIXUNSUBTYPE
{
export
enum
DONGTAIZIXUNSUBTYPE
{
政策动向
=
3
,
政策动向
=
1
,
学会动态
,
学会动态
,
行业风采
行业风采
}
}
/**
/**
* 资料类型
* 资料类型
*/
*/
...
@@ -123,10 +124,10 @@ export enum BANNERPOSITION {
...
@@ -123,10 +124,10 @@ export enum BANNERPOSITION {
* 内容管理文章位置
* 内容管理文章位置
*/
*/
export
enum
ARTICLEPOSITION
{
export
enum
ARTICLEPOSITION
{
学会概况
_hgh
学会规章
=
1
,
动态资讯
_hgh
政策动向
=
1
,
动态资讯
_hgh
政策动向
,
动态资讯
_hgh
学会动态
,
动态资讯
_hgh
学会动态
,
动态资讯
_hgh
行业风采
,
动态资讯
_hgh
行业风采
,
学会概况
_hgh
学会规章
,
品牌项目
_hgh
乡村振兴
,
品牌项目
_hgh
乡村振兴
,
品牌项目
_hgh
学术研究
,
品牌项目
_hgh
学术研究
,
品牌项目
_hgh
芳华杯
,
品牌项目
_hgh
芳华杯
,
...
@@ -144,6 +145,12 @@ export enum VIDEOPOSITION {
...
@@ -144,6 +145,12 @@ export enum VIDEOPOSITION {
党建工作
_hgh
学习交流
党建工作
_hgh
学习交流
}
}
export
enum
DANGJIANVIDEO
{
主题教育
=
2
,
工作动态
,
学习交流
}
export
enum
YEARENUM
{
export
enum
YEARENUM
{
_kbh2024
=
2024
,
_kbh2024
=
2024
,
_kbh2023
=
2023
,
_kbh2023
=
2023
,
...
@@ -257,6 +264,14 @@ export enum COMMITTEEMEMBER {
...
@@ -257,6 +264,14 @@ export enum COMMITTEEMEMBER {
委员
3
委员
3
}
}
/**
* 分会职务
*/
export
enum
BRANCHPOSITION
{
主任
=
1
,
成员
}
/**
/**
* 单位信息类型
* 单位信息类型
...
@@ -359,3 +374,31 @@ export enum ORDERSTATE {
...
@@ -359,3 +374,31 @@ export enum ORDERSTATE {
未支付
=
1
,
未支付
=
1
,
}
}
/**
* 会费类别
*/
export
enum
COSTTYPE
{
首次
=
1
,
续费
}
export
enum
ISPAYENUM
{
全部
=
0
,
已支付
=
1
,
未支付
}
export
enum
INVOICESTATUS
{
未开发票
=
1
,
已开发票
}
/**
* 支付方式
*/
export
enum
PAYMENTTYPE
{
微信支付
=
1
,
银行转账
,
线下支付
}
src/data/models/model.ts
View file @
22c214ef
...
@@ -212,7 +212,8 @@ const ModelArray = [
...
@@ -212,7 +212,8 @@ const ModelArray = [
videoTime
:
'Number'
,
//video时间
videoTime
:
'Number'
,
//video时间
desc
:
'String'
,
//说明
desc
:
'String'
,
//说明
display
:{
type
:
'Number'
,
default
:
0
},
//是否显示 使用是否的枚举
display
:{
type
:
'Number'
,
default
:
0
},
//是否显示 使用是否的枚举
ct
:
'Number'
ct
:
'Number'
,
coverUrl
:
'String'
,
//封面图片
}
}
},
},
{
{
...
@@ -235,11 +236,11 @@ const ModelArray = [
...
@@ -235,11 +236,11 @@ const ModelArray = [
schema
:{
schema
:{
id
:{
type
:
'String'
,
index
:
true
},
id
:{
type
:
'String'
,
index
:
true
},
name
:
'String'
,
//机构名称
name
:
'String'
,
//机构名称
awardsCount
:
'Number'
,
//获奖数量
desc
:
'String'
,
//内容
desc
:
'String'
,
//内容
createTime
:
'Number'
,
//成立时间
rank
:
'Number'
,
rank
:
'Number'
,
logoUrl
:
'String'
,
logoUrl
:
'String'
,
ct
:
'Number'
ct
:
'Number'
,
}
}
},
},
{
{
...
@@ -337,7 +338,7 @@ const ModelArray = [
...
@@ -337,7 +338,7 @@ const ModelArray = [
pwd
:{
type
:
'String'
},
//密码
pwd
:{
type
:
'String'
},
//密码
token
:{
type
:
'String'
,
default
:
''
},
//token
token
:{
type
:
'String'
,
default
:
''
},
//token
tokenMs
:{
type
:
'Number'
,
default
:
0
},
//token过期时间
tokenMs
:{
type
:
'Number'
,
default
:
0
},
//token过期时间
phone
:{
type
:
'String'
,
index
:
true
},
phone
:{
type
:
'String'
,
index
:
true
},
//登陆手机号
mail
:{
type
:
'String'
,
index
:
true
},
mail
:{
type
:
'String'
,
index
:
true
},
sex
:
'Number'
,
//性别 枚举
sex
:
'Number'
,
//性别 枚举
documentType
:
'Number'
,
//证件类型 枚举
documentType
:
'Number'
,
//证件类型 枚举
...
@@ -429,17 +430,18 @@ const ModelArray = [
...
@@ -429,17 +430,18 @@ const ModelArray = [
unitName
:
'String'
,
//单位名称
unitName
:
'String'
,
//单位名称
orderCycleStart
:
'Number'
,
//订单周期开始时间
orderCycleStart
:
'Number'
,
//订单周期开始时间
orderCycleEnd
:
'Number'
,
//订单周期结束时间
orderCycleEnd
:
'Number'
,
//订单周期结束时间
money
:
'String'
,
//金额
money
:
'String'
,
//金额
paymentMethod
:
'Number'
,
//付款方式 枚举
paymentMethod
:
'Number'
,
//付款方式 枚举
PAYMENTTYPE
memberId
:
'String'
,
//会员id
memberId
:
'String'
,
//会员id
loginId
:
'String'
,
//登陆名
loginId
:
'String'
,
//登陆名
phone
:
"String"
,
//登陆手机号
memberCategory
:
'Number'
,
//会员类别 枚举
memberCategory
:
'Number'
,
//会员类别 枚举
paymentNum
:
'String'
,
//支付单号(与订单号不一样)
paymentNum
:
'String'
,
//支付单号(与订单号不一样)
// membershipFeesType:'Number',//会费类别 枚举
// membershipFeesType:'Number',//会费类别 枚举
invoiceAdd
:
'String'
,
//发票图片地址
invoiceAdd
:
'String'
,
//发票图片地址
state
:
'Number'
,
//状态 枚举
state
:
'Number'
,
//状态 枚举
isFirst
:{
type
:
'Boolean'
,
default
:
true
},
//首次订单
isFirst
:{
type
:
'Boolean'
,
default
:
true
},
//首次订单
invoiceStatus
:{
type
:
'Number'
,
index
:
true
},
//发票状态
}
}
},
},
];
];
...
...
src/routers/officalWebsite/router.ts
View file @
22c214ef
...
@@ -66,6 +66,14 @@ export const Config = {
...
@@ -66,6 +66,14 @@ export const Config = {
{
key
:
"id"
,
type
:
"String"
,
desc
:
"动态资讯列表中的标识"
},
{
key
:
"id"
,
type
:
"String"
,
desc
:
"动态资讯列表中的标识"
},
],
],
bindBiz
:
officialWebsiteBiz
.
wenZhangXiangQing
bindBiz
:
officialWebsiteBiz
.
wenZhangXiangQing
},
{
apiName
:
"热门排行"
,
subUrl
:
'/remenpaihang'
,
param
:[
{
key
:
"type"
,
type
:
"Number"
,
desc
:
"类型"
}
],
bindBiz
:
officialWebsiteBiz
.
reMenPaiHang
}
}
],
],
"品牌项目"
:[
"品牌项目"
:[
...
@@ -106,12 +114,20 @@ export const Config = {
...
@@ -106,12 +114,20 @@ export const Config = {
bindBiz
:
officialWebsiteBiz
.
zhuTiJiaoYu
bindBiz
:
officialWebsiteBiz
.
zhuTiJiaoYu
},
},
{
{
apiName
:
"学习园地"
,
apiName
:
"学习园地
-视频资料
"
,
subUrl
:
'/xuexiyuandi'
,
subUrl
:
'/xuexiyuandi
shipin
'
,
param
:[
param
:[
{
key
:
"type"
,
type
:
"Number"
,
desc
:
"类型"
}
{
key
:
"type"
,
type
:
"Number"
,
desc
:
"类型"
}
],
],
bindBiz
:
officialWebsiteBiz
.
xueXiYuanDi
bindBiz
:
officialWebsiteBiz
.
xueXiYuanDiShiPin
},
{
apiName
:
"学习园地-文字资料"
,
subUrl
:
'/xuexiyuandiwenzi'
,
param
:[
{
key
:
"type"
,
type
:
"Number"
,
desc
:
"类型"
}
],
bindBiz
:
officialWebsiteBiz
.
xueXiYuanDiWenZi
},
},
{
{
apiName
:
"党建资源列表"
,
apiName
:
"党建资源列表"
,
...
@@ -124,6 +140,18 @@ export const Config = {
...
@@ -124,6 +140,18 @@ export const Config = {
],
],
bindBiz
:
officialWebsiteBiz
.
dangJianZiYuan
bindBiz
:
officialWebsiteBiz
.
dangJianZiYuan
},
},
{
apiName
:
"学习园地-文字资料类型"
,
subUrl
:
'/xuexiyuandiwenzitype'
,
param
:[],
bindBiz
:
officialWebsiteBiz
.
xueXiYuanDiWenZiType
},
{
apiName
:
"学习园地-视频资料类型"
,
subUrl
:
'/xuexiyuandishipintype'
,
param
:[],
bindBiz
:
officialWebsiteBiz
.
xueXiYuanDiShiPinType
}
],
],
"通知公告"
:[
"通知公告"
:[
{
{
...
@@ -135,5 +163,42 @@ export const Config = {
...
@@ -135,5 +163,42 @@ export const Config = {
],
],
bindBiz
:
officialWebsiteBiz
.
tongZhiGongGao
bindBiz
:
officialWebsiteBiz
.
tongZhiGongGao
},
},
{
apiName
:
"通知公告详情"
,
subUrl
:
'/tongzhigonggaoinfo'
,
param
:[
{
key
:
"type"
,
type
:
"Number"
,
desc
:
"类型 参考公用组件"
},
{
key
:
"id"
,
type
:
"String"
,
desc
:
"标识"
}
],
bindBiz
:
officialWebsiteBiz
.
tongZhiGongGaoInfo
},
],
"分支机构"
:[
{
apiName
:
"机构列表"
,
subUrl
:
'/fenzhijigoulist'
,
param
:[],
bindBiz
:
officialWebsiteBiz
.
fenZhiJiGou
},
{
apiName
:
"分会动态"
,
subUrl
:
'/fenhuidongtai'
,
param
:[
{
key
:
"pageNumber"
,
type
:
"Number"
,
desc
:
"当前页数"
},
{
key
:
"agencyId"
,
type
:
"String"
,
desc
:
"分会id 不填就是全部"
,
isNull
:
true
}
],
bindBiz
:
officialWebsiteBiz
.
fenHuiDongTai
},
{
apiName
:
"分会详情"
,
subUrl
:
'/fenhuixiangqing'
,
param
:[
{
key
:
"id"
,
type
:
"String"
,
desc
:
"分会id"
}
],
bindBiz
:
officialWebsiteBiz
.
fenHuiDongTaiInfo
}
],
],
}
}
\ No newline at end of file
src/routers/portal/router.ts
View file @
22c214ef
...
@@ -112,7 +112,9 @@ export const Config = {
...
@@ -112,7 +112,9 @@ export const Config = {
{
{
apiName
:
"学会领导列表"
,
apiName
:
"学会领导列表"
,
subUrl
:
'/xuehui/xuehuilingdao/list'
,
subUrl
:
'/xuehui/xuehuilingdao/list'
,
param
:[],
param
:[
{
key
:
"pageNumber"
,
type
:
"Number"
,
desc
:
"当前页数"
}
],
bindBiz
:
xueHuiLingDaoBiz
.
list
bindBiz
:
xueHuiLingDaoBiz
.
list
},
},
{
{
...
@@ -343,7 +345,7 @@ export const Config = {
...
@@ -343,7 +345,7 @@ export const Config = {
{
key
:
"form"
,
type
:
"Object"
,
sub
:
{
key
:
"form"
,
type
:
"Object"
,
sub
:
{
{
name
:{
type
:
'String'
,
desc
:
"名称"
},
name
:{
type
:
'String'
,
desc
:
"名称"
},
awardsCount
:{
type
:
'Number'
,
desc
:
"荣誉数量
"
},
createTime
:{
type
:
'Number'
,
desc
:
"创立时间
"
},
desc
:{
type
:
'String'
,
desc
:
"描述"
},
desc
:{
type
:
'String'
,
desc
:
"描述"
},
rank
:{
type
:
'Number'
,
desc
:
"排序"
},
rank
:{
type
:
'Number'
,
desc
:
"排序"
},
logoUrl
:{
type
:
'String'
,
desc
:
"logo图片地址"
}
logoUrl
:{
type
:
'String'
,
desc
:
"logo图片地址"
}
...
@@ -360,7 +362,7 @@ export const Config = {
...
@@ -360,7 +362,7 @@ export const Config = {
{
key
:
"form"
,
type
:
"Object"
,
sub
:
{
key
:
"form"
,
type
:
"Object"
,
sub
:
{
{
name
:{
type
:
'String'
,
desc
:
"名称"
},
name
:{
type
:
'String'
,
desc
:
"名称"
},
awardsCount
:{
type
:
'Number'
,
desc
:
"荣誉数量
"
},
createTime
:{
type
:
'Number'
,
desc
:
"创立时间
"
},
desc
:{
type
:
'String'
,
desc
:
"描述"
},
desc
:{
type
:
'String'
,
desc
:
"描述"
},
rank
:{
type
:
'Number'
,
desc
:
"排序"
},
rank
:{
type
:
'Number'
,
desc
:
"排序"
},
logoUrl
:{
type
:
'String'
,
desc
:
"logo图片地址"
}
logoUrl
:{
type
:
'String'
,
desc
:
"logo图片地址"
}
...
@@ -382,7 +384,9 @@ export const Config = {
...
@@ -382,7 +384,9 @@ export const Config = {
{
{
apiName
:
"列表"
,
apiName
:
"列表"
,
subUrl
:
'/fenzhijigou/jigouguanli/list'
,
subUrl
:
'/fenzhijigou/jigouguanli/list'
,
param
:[],
param
:[
{
key
:
"pageNumber"
,
type
:
"Number"
,
desc
:
"当前页"
}
],
bindBiz
:
jiGouGuanLiBiz
.
list
bindBiz
:
jiGouGuanLiBiz
.
list
},
},
{
{
...
@@ -444,7 +448,8 @@ export const Config = {
...
@@ -444,7 +448,8 @@ export const Config = {
apiName
:
"列表"
,
apiName
:
"列表"
,
subUrl
:
'/tongzhigonggao/huiyitongzhi/list'
,
subUrl
:
'/tongzhigonggao/huiyitongzhi/list'
,
param
:[
param
:[
{
key
:
"desc"
,
type
:
"String"
,
desc
:
"内容关键字"
}
{
key
:
"desc"
,
type
:
"String"
,
desc
:
"内容关键字"
},
{
key
:
"pageNumber"
,
type
:
"Number"
,
desc
:
"当前页面"
}
],
],
bindBiz
:
huiYiTongZhiBiz
.
list
bindBiz
:
huiYiTongZhiBiz
.
list
},
},
...
@@ -515,7 +520,8 @@ export const Config = {
...
@@ -515,7 +520,8 @@ export const Config = {
apiName
:
"列表"
,
apiName
:
"列表"
,
subUrl
:
'/tongzhigonggao/huodongtongzhi/list'
,
subUrl
:
'/tongzhigonggao/huodongtongzhi/list'
,
param
:[
param
:[
{
key
:
"desc"
,
type
:
"String"
,
desc
:
"内容关键字"
}
{
key
:
"desc"
,
type
:
"String"
,
desc
:
"内容关键字"
},
{
key
:
"pageNumber"
,
type
:
"Number"
,
desc
:
"当前页面"
}
],
],
bindBiz
:
huoDongTongZhiBiz
.
list
bindBiz
:
huoDongTongZhiBiz
.
list
},
},
...
@@ -586,7 +592,8 @@ export const Config = {
...
@@ -586,7 +592,8 @@ export const Config = {
apiName
:
"列表"
,
apiName
:
"列表"
,
subUrl
:
'/tongzhigonggao/xiangmugonggao/list'
,
subUrl
:
'/tongzhigonggao/xiangmugonggao/list'
,
param
:[
param
:[
{
key
:
"desc"
,
type
:
"String"
,
desc
:
"内容关键字"
}
{
key
:
"desc"
,
type
:
"String"
,
desc
:
"内容关键字"
},
{
key
:
"pageNumber"
,
type
:
"Number"
,
desc
:
"当前页面"
}
],
],
bindBiz
:
xiangMuGongGaoBiz
.
list
bindBiz
:
xiangMuGongGaoBiz
.
list
},
},
...
@@ -657,7 +664,7 @@ export const Config = {
...
@@ -657,7 +664,7 @@ export const Config = {
apiName
:
"列表"
,
apiName
:
"列表"
,
subUrl
:
'/neirongguanLi/bannerguanli/list'
,
subUrl
:
'/neirongguanLi/bannerguanli/list'
,
param
:[
param
:[
{
key
:
"
title"
,
type
:
"String"
,
desc
:
"内容关键字"
,
isNull
:
true
}
{
key
:
"
pageNumber"
,
type
:
"Number"
,
desc
:
"当前页面数"
}
],
],
bindBiz
:
bannerGuanLiBiz
.
list
bindBiz
:
bannerGuanLiBiz
.
list
},
},
...
@@ -689,7 +696,8 @@ export const Config = {
...
@@ -689,7 +696,8 @@ export const Config = {
videoType
:{
type
:
'Number'
,
desc
:
"分类"
},
videoType
:{
type
:
'Number'
,
desc
:
"分类"
},
videoUrl
:{
type
:
'[String]'
,
desc
:
"图片地址"
},
videoUrl
:{
type
:
'[String]'
,
desc
:
"图片地址"
},
videoTime
:{
type
:
'Number'
,
desc
:
"创建"
},
videoTime
:{
type
:
'Number'
,
desc
:
"创建"
},
desc
:{
type
:
'String'
,
desc
:
"说明"
}
desc
:{
type
:
'String'
,
desc
:
"说明"
},
coverUrl
:{
type
:
'String'
,
desc
:
"封面图片地址"
}
},
},
desc
:
"表单"
desc
:
"表单"
}
}
...
@@ -706,6 +714,7 @@ export const Config = {
...
@@ -706,6 +714,7 @@ export const Config = {
videoType
:{
type
:
'Number'
,
desc
:
"分类"
},
videoType
:{
type
:
'Number'
,
desc
:
"分类"
},
videoUrl
:{
type
:
'[String]'
,
desc
:
"图片地址"
},
videoUrl
:{
type
:
'[String]'
,
desc
:
"图片地址"
},
videoTime
:{
type
:
'Number'
,
desc
:
"创建"
},
videoTime
:{
type
:
'Number'
,
desc
:
"创建"
},
coverUrl
:{
type
:
'String'
,
desc
:
"封面图片地址"
},
desc
:{
type
:
'String'
,
desc
:
"说明"
}
desc
:{
type
:
'String'
,
desc
:
"说明"
}
},
},
desc
:
"表单"
desc
:
"表单"
...
@@ -729,6 +738,7 @@ export const Config = {
...
@@ -729,6 +738,7 @@ export const Config = {
{
key
:
"videoType"
,
type
:
"Number"
,
desc
:
"分类"
,
isNull
:
true
},
{
key
:
"videoType"
,
type
:
"Number"
,
desc
:
"分类"
,
isNull
:
true
},
{
key
:
"title"
,
type
:
"String"
,
desc
:
"内容关键字"
,
isNull
:
true
},
{
key
:
"title"
,
type
:
"String"
,
desc
:
"内容关键字"
,
isNull
:
true
},
{
key
:
"videoTime"
,
type
:
"Number"
,
desc
:
"创建时间"
,
isNull
:
true
},
{
key
:
"videoTime"
,
type
:
"Number"
,
desc
:
"创建时间"
,
isNull
:
true
},
{
key
:
"pageNumber"
,
type
:
"Number"
,
desc
:
"当前页面数"
}
],
],
bindBiz
:
shiPinGuanLiBiz
.
list
bindBiz
:
shiPinGuanLiBiz
.
list
},
},
...
@@ -800,6 +810,7 @@ export const Config = {
...
@@ -800,6 +810,7 @@ export const Config = {
{
key
:
"articleType"
,
type
:
"Number"
,
desc
:
"分类"
,
isNull
:
true
},
{
key
:
"articleType"
,
type
:
"Number"
,
desc
:
"分类"
,
isNull
:
true
},
{
key
:
"title"
,
type
:
"String"
,
desc
:
"内容关键字"
,
isNull
:
true
},
{
key
:
"title"
,
type
:
"String"
,
desc
:
"内容关键字"
,
isNull
:
true
},
{
key
:
"articleTime"
,
type
:
"Number"
,
desc
:
"创建时间"
,
isNull
:
true
},
{
key
:
"articleTime"
,
type
:
"Number"
,
desc
:
"创建时间"
,
isNull
:
true
},
{
key
:
"pageNumber"
,
type
:
"Number"
,
desc
:
"当前页面数"
}
],
],
bindBiz
:
wenZhangGuanLiBiz
.
list
bindBiz
:
wenZhangGuanLiBiz
.
list
},
},
...
@@ -934,7 +945,8 @@ export const Config = {
...
@@ -934,7 +945,8 @@ export const Config = {
apiName
:
"列表"
,
apiName
:
"列表"
,
subUrl
:
'/fenzhijigou/jigouguanli/gongzuodongtai/list'
,
subUrl
:
'/fenzhijigou/jigouguanli/gongzuodongtai/list'
,
param
:[
param
:[
{
key
:
"agencyId"
,
type
:
"String"
,
desc
:
"机构id"
}
{
key
:
"agencyId"
,
type
:
"String"
,
desc
:
"机构id"
},
{
key
:
"pageNumber"
,
type
:
"Number"
,
desc
:
"当前页面"
}
],
],
bindBiz
:
gongZuoDongTaiBiz
.
list
bindBiz
:
gongZuoDongTaiBiz
.
list
},
},
...
@@ -1005,7 +1017,8 @@ export const Config = {
...
@@ -1005,7 +1017,8 @@ export const Config = {
apiName
:
"列表"
,
apiName
:
"列表"
,
subUrl
:
'/fenzhijigou/jigouguanli/weiyuanmingdan/list'
,
subUrl
:
'/fenzhijigou/jigouguanli/weiyuanmingdan/list'
,
param
:[
param
:[
{
key
:
"agencyId"
,
type
:
"String"
,
desc
:
"机构id"
}
{
key
:
"agencyId"
,
type
:
"String"
,
desc
:
"机构id"
},
{
key
:
"pageNumber"
,
type
:
"Number"
,
desc
:
"当前页面"
}
],
],
bindBiz
:
weiYuanMingDanBiz
.
list
bindBiz
:
weiYuanMingDanBiz
.
list
},
},
...
@@ -1065,7 +1078,8 @@ export const Config = {
...
@@ -1065,7 +1078,8 @@ export const Config = {
apiName
:
"列表"
,
apiName
:
"列表"
,
subUrl
:
'/fenzhijigou/jigouguanli/xiazaizhuanqu/list'
,
subUrl
:
'/fenzhijigou/jigouguanli/xiazaizhuanqu/list'
,
param
:[
param
:[
{
key
:
"agencyId"
,
type
:
"String"
,
desc
:
"机构id"
}
{
key
:
"agencyId"
,
type
:
"String"
,
desc
:
"机构id"
},
{
key
:
"pageNumber"
,
type
:
"Number"
,
desc
:
"当前页面"
}
],
],
bindBiz
:
xiaZaiZhuanQuBiz
.
list
bindBiz
:
xiaZaiZhuanQuBiz
.
list
},
},
...
...
src/routers/public/router.ts
View file @
22c214ef
...
@@ -80,9 +80,9 @@ export const Config = {
...
@@ -80,9 +80,9 @@ export const Config = {
},
},
{
{
apiName
:
"分委会职务"
,
apiName
:
"分委会职务"
,
subUrl
:
'/
committeemember
'
,
subUrl
:
'/
branchposition
'
,
param
:[],
param
:[],
bindBiz
:
setEnumInterface
(
enumConfig
.
COMMITTEEMEMBER
)
bindBiz
:
setEnumInterface
(
enumConfig
.
BRANCHPOSITION
)
},
},
{
{
apiName
:
"下载专区分类"
,
apiName
:
"下载专区分类"
,
...
@@ -90,6 +90,53 @@ export const Config = {
...
@@ -90,6 +90,53 @@ export const Config = {
param
:[],
param
:[],
bindBiz
:
setEnumInterface
(
enumConfig
.
DWTYPE
)
bindBiz
:
setEnumInterface
(
enumConfig
.
DWTYPE
)
},
},
{
apiName
:
"民族"
,
subUrl
:
'/nation'
,
param
:[],
bindBiz
:
setEnumInterface
(
enumConfig
.
NATION
)
},
{
apiName
:
"证件类型"
,
subUrl
:
'/documenttype'
,
param
:[],
bindBiz
:
setEnumInterface
(
enumConfig
.
DOCUMENTTYPE
)
},
{
apiName
:
"单位信息类型"
,
subUrl
:
'/unitinfotype'
,
param
:[],
bindBiz
:
setEnumInterface
(
enumConfig
.
UNITINFOTYPE
)
},
{
apiName
:
"动态资讯类型列表"
,
subUrl
:
'/dongtaizixuntype'
,
param
:[],
bindBiz
:
zhengCeZiXunLeiXing
()
},
{
apiName
:
"通知公告类型"
,
subUrl
:
'/tongzhigonggaotype'
,
param
:[],
bindBiz
:
setEnumInterface
(
enumConfig
.
TONGZHIGONGGAO
)
}
],
],
}
}
function
zhengCeZiXunLeiXing
()
{
let
conf
=
{};
conf
[
enumConfig
.
DONGTAIZIXUNSUBTYPE
.
政策动向
]
=
"Policy Tendence"
;
conf
[
enumConfig
.
DONGTAIZIXUNSUBTYPE
.
学会动态
]
=
"Assoclation dynamics"
;
conf
[
enumConfig
.
DONGTAIZIXUNSUBTYPE
.
行业风采
]
=
"Industry style"
;
let
dataList
=
[];
for
(
let
key
in
enumConfig
.
DONGTAIZIXUNSUBTYPE
)
{
let
anyKey
:
any
=
key
;
if
(
isNaN
(
anyKey
))
{
let
keyStr
=
key
;
let
value
=
enumConfig
.
DONGTAIZIXUNSUBTYPE
[
key
];
dataList
.
push
({
key
:
keyStr
,
value
,
keyEng
:
conf
[
value
]});
}
}
return
{
dataList
}
}
src/routers/router.ts
View file @
22c214ef
...
@@ -14,7 +14,7 @@ import * as memberRouter from "./member/router";
...
@@ -14,7 +14,7 @@ import * as memberRouter from "./member/router";
import
*
as
officalWebsiteRouter
from
"./officalWebsite/router"
;
import
*
as
officalWebsiteRouter
from
"./officalWebsite/router"
;
import
*
as
asyncHandler
from
'express-async-handler'
;
import
*
as
asyncHandler
from
'express-async-handler'
;
const
Look
=
fals
e
;
//true更新文档
const
Look
=
tru
e
;
//true更新文档
export
async
function
setRouter
(
httpServer
){
export
async
function
setRouter
(
httpServer
){
if
(
Look
)
{
if
(
Look
)
{
...
@@ -30,7 +30,6 @@ export async function setRouter(httpServer){
...
@@ -30,7 +30,6 @@ export async function setRouter(httpServer){
await
analysisRouter
(
httpServer
,
officalWebsiteRouter
.
Config
,
officalWebsiteRouter
.
FirstRouter
);
//官网路由
await
analysisRouter
(
httpServer
,
officalWebsiteRouter
.
Config
,
officalWebsiteRouter
.
FirstRouter
);
//官网路由
}
}
async
function
analysisRouter
(
httpServer
,
config
,
firstRouter
)
{
async
function
analysisRouter
(
httpServer
,
config
,
firstRouter
)
{
for
(
let
modelKey
in
config
)
{
for
(
let
modelKey
in
config
)
{
config
[
modelKey
].
forEach
(
info
=>
{
config
[
modelKey
].
forEach
(
info
=>
{
...
@@ -60,7 +59,6 @@ async function analysisRouter(httpServer, config, firstRouter) {
...
@@ -60,7 +59,6 @@ async function analysisRouter(httpServer, config, firstRouter) {
eccFormParam
(
apiName
,
item
.
sub
,
req
.
body
[
item
.
key
]);
eccFormParam
(
apiName
,
item
.
sub
,
req
.
body
[
item
.
key
]);
funcParam
[
item
.
key
]
=
req
.
body
[
item
.
key
];
funcParam
[
item
.
key
]
=
req
.
body
[
item
.
key
];
});
});
}
}
if
(
Object
.
keys
(
checkStringMap
).
length
)
{
if
(
Object
.
keys
(
checkStringMap
).
length
)
{
let
eccResult
=
eccReqParamater
(
apiName
,
checkStringMap
,
req
.
body
,
stringNotMustHaveKeys
);
let
eccResult
=
eccReqParamater
(
apiName
,
checkStringMap
,
req
.
body
,
stringNotMustHaveKeys
);
...
@@ -78,4 +76,5 @@ async function analysisRouter(httpServer, config, firstRouter) {
...
@@ -78,4 +76,5 @@ async function analysisRouter(httpServer, config, firstRouter) {
});
});
}
}
}
}
\ No newline at end of file
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