Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
S
store-system
Project
Project
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
luoyangfei
store-system
Commits
0b646031
Commit
0b646031
authored
Nov 16, 2018
by
wangyihao
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改
parent
04001f88
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
61 additions
and
8 deletions
+61
-8
IndexController.java
...main/java/cn/com/fqy/controller/mapi/IndexController.java
+61
-8
No files found.
2code/server/store-system/src/main/java/cn/com/fqy/controller/mapi/IndexController.java
View file @
0b646031
...
@@ -219,12 +219,39 @@ public class IndexController {
...
@@ -219,12 +219,39 @@ public class IndexController {
*/
*/
@RequestMapping
(
"searchWorkerResult"
)
@RequestMapping
(
"searchWorkerResult"
)
@ResponseBody
@ResponseBody
public
ResultInfo
<
List
<
Worker
>>
searchWorkerResult
(
Worker
worker
)
{
public
ResultInfo
<
List
<
Worker
>>
searchWorkerResult
(
Worker
worker
,
String
cityId
)
{
ResultInfo
<
List
<
Worker
>>
resultInfo
=
new
ResultInfo
<>();
ResultInfo
<
List
<
Worker
>>
resultInfo
=
new
ResultInfo
<>();
// List<Worker> listQuery1 = new ArrayList<>();
List
<
Worker
>
listQuery
=
new
ArrayList
<>();
List
<
Worker
>
listQuery
=
new
ArrayList
<>();
worker
.
setIsDeleted
(
0
);
// 未删除
List
<
String
>
stoListQuery
=
new
ArrayList
<>();
worker
.
setIsShopping
(
1
);
// 员工展示状态
if
(
cityId
==
null
||
""
.
equals
(
cityId
))
{
worker
.
setIsAuditing
(
1
);
resultInfo
.
setCode
(
"0"
);
resultInfo
.
setMsg
(
"市 ID 参数为空"
);
return
resultInfo
;
}
Store
store
=
new
Store
();
store
.
setCityId
(
cityId
);
// 通过城市ID查询返回店铺ID
List
<
Store
>
stoList
=
storeService
.
getStoreList
(
new
Query
(
store
));
if
(
stoList
!=
null
&&
stoList
.
size
()
>
0
)
{
for
(
Store
list
:
stoList
)
{
stoListQuery
.
add
(
list
.
getStoreId
());
}
}
else
{
resultInfo
.
setCode
(
Constant
.
FAIL
);
resultInfo
.
setMsg
(
"暂无数据"
);
return
resultInfo
;
}
// 将storeId的集合转换数组
String
[]
strArray
=
stoListQuery
.
toArray
(
new
String
[
stoListQuery
.
size
()]);
// worker.setIsDeleted(0); // 未删除
// worker.setIsShopping(1); // 员工展示状态
// worker.setIsAuditing(1);
int
firstNumber
=
0
;
int
firstNumber
=
0
;
int
lastNUmber
=
0
;
int
lastNUmber
=
0
;
int
firstNumber1
=
0
;
int
firstNumber1
=
0
;
...
@@ -248,10 +275,11 @@ public class IndexController {
...
@@ -248,10 +275,11 @@ public class IndexController {
worker
.
setWorkerAge
(
null
);
worker
.
setWorkerAge
(
null
);
}
}
// 通过storeId查询返回员工列表
List
<
Worker
>
workerlist
=
workerService
.
getWorkerList
(
new
Query
(
worker
));
List
<
Worker
>
workerList
=
workerService
.
getWorkerSByIds
(
strArray
);
if
(
workerlist
.
size
()
>
0
&&
workerlist
!=
null
)
{
// List<Worker> workerlist = workerService.getWorkerList(new Query(worker));
for
(
Worker
list
:
workerlist
)
{
if
(
workerList
.
size
()
>
0
&&
workerList
!=
null
)
{
for
(
Worker
list
:
workerList
)
{
if
(
firstNumber
!=
0
||
lastNUmber
!=
0
)
{
if
(
firstNumber
!=
0
||
lastNUmber
!=
0
)
{
int
hegit
=
Integer
.
valueOf
(
list
.
getWorkerHeight
());
int
hegit
=
Integer
.
valueOf
(
list
.
getWorkerHeight
());
if
(
hegit
<
firstNumber
||
hegit
>
lastNUmber
)
{
if
(
hegit
<
firstNumber
||
hegit
>
lastNUmber
)
{
...
@@ -279,4 +307,29 @@ public class IndexController {
...
@@ -279,4 +307,29 @@ public class IndexController {
}
}
return
resultInfo
;
return
resultInfo
;
}
}
/**
* 店铺在线员工
*/
@RequestMapping
(
"workers"
)
@ResponseBody
public
ResultInfo
<
List
<
Worker
>>
workers
(
String
storeId
){
ResultInfo
<
List
<
Worker
>>
resultInfo
=
new
ResultInfo
<>();
if
(
storeId
==
null
||
""
.
equals
(
storeId
))
{
resultInfo
.
setCode
(
"0"
);
resultInfo
.
setMsg
(
"店铺ID参数为空"
);
return
resultInfo
;
}
Worker
worker
=
new
Worker
();
worker
.
setStoreId
(
storeId
);
List
<
Worker
>
workerList
=
workerService
.
getWorkerList
(
new
Query
(
worker
));
if
(
null
!=
workerList
&&
workerList
.
size
()>
0
)
{
resultInfo
.
setCode
(
"1"
);
resultInfo
.
setData
(
workerList
);
}
else
{
resultInfo
.
setCode
(
"0"
);
resultInfo
.
setMsg
(
"员工信息丢失"
);
}
return
resultInfo
;
}
}
}
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