Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
H
hxkf
Project
Project
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
Graph
比较
统计图
议题
0
议题
0
列表
看板
标记
Milestones
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
注册表
注册表
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
svn
hxkf
Commits
d4af06d3
提交
d4af06d3
authored
5月 29, 2020
作者:
liupengfei
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
--no commit message
上级
f292892c
隐藏空白字符变更
内嵌
并排
正在显示
2 个修改的文件
包含
75 行增加
和
1 行删除
+75
-1
BulletinContentController.java
...ser/bg/controller/bulletin/BulletinContentController.java
+15
-1
BulletinContentForm.java
...sysuser/commons/form/bg/bulletin/BulletinContentForm.java
+60
-0
没有找到文件。
app/sysuser/src/main/java/com/zrqx/sysuser/bg/controller/bulletin/BulletinContentController.java
浏览文件 @
d4af06d3
package
com
.
zrqx
.
sysuser
.
bg
.
controller
.
bulletin
;
import
java.text.ParseException
;
import
java.text.SimpleDateFormat
;
import
java.util.Arrays
;
import
java.util.Date
;
import
org.springframework.beans.BeanUtils
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.web.bind.annotation.GetMapping
;
import
org.springframework.web.bind.annotation.PathVariable
;
...
...
@@ -16,6 +19,7 @@ import com.zrqx.core.util.page.PageInfo;
import
com.zrqx.core.util.page.PageParam
;
import
com.zrqx.core.util.response.CallBack
;
import
com.zrqx.sysuser.bg.service.bulletin.BulletinContentService
;
import
com.zrqx.sysuser.commons.form.bg.bulletin.BulletinContentForm
;
import
com.zrqx.sysuser.commons.form.bg.bulletin.BulletinContentStatusForm
;
import
com.zrqx.sysuser.commons.form.bg.bulletin.QueryBulletinContentForm
;
import
com.zrqx.sysuser.commons.form.bg.bulletin.UpdateBulletinContentForm
;
...
...
@@ -38,10 +42,20 @@ public class BulletinContentController {
@ApiOperation
(
value
=
"新增"
,
notes
=
"新增一个"
)
@PostMapping
(
value
=
"/save"
)
public
CallBack
<
Boolean
>
saveAdsign
(
@RequestBody
BulletinContent
entity
)
{
public
CallBack
<
Boolean
>
saveAdsign
(
@RequestBody
BulletinContentForm
form
)
{
BulletinContent
entity
=
new
BulletinContent
();
Date
releaserTime
=
null
;
SimpleDateFormat
sdf2
=
new
SimpleDateFormat
(
"yyyy-MM-dd"
);
try
{
releaserTime
=
sdf2
.
parse
(
form
.
getReleaserTime
());
}
catch
(
ParseException
e
)
{
e
.
printStackTrace
();
}
entity
.
setReleaserTime
(
releaserTime
);
entity
.
setTopStatus
(
0
);
entity
.
setCreateTime
(
new
Date
());
entity
.
setBrowseNum
(
0
);
BeanUtils
.
copyProperties
(
form
,
entity
);
if
(!
service
.
insert
(
entity
))
{
throw
new
BaseException
(
"操作失败"
);
}
...
...
app/sysuser/src/main/java/com/zrqx/sysuser/commons/form/bg/bulletin/BulletinContentForm.java
0 → 100644
浏览文件 @
d4af06d3
package
com
.
zrqx
.
sysuser
.
commons
.
form
.
bg
.
bulletin
;
import
java.util.Date
;
import
javax.persistence.GeneratedValue
;
import
javax.persistence.Id
;
import
com.fasterxml.jackson.annotation.JsonIgnore
;
import
com.zrqx.core.enums.StatusEnum
;
import
io.swagger.annotations.ApiModel
;
import
io.swagger.annotations.ApiModelProperty
;
import
lombok.Data
;
/**
* 公告内容
*
*/
@Data
@ApiModel
(
value
=
"BulletinContentForm"
,
description
=
"公告内容BulletinContentForm"
)
public
class
BulletinContentForm
{
// 广告位ID
@Id
@GeneratedValue
(
generator
=
"JDBC"
)
@ApiModelProperty
(
value
=
"内容ID"
)
private
Integer
id
;
@ApiModelProperty
(
value
=
"内容标题"
,
required
=
true
)
private
String
title
;
@ApiModelProperty
(
value
=
"栏目id"
,
required
=
true
)
private
Integer
columnId
;
@ApiModelProperty
(
value
=
"来源"
,
required
=
true
)
private
String
source
;
@ApiModelProperty
(
value
=
"发布时间"
,
required
=
true
)
private
String
releaserTime
;
@ApiModelProperty
(
value
=
"发布人"
,
required
=
true
)
private
String
releaser
;
@ApiModelProperty
(
value
=
"公告内容"
)
private
String
content
;
@ApiModelProperty
(
value
=
"置顶状态:0未置顶,1已置顶"
)
private
Integer
topStatus
;
@ApiModelProperty
(
value
=
"浏览量"
)
private
Integer
browseNum
;
/***
* @see StatusEnum
*/
@ApiModelProperty
(
value
=
"上架状态 0:下架 1:上架"
)
private
Integer
status
;
@ApiModelProperty
(
value
=
"创建时间"
)
@JsonIgnore
private
Date
createTime
;
@ApiModelProperty
(
value
=
"更新时间"
)
@JsonIgnore
private
Date
updateTime
;
/** @see com.zrqx.core.enums.LinkTypeEnum */
@ApiModelProperty
(
value
=
"链接类型 0 默认 1内链 2外链"
)
private
String
linkType
;
@ApiModelProperty
(
value
=
"链接地址"
)
private
String
linkUrl
;
}
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论