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
9c5bc464
Commit
9c5bc464
authored
Nov 19, 2018
by
wyh
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
新增 批量
parent
0a146a21
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
94 additions
and
5 deletions
+94
-5
WebWorkerController.java
.../java/cn/com/fqy/controller/mapi/WebWorkerController.java
+36
-5
WorkerController.java
...main/java/cn/com/fqy/controller/mgt/WorkerController.java
+21
-0
WorkerService.java
.../src/main/java/cn/com/fqy/core/service/WorkerService.java
+12
-0
WorkerServiceImpl.java
.../java/cn/com/fqy/core/service/impl/WorkerServiceImpl.java
+25
-0
No files found.
2code/server/store-system/src/main/java/cn/com/fqy/controller/mapi/WebWorkerController.java
View file @
9c5bc464
package
cn
.
com
.
fqy
.
controller
.
mapi
;
import
java.util.HashMap
;
import
java.util.List
;
import
java.util.Map
;
import
javax.annotation.Resource
;
import
org.springframework.stereotype.Controller
;
import
org.springframework.web.bind.annotation.ModelAttribute
;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
org.springframework.web.bind.annotation.ResponseBody
;
import
cn.com.fqy.common.ResultInfo
;
import
cn.com.fqy.common.constants.Constant
;
import
cn.com.fqy.core.common.PageFinder
;
import
cn.com.fqy.core.model.Advert
;
import
cn.com.fqy.core.model.Query
;
import
cn.com.fqy.core.model.Store
;
import
cn.com.fqy.core.model.Worker
;
...
...
@@ -67,8 +67,9 @@ public class WebWorkerController {
*/
@RequestMapping
(
"workerDetails"
)
@ResponseBody
public
ResultInfo
<
Worker
>
workerDetails
(
String
workerId
){
ResultInfo
<
Worker
>
resultInfo
=
new
ResultInfo
<>();
public
ResultInfo
<
Map
<
String
,
Object
>>
workerDetails
(
String
workerId
){
ResultInfo
<
Map
<
String
,
Object
>>
resultInfo
=
new
ResultInfo
<>();
Map
<
String
,
Object
>
map
=
new
HashMap
<>();
if
(
workerId
==
null
||
""
.
equals
(
workerId
))
{
resultInfo
.
setCode
(
"0"
);
resultInfo
.
setMsg
(
"员工参数为空"
);
...
...
@@ -76,8 +77,38 @@ public class WebWorkerController {
}
Worker
res
=
workerService
.
getWorker
(
workerId
);
if
(
null
!=
res
)
{
Store
store
=
storeService
.
getStore
(
res
.
getStoreId
());
if
(
null
!=
store
)
{
map
.
put
(
"workerId"
,
res
.
getWorkerId
());
map
.
put
(
"workerName"
,
res
.
getWorkerName
());
map
.
put
(
"workerAge"
,
res
.
getWorkerAge
());
map
.
put
(
"workerNumber"
,
res
.
getWorkerNumber
());
map
.
put
(
"workerBirthday"
,
res
.
getWorkerBirthday
());
map
.
put
(
"workerAncestral"
,
res
.
getWorkerAncestral
());
map
.
put
(
"workerBust"
,
res
.
getWorkerBust
());
map
.
put
(
"workerHeight"
,
res
.
getWorkerHeight
());
map
.
put
(
"workerHipline"
,
res
.
getWorkerHipline
());
map
.
put
(
"workerHomePic"
,
res
.
getWorkerHomePic
());
map
.
put
(
"workerPic"
,
res
.
getWorkerPic
());
map
.
put
(
"workerResume"
,
res
.
getWorkerResume
());
map
.
put
(
"workerSex"
,
res
.
getWorkerSex
());
map
.
put
(
"workerWaist"
,
res
.
getWorkerWaist
());
map
.
put
(
"workerWeight"
,
res
.
getWorkerWeight
());
map
.
put
(
"storeId"
,
res
.
getStoreId
());
map
.
put
(
"brief"
,
res
.
getBrief
());
map
.
put
(
"clicks"
,
res
.
getClicks
());
map
.
put
(
"matureTime"
,
res
.
getMatureTime
());
map
.
put
(
"serialNumber"
,
res
.
getSerialNumber
());
map
.
put
(
"storeName"
,
res
.
getStoreName
());
map
.
put
(
"storeBrief"
,
store
.
getBrief
());
map
.
put
(
"storeCityName"
,
store
.
getCityName
());
map
.
put
(
"storeProvince"
,
store
.
getProvince
());
map
.
put
(
"storeCounty"
,
store
.
getCounty
());
map
.
put
(
"storeHomePic"
,
store
.
getStoreHomePic
());
map
.
put
(
"storePosition"
,
store
.
getStorePosition
());
}
resultInfo
.
setCode
(
"1"
);
resultInfo
.
setData
(
res
);
resultInfo
.
setData
(
map
);
}
else
{
resultInfo
.
setCode
(
"0"
);
resultInfo
.
setMsg
(
"员工信息丢失"
);
...
...
2code/server/store-system/src/main/java/cn/com/fqy/controller/mgt/WorkerController.java
View file @
9c5bc464
...
...
@@ -114,4 +114,25 @@ public class WorkerController extends BaseController {
}
return
result
;
}
/**
* 批量审核
* @param workerIds
* @return
*/
@RequestMapping
(
"batchWorkers"
)
@ResponseBody
public
ResultInfo
<
Worker
>
batchWorkers
(
String
[]
workerIds
)
{
return
workerService
.
batchWorkerUpdate
(
workerIds
,
getOperator
());
}
/**
* 批量展示
* @param workerIds
* @return
*/
@RequestMapping
(
"batchWorkerShop"
)
@ResponseBody
public
ResultInfo
<
Worker
>
batchWorkerShop
(
String
[]
workerIds
)
{
return
workerService
.
batchWorkerShopping
(
workerIds
,
getOperator
());
}
}
2code/server/store-system/src/main/java/cn/com/fqy/core/service/WorkerService.java
View file @
9c5bc464
...
...
@@ -7,6 +7,7 @@ import cn.com.fqy.common.ResultInfo;
import
cn.com.fqy.core.common.BaseService
;
import
cn.com.fqy.core.common.PageFinder
;
import
cn.com.fqy.core.model.Query
;
import
cn.com.fqy.core.model.SysUser
;
import
cn.com.fqy.core.model.Worker
;
/**
...
...
@@ -84,5 +85,16 @@ public interface WorkerService extends BaseService {
* @return
*/
public
List
<
Worker
>
getWorkerSByIds
(
String
[]
ids
);
/**
* 根据 一组ID 修改一组数据
* @param workerId
* @return
*/
public
ResultInfo
<
Worker
>
batchWorkerUpdate
(
String
[]
workerIds
,
Operator
operator
);
public
ResultInfo
<
Worker
>
batchWorkerShopping
(
String
[]
workerIds
,
Operator
operator
);
}
2code/server/store-system/src/main/java/cn/com/fqy/core/service/impl/WorkerServiceImpl.java
View file @
9c5bc464
...
...
@@ -20,6 +20,7 @@ import cn.com.fqy.common.constants.Constant;
import
cn.com.fqy.core.common.PageFinder
;
import
cn.com.fqy.core.dao.WorkerDao
;
import
cn.com.fqy.core.model.Query
;
import
cn.com.fqy.core.model.SysUser
;
import
cn.com.fqy.core.model.Worker
;
import
cn.com.fqy.core.service.WorkerService
;
...
...
@@ -320,4 +321,28 @@ public class WorkerServiceImpl implements WorkerService {
return
list
;
}
@Override
public
ResultInfo
<
Worker
>
batchWorkerUpdate
(
String
[]
workerIds
,
Operator
operator
)
{
ResultInfo
<
Worker
>
resultInfo
=
new
ResultInfo
<
Worker
>();
for
(
String
id
:
workerIds
)
{
Worker
worker
=
new
Worker
();
worker
.
setWorkerId
(
id
);
worker
.
setIsAuditing
(
1
);
resultInfo
=
updateWorker
(
worker
,
operator
);
}
return
resultInfo
;
}
@Override
public
ResultInfo
<
Worker
>
batchWorkerShopping
(
String
[]
workerIds
,
Operator
operator
)
{
ResultInfo
<
Worker
>
resultInfo
=
new
ResultInfo
<
Worker
>();
for
(
String
id
:
workerIds
)
{
Worker
worker
=
new
Worker
();
worker
.
setWorkerId
(
id
);
worker
.
setIsShopping
(
1
);;
resultInfo
=
updateWorker
(
worker
,
operator
);
}
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