Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
I
ims-ci-test
概览
概览
详情
活动
周期分析
版本库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
统计图
问题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程表
图表
维基
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
test-ci
ims-ci-test
Commits
949eecec
提交
949eecec
authored
6月 19, 2023
作者:
panda
提交者:
余乾开
7月 01, 2023
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
行业新闻相关接口
上级
4418d203
隐藏空白字符变更
内嵌
并排
正在显示
5 个修改的文件
包含
112 行增加
和
15 行删除
+112
-15
IndustryNewsController.java
...om/mmc/csf/release/controller/IndustryNewsController.java
+7
-4
IndustryNewsDao.java
...rc/main/java/com/mmc/csf/release/dao/IndustryNewsDao.java
+4
-3
IndustryNewsService.java
...java/com/mmc/csf/release/service/IndustryNewsService.java
+2
-1
IndustryNewsServiceImpl.java
...mmc/csf/release/service/impl/IndustryNewsServiceImpl.java
+9
-7
IndustryNewsDao.xml
...ervice/src/main/resources/mapper/news/IndustryNewsDao.xml
+90
-0
没有找到文件。
release-service/src/main/java/com/mmc/csf/release/controller/IndustryNewsController.java
浏览文件 @
949eecec
package
com
.
mmc
.
csf
.
release
.
controller
;
import
javax.servlet.http.HttpServletRequest
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.validation.annotation.Validated
;
import
org.springframework.web.bind.annotation.*
;
import
com.mmc.csf.common.util.web.ResultBody
;
import
com.mmc.csf.infomation.qo.IndustryCaseQO
;
import
com.mmc.csf.infomation.qo.IndustryNewsQO
;
...
...
@@ -9,14 +15,11 @@ import com.mmc.csf.release.model.group.Create;
import
com.mmc.csf.release.model.group.Page
;
import
com.mmc.csf.release.model.group.Update
;
import
com.mmc.csf.release.service.IndustryNewsService
;
import
io.swagger.annotations.Api
;
import
io.swagger.annotations.ApiOperation
;
import
io.swagger.annotations.ApiResponse
;
import
io.swagger.annotations.ApiResponses
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.validation.annotation.Validated
;
import
org.springframework.web.bind.annotation.*
;
import
javax.servlet.http.HttpServletRequest
;
/**
* @author: zj
...
...
release-service/src/main/java/com/mmc/csf/release/dao/IndustryNewsDao.java
浏览文件 @
949eecec
package
com
.
mmc
.
csf
.
release
.
dao
;
import
java.util.List
;
import
org.apache.ibatis.annotations.Mapper
;
import
com.mmc.csf.infomation.qo.IndustryCaseQO
;
import
com.mmc.csf.infomation.qo.IndustryNewsQO
;
import
com.mmc.csf.release.entity.information.IndustryNewsDO
;
import
org.apache.ibatis.annotations.Mapper
;
import
java.util.List
;
/**
* @author: zj
...
...
release-service/src/main/java/com/mmc/csf/release/service/IndustryNewsService.java
浏览文件 @
949eecec
package
com
.
mmc
.
csf
.
release
.
service
;
import
javax.servlet.http.HttpServletRequest
;
import
com.mmc.csf.common.util.web.ResultBody
;
import
com.mmc.csf.infomation.qo.IndustryCaseQO
;
import
com.mmc.csf.infomation.qo.IndustryNewsQO
;
import
com.mmc.csf.infomation.vo.IndustryNewsDTO
;
import
com.mmc.csf.infomation.vo.IndustryNewsVO
;
import
javax.servlet.http.HttpServletRequest
;
/**
* @author: zj
...
...
release-service/src/main/java/com/mmc/csf/release/service/impl/IndustryNewsServiceImpl.java
浏览文件 @
949eecec
package
com
.
mmc
.
csf
.
release
.
service
.
impl
;
import
java.util.List
;
import
java.util.stream.Collectors
;
import
javax.servlet.http.HttpServletRequest
;
import
org.apache.commons.collections4.CollectionUtils
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Service
;
import
com.mmc.csf.common.util.page.PageResult
;
import
com.mmc.csf.common.util.web.ResultBody
;
import
com.mmc.csf.common.util.web.ResultEnum
;
...
...
@@ -12,13 +21,6 @@ import com.mmc.csf.release.dao.IndustryNewsDao;
import
com.mmc.csf.release.entity.information.IndustryNewsDO
;
import
com.mmc.csf.release.feign.UserAppApi
;
import
com.mmc.csf.release.service.IndustryNewsService
;
import
org.apache.commons.collections4.CollectionUtils
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Service
;
import
javax.servlet.http.HttpServletRequest
;
import
java.util.List
;
import
java.util.stream.Collectors
;
/**
* @author: zj
...
...
release-service/src/main/resources/mapper/news/IndustryNewsDao.xml
浏览文件 @
949eecec
...
...
@@ -139,6 +139,96 @@
<select
id=
"backgroundListNewsPage"
parameterType=
"com.mmc.csf.infomation.qo.IndustryNewsQO"
resultType=
"com.mmc.csf.release.entity.information.IndustryNewsDO"
>
select id,
news_title,
news_author,
user_account_id,
surface_img,
news_contents,
origin,
create_time,
update_time
from industry_news
where is_deleted = 0
and id = #{id}
</select>
<select
id=
"count"
resultType=
"java.lang.Integer"
parameterType=
"com.mmc.csf.release.entity.IndustryNewsDO"
>
select count(*)
from industry_news
<where>
is_deleted = 0
<if
test=
"newsTitle != null and newsTitle != ''"
>
and news_title = #{newsTitle}
</if>
<if
test=
"newsAuthor != null and newsAuthor != ''"
>
and news_author = #{newsAuthor}
</if>
<if
test=
"userAccountId != null"
>
and user_account_id = #{userAccountId}
</if>
<if
test=
"surfaceImg != null and surfaceImg != ''"
>
and surface_img = #{surfaceImg}
</if>
<if
test=
"newsContents != null and newsContents != ''"
>
and news_contents = #{newsContents}
</if>
<if
test=
"origin != null and origin != ''"
>
and origin = #{origin}
</if>
</where>
</select>
<insert
id=
"insert"
parameterType=
"com.mmc.csf.release.entity.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())
</insert>
<update
id=
"update"
parameterType=
"com.mmc.csf.release.entity.IndustryNewsDO"
>
update industry_news
<set>
<if
test=
"newsTitle != null and newsTitle != ''"
>
news_title = #{newsTitle},
</if>
<if
test=
"newsAuthor != null and newsAuthor != ''"
>
news_author = #{newsAuthor},
</if>
<if
test=
"userAccountId != null"
>
user_account_id = #{userAccountId},
</if>
<if
test=
"surfaceImg != null and surfaceImg != ''"
>
surface_img = #{surfaceImg},
</if>
<if
test=
"newsContents != null"
>
news_contents = #{newsContents},
</if>
<if
test=
"origin != null and origin != ''"
>
origin = #{origin},
</if>
</set>
where is_deleted = 0 and id = #{id}
</update>
<select
id=
"countPage"
parameterType=
"com.mmc.csf.infomation.qo.IndustryNewsQO"
resultType=
"java.lang.Integer"
>
select count(*)
from industry_news
<where>
is_deleted = 0
<if
test=
"newsTitle != null and newsTitle != ''"
>
and news_title like concat('%',#{newsTitle},'%')
</if>
<if
test=
"startTime != null"
>
and create_time
>
= #{startTime}
</if>
<if
test=
"endTime != null"
>
and create_time
<
= #{endTime}
</if>
</where>
</select>
<select
id=
"backgroundListNewsPage"
parameterType=
"com.mmc.csf.infomation.qo.IndustryNewsQO"
resultType=
"com.mmc.csf.release.entity.IndustryNewsDO"
>
select id,
news_title,
news_author,
user_account_id,
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论