Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
G
guns-vip
Overview
Overview
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
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
chenjunxiong
guns-vip
Commits
48b5dd43
Commit
48b5dd43
authored
May 09, 2017
by
fsn
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
新增通知的业务的编写
parent
d2ec5d93
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
27 additions
and
7 deletions
+27
-7
src/main/java/com/stylefeng/guns/modular/system/controller/NoticeController.java
+13
-1
src/main/webapp/WEB-INF/view/system/notice/notice_add.html
+13
-5
src/main/webapp/static/modular/system/notice/notice_info.js
+1
-1
No files found.
src/main/java/com/stylefeng/guns/modular/system/controller/NoticeController.java
View file @
48b5dd43
package
com
.
stylefeng
.
guns
.
modular
.
system
.
controller
;
package
com
.
stylefeng
.
guns
.
modular
.
system
.
controller
;
import
com.stylefeng.guns.common.controller.BaseController
;
import
com.stylefeng.guns.common.controller.BaseController
;
import
com.stylefeng.guns.common.exception.BizExceptionEnum
;
import
com.stylefeng.guns.common.exception.BussinessException
;
import
com.stylefeng.guns.core.shiro.ShiroKit
;
import
com.stylefeng.guns.core.util.ToolUtil
;
import
com.stylefeng.guns.modular.system.dao.NoticeDao
;
import
com.stylefeng.guns.modular.system.dao.NoticeDao
;
import
com.stylefeng.guns.persistence.model.Notice
;
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
;
...
@@ -9,6 +14,7 @@ import org.springframework.ui.Model;
...
@@ -9,6 +14,7 @@ import org.springframework.ui.Model;
import
org.springframework.web.bind.annotation.PathVariable
;
import
org.springframework.web.bind.annotation.PathVariable
;
import
javax.annotation.Resource
;
import
javax.annotation.Resource
;
import
java.util.Date
;
import
java.util.List
;
import
java.util.List
;
import
java.util.Map
;
import
java.util.Map
;
...
@@ -66,7 +72,13 @@ public class NoticeController extends BaseController {
...
@@ -66,7 +72,13 @@ public class NoticeController extends BaseController {
*/
*/
@RequestMapping
(
value
=
"/add"
)
@RequestMapping
(
value
=
"/add"
)
@ResponseBody
@ResponseBody
public
Object
add
()
{
public
Object
add
(
Notice
notice
)
{
if
(
ToolUtil
.
isOneEmpty
(
notice
,
notice
.
getTitle
(),
notice
.
getContent
())){
throw
new
BussinessException
(
BizExceptionEnum
.
REQUEST_NULL
);
}
notice
.
setCreater
(
ShiroKit
.
getUser
().
getId
());
notice
.
setCreatetime
(
new
Date
());
notice
.
insert
();
return
super
.
SUCCESS_TIP
;
return
super
.
SUCCESS_TIP
;
}
}
...
...
src/main/webapp/WEB-INF/view/system/notice/notice_add.html
View file @
48b5dd43
...
@@ -6,12 +6,20 @@
...
@@ -6,12 +6,20 @@
<input
type=
"hidden"
id=
"id"
value=
""
>
<input
type=
"hidden"
id=
"id"
value=
""
>
<div
class=
"row"
>
<div
class=
"row"
>
<div
class=
"col-sm-
6 b-r
"
>
<div
class=
"col-sm-
12
"
>
<div
class=
"form-group"
>
</div
>
<label
class=
"col-sm-1 control-label"
>
标题
</label
>
<div
class=
"col-sm-11"
>
<div
class=
"col-sm-6
"
>
<input
class=
"form-control"
id=
"title"
type=
"text
"
>
</div>
</div>
<div
class=
"form-group"
>
<label
class=
"col-sm-1 control-label"
>
内容
</label>
<div
class=
"col-sm-11"
>
<textarea
class=
"form-control"
id=
"content"
type=
"text"
></textarea>
</div>
</div>
</div>
</div>
</div>
</div>
...
...
src/main/webapp/static/modular/system/notice/notice_info.js
View file @
48b5dd43
...
@@ -44,7 +44,7 @@ NoticeInfoDlg.close = function() {
...
@@ -44,7 +44,7 @@ NoticeInfoDlg.close = function() {
* 收集数据
* 收集数据
*/
*/
NoticeInfoDlg
.
collectData
=
function
()
{
NoticeInfoDlg
.
collectData
=
function
()
{
this
.
set
(
'id'
);
this
.
set
(
'id'
)
.
set
(
'title'
).
set
(
'content'
)
;
}
}
/**
/**
...
...
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