Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
I
ims
概览
概览
详情
活动
周期分析
版本库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
统计图
问题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程表
图表
维基
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
iuav
ims
Commits
81accfcc
提交
81accfcc
authored
11月 15, 2023
作者:
刘明祎-运维用途
浏览文件
操作
浏览文件
下载
差异文件
Merge branch 'develop'
上级
39059c8c
c477a655
隐藏空白字符变更
内嵌
并排
正在显示
6 个修改的文件
包含
25 行增加
和
12 行删除
+25
-12
IndustryNewsDTO.java
.../main/java/com/mmc/csf/infomation/vo/IndustryNewsDTO.java
+2
-0
IndustryNewsVO.java
...c/main/java/com/mmc/csf/infomation/vo/IndustryNewsVO.java
+3
-0
kustomization.yaml
kustomization/overlays/dev/kustomization.yaml
+1
-1
IndustryNewsDO.java
...om/mmc/csf/release/entity/information/IndustryNewsDO.java
+5
-3
IndustryNewsServiceImpl.java
...mmc/csf/release/service/impl/IndustryNewsServiceImpl.java
+2
-2
IndustryNewsDao.xml
...ervice/src/main/resources/mapper/news/IndustryNewsDao.xml
+12
-6
没有找到文件。
csf-common/csf-common-model/src/main/java/com/mmc/csf/infomation/vo/IndustryNewsDTO.java
浏览文件 @
81accfcc
...
...
@@ -37,4 +37,6 @@ public class IndustryNewsDTO implements Serializable {
private
Date
createTime
;
@ApiModelProperty
(
value
=
"最新修改时间"
)
private
Date
updateTime
;
@ApiModelProperty
(
value
=
"是否是热点新闻"
)
private
Integer
isHot
;
}
csf-common/csf-common-model/src/main/java/com/mmc/csf/infomation/vo/IndustryNewsVO.java
浏览文件 @
81accfcc
...
...
@@ -44,4 +44,7 @@ public class IndustryNewsVO implements Serializable {
@ApiModelProperty
(
value
=
"来源"
,
example
=
"来源"
)
private
String
origin
;
@ApiModelProperty
(
value
=
"是否是热点新闻 1是 0不是"
)
private
Integer
isHot
;
}
kustomization/overlays/dev/kustomization.yaml
浏览文件 @
81accfcc
...
...
@@ -18,4 +18,4 @@ patches:
images
:
-
name
:
REGISTRY/NAMESPACE/IMAGE:TAG
newName
:
mmc-registry.cn-shenzhen.cr.aliyuncs.com/sharefly-dev/ims
newTag
:
838bc9199adfa6b189b70c2d0c26495670522bda
newTag
:
d716ba06478c08d9f6c49cbc563152e57391fec3
release-service/src/main/java/com/mmc/csf/release/entity/information/IndustryNewsDO.java
浏览文件 @
81accfcc
...
...
@@ -2,6 +2,7 @@ package com.mmc.csf.release.entity.information;
import
com.mmc.csf.infomation.vo.IndustryNewsDTO
;
import
io.swagger.annotations.ApiModelProperty
;
import
io.swagger.models.auth.In
;
import
lombok.AllArgsConstructor
;
import
lombok.Builder
;
import
lombok.Data
;
...
...
@@ -32,13 +33,13 @@ public class IndustryNewsDO implements Serializable {
@ApiModelProperty
(
value
=
"来源"
)
private
String
origin
;
private
Integer
isDeleted
;
private
Integer
isHot
;
public
IndustryNewsDTO
buildIndustryNewsDTO
(){
return
IndustryNewsDTO
.
builder
().
id
(
id
).
newsTitle
(
newsTitle
).
newsAuthor
(
newsAuthor
).
userAccountId
(
userAccountId
).
surfaceImg
(
surfaceImg
).
newsContents
(
newsContents
).
createTime
(
createTime
).
updateTime
(
updateTime
).
origin
(
origin
).
build
();
newsContents
(
newsContents
).
isHot
(
isHot
).
createTime
(
createTime
).
updateTime
(
updateTime
).
origin
(
origin
).
build
();
}
public
IndustryNewsDO
(
Integer
id
,
String
newsTitle
,
String
newsAuthor
,
Integer
userAccountId
,
String
surfaceImg
,
String
newsContents
,
String
origin
)
{
public
IndustryNewsDO
(
Integer
id
,
String
newsTitle
,
String
newsAuthor
,
Integer
userAccountId
,
String
surfaceImg
,
String
newsContents
,
String
origin
,
Integer
isHot
)
{
this
.
id
=
id
;
this
.
newsTitle
=
newsTitle
;
this
.
newsAuthor
=
newsAuthor
;
...
...
@@ -46,5 +47,6 @@ public class IndustryNewsDO implements Serializable {
this
.
surfaceImg
=
surfaceImg
;
this
.
newsContents
=
newsContents
;
this
.
origin
=
origin
;
this
.
isHot
=
isHot
;
}
}
release-service/src/main/java/com/mmc/csf/release/service/impl/IndustryNewsServiceImpl.java
浏览文件 @
81accfcc
...
...
@@ -72,14 +72,14 @@ public class IndustryNewsServiceImpl implements IndustryNewsService {
if
(
count
>
0
){
return
ResultBody
.
error
(
ResultEnum
.
INDUSTRY_NEWS_TITLE_EXISTS
);
}
industryNewsDO
=
new
IndustryNewsDO
(
param
.
getId
(),
param
.
getNewsTitle
(),
param
.
getNewsAuthor
(),
userAccountId
,
param
.
getSurfaceImg
(),
param
.
getNewsContents
(),
param
.
getOrigin
());
industryNewsDO
=
new
IndustryNewsDO
(
param
.
getId
(),
param
.
getNewsTitle
(),
param
.
getNewsAuthor
(),
userAccountId
,
param
.
getSurfaceImg
(),
param
.
getNewsContents
(),
param
.
getOrigin
()
,
param
.
getIsHot
()
);
industryNewsDao
.
insert
(
industryNewsDO
);
return
ResultBody
.
success
();
}
@Override
public
ResultBody
upDateIndustryNews
(
IndustryNewsVO
param
,
Integer
userAccountId
)
{
IndustryNewsDO
industryNewsDO
=
new
IndustryNewsDO
(
param
.
getId
(),
param
.
getNewsTitle
(),
param
.
getNewsAuthor
(),
userAccountId
,
param
.
getSurfaceImg
(),
param
.
getNewsContents
(),
param
.
getOrigin
());
IndustryNewsDO
industryNewsDO
=
new
IndustryNewsDO
(
param
.
getId
(),
param
.
getNewsTitle
(),
param
.
getNewsAuthor
(),
userAccountId
,
param
.
getSurfaceImg
(),
param
.
getNewsContents
(),
param
.
getOrigin
()
,
param
.
getIsHot
()
);
industryNewsDao
.
update
(
industryNewsDO
);
return
ResultBody
.
success
();
}
...
...
release-service/src/main/resources/mapper/news/IndustryNewsDao.xml
浏览文件 @
81accfcc
...
...
@@ -46,7 +46,7 @@
<if
test=
"keyword != null "
>
and news_title like CONCAT("%",#{keyword},"%")
</if>
order by create_time desc
order by
is_hot desc,
create_time desc
limit #{pageNo}, #{pageSize}
</select>
...
...
@@ -59,7 +59,8 @@
news_contents,
origin,
create_time,
update_time
update_time,
is_hot
from industry_news
where is_deleted = 0
and id = #{id}
...
...
@@ -93,8 +94,8 @@
<insert
id=
"insert"
parameterType=
"com.mmc.csf.release.entity.information.IndustryNewsDO"
useGeneratedKeys=
"true"
keyColumn=
"id"
>
insert into industry_news(news_title, news_author, user_account_id, surface_img, news_contents, origin,
create_time)
values (#{newsTitle}, #{newsAuthor}, #{userAccountId}, #{surfaceImg}, #{newsContents}, #{origin}, now())
create_time
,is_hot
)
values (#{newsTitle}, #{newsAuthor}, #{userAccountId}, #{surfaceImg}, #{newsContents}, #{origin}, now()
,#{isHot}
)
</insert>
<update
id=
"update"
parameterType=
"com.mmc.csf.release.entity.information.IndustryNewsDO"
>
...
...
@@ -121,6 +122,9 @@
<if
test=
"isDeleted !=null"
>
is_deleted = #{isDeleted},
</if>
<if
test=
"isHot != null"
>
is_hot = #{isHot}
</if>
</set>
where is_deleted = 0 and id = #{id}
</update>
...
...
@@ -152,7 +156,8 @@
news_contents,
origin,
create_time,
update_time
update_time,
is_hot
from industry_news
<where>
is_deleted = 0
...
...
@@ -166,7 +171,7 @@
and create_time
<
= #{endTime}
</if>
</where>
order by create_time desc
order by
is_hot desc,
create_time desc
limit #{pageNo}, #{pageSize}
</select>
</mapper>
\ No newline at end of file
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论