Sfoglia il codice sorgente

添加内容概要

zhangding 5 anni fa
parent
commit
392e825988

+ 8 - 1
dgtly-admin/src/main/resources/templates/system/notice/add.html

@@ -21,7 +21,14 @@
 			<div class="form-group">	
 				<label class="col-sm-2 control-label">标题:</label>
 				<div class="col-sm-10">
-					<input id="noticeTitle" name="noticeTitle" class="form-control" type="text" required>
+					<input id="noticeTitle" name="noticeTitle" class="form-control" type="text" required maxlength="50">
+				</div>
+			</div>
+
+			<div class="form-group">
+				<label class="col-sm-2 control-label">概要:</label>
+				<div class="col-sm-10">
+					<input id="noticeOutline" name="noticeOutline" class="form-control" type="text" required>
 				</div>
 			</div>
 

+ 7 - 0
dgtly-admin/src/main/resources/templates/system/notice/edit.html

@@ -25,6 +25,13 @@
                     <input id="noticeTitle" name="noticeTitle" th:field="*{noticeTitle}" class="form-control" type="text" required>
                 </div>
             </div>
+
+            <div class="form-group">
+                <label class="col-sm-2 control-label">概要:</label>
+                <div class="col-sm-10">
+                    <input id="noticeOutline" name="noticeOutline" th:field="*{noticeOutline}" class="form-control" type="text" required maxlength="50">
+                </div>
+            </div>
             <div class="form-group">
 
                 <input id="fmzFile" name="fmzFile" type="hidden"/>

+ 12 - 0
dgtly-system/src/main/java/com/dgtly/system/domain/SysNotice.java

@@ -24,6 +24,9 @@ public class SysNotice extends BaseEntity
     /** 公告标题 */
     private String noticeTitle;
 
+    /** 公告概要 */
+    private String noticeOutline;
+
     /** 公告类型(1通知 2公告) */
     private String noticeType;
 
@@ -71,6 +74,14 @@ public class SysNotice extends BaseEntity
         return noticeTitle;
     }
 
+    public String getNoticeOutline() {
+        return noticeOutline;
+    }
+
+    public void setNoticeOutline(String noticeOutline) {
+        this.noticeOutline = noticeOutline;
+    }
+
     public void setNoticeType(String noticeType)
     {
         this.noticeType = noticeType;
@@ -138,6 +149,7 @@ public class SysNotice extends BaseEntity
             .append("updateBy", getUpdateBy())
             .append("updateTime", getUpdateTime())
             .append("remark", getRemark())
+            .append("noticeOutline", getNoticeOutline())
             .toString();
     }
 }

+ 6 - 1
dgtly-system/src/main/resources/mapper/system/SysNoticeMapper.xml

@@ -8,6 +8,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
         <result property="noticeId"       column="notice_id"       />
         <result property="companyId"    column="company_id"    />
         <result property="noticeTitle"    column="notice_title"    />
+        <result property="noticeOutline"    column="notice_outline"    />
         <result property="noticeType"     column="notice_type"     />
         <result property="noticeContent"  column="notice_content"  />
         <result property="status"         column="status"          />
@@ -20,7 +21,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
     </resultMap>
     
     <sql id="selectNoticeVo">
-        select notice_id,company_id,notice_title, notice_type, notice_content, status, create_by, fmz_file_url, create_time, update_by, update_time, remark
+        select notice_id,company_id,notice_title,notice_outline, notice_type, notice_content, status, create_by, fmz_file_url, create_time, update_by, update_time, remark
 		from sys_notice
     </sql>
 
@@ -28,6 +29,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
         select sn.notice_id,
         su.company_id,
         sn.notice_title,
+        sn.notice_outline,
         sn.notice_type,
         sn.notice_content,
         sn.status,
@@ -116,6 +118,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
         insert into sys_notice (
             <if test="companyId != null and companyId != 0">company_id,</if>
 			<if test="noticeTitle != null and noticeTitle != '' ">notice_title, </if>
+			<if test="noticeOutline != null and noticeOutline != '' ">notice_outline, </if>
 			<if test="noticeType != null and noticeType != '' ">notice_type, </if>
 			<if test="noticeContent != null and noticeContent != '' ">notice_content, </if>
 			<if test="status != null and status != '' ">status, </if>
@@ -126,6 +129,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
  		)values(
             <if test="companyId != null and companyId != 0">#{companyId},</if>
 			<if test="noticeTitle != null and noticeTitle != ''">#{noticeTitle}, </if>
+			<if test="noticeOutline != null and noticeOutline != ''">#{noticeOutline}, </if>
 			<if test="noticeType != null and noticeType != ''">#{noticeType}, </if>
 			<if test="noticeContent != null and noticeContent != ''">#{noticeContent}, </if>
 			<if test="status != null and status != ''">#{status}, </if>
@@ -140,6 +144,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
         update sys_notice 
         <set>
             <if test="noticeTitle != null and noticeTitle != ''">notice_title = #{noticeTitle}, </if>
+            <if test="noticeOutline != null and noticeOutline != ''">notice_outline = #{noticeOutline}, </if>
             <if test="noticeType != null and noticeType != ''">notice_type = #{noticeType}, </if>
             <if test="noticeContent != null">notice_content = #{noticeContent}, </if>
             <if test="status != null and status != ''">status = #{status}, </if>