Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
I
ims
概览
概览
详情
活动
周期分析
版本库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
统计图
问题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程表
图表
维基
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
iuav
ims
Commits
8a9aa630
提交
8a9aa630
authored
6月 21, 2023
作者:
张小凤
提交者:
余乾开
7月 01, 2023
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Banner(update)
上级
b8f775fb
显示空白字符变更
内嵌
并排
正在显示
3 个修改的文件
包含
31 行增加
和
45 行删除
+31
-45
BannerInfoDO.java
.../java/com/mmc/csf/release/entity/module/BannerInfoDO.java
+24
-19
ModuleInfoServiceImpl.java
...m/mmc/csf/release/service/impl/ModuleInfoServiceImpl.java
+0
-8
ModuleInfoDao.xml
...ervice/src/main/resources/mapper/module/ModuleInfoDao.xml
+7
-18
没有找到文件。
release-service/src/main/java/com/mmc/csf/release/entity/module/BannerInfoDO.java
浏览文件 @
8a9aa630
...
...
@@ -33,18 +33,10 @@ public class BannerInfoDO implements Serializable {
*/
private
String
bannerImg
;
/**
* banner类型(0无,1海报,
2页面
)
* banner类型(0无,1海报,
3 路由 路由(需要授权)等
)
*/
private
Integer
bannerType
;
/**
* 商品id
*/
/* private Integer goodsId;*/
/**
* 海报图片url
*/
private
String
bannerPoster
;
/**
* 页面url
*/
private
String
bannerUrl
;
...
...
@@ -53,10 +45,7 @@ public class BannerInfoDO implements Serializable {
*/
private
String
detailInfo
;
private
Integer
sort
;
/**
* 富文本内容
*/
private
String
textContent
;
/**
* 有效开始时间
*/
...
...
@@ -78,25 +67,41 @@ public class BannerInfoDO implements Serializable {
public
BannerInfoDTO
buildBannerInfoDTO
(){
Date
now
=
new
Date
();
return
BannerInfoDTO
.
builder
().
id
(
this
.
id
).
moduleId
(
this
.
moduleId
).
bannerName
(
this
.
bannerName
).
bannerImg
(
this
.
bannerImg
)
.
bannerPoster
(
this
.
bannerPoster
).
sort
(
this
.
sort
).
using
(
this
.
endTime
!=
null
?
(
now
.
before
(
this
.
endTime
)
?
(
this
.
using
==
1
?
1
:
0
)
:
0
)
:
(
this
.
using
==
1
?
1
:
0
))
.
deleted
(
this
.
deleted
).
createTime
(
this
.
createTime
).
bannerType
(
this
.
bannerType
).
bannerUrl
(
this
.
bannerUrl
).
textContent
(
this
.
textContent
)
Integer
bannerType
=
this
.
bannerType
;
String
bannerPoster
=
null
;
String
textContent
=
null
;
String
bannerUrls
=
null
;
if
(
"1"
.
equals
(
bannerType
.
toString
())){
bannerPoster
=
this
.
bannerUrl
;
}
else
if
(
"11"
.
equals
(
bannerType
.
toString
())){
textContent
=
this
.
bannerUrl
;
}
else
if
(!
"1"
.
equals
(
bannerType
.
toString
())
&&
!
"11"
.
equals
(
bannerType
.
toString
())){
bannerUrls
=
this
.
bannerUrl
;
}
return
BannerInfoDTO
.
builder
()
.
id
(
this
.
id
).
moduleId
(
this
.
moduleId
).
bannerName
(
this
.
bannerName
).
bannerImg
(
this
.
bannerImg
)
.
bannerPoster
(
bannerPoster
).
sort
(
this
.
sort
).
using
(
this
.
endTime
!=
null
?
(
now
.
before
(
this
.
endTime
)
?
(
this
.
using
==
1
?
1
:
0
)
:
0
)
:
(
this
.
using
==
1
?
1
:
0
))
.
deleted
(
this
.
deleted
).
createTime
(
this
.
createTime
).
bannerType
(
this
.
bannerType
).
bannerUrl
(
bannerUrls
).
textContent
(
textContent
)
.
detailInfo
(
this
.
detailInfo
).
startTime
(
this
.
startTime
).
endTime
(
this
.
endTime
).
build
();
}
public
BannerInfoDO
(
BannerInfoVO
bannerInfoVO
){
if
(
"1"
.
equals
(
bannerInfoVO
.
getBannerType
().
toString
())){
this
.
bannerUrl
=
bannerInfoVO
.
getBannerPoster
();
}
else
if
(
"11"
.
equals
(
bannerInfoVO
.
getBannerType
().
toString
())){
this
.
bannerUrl
=
bannerInfoVO
.
getTextContent
();
}
else
if
(!
"1"
.
equals
(
bannerInfoVO
.
getBannerType
().
toString
())
&&
!
"11"
.
equals
(
bannerInfoVO
.
getBannerType
().
toString
())){
this
.
bannerUrl
=
bannerInfoVO
.
getBannerUrl
();
}
this
.
id
=
bannerInfoVO
.
getId
();
this
.
moduleId
=
bannerInfoVO
.
getModuleId
();
this
.
bannerName
=
bannerInfoVO
.
getBannerName
();
this
.
bannerImg
=
bannerInfoVO
.
getBannerImg
();
this
.
bannerType
=
bannerInfoVO
.
getBannerType
();
this
.
bannerPoster
=
bannerInfoVO
.
getBannerPoster
();
this
.
bannerUrl
=
bannerInfoVO
.
getBannerUrl
();
this
.
sort
=
bannerInfoVO
.
getSort
();
this
.
using
=
bannerInfoVO
.
getUsing
();
this
.
detailInfo
=
bannerInfoVO
.
getDetailInfo
();
this
.
startTime
=
bannerInfoVO
.
getStartTime
();
this
.
endTime
=
bannerInfoVO
.
getEndTime
();
this
.
textContent
=
bannerInfoVO
.
getTextContent
();
}
}
release-service/src/main/java/com/mmc/csf/release/service/impl/ModuleInfoServiceImpl.java
浏览文件 @
8a9aa630
...
...
@@ -128,14 +128,6 @@ public class ModuleInfoServiceImpl implements ModuleInfoService {
return
ResultBody
.
error
(
ResultEnum
.
EXIST_SAME_NAME_OF_BANNER_ERROR
);
}
BannerInfoDO
bannerInfoDO
=
new
BannerInfoDO
(
bannerInfoVO
);
if
(
"0"
.
equals
(
bannerInfoVO
.
getBannerType
().
toString
())){
bannerInfoDO
.
setBannerUrl
(
""
);
bannerInfoDO
.
setBannerPoster
(
""
);
}
else
if
(
"1"
.
equals
(
bannerInfoVO
.
getBannerType
().
toString
())){
bannerInfoDO
.
setBannerUrl
(
""
);
}
else
if
(
"2"
.
equals
(
bannerInfoVO
.
getBannerType
().
toString
())){
bannerInfoDO
.
setBannerPoster
(
""
);
}
moduleInfoDao
.
updateBannerInfo
(
bannerInfoDO
);
return
ResultBody
.
success
();
}
...
...
release-service/src/main/resources/mapper/module/ModuleInfoDao.xml
浏览文件 @
8a9aa630
...
...
@@ -19,13 +19,10 @@
<result
column=
"module_id"
property=
"moduleId"
/>
<result
column=
"banner_name"
property=
"bannerName"
/>
<result
column=
"banner_img"
property=
"bannerImg"
/>
<result
column=
"banner_poster"
property=
"bannerPoster"
/>
<result
column=
"banner_type"
property=
"bannerType"
/>
<result
column=
"goods_id"
property=
"goodsId"
/>
<result
column=
"detail_info"
property=
"detailInfo"
/>
<result
column=
"banner_url"
property=
"bannerUrl"
/>
<result
column=
"sort"
property=
"sort"
/>
<result
column=
"text_content"
property=
"textContent"
/>
<result
column=
"start_time"
property=
"startTime"
/>
<result
column=
"end_time"
property=
"endTime"
/>
<result
column=
"is_using"
property=
"using"
/>
...
...
@@ -111,8 +108,8 @@
</select>
<select
id=
"listBannerInfoPage"
resultMap=
"bannerInfoResultMap"
parameterType=
"com.mmc.csf.infomation.qo.BannerInfoQO"
>
select bi.id,bi.module_id,bi.banner_name,bi.banner_img,bi.banner_
poster,bi.banner_
type,bi.goods_id,bi.banner_url,bi.sort,
bi.start_time,bi.end_time,bi.is_using,bi.is_deleted,bi.create_time,bi.update_time,mi.module_name,bi.detail_info
,bi.text_content
select bi.id,bi.module_id,bi.banner_name,bi.banner_img,bi.banner_type,bi.goods_id,bi.banner_url,bi.sort,
bi.start_time,bi.end_time,bi.is_using,bi.is_deleted,bi.create_time,bi.update_time,mi.module_name,bi.detail_info
from banner_info bi INNER JOIN module_info mi ON bi.module_id = mi.id
where bi.is_deleted = 0
<if
test=
" keyword != null and keyword != '' "
>
...
...
@@ -147,8 +144,8 @@
<insert
id=
"insertBannerInfo"
useGeneratedKeys=
"true"
keyProperty=
"id"
parameterType=
"com.mmc.csf.release.entity.module.BannerInfoDO"
>
insert into banner_info(module_id,banner_name,banner_img,banner_type,
goods_id,detail_info,banner_poster,banner_url,start_time,end_time,text_content
,sort,is_using,create_time)
values(#{moduleId},#{bannerName},#{bannerImg},#{bannerType},#{
goodsId},#{detailInfo},#{bannerPoster},#{bannerUrl},#{startTime},#{endTime},#{textContent
},#{sort},#{using},NOW())
insert into banner_info(module_id,banner_name,banner_img,banner_type,
detail_info,banner_url,start_time,end_time
,sort,is_using,create_time)
values(#{moduleId},#{bannerName},#{bannerImg},#{bannerType},#{
detailInfo},#{bannerUrl},#{startTime},#{endTime
},#{sort},#{using},NOW())
</insert>
<update
id=
"updateBannerInfo"
parameterType=
"com.mmc.csf.release.entity.module.BannerInfoDO"
>
...
...
@@ -163,27 +160,19 @@
<if
test=
" bannerImg != null "
>
banner_img = #{bannerImg},
</if>
<if
test=
" bannerPoster != null "
>
banner_poster = #{bannerPoster},
</if>
<if
test=
" bannerUrl != null "
>
banner_url = #{bannerUrl},
</if>
<if
test=
" bannerType != null "
>
banner_type = #{bannerType},
</if>
<if
test=
" goodsId != null "
>
goods_id = #{goodsId},
</if>
<if
test=
" detailInfo != null "
>
detail_info = #{detailInfo},
</if>
<if
test=
" sort != null "
>
sort = #{sort},
</if>
<if
test=
" textContent != null "
>
text_content = #{textContent},
</if>
<if
test=
" using != null "
>
is_using = #{using},
</if>
...
...
@@ -211,8 +200,8 @@
</select>
<select
id=
"listBannerImg"
resultMap=
"bannerInfoResultMap"
>
select bi.id,bi.module_id,bi.banner_name,bi.banner_img,bi.banner_
poster,bi.banner_
type,bi.goods_id,bi.detail_info,
bi.banner_url,bi.start_time,bi.end_time,bi.sort,bi.start_time,bi.end_time,bi.is_using,bi.is_deleted,bi.create_time,bi.update_time
,bi.text_content
select bi.id,bi.module_id,bi.banner_name,bi.banner_img,bi.banner_type,bi.goods_id,bi.detail_info,
bi.banner_url,bi.start_time,bi.end_time,bi.sort,bi.start_time,bi.end_time,bi.is_using,bi.is_deleted,bi.create_time,bi.update_time
from banner_info bi INNER JOIN module_info mi ON bi.module_id = mi.id
where bi.is_deleted = 0 and bi.is_using = 1
and (bi.end_time is null
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论