Commit dc75efe4 by Java-聂换换

消息

parent 90a33814
......@@ -44,9 +44,9 @@ public class Article extends DataEntity<Article> {
private String scope;
private Integer isFlow = 0;
private String isFlow = "N";
private Integer isTip = 0;
private String isTip = "N";
private ArticleData articleData; //文章副表
......@@ -261,19 +261,19 @@ public class Article extends DataEntity<Article> {
this.scope = scope;
}
public Integer getIsFlow() {
public String getIsFlow() {
return isFlow;
}
public void setIsFlow(Integer isFlow) {
public void setIsFlow(String isFlow) {
this.isFlow = isFlow;
}
public Integer getIsTip() {
public String getIsTip() {
return isTip;
}
public void setIsTip(Integer isTip) {
public void setIsTip(String isTip) {
this.isTip = isTip;
}
......
......@@ -204,6 +204,12 @@ public class ArticleController extends BaseController {
if(article.getScope()!=null){
article.getScope().replaceAll(",","");
}
if(StringUtils.isBlank(article.getIsFlow())){
article.setIsFlow("N");
}
if(StringUtils.isBlank(article.getIsTip())){
article.setIsTip("N");
}
articleService.save(article);
addMessage(redirectAttributes, "保存消息'" + StringUtils.abbr(article.getTitle(),50) + "'成功");
String categoryId = article.getCategory()!=null?article.getCategory().getId():null;
......
......@@ -56,18 +56,18 @@
<div class="controls">
<form:input path="title" htmlEscape="false" maxlength="200" class="input-xxlarge measure-input required"/>
&nbsp;
<c:if test="${article.isTip eq 1}">
<form:checkbox path="isTip" value="1" checked="checked"/>
<c:if test="${article.isTip eq 'Y'}">
<form:checkbox path="isTip" value="Y" checked="checked"/>
</c:if>
<c:if test="${article.isTip ne 1}">
<form:checkbox path="isTip" value="1"/>
<c:if test="${article.isTip ne 'Y'}">
<form:checkbox path="isTip" value="Y"/>
</c:if>
同步到首页弹窗
<c:if test="${article.isFlow eq 1}">
<form:checkbox path="isFlow" value="1" checked="checked"/>
<c:if test="${article.isFlow eq 'Y'}">
<form:checkbox path="isFlow" value="Y" checked="checked"/>
</c:if>
<c:if test="${article.isFlow ne 1}">
<form:checkbox path="isFlow" value="1"/>
<c:if test="${article.isFlow ne 'Y'}">
<form:checkbox path="isFlow" value="Y"/>
</c:if>同步到首页滚动新闻
<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