Commit da1b3904 by yao.xiao

增加-文章查询,保存

parent 27c414e0
...@@ -46,6 +46,26 @@ public class PractitionerFileSharing { ...@@ -46,6 +46,26 @@ public class PractitionerFileSharing {
private String updatedName; private String updatedName;
/**
* 标题
*/
private String title;
/**
* 摘要
*/
private String digest;
/**
* 作者
*/
private String author;
/**
* 封面地址
*/
private String coverUrl;
/** /**
* 获取 serial id * 获取 serial id
...@@ -245,6 +265,78 @@ public class PractitionerFileSharing { ...@@ -245,6 +265,78 @@ public class PractitionerFileSharing {
this.updatedName = updatedName; this.updatedName = updatedName;
} }
/**
* 获取 标题
*
* @return the title 标题
*/
public String getTitle() {
return this.title;
}
/**
* 设置 标题
*
* @param title the 标题 to set
*/
public void setTitle(String title) {
this.title = title;
}
/**
* 获取 摘要
*
* @return the digest 摘要
*/
public String getDigest() {
return this.digest;
}
/**
* 设置 摘要
*
* @param digest the 摘要 to set
*/
public void setDigest(String digest) {
this.digest = digest;
}
/**
* 获取 作者
*
* @return the author 作者
*/
public String getAuthor() {
return this.author;
}
/**
* 设置 作者
*
* @param author the 作者 to set
*/
public void setAuthor(String author) {
this.author = author;
}
/**
* 获取 封面地址
*
* @return the coverUrl 封面地址
*/
public String getCoverUrl() {
return this.coverUrl;
}
/**
* 设置 封面地址
*
* @param coverUrl the 封面地址 to set
*/
public void setCoverUrl(String coverUrl) {
this.coverUrl = coverUrl;
}
@Override @Override
public String toString() { public String toString() {
return "PractitionerFileSharing{" + return "PractitionerFileSharing{" +
...@@ -253,12 +345,16 @@ public class PractitionerFileSharing { ...@@ -253,12 +345,16 @@ public class PractitionerFileSharing {
", mdDropOptionName='" + mdDropOptionName + '\'' + ", mdDropOptionName='" + mdDropOptionName + '\'' +
", fileContent='" + fileContent + '\'' + ", fileContent='" + fileContent + '\'' +
", isActive=" + isActive + ", isActive=" + isActive +
", createdAt=" + createdAt + ", createdAt='" + createdAt + '\'' +
", createdBy=" + createdBy + ", createdBy=" + createdBy +
", createdName='" + createdName + '\'' + ", createdName='" + createdName + '\'' +
", updatedAt=" + updatedAt + ", updatedAt='" + updatedAt + '\'' +
", updatedBy=" + updatedBy + ", updatedBy=" + updatedBy +
", updatedName='" + updatedName + '\'' + ", updatedName='" + updatedName + '\'' +
", title='" + title + '\'' +
", digest='" + digest + '\'' +
", author='" + author + '\'' +
", coverUrl='" + coverUrl + '\'' +
'}'; '}';
} }
} }
...@@ -28,6 +28,26 @@ public class PractitionerFileSharingSaveRequestVO { ...@@ -28,6 +28,26 @@ public class PractitionerFileSharingSaveRequestVO {
private Long loginId; private Long loginId;
/**
* 标题
*/
private String title;
/**
* 摘要
*/
private String digest;
/**
* 作者
*/
private String author;
/**
* 封面地址
*/
private String coverUrl;
/** /**
* 获取 serial id * 获取 serial id
...@@ -119,6 +139,79 @@ public class PractitionerFileSharingSaveRequestVO { ...@@ -119,6 +139,79 @@ public class PractitionerFileSharingSaveRequestVO {
this.loginId = loginId; this.loginId = loginId;
} }
/**
* 获取 标题
*
* @return the title 标题
*/
public String getTitle() {
return this.title;
}
/**
* 设置 标题
*
* @param title the 标题 to set
*/
public void setTitle(String title) {
this.title = title;
}
/**
* 获取 摘要
*
* @return the digest 摘要
*/
public String getDigest() {
return this.digest;
}
/**
* 设置 摘要
*
* @param digest the 摘要 to set
*/
public void setDigest(String digest) {
this.digest = digest;
}
/**
* 获取 作者
*
* @return the author 作者
*/
public String getAuthor() {
return this.author;
}
/**
* 设置 作者
*
* @param author the 作者 to set
*/
public void setAuthor(String author) {
this.author = author;
}
/**
* 获取 封面地址
*
* @return the coverUrl 封面地址
*/
public String getCoverUrl() {
return this.coverUrl;
}
/**
* 设置 封面地址
*
* @param coverUrl the 封面地址 to set
*/
public void setCoverUrl(String coverUrl) {
this.coverUrl = coverUrl;
}
@Override @Override
public String toString() { public String toString() {
return "PractitionerFileSharingSaveRequestVO{" + return "PractitionerFileSharingSaveRequestVO{" +
...@@ -127,6 +220,10 @@ public class PractitionerFileSharingSaveRequestVO { ...@@ -127,6 +220,10 @@ public class PractitionerFileSharingSaveRequestVO {
", fileContent='" + fileContent + '\'' + ", fileContent='" + fileContent + '\'' +
", isActive=" + isActive + ", isActive=" + isActive +
", loginId=" + loginId + ", loginId=" + loginId +
", title='" + title + '\'' +
", digest='" + digest + '\'' +
", author='" + author + '\'' +
", coverUrl='" + coverUrl + '\'' +
'}'; '}';
} }
} }
...@@ -41,4 +41,24 @@ public class AclPractitionerFileSharing { ...@@ -41,4 +41,24 @@ public class AclPractitionerFileSharing {
private Date updatedAt; private Date updatedAt;
private Long updatedBy; private Long updatedBy;
/**
* 标题
*/
private String title;
/**
* 摘要
*/
private String digest;
/**
* 作者
*/
private String author;
/**
* 封面地址
*/
private String coverUrl;
} }
\ No newline at end of file
...@@ -13,7 +13,11 @@ ...@@ -13,7 +13,11 @@
uc.name createdName, uc.name createdName,
s.updated_at updatedAt, s.updated_at updatedAt,
s.updated_by updatedBy, s.updated_by updatedBy,
uu.name updatedName uu.name updatedName,
s.title title,
s.digest digest,
s.author author,
s.cover_url coverUrl
from ag_acl_practitioner_file_sharing s from ag_acl_practitioner_file_sharing s
left join ag_md_drop_options o on o.id = s.md_drop_option_id left join ag_md_drop_options o on o.id = s.md_drop_option_id
left join ag_acl_user uc on uc.id = s.created_by left join ag_acl_user uc on uc.id = s.created_by
......
...@@ -12,11 +12,15 @@ ...@@ -12,11 +12,15 @@
<result column="created_by" jdbcType="BIGINT" property="createdBy" /> <result column="created_by" jdbcType="BIGINT" property="createdBy" />
<result column="updated_at" jdbcType="TIMESTAMP" property="updatedAt" /> <result column="updated_at" jdbcType="TIMESTAMP" property="updatedAt" />
<result column="updated_by" jdbcType="BIGINT" property="updatedBy" /> <result column="updated_by" jdbcType="BIGINT" property="updatedBy" />
<result column="title" jdbcType="VARCHAR" property="title" />
<result column="digest" jdbcType="VARCHAR" property="digest" />
<result column="author" jdbcType="VARCHAR" property="author" />
<result column="cover_url" jdbcType="VARCHAR" property="coverUrl" />
</resultMap> </resultMap>
<sql id="Base_Column_List"> <sql id="Base_Column_List">
<!--@mbg.generated--> <!--@mbg.generated-->
id, md_drop_option_id, file_content, is_active, created_at, created_by, updated_at, id, md_drop_option_id, file_content, is_active, created_at, created_by, updated_at,
updated_by updated_by, title, digest, author, cover_url
</sql> </sql>
<select id="selectByPrimaryKey" parameterType="java.lang.Long" resultMap="BaseResultMap"> <select id="selectByPrimaryKey" parameterType="java.lang.Long" resultMap="BaseResultMap">
<!--@mbg.generated--> <!--@mbg.generated-->
...@@ -34,10 +38,12 @@ ...@@ -34,10 +38,12 @@
<!--@mbg.generated--> <!--@mbg.generated-->
insert into ag_acl_practitioner_file_sharing (md_drop_option_id, file_content, is_active, insert into ag_acl_practitioner_file_sharing (md_drop_option_id, file_content, is_active,
created_at, created_by, updated_at, created_at, created_by, updated_at,
updated_by) updated_by, title, digest,
author, cover_url)
values (#{mdDropOptionId,jdbcType=BIGINT}, #{fileContent,jdbcType=LONGVARCHAR}, #{isActive,jdbcType=INTEGER}, values (#{mdDropOptionId,jdbcType=BIGINT}, #{fileContent,jdbcType=LONGVARCHAR}, #{isActive,jdbcType=INTEGER},
#{createdAt,jdbcType=TIMESTAMP}, #{createdBy,jdbcType=BIGINT}, #{updatedAt,jdbcType=TIMESTAMP}, #{createdAt,jdbcType=TIMESTAMP}, #{createdBy,jdbcType=BIGINT}, #{updatedAt,jdbcType=TIMESTAMP},
#{updatedBy,jdbcType=BIGINT}) #{updatedBy,jdbcType=BIGINT}, #{title,jdbcType=VARCHAR}, #{digest,jdbcType=VARCHAR},
#{author,jdbcType=VARCHAR}, #{coverUrl,jdbcType=VARCHAR})
</insert> </insert>
<insert id="insertSelective" keyColumn="id" keyProperty="id" parameterType="com.yd.dal.entity.customer.AclPractitionerFileSharing" useGeneratedKeys="true"> <insert id="insertSelective" keyColumn="id" keyProperty="id" parameterType="com.yd.dal.entity.customer.AclPractitionerFileSharing" useGeneratedKeys="true">
<!--@mbg.generated--> <!--@mbg.generated-->
...@@ -64,6 +70,18 @@ ...@@ -64,6 +70,18 @@
<if test="updatedBy != null"> <if test="updatedBy != null">
updated_by, updated_by,
</if> </if>
<if test="title != null">
title,
</if>
<if test="digest != null">
digest,
</if>
<if test="author != null">
author,
</if>
<if test="coverUrl != null">
cover_url,
</if>
</trim> </trim>
<trim prefix="values (" suffix=")" suffixOverrides=","> <trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="mdDropOptionId != null"> <if test="mdDropOptionId != null">
...@@ -87,6 +105,18 @@ ...@@ -87,6 +105,18 @@
<if test="updatedBy != null"> <if test="updatedBy != null">
#{updatedBy,jdbcType=BIGINT}, #{updatedBy,jdbcType=BIGINT},
</if> </if>
<if test="title != null">
#{title,jdbcType=VARCHAR},
</if>
<if test="digest != null">
#{digest,jdbcType=VARCHAR},
</if>
<if test="author != null">
#{author,jdbcType=VARCHAR},
</if>
<if test="coverUrl != null">
#{coverUrl,jdbcType=VARCHAR},
</if>
</trim> </trim>
</insert> </insert>
<update id="updateByPrimaryKeySelective" parameterType="com.yd.dal.entity.customer.AclPractitionerFileSharing"> <update id="updateByPrimaryKeySelective" parameterType="com.yd.dal.entity.customer.AclPractitionerFileSharing">
...@@ -114,6 +144,18 @@ ...@@ -114,6 +144,18 @@
<if test="updatedBy != null"> <if test="updatedBy != null">
updated_by = #{updatedBy,jdbcType=BIGINT}, updated_by = #{updatedBy,jdbcType=BIGINT},
</if> </if>
<if test="title != null">
title = #{title,jdbcType=VARCHAR},
</if>
<if test="digest != null">
digest = #{digest,jdbcType=VARCHAR},
</if>
<if test="author != null">
author = #{author,jdbcType=VARCHAR},
</if>
<if test="coverUrl != null">
cover_url = #{coverUrl,jdbcType=VARCHAR},
</if>
</set> </set>
where id = #{id,jdbcType=BIGINT} where id = #{id,jdbcType=BIGINT}
</update> </update>
...@@ -126,7 +168,11 @@ ...@@ -126,7 +168,11 @@
created_at = #{createdAt,jdbcType=TIMESTAMP}, created_at = #{createdAt,jdbcType=TIMESTAMP},
created_by = #{createdBy,jdbcType=BIGINT}, created_by = #{createdBy,jdbcType=BIGINT},
updated_at = #{updatedAt,jdbcType=TIMESTAMP}, updated_at = #{updatedAt,jdbcType=TIMESTAMP},
updated_by = #{updatedBy,jdbcType=BIGINT} updated_by = #{updatedBy,jdbcType=BIGINT},
title = #{title,jdbcType=VARCHAR},
digest = #{digest,jdbcType=VARCHAR},
author = #{author,jdbcType=VARCHAR},
cover_url = #{coverUrl,jdbcType=VARCHAR}
where id = #{id,jdbcType=BIGINT} where id = #{id,jdbcType=BIGINT}
</update> </update>
<update id="updateBatch" parameterType="java.util.List"> <update id="updateBatch" parameterType="java.util.List">
...@@ -168,6 +214,26 @@ ...@@ -168,6 +214,26 @@
when id = #{item.id,jdbcType=BIGINT} then #{item.updatedBy,jdbcType=BIGINT} when id = #{item.id,jdbcType=BIGINT} then #{item.updatedBy,jdbcType=BIGINT}
</foreach> </foreach>
</trim> </trim>
<trim prefix="title = case" suffix="end,">
<foreach collection="list" index="index" item="item">
when id = #{item.id,jdbcType=BIGINT} then #{item.title,jdbcType=VARCHAR}
</foreach>
</trim>
<trim prefix="digest = case" suffix="end,">
<foreach collection="list" index="index" item="item">
when id = #{item.id,jdbcType=BIGINT} then #{item.digest,jdbcType=VARCHAR}
</foreach>
</trim>
<trim prefix="author = case" suffix="end,">
<foreach collection="list" index="index" item="item">
when id = #{item.id,jdbcType=BIGINT} then #{item.author,jdbcType=VARCHAR}
</foreach>
</trim>
<trim prefix="cover_url = case" suffix="end,">
<foreach collection="list" index="index" item="item">
when id = #{item.id,jdbcType=BIGINT} then #{item.coverUrl,jdbcType=VARCHAR}
</foreach>
</trim>
</trim> </trim>
where id in where id in
<foreach close=")" collection="list" item="item" open="(" separator=", "> <foreach close=")" collection="list" item="item" open="(" separator=", ">
...@@ -227,6 +293,34 @@ ...@@ -227,6 +293,34 @@
</if> </if>
</foreach> </foreach>
</trim> </trim>
<trim prefix="title = case" suffix="end,">
<foreach collection="list" index="index" item="item">
<if test="item.title != null">
when id = #{item.id,jdbcType=BIGINT} then #{item.title,jdbcType=VARCHAR}
</if>
</foreach>
</trim>
<trim prefix="digest = case" suffix="end,">
<foreach collection="list" index="index" item="item">
<if test="item.digest != null">
when id = #{item.id,jdbcType=BIGINT} then #{item.digest,jdbcType=VARCHAR}
</if>
</foreach>
</trim>
<trim prefix="author = case" suffix="end,">
<foreach collection="list" index="index" item="item">
<if test="item.author != null">
when id = #{item.id,jdbcType=BIGINT} then #{item.author,jdbcType=VARCHAR}
</if>
</foreach>
</trim>
<trim prefix="cover_url = case" suffix="end,">
<foreach collection="list" index="index" item="item">
<if test="item.coverUrl != null">
when id = #{item.id,jdbcType=BIGINT} then #{item.coverUrl,jdbcType=VARCHAR}
</if>
</foreach>
</trim>
</trim> </trim>
where id in where id in
<foreach close=")" collection="list" item="item" open="(" separator=", "> <foreach close=")" collection="list" item="item" open="(" separator=", ">
...@@ -237,12 +331,14 @@ ...@@ -237,12 +331,14 @@
<!--@mbg.generated--> <!--@mbg.generated-->
insert into ag_acl_practitioner_file_sharing insert into ag_acl_practitioner_file_sharing
(md_drop_option_id, file_content, is_active, created_at, created_by, updated_at, (md_drop_option_id, file_content, is_active, created_at, created_by, updated_at,
updated_by) updated_by, title, digest, author, cover_url)
values values
<foreach collection="list" item="item" separator=","> <foreach collection="list" item="item" separator=",">
(#{item.mdDropOptionId,jdbcType=BIGINT}, #{item.fileContent,jdbcType=LONGVARCHAR}, (#{item.mdDropOptionId,jdbcType=BIGINT}, #{item.fileContent,jdbcType=LONGVARCHAR},
#{item.isActive,jdbcType=INTEGER}, #{item.createdAt,jdbcType=TIMESTAMP}, #{item.createdBy,jdbcType=BIGINT}, #{item.isActive,jdbcType=INTEGER}, #{item.createdAt,jdbcType=TIMESTAMP}, #{item.createdBy,jdbcType=BIGINT},
#{item.updatedAt,jdbcType=TIMESTAMP}, #{item.updatedBy,jdbcType=BIGINT}) #{item.updatedAt,jdbcType=TIMESTAMP}, #{item.updatedBy,jdbcType=BIGINT}, #{item.title,jdbcType=VARCHAR},
#{item.digest,jdbcType=VARCHAR}, #{item.author,jdbcType=VARCHAR}, #{item.coverUrl,jdbcType=VARCHAR}
)
</foreach> </foreach>
</insert> </insert>
</mapper> </mapper>
\ No newline at end of file
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