Commit 20de9857 authored by liwei's avatar liwei

拼path路径,改为直接查url

parent 6059d7c2
......@@ -260,8 +260,9 @@ public class CmsActivity extends CyIdIncreEntity<CmsActivity> {
@TableField(exist = false)
private String nickName;
@TableField(exist = false)
private String path;
private String url;
......
......@@ -119,9 +119,6 @@ public class CmsActivityServiceImpl extends ServiceImpl<CmsActivityRepository, C
@Override
public CmsActivity findById(Integer id) {
CmsActivity cmsActivity = baseMapper.selectById(id);
if (cmsActivity.getPath() != null) {
cmsActivity.setPath(global.getBase_Discovery() + cmsActivity.getPath());
}
return cmsActivity;
}
......@@ -136,11 +133,6 @@ public class CmsActivityServiceImpl extends ServiceImpl<CmsActivityRepository, C
CmsActivity cmsActivity) {
IPage<CmsActivity> cmsActivityIPage = baseMapper.queryCmsActivityPaged(paginationUtility, cmsActivity);
List<CmsActivity> newsInformation = cmsActivityIPage.getRecords();
for (CmsActivity news : newsInformation) {
if (news.getPath() != null) {
news.setPath(global.getBase_Discovery() + news.getPath());
}
}
cmsActivityIPage.setRecords(newsInformation);
return cmsActivityIPage;
......
......@@ -51,7 +51,7 @@ public class CmsBanner extends CyIdIncreEntity<CmsBanner> {
* 图片地址
*/
@TableField(exist = false)
private String path;
private String url;
}
......
......@@ -94,9 +94,6 @@ public class CmsBannerServiceImpl extends ServiceImpl<CmsBannerRepository, CmsBa
@Override
public CmsBanner findById(String id){
CmsBanner banner = baseMapper.selectByIdWithUrl(id);
if (banner.getPath()!=null){
banner.setPath(global.getBase_Discovery()+banner.getPath());
}
return banner;
}
......@@ -110,11 +107,6 @@ public class CmsBannerServiceImpl extends ServiceImpl<CmsBannerRepository, CmsBa
CmsBanner cmsBanner){
IPage<CmsBanner> result = baseMapper.queryCmsBannersPaged(paginationUtility,cmsBanner);
List<CmsBanner> cmsBannerList = result.getRecords();
for (CmsBanner banner : cmsBannerList){
if (banner.getPath()!=null){
banner.setPath(global.getBase_Discovery()+banner.getPath());
}
}
return result;
}
......
......@@ -171,8 +171,9 @@ public class CmsNotice extends CyIdIncreEntity<CmsNotice> {
@TableField(exist = false)
private String nickName;
@TableField(exist = false)
private String path;
private String url;
}
......
......@@ -104,9 +104,6 @@ public class CmsNoticeServiceImpl extends ServiceImpl<CmsNoticeRepository, CmsNo
@Override
public CmsNotice findById(Integer id) {
CmsNotice cmsNotice = baseMapper.selectById(id);
if (cmsNotice.getPath() != null) {
cmsNotice.setPath(global.getBase_Discovery() + cmsNotice.getPath());
}
return cmsNotice;
}
......@@ -121,11 +118,6 @@ public class CmsNoticeServiceImpl extends ServiceImpl<CmsNoticeRepository, CmsNo
CmsNotice cmsNotice) {
IPage<CmsNotice> cmsNoticeIPage = baseMapper.queryCmsNoticePaged(paginationUtility, cmsNotice);
List<CmsNotice> newsInformation = cmsNoticeIPage.getRecords();
for (CmsNotice news : newsInformation) {
if (news.getPath() != null) {
news.setPath(global.getBase_Discovery() + news.getPath());
}
}
cmsNoticeIPage.setRecords(newsInformation);
return cmsNoticeIPage;
......
......@@ -20,44 +20,6 @@ import java.util.Date;
@TableName("opm_topic")
public class OpmTopic extends CyIdIncreEntity<OpmTopic> {
/**
* @desc 创建人
* @column create_by
* @default
*/
// @Excel(name = "创建人")
// @TableField("create_by")
// private String createBy;
/**
* @desc 创建时间
* @column create_date
* @default
*/
// @Excel(name = "创建时间")
// @DateTimeFormat(pattern = "yyyy-MM-dd")
// @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
// @TableField("create_date")
// private Date createDate;
/**
* @desc 更新人
* @column update_by
* @default
*/
// @Excel(name = "更新人")
// @TableField("update_by")
// private String updateBy;
/**
* @desc 更新时间
* @column update_date
* @default
*/
// @Excel(name = "更新时间")
// @DateTimeFormat(pattern = "yyyy-MM-dd")
// @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
// @TableField("update_date")
// private Date updateDate;
/**
* @desc 备注
......@@ -107,8 +69,6 @@ public class OpmTopic extends CyIdIncreEntity<OpmTopic> {
/**
* @desc 排序
* @column weight
......@@ -127,9 +87,6 @@ public class OpmTopic extends CyIdIncreEntity<OpmTopic> {
private Integer articleCount;
/**
* 开始时间
*/
......@@ -146,8 +103,9 @@ public class OpmTopic extends CyIdIncreEntity<OpmTopic> {
@TableField(exist = false)
private String nickName;
@TableField(exist = false)
private String path;
private String url;
}
......
......@@ -103,9 +103,6 @@ public class OpmTopicServiceImpl extends ServiceImpl<OpmTopicRepository, OpmTopi
@Override
public OpmTopic findById(Integer id) {
OpmTopic opmTopic = baseMapper.selectById(id);
if (opmTopic.getPath() != null) {
opmTopic.setPath(global.getBase_Discovery() + opmTopic.getPath());
}
return opmTopic;
}
......@@ -120,11 +117,6 @@ public class OpmTopicServiceImpl extends ServiceImpl<OpmTopicRepository, OpmTopi
OpmTopic opmTopic) {
IPage<OpmTopic> opmTopicIPage = baseMapper.queryOpmTopicPaged(paginationUtility, opmTopic);
List<OpmTopic> newsInformation = opmTopicIPage.getRecords();
for (OpmTopic news : newsInformation) {
if (news.getPath() != null) {
news.setPath(global.getBase_Discovery() + news.getPath());
}
}
opmTopicIPage.setRecords(newsInformation);
return opmTopicIPage;
......
......@@ -119,7 +119,7 @@
ca.summary,
ca.max_application_count,
su.nick_name as nickName,
oi.path
oi.url
FROM cms_activity ca
LEFT JOIN
(SELECT
......@@ -207,8 +207,8 @@
</update>
<select id="selectById" resultMap="BaseResultMap" parameterType="java.lang.Integer">
select ca.*,
oi.path
from cms_activity ca
oi.url
from cms_activity ca
left join oss_info oi on oi.business_id = ca.picture_id
where ca.business_id = #{businessId}
</select>
......
......@@ -82,7 +82,7 @@
cn.is_recommended,
cn.is_top,
su.nick_name as nickName,
oi.path
oi.url
FROM cms_notice cn
LEFT JOIN oss_info oi on cn.picture_id = oi.business_id
LEFT JOIN sys_user su on su.business_id = cn.create_by
......
......@@ -42,7 +42,7 @@
</select>
<select id="queryCmsBannersPaged" resultMap="BaseResultMap">
select smb.*,oi.path from cms_banner smb
select smb.*,oi.url from cms_banner smb
left join oss_info oi on smb.picture_id = oi.business_id
where 1=1
and smb.del_flag = '0'
......@@ -65,7 +65,7 @@
</select>
<select id="selectByIdWithUrl" resultType="org.rcisoft.business.cmsBanner.entity.CmsBanner">
SELECT smb.*,
oi.path
oi.url
FROM cms_banner smb
LEFT JOIN oss_info oi ON oi.business_id = smb.picture_id
where 1 = 1
......
......@@ -132,7 +132,7 @@
</update>
<select id="selectById" resultMap="BaseResultMap" parameterType="java.lang.Integer">
select cn.*
from opm_topic cn
from opm_topic cn
where cn.business_id = #{businessId}
</select>
<select id="checkWeight" resultMap="BaseResultMap" parameterType="java.lang.Integer">
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment