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
edbce195
Commit
edbce195
authored
Dec 05, 2019
by
王昆
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
gsb
parent
4d24b5a1
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
35 additions
and
0 deletions
+35
-0
laowubao/app/base/service/impl/operator/labourSve.js
+17
-0
laowubao/app/base/service/impl/operator/recruitSve.js
+18
-0
No files found.
laowubao/app/base/service/impl/operator/labourSve.js
View file @
edbce195
...
...
@@ -7,6 +7,7 @@ const settings = require("../../../../config/settings");
class
LabourService
extends
ServiceBase
{
constructor
()
{
super
(
"operator"
,
ServiceBase
.
getDaoName
(
LabourService
));
this
.
usersDao
=
system
.
getObject
(
"db.operator.usersDao"
);
}
async
SaveLabourInfo
(
params
){
//添加或更新招聘信息
...
...
@@ -108,6 +109,9 @@ class LabourService extends ServiceBase {
raw
:
true
};
var
list
=
await
this
.
dao
.
model
.
findAndCountAll
(
sqlwhere
)
||
[];
if
(
list
)
{
await
this
.
setUserInfo
(
list
.
rows
);
}
return
system
.
getResult
(
list
);
}
catch
(
e
)
{
console
.
log
(
e
);
...
...
@@ -165,6 +169,19 @@ class LabourService extends ServiceBase {
}
}
async
setUserInfo
(
rows
)
{
if
(
!
rows
||
rows
.
length
==
0
)
{
return
;
}
var
ids
=
[];
for
(
var
row
of
rows
)
{
ids
.
push
(
row
.
user_id
);
}
var
map
=
await
this
.
usersDao
.
findUserInfoByids
(
ids
);
for
(
var
row
of
rows
)
{
row
.
userInfo
=
map
[
row
.
user_id
]
||
{};
}
}
}
module
.
exports
=
LabourService
;
...
...
laowubao/app/base/service/impl/operator/recruitSve.js
View file @
edbce195
...
...
@@ -7,6 +7,7 @@ const settings = require("../../../../config/settings");
class
RecruitService
extends
ServiceBase
{
constructor
()
{
super
(
"operator"
,
ServiceBase
.
getDaoName
(
RecruitService
));
this
.
usersDao
=
system
.
getObject
(
"db.operator.usersDao"
);
}
async
SaveRecruitInfo
(
params
){
//添加或更新招聘信息
...
...
@@ -236,6 +237,9 @@ class RecruitService extends ServiceBase {
raw
:
true
};
var
list
=
await
this
.
dao
.
model
.
findAndCountAll
(
sqlwhere
)
||
[];
if
(
list
)
{
await
this
.
setUserInfo
(
list
.
rows
);
}
return
system
.
getResult
(
list
);
}
catch
(
e
)
{
console
.
log
(
e
);
...
...
@@ -244,6 +248,20 @@ class RecruitService extends ServiceBase {
}
async
setUserInfo
(
rows
)
{
if
(
!
rows
||
rows
.
length
==
0
)
{
return
;
}
var
ids
=
[];
for
(
var
row
of
rows
)
{
ids
.
push
(
row
.
user_id
);
}
var
map
=
await
this
.
usersDao
.
findUserInfoByids
(
ids
);
for
(
var
row
of
rows
)
{
row
.
userInfo
=
map
[
row
.
user_id
]
||
{};
}
}
async
updatestatus
(
obj
){
//更新状态信息
try
{
var
whereobj
=
{
where
:{
id
:
obj
.
id
}};
...
...
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