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
baa60211
Commit
baa60211
authored
Nov 08, 2018
by
扫地僧
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改方法名
parent
c3fe709a
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
97 additions
and
97 deletions
+97
-97
AdministratorsController.java
...a/cn/com/fqy/controller/mgt/AdministratorsController.java
+97
-97
No files found.
2code/server/store-system/src/main/java/cn/com/fqy/controller/mgt/AdministratorsController.java
View file @
baa60211
package
cn
.
com
.
fqy
.
controller
.
mgt
;
package
cn
.
com
.
fqy
.
controller
.
mgt
;
import
java.util.List
;
import
java.util.List
;
import
javax.annotation.Resource
;
import
javax.annotation.Resource
;
import
org.springframework.stereotype.Controller
;
import
org.springframework.stereotype.Controller
;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
org.springframework.web.bind.annotation.ResponseBody
;
import
org.springframework.web.bind.annotation.ResponseBody
;
import
cn.com.fqy.common.Operator
;
import
cn.com.fqy.common.Operator
;
import
cn.com.fqy.common.ResultInfo
;
import
cn.com.fqy.common.ResultInfo
;
import
cn.com.fqy.core.common.BaseController
;
import
cn.com.fqy.core.common.BaseController
;
import
cn.com.fqy.core.common.PageFinder
;
import
cn.com.fqy.core.common.PageFinder
;
import
cn.com.fqy.core.model.Administrators
;
import
cn.com.fqy.core.model.Administrators
;
import
cn.com.fqy.core.model.Query
;
import
cn.com.fqy.core.model.Query
;
import
cn.com.fqy.core.model.Store
;
import
cn.com.fqy.core.model.Store
;
import
cn.com.fqy.core.service.AdministratorsService
;
import
cn.com.fqy.core.service.AdministratorsService
;
@Controller
@Controller
@RequestMapping
(
"administrators"
)
@RequestMapping
(
"administrators"
)
public
class
AdministratorsController
extends
BaseController
{
public
class
AdministratorsController
extends
BaseController
{
@Resource
@Resource
private
AdministratorsService
administratorsService
;
private
AdministratorsService
administratorsService
;
/*
/*
* 分页展示店铺管理员信息
* 分页展示店铺管理员信息
*/
*/
@RequestMapping
(
"
getAdministratorsList"
)
@RequestMapping
(
"
administratorsList"
)
@ResponseBody
@ResponseBody
public
PageFinder
<
Administrators
>
getAdministratorsList
(
Administrators
administrators
,
Query
query
)
{
public
PageFinder
<
Administrators
>
administratorsList
(
Administrators
administrators
,
Query
query
)
{
administrators
.
setIsDeleted
(
0
);
administrators
.
setIsDeleted
(
0
);
Query
q
=
new
Query
(
query
.
getPageNo
(),
query
.
getPageSize
(),
administrators
);
Query
q
=
new
Query
(
query
.
getPageNo
(),
query
.
getPageSize
(),
administrators
);
return
administratorsService
.
getAdministratorsPagedList
(
q
);
return
administratorsService
.
getAdministratorsPagedList
(
q
);
}
}
/**
/**
* 添加或修改店铺管理员信息
* 添加或修改店铺管理员信息
* @param CarPreiod
* @param CarPreiod
* @return
* @return
*/
*/
@RequestMapping
(
"addOrEditAdministrators"
)
@RequestMapping
(
"addOrEditAdministrators"
)
@ResponseBody
@ResponseBody
public
ResultInfo
<
Administrators
>
addOrEditAdministrators
(
Administrators
administrators
)
{
public
ResultInfo
<
Administrators
>
addOrEditAdministrators
(
Administrators
administrators
)
{
ResultInfo
<
Administrators
>
resultInfo
=
new
ResultInfo
<>();
ResultInfo
<
Administrators
>
resultInfo
=
new
ResultInfo
<>();
//操作人
//操作人
Operator
op
=
getOperator
();
Operator
op
=
getOperator
();
if
(
administrators
!=
null
&&
administrators
.
getAdministratorsId
()!=
null
&&!
""
.
equals
(
administrators
.
getAdministratorsId
()))
{
if
(
administrators
!=
null
&&
administrators
.
getAdministratorsId
()!=
null
&&!
""
.
equals
(
administrators
.
getAdministratorsId
()))
{
resultInfo
=
administratorsService
.
updateAdministrators
(
administrators
,
op
);
resultInfo
=
administratorsService
.
updateAdministrators
(
administrators
,
op
);
}
else
{
}
else
{
resultInfo
=
administratorsService
.
addAdministrators
(
administrators
,
op
);
resultInfo
=
administratorsService
.
addAdministrators
(
administrators
,
op
);
}
}
return
resultInfo
;
return
resultInfo
;
}
}
/**
/**
* 店铺管理员删除
* 店铺管理员删除
* @param workerId
* @param workerId
* @return
* @return
*/
*/
@RequestMapping
(
"delAdministrators"
)
@RequestMapping
(
"delAdministrators"
)
@ResponseBody
@ResponseBody
public
ResultInfo
<
Administrators
>
delAdministrators
(
String
administratorsId
)
{
public
ResultInfo
<
Administrators
>
delAdministrators
(
String
administratorsId
)
{
ResultInfo
<
Administrators
>
resultInfo
=
new
ResultInfo
<>();
ResultInfo
<
Administrators
>
resultInfo
=
new
ResultInfo
<>();
if
(
administratorsId
==
null
||
""
.
equals
(
administratorsId
))
{
if
(
administratorsId
==
null
||
""
.
equals
(
administratorsId
))
{
resultInfo
.
setCode
(
"0"
);
resultInfo
.
setCode
(
"0"
);
resultInfo
.
setMsg
(
"店铺管理员ID参数为空"
);
resultInfo
.
setMsg
(
"店铺管理员ID参数为空"
);
return
resultInfo
;
return
resultInfo
;
}
}
Administrators
administrators
=
new
Administrators
();
Administrators
administrators
=
new
Administrators
();
administrators
.
setIsDeleted
(
1
);
administrators
.
setIsDeleted
(
1
);
administrators
.
setAdministratorsId
(
administratorsId
);
administrators
.
setAdministratorsId
(
administratorsId
);
return
administratorsService
.
updateAdministrators
(
administrators
,
getOperator
());
return
administratorsService
.
updateAdministrators
(
administrators
,
getOperator
());
}
}
/**
/**
* 获取店铺信息
* 获取店铺信息
*/
*/
@RequestMapping
(
"getAdministrators"
)
@RequestMapping
(
"getAdministrators"
)
@ResponseBody
@ResponseBody
public
ResultInfo
<
List
<
Administrators
>>
getAdministrators
(){
public
ResultInfo
<
List
<
Administrators
>>
getAdministrators
(){
ResultInfo
<
List
<
Administrators
>>
result
=
new
ResultInfo
<>();
ResultInfo
<
List
<
Administrators
>>
result
=
new
ResultInfo
<>();
Administrators
administrators
=
new
Administrators
();
Administrators
administrators
=
new
Administrators
();
administrators
.
setIsDeleted
(
0
);
administrators
.
setIsDeleted
(
0
);
List
<
Administrators
>
administratorsList
=
administratorsService
.
getAdministratorsList
(
new
Query
(
administrators
));
List
<
Administrators
>
administratorsList
=
administratorsService
.
getAdministratorsList
(
new
Query
(
administrators
));
if
(
administratorsList
.
size
()>
0
)
{
if
(
administratorsList
.
size
()>
0
)
{
result
.
setCode
(
"1"
);
result
.
setCode
(
"1"
);
result
.
setData
(
administratorsList
);
result
.
setData
(
administratorsList
);
}
else
{
}
else
{
result
.
setCode
(
"0"
);
result
.
setCode
(
"0"
);
result
.
setMsg
(
"暂无店铺管理员数据"
);
result
.
setMsg
(
"暂无店铺管理员数据"
);
}
}
return
result
;
return
result
;
}
}
}
}
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