Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
jinli gu
MCMS
Commits
021aff2f
Commit
021aff2f
authored
Jan 19, 2021
by
xierz
Browse files
调整web层接口
parent
b511f864
Changes
2
Hide whitespace changes
Inline
Side-by-side
src/main/java/net/mingsoft/cms/action/web/ContentAction.java
View file @
021aff2f
...
@@ -28,6 +28,7 @@ import io.swagger.annotations.ApiOperation;
...
@@ -28,6 +28,7 @@ import io.swagger.annotations.ApiOperation;
import
net.mingsoft.base.entity.ResultData
;
import
net.mingsoft.base.entity.ResultData
;
import
net.mingsoft.basic.bean.EUListBean
;
import
net.mingsoft.basic.bean.EUListBean
;
import
net.mingsoft.basic.util.BasicUtil
;
import
net.mingsoft.basic.util.BasicUtil
;
import
net.mingsoft.cms.bean.ContentBean
;
import
net.mingsoft.cms.biz.IContentBiz
;
import
net.mingsoft.cms.biz.IContentBiz
;
import
net.mingsoft.cms.biz.IHistoryLogBiz
;
import
net.mingsoft.cms.biz.IHistoryLogBiz
;
import
net.mingsoft.cms.entity.ContentEntity
;
import
net.mingsoft.cms.entity.ContentEntity
;
...
@@ -98,7 +99,7 @@ public class ContentAction extends net.mingsoft.cms.action.BaseAction{
...
@@ -98,7 +99,7 @@ public class ContentAction extends net.mingsoft.cms.action.BaseAction{
})
})
@RequestMapping
(
"/list"
)
@RequestMapping
(
"/list"
)
@ResponseBody
@ResponseBody
public
ResultData
list
(
@ModelAttribute
@ApiIgnore
Content
Entity
content
,
HttpServletResponse
response
,
HttpServletRequest
request
,
@ApiIgnore
ModelMap
model
,
BindingResult
result
)
{
public
ResultData
list
(
@ModelAttribute
@ApiIgnore
Content
Bean
content
,
HttpServletResponse
response
,
HttpServletRequest
request
,
@ApiIgnore
ModelMap
model
,
BindingResult
result
)
{
BasicUtil
.
startPage
();
BasicUtil
.
startPage
();
List
contentList
=
contentBiz
.
query
(
content
);
List
contentList
=
contentBiz
.
query
(
content
);
return
ResultData
.
build
().
success
(
new
EUListBean
(
contentList
,(
int
)
BasicUtil
.
endPage
(
contentList
).
getTotal
()));
return
ResultData
.
build
().
success
(
new
EUListBean
(
contentList
,(
int
)
BasicUtil
.
endPage
(
contentList
).
getTotal
()));
...
@@ -113,7 +114,7 @@ public class ContentAction extends net.mingsoft.cms.action.BaseAction{
...
@@ -113,7 +114,7 @@ public class ContentAction extends net.mingsoft.cms.action.BaseAction{
@ApiImplicitParam
(
name
=
"id"
,
value
=
"编号"
,
required
=
true
,
paramType
=
"query"
)
@ApiImplicitParam
(
name
=
"id"
,
value
=
"编号"
,
required
=
true
,
paramType
=
"query"
)
@GetMapping
(
"/get"
)
@GetMapping
(
"/get"
)
@ResponseBody
@ResponseBody
public
ResultData
get
(
@ModelAttribute
@ApiIgnore
Content
Entity
content
,
HttpServletResponse
response
,
HttpServletRequest
request
,
@ApiIgnore
ModelMap
model
){
public
ResultData
get
(
@ModelAttribute
@ApiIgnore
Content
Bean
content
,
HttpServletResponse
response
,
HttpServletRequest
request
,
@ApiIgnore
ModelMap
model
){
if
(
content
.
getId
()==
null
)
{
if
(
content
.
getId
()==
null
)
{
return
ResultData
.
build
().
error
();
return
ResultData
.
build
().
error
();
}
}
...
...
src/main/java/net/mingsoft/cms/dao/IContentDao.xml
View file @
021aff2f
...
@@ -156,7 +156,7 @@
...
@@ -156,7 +156,7 @@
</select>
</select>
<!--根据实体获取-->
<!--根据实体获取-->
<select
id=
"getByEntity"
resultMap=
"resultMap"
parameterType=
"net.mingsoft.cms.
entity
.Content
Entity
"
>
<select
id=
"getByEntity"
resultMap=
"resultMap"
parameterType=
"net.mingsoft.cms.
bean
.Content
Bean
"
>
select * from cms_content
select * from cms_content
<where>
<where>
del=0
del=0
...
...
Write
Preview
Supports
Markdown
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