Commit 124c75c2 authored by gaoyingwei's avatar gaoyingwei

Merge remote-tracking branch 'origin/master' into master

parents caca5390 20de9857
...@@ -260,8 +260,9 @@ public class CmsActivity extends CyIdIncreEntity<CmsActivity> { ...@@ -260,8 +260,9 @@ public class CmsActivity extends CyIdIncreEntity<CmsActivity> {
@TableField(exist = false) @TableField(exist = false)
private String nickName; private String nickName;
@TableField(exist = false) @TableField(exist = false)
private String path; private String url;
......
...@@ -119,9 +119,6 @@ public class CmsActivityServiceImpl extends ServiceImpl<CmsActivityRepository, C ...@@ -119,9 +119,6 @@ public class CmsActivityServiceImpl extends ServiceImpl<CmsActivityRepository, C
@Override @Override
public CmsActivity findById(Integer id) { public CmsActivity findById(Integer id) {
CmsActivity cmsActivity = baseMapper.selectById(id); CmsActivity cmsActivity = baseMapper.selectById(id);
if (cmsActivity.getPath() != null) {
cmsActivity.setPath(global.getBase_Discovery() + cmsActivity.getPath());
}
return cmsActivity; return cmsActivity;
} }
...@@ -136,11 +133,6 @@ public class CmsActivityServiceImpl extends ServiceImpl<CmsActivityRepository, C ...@@ -136,11 +133,6 @@ public class CmsActivityServiceImpl extends ServiceImpl<CmsActivityRepository, C
CmsActivity cmsActivity) { CmsActivity cmsActivity) {
IPage<CmsActivity> cmsActivityIPage = baseMapper.queryCmsActivityPaged(paginationUtility, cmsActivity); IPage<CmsActivity> cmsActivityIPage = baseMapper.queryCmsActivityPaged(paginationUtility, cmsActivity);
List<CmsActivity> newsInformation = cmsActivityIPage.getRecords(); List<CmsActivity> newsInformation = cmsActivityIPage.getRecords();
for (CmsActivity news : newsInformation) {
if (news.getPath() != null) {
news.setPath(global.getBase_Discovery() + news.getPath());
}
}
cmsActivityIPage.setRecords(newsInformation); cmsActivityIPage.setRecords(newsInformation);
return cmsActivityIPage; return cmsActivityIPage;
......
...@@ -51,7 +51,7 @@ public class CmsBanner extends CyIdIncreEntity<CmsBanner> { ...@@ -51,7 +51,7 @@ public class CmsBanner extends CyIdIncreEntity<CmsBanner> {
* 图片地址 * 图片地址
*/ */
@TableField(exist = false) @TableField(exist = false)
private String path; private String url;
} }
......
...@@ -94,9 +94,6 @@ public class CmsBannerServiceImpl extends ServiceImpl<CmsBannerRepository, CmsBa ...@@ -94,9 +94,6 @@ public class CmsBannerServiceImpl extends ServiceImpl<CmsBannerRepository, CmsBa
@Override @Override
public CmsBanner findById(String id){ public CmsBanner findById(String id){
CmsBanner banner = baseMapper.selectByIdWithUrl(id); CmsBanner banner = baseMapper.selectByIdWithUrl(id);
if (banner.getPath()!=null){
banner.setPath(global.getBase_Discovery()+banner.getPath());
}
return banner; return banner;
} }
...@@ -110,11 +107,6 @@ public class CmsBannerServiceImpl extends ServiceImpl<CmsBannerRepository, CmsBa ...@@ -110,11 +107,6 @@ public class CmsBannerServiceImpl extends ServiceImpl<CmsBannerRepository, CmsBa
CmsBanner cmsBanner){ CmsBanner cmsBanner){
IPage<CmsBanner> result = baseMapper.queryCmsBannersPaged(paginationUtility,cmsBanner); IPage<CmsBanner> result = baseMapper.queryCmsBannersPaged(paginationUtility,cmsBanner);
List<CmsBanner> cmsBannerList = result.getRecords(); List<CmsBanner> cmsBannerList = result.getRecords();
for (CmsBanner banner : cmsBannerList){
if (banner.getPath()!=null){
banner.setPath(global.getBase_Discovery()+banner.getPath());
}
}
return result; return result;
} }
......
...@@ -171,8 +171,9 @@ public class CmsNotice extends CyIdIncreEntity<CmsNotice> { ...@@ -171,8 +171,9 @@ public class CmsNotice extends CyIdIncreEntity<CmsNotice> {
@TableField(exist = false) @TableField(exist = false)
private String nickName; private String nickName;
@TableField(exist = false) @TableField(exist = false)
private String path; private String url;
} }
......
...@@ -104,9 +104,6 @@ public class CmsNoticeServiceImpl extends ServiceImpl<CmsNoticeRepository, CmsNo ...@@ -104,9 +104,6 @@ public class CmsNoticeServiceImpl extends ServiceImpl<CmsNoticeRepository, CmsNo
@Override @Override
public CmsNotice findById(Integer id) { public CmsNotice findById(Integer id) {
CmsNotice cmsNotice = baseMapper.selectById(id); CmsNotice cmsNotice = baseMapper.selectById(id);
if (cmsNotice.getPath() != null) {
cmsNotice.setPath(global.getBase_Discovery() + cmsNotice.getPath());
}
return cmsNotice; return cmsNotice;
} }
...@@ -121,11 +118,6 @@ public class CmsNoticeServiceImpl extends ServiceImpl<CmsNoticeRepository, CmsNo ...@@ -121,11 +118,6 @@ public class CmsNoticeServiceImpl extends ServiceImpl<CmsNoticeRepository, CmsNo
CmsNotice cmsNotice) { CmsNotice cmsNotice) {
IPage<CmsNotice> cmsNoticeIPage = baseMapper.queryCmsNoticePaged(paginationUtility, cmsNotice); IPage<CmsNotice> cmsNoticeIPage = baseMapper.queryCmsNoticePaged(paginationUtility, cmsNotice);
List<CmsNotice> newsInformation = cmsNoticeIPage.getRecords(); List<CmsNotice> newsInformation = cmsNoticeIPage.getRecords();
for (CmsNotice news : newsInformation) {
if (news.getPath() != null) {
news.setPath(global.getBase_Discovery() + news.getPath());
}
}
cmsNoticeIPage.setRecords(newsInformation); cmsNoticeIPage.setRecords(newsInformation);
return cmsNoticeIPage; return cmsNoticeIPage;
......
...@@ -96,5 +96,17 @@ public class OpmArticle extends CyIdIncreEntity<OpmArticle> { ...@@ -96,5 +96,17 @@ public class OpmArticle extends CyIdIncreEntity<OpmArticle> {
*/ */
@TableField(exist = false) @TableField(exist = false)
List<ArticleCommentDTO> articleCommentDTOList; List<ArticleCommentDTO> articleCommentDTOList;
/**
* 会员头像
*/
@TableField(exist = false)
private String memAvatar;
/**
* 动态图片,以逗号分割
*/
@TableField(exist = false)
private String pictureUrls;
} }
...@@ -20,44 +20,6 @@ import java.util.Date; ...@@ -20,44 +20,6 @@ import java.util.Date;
@TableName("opm_topic") @TableName("opm_topic")
public class OpmTopic extends CyIdIncreEntity<OpmTopic> { 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 备注 * @desc 备注
...@@ -107,8 +69,6 @@ public class OpmTopic extends CyIdIncreEntity<OpmTopic> { ...@@ -107,8 +69,6 @@ public class OpmTopic extends CyIdIncreEntity<OpmTopic> {
/** /**
* @desc 排序 * @desc 排序
* @column weight * @column weight
...@@ -127,9 +87,6 @@ public class OpmTopic extends CyIdIncreEntity<OpmTopic> { ...@@ -127,9 +87,6 @@ public class OpmTopic extends CyIdIncreEntity<OpmTopic> {
private Integer articleCount; private Integer articleCount;
/** /**
* 开始时间 * 开始时间
*/ */
...@@ -146,8 +103,9 @@ public class OpmTopic extends CyIdIncreEntity<OpmTopic> { ...@@ -146,8 +103,9 @@ public class OpmTopic extends CyIdIncreEntity<OpmTopic> {
@TableField(exist = false) @TableField(exist = false)
private String nickName; private String nickName;
@TableField(exist = false) @TableField(exist = false)
private String path; private String url;
} }
......
...@@ -103,9 +103,6 @@ public class OpmTopicServiceImpl extends ServiceImpl<OpmTopicRepository, OpmTopi ...@@ -103,9 +103,6 @@ public class OpmTopicServiceImpl extends ServiceImpl<OpmTopicRepository, OpmTopi
@Override @Override
public OpmTopic findById(Integer id) { public OpmTopic findById(Integer id) {
OpmTopic opmTopic = baseMapper.selectById(id); OpmTopic opmTopic = baseMapper.selectById(id);
if (opmTopic.getPath() != null) {
opmTopic.setPath(global.getBase_Discovery() + opmTopic.getPath());
}
return opmTopic; return opmTopic;
} }
...@@ -120,11 +117,6 @@ public class OpmTopicServiceImpl extends ServiceImpl<OpmTopicRepository, OpmTopi ...@@ -120,11 +117,6 @@ public class OpmTopicServiceImpl extends ServiceImpl<OpmTopicRepository, OpmTopi
OpmTopic opmTopic) { OpmTopic opmTopic) {
IPage<OpmTopic> opmTopicIPage = baseMapper.queryOpmTopicPaged(paginationUtility, opmTopic); IPage<OpmTopic> opmTopicIPage = baseMapper.queryOpmTopicPaged(paginationUtility, opmTopic);
List<OpmTopic> newsInformation = opmTopicIPage.getRecords(); List<OpmTopic> newsInformation = opmTopicIPage.getRecords();
for (OpmTopic news : newsInformation) {
if (news.getPath() != null) {
news.setPath(global.getBase_Discovery() + news.getPath());
}
}
opmTopicIPage.setRecords(newsInformation); opmTopicIPage.setRecords(newsInformation);
return opmTopicIPage; return opmTopicIPage;
......
...@@ -119,7 +119,7 @@ ...@@ -119,7 +119,7 @@
ca.summary, ca.summary,
ca.max_application_count, ca.max_application_count,
su.nick_name as nickName, su.nick_name as nickName,
oi.path oi.url
FROM cms_activity ca FROM cms_activity ca
LEFT JOIN LEFT JOIN
(SELECT (SELECT
...@@ -207,8 +207,8 @@ ...@@ -207,8 +207,8 @@
</update> </update>
<select id="selectById" resultMap="BaseResultMap" parameterType="java.lang.Integer"> <select id="selectById" resultMap="BaseResultMap" parameterType="java.lang.Integer">
select ca.*, select ca.*,
oi.path oi.url
from cms_activity ca from cms_activity ca
left join oss_info oi on oi.business_id = ca.picture_id left join oss_info oi on oi.business_id = ca.picture_id
where ca.business_id = #{businessId} where ca.business_id = #{businessId}
</select> </select>
......
...@@ -82,7 +82,7 @@ ...@@ -82,7 +82,7 @@
cn.is_recommended, cn.is_recommended,
cn.is_top, cn.is_top,
su.nick_name as nickName, su.nick_name as nickName,
oi.path oi.url
FROM cms_notice cn FROM cms_notice cn
LEFT JOIN oss_info oi on cn.picture_id = oi.business_id LEFT JOIN oss_info oi on cn.picture_id = oi.business_id
LEFT JOIN sys_user su on su.business_id = cn.create_by LEFT JOIN sys_user su on su.business_id = cn.create_by
......
...@@ -42,7 +42,7 @@ ...@@ -42,7 +42,7 @@
</select> </select>
<select id="queryCmsBannersPaged" resultMap="BaseResultMap"> <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 left join oss_info oi on smb.picture_id = oi.business_id
where 1=1 where 1=1
and smb.del_flag = '0' and smb.del_flag = '0'
...@@ -65,7 +65,7 @@ ...@@ -65,7 +65,7 @@
</select> </select>
<select id="selectByIdWithUrl" resultType="org.rcisoft.business.cmsBanner.entity.CmsBanner"> <select id="selectByIdWithUrl" resultType="org.rcisoft.business.cmsBanner.entity.CmsBanner">
SELECT smb.*, SELECT smb.*,
oi.path oi.url
FROM cms_banner smb FROM cms_banner smb
LEFT JOIN oss_info oi ON oi.business_id = smb.picture_id LEFT JOIN oss_info oi ON oi.business_id = smb.picture_id
where 1 = 1 where 1 = 1
......
...@@ -69,12 +69,37 @@ ...@@ -69,12 +69,37 @@
</select> </select>
<select id="queryOpmArticlePaged" resultMap="BaseResultMap"> <select id="queryOpmArticlePaged" resultMap="BaseResultMap">
select opa.*,sot.topic_name as topic,mi.mem_code as memCode SELECT
from opm_article opa opa.business_id,
left join opm_topic sot on opa.topic_id = sot.business_id opa.flag,
left join mem_info mi on opa.create_by = mi.user_id opa.del_flag,
where 1=1 opa.comment_count,
and opa.del_flag = '0' opa.like_count,
opa.exam_status,
opa.is_article,
opa.create_date,
opt.topic_name AS topic,
mi.mem_code AS memCode,
oi.path AS memAvatar,
GROUP_CONCAT(DISTINCT pic_urls.path ORDER BY pic_urls.path SEPARATOR ',') AS pictureUrls
FROM
opm_article opa
LEFT JOIN opm_topic opt ON opa.topic_id = opt.business_id
LEFT JOIN mem_info mi ON opa.create_by = mi.user_id
LEFT JOIN oss_info oi ON mi.avatar = oi.business_id
LEFT JOIN (
SELECT
opm_article.business_id,
CAST(JSON_UNQUOTE(JSON_EXTRACT(picture_id, CONCAT('$.id[', jt_ids.idx - 1, ']'))) AS UNSIGNED) AS picture_id
FROM
opm_article,
JSON_TABLE(JSON_EXTRACT(opm_article.picture_id, '$.id'), '$[*]' COLUMNS (idx FOR ORDINALITY)) AS jt_ids
WHERE
opm_article.del_flag = '0'
) AS pic_ids ON opa.business_id = pic_ids.business_id
LEFT JOIN oss_info pic_urls ON pic_ids.picture_id = pic_urls.business_id
WHERE
opa.del_flag = '0'
<if test="entity.flag !=null and entity.flag != '' "> <if test="entity.flag !=null and entity.flag != '' ">
and opa.flag = #{entity.flag} and opa.flag = #{entity.flag}
</if> </if>
...@@ -94,7 +119,7 @@ ...@@ -94,7 +119,7 @@
and opa.content like concat('%',#{entity.content},'%') and opa.content like concat('%',#{entity.content},'%')
</if> </if>
<if test="entity.topic !=null and entity.topic != '' "> <if test="entity.topic !=null and entity.topic != '' ">
and sot.topic_name like concat('%',#{entity.topic},'%') and opt.topic_name like concat('%',#{entity.topic},'%')
</if> </if>
<if test="entity.createBy !=null and entity.createBy != '' "> <if test="entity.createBy !=null and entity.createBy != '' ">
and opa.create_by = #{entity.createBy} and opa.create_by = #{entity.createBy}
...@@ -114,7 +139,10 @@ ...@@ -114,7 +139,10 @@
<if test="entity.commentCount !=null and entity.commentCount != '' "> <if test="entity.commentCount !=null and entity.commentCount != '' ">
and opa.comment_count &gt;= #{entity.commentCount} and opa.comment_count &gt;= #{entity.commentCount}
</if> </if>
ORDER BY opa.business_id DESC GROUP BY
opa.business_id
ORDER BY
opa.business_id DESC
</select> </select>
<select id="selectByIdWithUrl" resultType="org.rcisoft.business.opmArticle.entity.OpmArticle"> <select id="selectByIdWithUrl" resultType="org.rcisoft.business.opmArticle.entity.OpmArticle">
SELECT opa.*, SELECT opa.*,
......
...@@ -132,7 +132,7 @@ ...@@ -132,7 +132,7 @@
</update> </update>
<select id="selectById" resultMap="BaseResultMap" parameterType="java.lang.Integer"> <select id="selectById" resultMap="BaseResultMap" parameterType="java.lang.Integer">
select cn.* select cn.*
from opm_topic cn from opm_topic cn
where cn.business_id = #{businessId} where cn.business_id = #{businessId}
</select> </select>
<select id="checkWeight" resultMap="BaseResultMap" parameterType="java.lang.Integer"> <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