🎨 属性名变更

This commit is contained in:
ronger 2020-04-09 18:50:13 +08:00
parent 27db7a83f7
commit 5b84fa9358
3 changed files with 13 additions and 12 deletions

View File

@ -20,9 +20,9 @@ public class PortfolioDTO {
/** 作品集作者头像 */ /** 作品集作者头像 */
private String portfolioAuthorAvatarUrl; private String portfolioAuthorAvatarUrl;
/** 作品集名称 */ /** 作品集名称 */
private String name; private String portfolioTitle;
/** 作品集介绍 */ /** 作品集介绍 */
private String description; private String portfolioDescription;
/** 更新时间 */ /** 更新时间 */
private Date updatedTime; private Date updatedTime;
/** 过去时长 */ /** 过去时长 */

View File

@ -20,13 +20,14 @@ public class Portfolio {
@Column(name = "id") @Column(name = "id")
private Integer idPortfolio; private Integer idPortfolio;
/** 作品集头像 */ /** 作品集头像 */
@Column(name = "portfolio_head_img_url")
private String headImgUrl; private String headImgUrl;
/** 作品集名称 */ /** 作品集名称 */
private String name; private String portfolioTitle;
/** 作品集作者 */ /** 作品集作者 */
private Integer portfolioAuthorId; private Integer portfolioAuthorId;
/** 作品集介绍 */ /** 作品集介绍 */
private String description; private String portfolioDescription;
/** 创建时间 */ /** 创建时间 */
private Date createdTime; private Date createdTime;
/** 更新时间 */ /** 更新时间 */

View File

@ -3,26 +3,26 @@
<mapper namespace="com.rymcu.vertical.mapper.PortfolioMapper"> <mapper namespace="com.rymcu.vertical.mapper.PortfolioMapper">
<resultMap id="BaseResultMap" type="com.rymcu.vertical.entity.Portfolio"> <resultMap id="BaseResultMap" type="com.rymcu.vertical.entity.Portfolio">
<id column="id" property="idPortfolio"></id> <id column="id" property="idPortfolio"></id>
<result column="head_img_url" property="headImgUrl"></result> <result column="portfolio_head_img_url" property="headImgUrl"></result>
<result column="name" property="name"></result> <result column="portfolio_title" property="portfolioTitle"></result>
<result column="portfolio_author_id" property="portfolioAuthorId"></result> <result column="portfolio_author_id" property="portfolioAuthorId"></result>
<result column="description" property="description"></result> <result column="portfolio_description" property="portfolioDescription"></result>
<result column="created_time" property="createdTime"></result> <result column="created_time" property="createdTime"></result>
<result column="updated_time" property="updatedTime"></result> <result column="updated_time" property="updatedTime"></result>
</resultMap> </resultMap>
<resultMap id="DTOResultMap" type="com.rymcu.vertical.dto.PortfolioDTO"> <resultMap id="DTOResultMap" type="com.rymcu.vertical.dto.PortfolioDTO">
<result column="id" property="idPortfolio"></result> <result column="id" property="idPortfolio"></result>
<result column="head_img_url" property="headImgUrl"></result> <result column="portfolio_head_img_url" property="headImgUrl"></result>
<result column="name" property="name"></result> <result column="portfolio_title" property="portfolioTitle"></result>
<result column="portfolio_author_id" property="portfolioAuthorId"></result> <result column="portfolio_author_id" property="portfolioAuthorId"></result>
<result column="description" property="description"></result> <result column="portfolio_description" property="portfolioDescription"></result>
<result column="updated_time" property="updatedTime"></result> <result column="updated_time" property="updatedTime"></result>
</resultMap> </resultMap>
<select id="selectUserPortfoliosByIdUser" resultMap="DTOResultMap"> <select id="selectUserPortfoliosByIdUser" resultMap="DTOResultMap">
select id, head_img_url, name, portfolio_author_id, description, updated_time from vertical_portfolio where portfolio_author_id = #{idUser} select id, portfolio_head_img_url, portfolio_title, portfolio_author_id, portfolio_description, updated_time from vertical_portfolio where portfolio_author_id = #{idUser}
</select> </select>
<select id="selectPortfolioDTOById" resultMap="DTOResultMap"> <select id="selectPortfolioDTOById" resultMap="DTOResultMap">
select id, head_img_url, name, portfolio_author_id, description, updated_time from vertical_portfolio where id = #{id} select id, portfolio_head_img_url, portfolio_title, portfolio_author_id, portfolio_description, updated_time from vertical_portfolio where id = #{id}
</select> </select>
<select id="selectCountArticleNumber" resultType="java.lang.Integer"> <select id="selectCountArticleNumber" resultType="java.lang.Integer">
select count(*) from vertical_portfolio_article where id_vertical_portfolio = #{idPortfolio} select count(*) from vertical_portfolio_article where id_vertical_portfolio = #{idPortfolio}