Merge pull request 'feat(专区文章功能开发): 增加文章关键词属性' (#586) from otto/microservices:master into master

This commit is contained in:
otto 2024-06-27 13:50:12 +08:00
commit a39ecf2468
7 changed files with 37 additions and 0 deletions

View File

@ -157,6 +157,11 @@ public class CmsDoc extends BaseSortEntity {
*/
private String auditEditableStatus;
/**
* 关键词
*/
private String keywords;
public CmsDir copyToCmsDir() {
CmsDir cmsDir = new CmsDir();
cmsDir.setId(id);
@ -224,6 +229,7 @@ public class CmsDoc extends BaseSortEntity {
cmsDocDto.setAuditStatus(auditStatus);
cmsDocDto.setAuditType(auditType);
cmsDocDto.setCreateBy(createBy);
cmsDocDto.setKeywords(keywords);
return cmsDocDto;
}

View File

@ -96,6 +96,11 @@ public class CmsDocBaseDto {
@ApiModelProperty("文章创建者")
private String createBy;
/**
* 关键词
*/
@ApiModelProperty("关键词")
private String keywords;
public void setPublishTime(Date publishTime) {
if (publishTime != null) {

View File

@ -65,6 +65,11 @@ public class CmsDocDto {
@ApiModelProperty("是否在栏目下修改")
private boolean isChangeOnDir;
/**
* 关键词
*/
@ApiModelProperty("关键词")
private String keywords;
public String getName() {
if (name != null) {

View File

@ -45,6 +45,11 @@ public class CmsDocInputDto {
*/
@ApiModelProperty("文本编辑器类型")
private String editorType;
/**
* 关键词
*/
@ApiModelProperty("关键词")
private String keywords;
public String getContent() {
String base64decodedString;
@ -78,6 +83,7 @@ public class CmsDocInputDto {
cmsDoc.setHeadImg(this.getHeadImg());
cmsDoc.setDeptId(dirDoc.getDeptId());
cmsDoc.setEditorType(this.editorType);
cmsDoc.setKeywords(this.keywords);
return cmsDoc;
}
}

View File

@ -78,4 +78,9 @@ public class CmsDocSearchVo {
*/
@ApiModelProperty(value = "创建者", hidden = true)
private String createBy;
/**
* 关键词
*/
@ApiModelProperty("关键词")
private String keywords;
}

View File

@ -36,6 +36,7 @@
<result property="auditType" column="audit_type"/>
<result property="auditTmpBranchName" column="audit_tmp_branch_name"/>
<result property="auditPrNumber" column="audit_pr_number"/>
<result property="keywords" column="keywords"/>
</resultMap>
<sql id="selectCmsDocVo">
@ -69,6 +70,7 @@
audit_status,
audit_type,
audit_tmp_branch_name,
keywords,
audit_pr_number
from cms_doc
</sql>
@ -100,6 +102,7 @@
cd.issue_id,
cd.is_homepage,
cd.editor_type,
cd.keywords,
cd.is_dir
from cms_doc cd
</sql>
@ -162,6 +165,7 @@
<sql id="selectListWhere">
<where>
<if test="name != null and name != ''">and name like concat('%', #{name}, '%')</if>
<if test="keywords != null and keywords != ''">and keywords like concat('%', #{keywords}, '%')</if>
<if test="fileName != null and fileName != ''">and file_name like concat('%', #{fileName}, '%')</if>
<if test="filePath != null and filePath != ''">and file_path = #{filePath}</if>
<if test="publishTime != null ">and publish_time = #{publishTime}</if>
@ -307,6 +311,7 @@
<if test="auditType != null">audit_type,</if>
<if test="auditTmpBranchName != null">audit_tmp_branch_name,</if>
<if test="auditPrNumber != null">audit_pr_number,</if>
<if test="keywords != null">keywords,</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="createBy != null">#{createBy},</if>
@ -339,6 +344,7 @@
<if test="auditType != null">#{auditType},</if>
<if test="auditTmpBranchName != null">#{auditTmpBranchName},</if>
<if test="auditPrNumber != null">#{auditPrNumber},</if>
<if test="keywords != null">#{keywords},</if>
</trim>
</insert>
@ -374,6 +380,7 @@
<if test="auditType != null">audit_type = #{auditType},</if>
<if test="auditTmpBranchName != null">audit_tmp_branch_name = #{auditTmpBranchName},</if>
<if test="auditPrNumber != null">audit_pr_number = #{auditPrNumber},</if>
<if test="keywords != null">keywords = #{keywords},</if>
</trim>
where id = #{id}
</update>

View File

@ -0,0 +1,3 @@
-- 专区文章表增加Keywords关键字
alter table cms_doc
add keywords varchar(255) null comment '关键词';