Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
Z
zhichan
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
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
蒋勇
zhichan
Commits
5f845af4
Commit
5f845af4
authored
Nov 23, 2019
by
孙亚楠
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
dd
parent
74e0cb63
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
65 additions
and
1 deletions
+65
-1
laowubao/app/base/api/impl/operator/laoActionApi.js
+28
-0
laowubao/app/base/service/impl/operator/recruitSve.js
+37
-1
No files found.
laowubao/app/base/api/impl/operator/laoActionApi.js
View file @
5f845af4
...
...
@@ -274,6 +274,12 @@ class LaoActionApi extends APIBase {
}
else
{
parm
.
current_page
=
1
;
}
if
(
obj
.
curStatus
){
parm
.
curStatus
=
this
.
trim
(
obj
.
curStatus
);
}
if
(
obj
.
curType
){
parm
.
curStatus
=
this
.
trim
(
obj
.
curType
);
}
if
(
find_type
==
0
)
{
temp_info
=
await
this
.
recruitSve
.
findAllList
(
parm
);
}
else
if
(
find_type
==
1
)
{
...
...
@@ -308,6 +314,28 @@ class LaoActionApi extends APIBase {
}
}
/**
* 上架or下架
* @param {*} obj
*/
async
UpdateCurStatus
(
obj
){
//当前状态代码-1:展示中、2:已下架、3:已过期、4:审核未通过 cur_type
if
(
!
this
.
trim
(
obj
.
curStatus
)){
return
system
.
getResult
(
-
1
,
`参数错误 状态不能为空`
);
}
if
(
!
Number
(
this
.
trim
(
obj
.
curType
))){
return
system
.
getResult
(
-
1
,
`参数错误 状态码不能为空`
);
}
if
(
!
Number
(
this
.
trim
(
obj
.
id
))){
return
system
.
getResult
(
-
1
,
`参数错误 ID不能为空`
);
}
try
{
return
await
this
.
recruitSve
.
UpdateCurStatus
(
obj
);
}
catch
(
error
)
{
return
system
.
getResult
(
-
1
,
`系统错误 错误信息
${
error
}
`
);
}
}
async
FindLabourInfo
(
obj
)
{
//获取供人信息
if
(
!
obj
)
{
return
system
.
getResult
(
null
,
"参数不能为空"
);
...
...
laowubao/app/base/service/impl/operator/recruitSve.js
View file @
5f845af4
...
...
@@ -71,12 +71,26 @@ class RecruitService extends ServiceBase {
if
(
!
obj
.
user_id
){
return
system
.
getResult
(
null
,
"参数错误!"
);
}
var
user_id
=
obj
.
user_id
;
var
curStatus
=
obj
.
curStatus
;
//当前的状态
var
curType
=
obj
.
curType
;
//当前的状态
let
where
=
{};
if
(
user_id
){
where
.
user_id
=
user_id
;
}
if
(
curType
){
where
.
cur_type
=
curType
;
}
if
(
curStatus
){
where
.
cur_status
=
curStatus
;
}
var
pageSize
=
obj
.
page_size
||
10
;
var
currentPage
=
obj
.
current_page
||
1
;
try
{
var
sqlwhere
=
{
where
:
{
user_id
:
user_id
}
,
where
:
where
,
order
:
[[
"publish_date"
,
'desc'
]],
limit
:
pageSize
,
offset
:
(
currentPage
-
1
)
*
pageSize
,
...
...
@@ -90,6 +104,28 @@ class RecruitService extends ServiceBase {
}
}
/**
* 更新上架 或下架
*/
async
UpdateCurStatus
(
params
){
try
{
let
cur_type
=
params
.
curType
;
let
cur_status
=
params
.
curStatus
;
let
id
=
Number
(
params
.
id
);
let
data
=
{};
if
(
curType
){
data
.
cur_type
=
cur_type
;
}
if
(
curStatus
){
data
.
cur_status
=
cur_status
;
}
let
res
=
await
this
.
dao
.
model
.
update
(
data
,{
where
:{
id
:
id
}});
return
system
.
getResult
(
res
);
}
catch
(
error
)
{
return
system
.
getResult
(
-
1
,
`系统错误 错误信息
${
error
}
`
);
}
}
async
findListByName
(
obj
){
//获取岗位名称招聘信息,返回符合条件的列表
//return await this.dao.findListByName(obj);
if
(
!
obj
.
recruit_name
){
...
...
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