Commit dc75efe4 by Java-聂换换

消息

parent 90a33814
...@@ -44,9 +44,9 @@ public class Article extends DataEntity<Article> { ...@@ -44,9 +44,9 @@ public class Article extends DataEntity<Article> {
private String scope; private String scope;
private Integer isFlow = 0; private String isFlow = "N";
private Integer isTip = 0; private String isTip = "N";
private ArticleData articleData; //文章副表 private ArticleData articleData; //文章副表
...@@ -261,19 +261,19 @@ public class Article extends DataEntity<Article> { ...@@ -261,19 +261,19 @@ public class Article extends DataEntity<Article> {
this.scope = scope; this.scope = scope;
} }
public Integer getIsFlow() { public String getIsFlow() {
return isFlow; return isFlow;
} }
public void setIsFlow(Integer isFlow) { public void setIsFlow(String isFlow) {
this.isFlow = isFlow; this.isFlow = isFlow;
} }
public Integer getIsTip() { public String getIsTip() {
return isTip; return isTip;
} }
public void setIsTip(Integer isTip) { public void setIsTip(String isTip) {
this.isTip = isTip; this.isTip = isTip;
} }
......
...@@ -204,6 +204,12 @@ public class ArticleController extends BaseController { ...@@ -204,6 +204,12 @@ public class ArticleController extends BaseController {
if(article.getScope()!=null){ if(article.getScope()!=null){
article.getScope().replaceAll(",",""); article.getScope().replaceAll(",","");
} }
if(StringUtils.isBlank(article.getIsFlow())){
article.setIsFlow("N");
}
if(StringUtils.isBlank(article.getIsTip())){
article.setIsTip("N");
}
articleService.save(article); articleService.save(article);
addMessage(redirectAttributes, "保存消息'" + StringUtils.abbr(article.getTitle(),50) + "'成功"); addMessage(redirectAttributes, "保存消息'" + StringUtils.abbr(article.getTitle(),50) + "'成功");
String categoryId = article.getCategory()!=null?article.getCategory().getId():null; String categoryId = article.getCategory()!=null?article.getCategory().getId():null;
......
...@@ -56,18 +56,18 @@ ...@@ -56,18 +56,18 @@
<div class="controls"> <div class="controls">
<form:input path="title" htmlEscape="false" maxlength="200" class="input-xxlarge measure-input required"/> <form:input path="title" htmlEscape="false" maxlength="200" class="input-xxlarge measure-input required"/>
&nbsp; &nbsp;
<c:if test="${article.isTip eq 1}"> <c:if test="${article.isTip eq 'Y'}">
<form:checkbox path="isTip" value="1" checked="checked"/> <form:checkbox path="isTip" value="Y" checked="checked"/>
</c:if> </c:if>
<c:if test="${article.isTip ne 1}"> <c:if test="${article.isTip ne 'Y'}">
<form:checkbox path="isTip" value="1"/> <form:checkbox path="isTip" value="Y"/>
</c:if> </c:if>
同步到首页弹窗 同步到首页弹窗
<c:if test="${article.isFlow eq 1}"> <c:if test="${article.isFlow eq 'Y'}">
<form:checkbox path="isFlow" value="1" checked="checked"/> <form:checkbox path="isFlow" value="Y" checked="checked"/>
</c:if> </c:if>
<c:if test="${article.isFlow ne 1}"> <c:if test="${article.isFlow ne 'Y'}">
<form:checkbox path="isFlow" value="1"/> <form:checkbox path="isFlow" value="Y"/>
</c:if>同步到首页滚动新闻 </c:if>同步到首页滚动新闻
<form:input path="category.id" value="28" cssStyle="display: none"/> <form:input path="category.id" value="28" cssStyle="display: none"/>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment