Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
Z
zjxcxServer
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
zjxcxServer
Commits
3f3c0f7f
Commit
3f3c0f7f
authored
May 18, 2023
by
lixinming
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
优化router结构
parent
549887c0
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
183 additions
and
169 deletions
+183
-169
user.ts
src/biz/admin/user.ts
+4
-4
user.ts
src/routers/admin/user.ts
+1
-1
enterprise.ts
src/routers/mobileClient/enterprise.ts
+0
-164
myEnterprise.ts
src/routers/mobileClient/myEnterprise.ts
+176
-0
router.ts
src/routers/router.ts
+2
-0
No files found.
src/biz/admin/
guanWeiHui/
user.ts
→
src/biz/admin/user.ts
View file @
3f3c0f7f
...
...
@@ -5,10 +5,10 @@
* 预留好 重置密码 退出登录 接口
*/
import
{
ERRORENUM
}
from
"../../
../
config/errorEnum"
;
import
{
findGuanWeiHuiUserInfoByLoginId
}
from
"../../
../
data/guanWeiHui/guanweihui"
;
import
{
BizError
}
from
"../../
../
util/bizError"
;
import
{
getPwdMd5
,
getToken
}
from
"../../
../
tools/system"
;
import
{
ERRORENUM
}
from
"../../config/errorEnum"
;
import
{
findGuanWeiHuiUserInfoByLoginId
}
from
"../../data/guanWeiHui/guanweihui"
;
import
{
BizError
}
from
"../../util/bizError"
;
import
{
getPwdMd5
,
getToken
}
from
"../../tools/system"
;
/**
...
...
src/routers/admin/user.ts
View file @
3f3c0f7f
...
...
@@ -2,7 +2,7 @@
* 管理后台端 管委会相关
*/
import
*
as
guanWeiHuiBiz
from
'../../biz/admin/
guanWeiHui/
user'
;
import
*
as
guanWeiHuiBiz
from
'../../biz/admin/user'
;
import
*
as
asyncHandler
from
'express-async-handler'
;
import
{
eccReqParamater
}
from
'../../util/verificationParam'
;
...
...
src/routers/mobileClient/enterprise.ts
View file @
3f3c0f7f
...
...
@@ -4,11 +4,9 @@
import
*
as
asyncHandler
from
'express-async-handler'
;
import
*
as
enterpriseBiz
from
'../../biz/mobileFuHuaQi/enterprise/enterprise'
;
import
*
as
myEnterpriseBiz
from
'../../biz/mobileFuHuaQi/enterprise/myEnterprise'
;
import
*
as
toExamineBiz
from
'../../biz/mobileFuHuaQi/enterprise/toExamine'
;
import
{
checkFuHuaQiToken
}
from
'../../middleware/user'
;
import
{
eccReqParamater
}
from
'../../util/verificationParam'
;
import
{
FUHUASTATE
}
from
'../../config/enum'
;
export
function
setRouter
(
httpServer
)
{
/**新注册企业 或 新迁入企业 */
...
...
@@ -18,19 +16,6 @@ export function setRouter(httpServer) {
httpServer
.
post
(
'/fuhuaqi/enterprise/updatemove'
,
checkFuHuaQiToken
,
asyncHandler
(
updateMoveInEnterprise
));
httpServer
.
post
(
'/fuhuaqi/enterprise/select'
,
checkFuHuaQiToken
,
asyncHandler
(
selectEnterpriseInfo
));
httpServer
.
post
(
'/fuhuaqi/enterprise/delete'
,
checkFuHuaQiToken
,
asyncHandler
(
delEnterpriseInfo
));
/**我的企业 */
httpServer
.
post
(
'/fuhuaqi/myenterprise/list'
,
checkFuHuaQiToken
,
asyncHandler
(
myEnterpriseList
));
httpServer
.
post
(
'/fuhuaqi/myenterprise/moveoutlist'
,
checkFuHuaQiToken
,
asyncHandler
(
myEnterpriseMoveOutList
));
httpServer
.
post
(
'/fuhuaqi/myenterprise/info'
,
checkFuHuaQiToken
,
asyncHandler
(
myEnterpriseInfo
));
httpServer
.
post
(
'/fuhuaqi/myenterprise/update'
,
checkFuHuaQiToken
,
asyncHandler
(
updateMyEnterpriseInfo
));
httpServer
.
post
(
'/fuhuaqi/myenterprise/replenish/create'
,
checkFuHuaQiToken
,
asyncHandler
(
replenishCreate
));
httpServer
.
post
(
'/fuhuaqi/myenterprise/replenish/input'
,
checkFuHuaQiToken
,
asyncHandler
(
replenishInPut
));
/**我的企业 修改 */
httpServer
.
post
(
'/fuhuaqi/myenterprise/update/physical'
,
checkFuHuaQiToken
,
asyncHandler
(
updatePhysical
));
httpServer
.
post
(
'/fuhuaqi/myenterprise/update/virtual'
,
checkFuHuaQiToken
,
asyncHandler
(
updateVirtual
));
httpServer
.
post
(
'/fuhuaqi/myenterprise/update/moveout'
,
checkFuHuaQiToken
,
asyncHandler
(
updateMoveOut
));
/**我的企业信息 回显 */
// httpServer.post('/fuhuaqi/myenterprise//moveout', checkFuHuaQiToken, asyncHandler(updateMoveOut));
/**审核企业填报数据 */
httpServer
.
post
(
'/fuhuaqi/enterprise/examine/unaudited'
,
checkFuHuaQiToken
,
asyncHandler
(
unaudited
));
httpServer
.
post
(
'/fuhuaqi/enterprise/examine/auditcompleted'
,
checkFuHuaQiToken
,
asyncHandler
(
auditCompleted
));
...
...
@@ -138,155 +123,6 @@ async function delEnterpriseInfo(req, res) {
/**
* 我的企业列表
* 小程序端 2.0
* @param req
* @param res
*/
async
function
myEnterpriseList
(
req
,
res
)
{
let
reqConf
=
{
name
:
'String'
,
state
:
"Number"
,
page
:
"Number"
};
let
{
name
,
state
,
page
}
=
eccReqParamater
(
reqConf
,
req
.
body
,
[
"name"
]);
const
Uscc
=
req
.
headers
.
uscc
;
let
data
=
await
myEnterpriseBiz
.
myEnterprise
(
Uscc
,
state
,
name
,
page
);
res
.
success
(
data
);
}
/**
* 我的企业列表迁出列表
* 小程序端 2.0
* @param req
* @param res
*/
async
function
myEnterpriseMoveOutList
(
req
,
res
)
{
let
reqConf
=
{
name
:
'String'
,
page
:
"Number"
};
let
{
name
,
page
}
=
eccReqParamater
(
reqConf
,
req
.
body
,
[
"name"
]);
const
Uscc
=
req
.
headers
.
uscc
;
let
data
=
await
myEnterpriseBiz
.
myEnterprise
(
Uscc
,
FUHUASTATE
.
迁出
,
name
,
page
);
res
.
success
(
data
);
}
/**
* 企业基本信息
* 我的企业列表中的企业基本信息
* 回显
* 2.0
* @param req
* @param res
*/
async
function
myEnterpriseInfo
(
req
,
res
)
{
let
reqConf
=
{
uscc
:
'String'
};
let
{
uscc
}
=
eccReqParamater
(
reqConf
,
req
.
body
);
const
FuHuaQiUscc
=
req
.
headers
.
uscc
;
let
result
=
await
myEnterpriseBiz
.
getMyEnterpriseBaseInfo
(
FuHuaQiUscc
,
uscc
);
res
.
success
(
result
);
}
/**
* 修改企业孵化状态 修改为实体
* 2.0
* @param req
* @param res
*/
async
function
updatePhysical
(
req
,
res
)
{
let
reqConf
=
{
leasedArea
:
'Number'
,
uscc
:
"String"
};
let
{
leasedArea
,
uscc
}
=
await
eccReqParamater
(
reqConf
,
req
.
body
);
const
FuHuaQiUscc
=
req
.
headers
.
uscc
;
let
result
=
await
myEnterpriseBiz
.
updatePhysicalInfo
(
FuHuaQiUscc
,
uscc
,
leasedArea
);
res
.
success
(
result
);
}
/**
* 修改企业孵化状态 修改为虚拟
* 2.0
* @param req
* @param res
*/
async
function
updateVirtual
(
req
,
res
)
{
let
reqConf
=
{
virtualCause
:
'Number'
,
uscc
:
"String"
,
virtualCauseDes
:
"String"
};
let
{
virtualCause
,
uscc
,
virtualCauseDes
}
=
await
eccReqParamater
(
reqConf
,
req
.
body
,
[
"virtualCauseDes"
]);
const
FuHuaQiUscc
=
req
.
headers
.
uscc
;
let
result
=
await
myEnterpriseBiz
.
updateVirtualInfo
(
FuHuaQiUscc
,
uscc
,
virtualCauseDes
,
virtualCause
);
res
.
success
(
result
);
}
/**
* 修改企业孵化状态 修改为迁出
* 2.0
* @param req
* @param res
*/
async
function
updateMoveOut
(
req
,
res
)
{
let
reqConf
=
{
moveOutType
:
'Number'
,
uscc
:
"String"
,
moveOutTrace
:
"Number"
,
moveOutCause
:
"[Number]"
};
const
skipList
=
[
"moveOutTrace"
,
"moveOutCause"
];
let
{
moveOutType
,
uscc
,
moveOutCause
,
moveOutTrace
}
=
await
eccReqParamater
(
reqConf
,
req
.
body
,
skipList
);
const
FuHuaQiUscc
=
req
.
headers
.
uscc
;
let
result
=
await
myEnterpriseBiz
.
updateMoveOutInfo
(
FuHuaQiUscc
,
uscc
,
moveOutType
,
moveOutTrace
,
moveOutCause
);
res
.
success
(
result
);
}
/**
* 修改我的企业信息
* 2.0
* @param req
* @param res
*/
async
function
updateMyEnterpriseInfo
(
req
,
res
)
{
let
reqConf
=
{
form
:
'Object'
};
let
{
form
}
=
eccReqParamater
(
reqConf
,
req
.
body
);
const
Uscc
=
req
.
headers
.
uscc
;
let
result
=
await
myEnterpriseBiz
.
updateMyEnterpriseBaseInfo
(
Uscc
,
form
);
res
.
success
(
result
);
}
/**
* 补录 新注册企业信息
* 2.0
* @param req
* @param res
*/
async
function
replenishCreate
(
req
,
res
)
{
let
reqConf
=
{
form
:
'Object'
};
let
{
form
}
=
eccReqParamater
(
reqConf
,
req
.
body
);
const
Uscc
=
req
.
headers
.
uscc
;
let
result
=
await
myEnterpriseBiz
.
replenishMyEnterpriseCreateInfo
(
Uscc
,
form
);
res
.
success
(
result
);
}
/**
* 补录 新迁入企业信息
* 2.0
* @param req
* @param res
*/
async
function
replenishInPut
(
req
,
res
)
{
let
reqConf
=
{
form
:
'Object'
};
let
{
form
}
=
eccReqParamater
(
reqConf
,
req
.
body
);
const
Uscc
=
req
.
headers
.
uscc
;
let
result
=
await
myEnterpriseBiz
.
replenishMyEnterpriseInPutInfo
(
Uscc
,
form
);
res
.
success
(
result
);
}
/**
* 待审核企业数据
* 3.0
* @param req
...
...
src/routers/mobileClient/myEnterprise.ts
0 → 100644
View file @
3f3c0f7f
/**
* 小程序端 孵化器入口 企业相关路由
*/
import
*
as
asyncHandler
from
'express-async-handler'
;
import
*
as
myEnterpriseBiz
from
'../../biz/mobileFuHuaQi/enterprise/myEnterprise'
;
import
{
checkFuHuaQiToken
}
from
'../../middleware/user'
;
import
{
eccReqParamater
}
from
'../../util/verificationParam'
;
import
{
FUHUASTATE
}
from
'../../config/enum'
;
export
function
setRouter
(
httpServer
)
{
/**我的企业 */
httpServer
.
post
(
'/fuhuaqi/myenterprise/list'
,
checkFuHuaQiToken
,
asyncHandler
(
myEnterpriseList
));
httpServer
.
post
(
'/fuhuaqi/myenterprise/moveoutlist'
,
checkFuHuaQiToken
,
asyncHandler
(
myEnterpriseMoveOutList
));
httpServer
.
post
(
'/fuhuaqi/myenterprise/info'
,
checkFuHuaQiToken
,
asyncHandler
(
myEnterpriseInfo
));
httpServer
.
post
(
'/fuhuaqi/myenterprise/update'
,
checkFuHuaQiToken
,
asyncHandler
(
updateMyEnterpriseInfo
));
httpServer
.
post
(
'/fuhuaqi/myenterprise/replenish/create'
,
checkFuHuaQiToken
,
asyncHandler
(
replenishCreate
));
httpServer
.
post
(
'/fuhuaqi/myenterprise/replenish/input'
,
checkFuHuaQiToken
,
asyncHandler
(
replenishInPut
));
/**我的企业 修改 */
httpServer
.
post
(
'/fuhuaqi/myenterprise/update/physical'
,
checkFuHuaQiToken
,
asyncHandler
(
updatePhysical
));
httpServer
.
post
(
'/fuhuaqi/myenterprise/update/virtual'
,
checkFuHuaQiToken
,
asyncHandler
(
updateVirtual
));
httpServer
.
post
(
'/fuhuaqi/myenterprise/update/moveout'
,
checkFuHuaQiToken
,
asyncHandler
(
updateMoveOut
));
/**我的企业信息 回显 */
// httpServer.post('/fuhuaqi/myenterprise//moveout', checkFuHuaQiToken, asyncHandler(updateMoveOut));
}
/**
* 我的企业列表
* 小程序端 2.0
* @param req
* @param res
*/
async
function
myEnterpriseList
(
req
,
res
)
{
let
reqConf
=
{
name
:
'String'
,
state
:
"Number"
,
page
:
"Number"
};
let
{
name
,
state
,
page
}
=
eccReqParamater
(
reqConf
,
req
.
body
,
[
"name"
]);
const
Uscc
=
req
.
headers
.
uscc
;
let
data
=
await
myEnterpriseBiz
.
myEnterprise
(
Uscc
,
state
,
name
,
page
);
res
.
success
(
data
);
}
/**
* 我的企业列表迁出列表
* 小程序端 2.0
* @param req
* @param res
*/
async
function
myEnterpriseMoveOutList
(
req
,
res
)
{
let
reqConf
=
{
name
:
'String'
,
page
:
"Number"
};
let
{
name
,
page
}
=
eccReqParamater
(
reqConf
,
req
.
body
,
[
"name"
]);
const
Uscc
=
req
.
headers
.
uscc
;
let
data
=
await
myEnterpriseBiz
.
myEnterprise
(
Uscc
,
FUHUASTATE
.
迁出
,
name
,
page
);
res
.
success
(
data
);
}
/**
* 企业基本信息
* 我的企业列表中的企业基本信息
* 回显
* 2.0
* @param req
* @param res
*/
async
function
myEnterpriseInfo
(
req
,
res
)
{
let
reqConf
=
{
uscc
:
'String'
};
let
{
uscc
}
=
eccReqParamater
(
reqConf
,
req
.
body
);
const
FuHuaQiUscc
=
req
.
headers
.
uscc
;
let
result
=
await
myEnterpriseBiz
.
getMyEnterpriseBaseInfo
(
FuHuaQiUscc
,
uscc
);
res
.
success
(
result
);
}
/**
* 修改企业孵化状态 修改为实体
* 2.0
* @param req
* @param res
*/
async
function
updatePhysical
(
req
,
res
)
{
let
reqConf
=
{
leasedArea
:
'Number'
,
uscc
:
"String"
};
let
{
leasedArea
,
uscc
}
=
await
eccReqParamater
(
reqConf
,
req
.
body
);
const
FuHuaQiUscc
=
req
.
headers
.
uscc
;
let
result
=
await
myEnterpriseBiz
.
updatePhysicalInfo
(
FuHuaQiUscc
,
uscc
,
leasedArea
);
res
.
success
(
result
);
}
/**
* 修改企业孵化状态 修改为虚拟
* 2.0
* @param req
* @param res
*/
async
function
updateVirtual
(
req
,
res
)
{
let
reqConf
=
{
virtualCause
:
'Number'
,
uscc
:
"String"
,
virtualCauseDes
:
"String"
};
let
{
virtualCause
,
uscc
,
virtualCauseDes
}
=
await
eccReqParamater
(
reqConf
,
req
.
body
,
[
"virtualCauseDes"
]);
const
FuHuaQiUscc
=
req
.
headers
.
uscc
;
let
result
=
await
myEnterpriseBiz
.
updateVirtualInfo
(
FuHuaQiUscc
,
uscc
,
virtualCauseDes
,
virtualCause
);
res
.
success
(
result
);
}
/**
* 修改企业孵化状态 修改为迁出
* 2.0
* @param req
* @param res
*/
async
function
updateMoveOut
(
req
,
res
)
{
let
reqConf
=
{
moveOutType
:
'Number'
,
uscc
:
"String"
,
moveOutTrace
:
"Number"
,
moveOutCause
:
"[Number]"
};
const
skipList
=
[
"moveOutTrace"
,
"moveOutCause"
];
let
{
moveOutType
,
uscc
,
moveOutCause
,
moveOutTrace
}
=
await
eccReqParamater
(
reqConf
,
req
.
body
,
skipList
);
const
FuHuaQiUscc
=
req
.
headers
.
uscc
;
let
result
=
await
myEnterpriseBiz
.
updateMoveOutInfo
(
FuHuaQiUscc
,
uscc
,
moveOutType
,
moveOutTrace
,
moveOutCause
);
res
.
success
(
result
);
}
/**
* 修改我的企业信息
* 2.0
* @param req
* @param res
*/
async
function
updateMyEnterpriseInfo
(
req
,
res
)
{
let
reqConf
=
{
form
:
'Object'
};
let
{
form
}
=
eccReqParamater
(
reqConf
,
req
.
body
);
const
Uscc
=
req
.
headers
.
uscc
;
let
result
=
await
myEnterpriseBiz
.
updateMyEnterpriseBaseInfo
(
Uscc
,
form
);
res
.
success
(
result
);
}
/**
* 补录 新注册企业信息
* 2.0
* @param req
* @param res
*/
async
function
replenishCreate
(
req
,
res
)
{
let
reqConf
=
{
form
:
'Object'
};
let
{
form
}
=
eccReqParamater
(
reqConf
,
req
.
body
);
const
Uscc
=
req
.
headers
.
uscc
;
let
result
=
await
myEnterpriseBiz
.
replenishMyEnterpriseCreateInfo
(
Uscc
,
form
);
res
.
success
(
result
);
}
/**
* 补录 新迁入企业信息
* 2.0
* @param req
* @param res
*/
async
function
replenishInPut
(
req
,
res
)
{
let
reqConf
=
{
form
:
'Object'
};
let
{
form
}
=
eccReqParamater
(
reqConf
,
req
.
body
);
const
Uscc
=
req
.
headers
.
uscc
;
let
result
=
await
myEnterpriseBiz
.
replenishMyEnterpriseInPutInfo
(
Uscc
,
form
);
res
.
success
(
result
);
}
\ No newline at end of file
src/routers/router.ts
View file @
3f3c0f7f
...
...
@@ -4,6 +4,7 @@
import
*
as
publicRouters
from
'./public'
;
import
*
as
mobileClientEnterpriseRouters
from
'./mobileClient/enterprise'
;
import
*
as
myEnterpriseRouters
from
'./mobileClient/myEnterprise'
;
import
*
as
mobileClientFinancingRouters
from
'./mobileClient/financing'
;
import
*
as
mobileClientFuHuaQiRouters
from
'./mobileClient/fuHuaQi'
;
import
*
as
mobileClientMonthRouters
from
'./mobileClient/month'
;
...
...
@@ -30,6 +31,7 @@ export function setRouter(httpServer){
publicRouters
.
setRouter
(
httpServer
);
/**小程序端 孵化器入口路由 */
mobileClientEnterpriseRouters
.
setRouter
(
httpServer
);
myEnterpriseRouters
.
setRouter
(
httpServer
);
mobileClientFinancingRouters
.
setRouter
(
httpServer
);
mobileClientFuHuaQiRouters
.
setRouter
(
httpServer
);
mobileClientMonthRouters
.
setRouter
(
httpServer
);
...
...
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