🚚 项目名称及目录名称变更

This commit is contained in:
ronger 2021-01-25 18:27:41 +08:00
parent fd9664e101
commit 48feca9e6f
42 changed files with 138 additions and 141 deletions

View File

@ -13,7 +13,7 @@ import java.util.Date;
* @author ronger * @author ronger
*/ */
@Data @Data
@Table(name = "vertical_article") @Table(name = "forest_article")
public class Article implements Serializable,Cloneable { public class Article implements Serializable,Cloneable {
/** 主键 */ /** 主键 */
@Id @Id

View File

@ -12,7 +12,7 @@ import java.util.Date;
* @author ronger * @author ronger
*/ */
@Data @Data
@Table(name = "vertical_article_content") @Table(name = "forest_article_content")
public class ArticleContent { public class ArticleContent {
@Id @Id

View File

@ -13,7 +13,7 @@ import java.util.Date;
* @author ronger * @author ronger
*/ */
@Data @Data
@Table(name="vertical_article_thumbs_up") @Table(name="forest_article_thumbs_up")
public class ArticleThumbsUp implements Serializable, Cloneable { public class ArticleThumbsUp implements Serializable, Cloneable {
/** /**
* 主键 * 主键

View File

@ -13,7 +13,7 @@ import java.util.Date;
* 银行 * 银行
* @author ronger * @author ronger
*/ */
@Table(name = "vertical_bank") @Table(name = "forest_bank")
@Data @Data
public class Bank { public class Bank {

View File

@ -14,7 +14,7 @@ import java.util.Date;
* 银行账户 * 银行账户
* @author ronger * @author ronger
*/ */
@Table(name = "vertical_bank_account") @Table(name = "forest_bank_account")
@Data @Data
public class BankAccount { public class BankAccount {
/** 主键 */ /** 主键 */

View File

@ -13,7 +13,7 @@ import java.util.Date;
* @author ronger * @author ronger
*/ */
@Data @Data
@Table(name="vertical_comment") @Table(name="forest_comment")
public class Comment implements Serializable,Cloneable { public class Comment implements Serializable,Cloneable {
/** 主键 */ /** 主键 */
@Id @Id

View File

@ -12,7 +12,7 @@ import java.util.Date;
* 货币发行记录 * 货币发行记录
* @author ronger * @author ronger
*/ */
@Table(name = "vertical_currency_issue") @Table(name = "forest_currency_issue")
@Data @Data
public class CurrencyIssue { public class CurrencyIssue {
/** 主键 */ /** 主键 */

View File

@ -12,7 +12,7 @@ import java.math.BigDecimal;
/** /**
* @author ronger * @author ronger
*/ */
@Table(name="vertical_currency_rule") @Table(name="forest_currency_rule")
@Data @Data
public class CurrencyRule implements Serializable, Cloneable { public class CurrencyRule implements Serializable, Cloneable {
/** /**

View File

@ -12,7 +12,7 @@ import java.io.Serializable;
* @author ronger * @author ronger
*/ */
@Data @Data
@Table(name="vertical_follow") @Table(name="forest_follow")
public class Follow implements Serializable,Cloneable { public class Follow implements Serializable,Cloneable {
/** 主键 */ /** 主键 */
@Id @Id

View File

@ -15,7 +15,7 @@ import java.util.Date;
* @author ronger * @author ronger
*/ */
@Data @Data
@Table(name="vertical_notification") @Table(name="forest_notification")
public class Notification implements Serializable,Cloneable { public class Notification implements Serializable,Cloneable {
/** /**
* 主键 * 主键

View File

@ -13,7 +13,7 @@ import java.io.Serializable;
* @author ronger * @author ronger
*/ */
@Data @Data
@Table(name = "vertical_permission") @Table(name = "forest_permission")
public class Permission implements Serializable,Cloneable { public class Permission implements Serializable,Cloneable {
@Id @Id

View File

@ -9,7 +9,7 @@ import java.util.Date;
* @author ronger * @author ronger
*/ */
@Data @Data
@Table(name = "vertical_portfolio") @Table(name = "forest_portfolio")
public class Portfolio { public class Portfolio {
/** 主键 */ /** 主键 */
@Id @Id

View File

@ -14,7 +14,7 @@ import java.util.Date;
* @author ronger * @author ronger
*/ */
@Data @Data
@Table(name = "vertical_role") @Table(name = "forest_role")
public class Role implements Serializable,Cloneable { public class Role implements Serializable,Cloneable {
@Id @Id
@Column(name = "id") @Column(name = "id")

View File

@ -13,7 +13,7 @@ import java.util.Date;
* @author ronger * @author ronger
*/ */
@Data @Data
@Table(name="vertical_special_day") @Table(name="forest_special_day")
public class SpecialDay implements Serializable,Cloneable{ public class SpecialDay implements Serializable,Cloneable{
/** */ /** */
@Id @Id

View File

@ -13,7 +13,7 @@ import java.util.Date;
* @author ronger * @author ronger
*/ */
@Data @Data
@Table(name="vertical_sponsor") @Table(name="forest_sponsor")
public class Sponsor implements Serializable, Cloneable { public class Sponsor implements Serializable, Cloneable {
/** /**
* 主键 * 主键

View File

@ -13,7 +13,7 @@ import java.util.Date;
* @author ronger * @author ronger
*/ */
@Data @Data
@Table(name = "vertical_tag") @Table(name = "forest_tag")
public class Tag implements Serializable,Cloneable { public class Tag implements Serializable,Cloneable {
/** 主键 */ /** 主键 */
@Id @Id

View File

@ -12,7 +12,7 @@ import java.util.Date;
* @author ronger * @author ronger
*/ */
@Data @Data
@Table(name = "vertical_topic") @Table(name = "forest_topic")
public class Topic { public class Topic {
/** 主键 */ /** 主键 */

View File

@ -13,7 +13,7 @@ import java.util.Date;
* 交易记录 * 交易记录
* @author ronger * @author ronger
*/ */
@Table(name = "vertical_transaction_record") @Table(name = "forest_transaction_record")
@Data @Data
public class TransactionRecord { public class TransactionRecord {
/** 主键 */ /** 主键 */

View File

@ -15,7 +15,7 @@ import java.util.Date;
/** /**
* @author ronger * @author ronger
*/ */
@Table(name = "vertical_user") @Table(name = "forest_user")
@Data @Data
public class User implements Serializable,Cloneable { public class User implements Serializable,Cloneable {
@Id @Id

View File

@ -9,7 +9,7 @@ import javax.persistence.Table;
* @author ronger * @author ronger
*/ */
@Data @Data
@Table(name = "vertical_user_extend") @Table(name = "forest_user_extend")
public class UserExtend { public class UserExtend {
@Id @Id

View File

@ -15,7 +15,7 @@ import java.util.Date;
* @author ronger * @author ronger
*/ */
@Data @Data
@Table(name="vertical_visit") @Table(name="forest_visit")
public class Visit implements Serializable,Cloneable { public class Visit implements Serializable,Cloneable {
/** 主键 */ /** 主键 */

View File

@ -11,7 +11,7 @@ import javax.persistence.Table;
* @author ronger * @author ronger
*/ */
@Data @Data
@Table(name = "vertical_wx_user") @Table(name = "forest_wx_user")
public class WxUser { public class WxUser {
@Id @Id

View File

@ -13,7 +13,7 @@ import java.util.List;
public interface TagMapper extends Mapper<Tag> { public interface TagMapper extends Mapper<Tag> {
/** /**
* 插入标签文章表(vertical_tag_article)相关信息 * 插入标签文章表(forest_tag_article)相关信息
* @param idTag * @param idTag
* @param idArticle * @param idArticle
* @return * @return

View File

@ -130,10 +130,7 @@ public class Utils {
} }
public static void main(String[] args){ public static void main(String[] args){
LocalDate localDate = LocalDate.parse("2019-11-15"); String s = entryptPassword("admin");
ZoneId zone = ZoneId.systemDefault();
Instant instant = localDate.atStartOfDay().atZone(zone).toInstant();
String s = getTimeAgo(Date.from(instant));
System.out.println(s); System.out.println(s);
} }

View File

@ -63,42 +63,42 @@
<result column="tag_description" property="tagDescription"></result> <result column="tag_description" property="tagDescription"></result>
</resultMap> </resultMap>
<resultMap id="PortfolioArticleResultMap" type="com.rymcu.forest.dto.PortfolioArticleDTO"> <resultMap id="PortfolioArticleResultMap" type="com.rymcu.forest.dto.PortfolioArticleDTO">
<result column="id_vertical_portfolio" property="idPortfolio"></result> <result column="id_portfolio" property="idPortfolio"></result>
<result column="id_vertical_article" property="idArticle"></result> <result column="id_article" property="idArticle"></result>
<result column="portfolio_title" property="portfolioTitle"></result> <result column="portfolio_title" property="portfolioTitle"></result>
<result column="portfolio_head_img_url" property="headImgUrl"></result> <result column="portfolio_head_img_url" property="headImgUrl"></result>
<result column="sort_no" property="sortNo"></result> <result column="sort_no" property="sortNo"></result>
</resultMap> </resultMap>
<insert id="insertArticleContent"> <insert id="insertArticleContent">
insert into vertical_article_content (id_article,article_content,article_content_html,created_time,updated_time) insert into forest_article_content (id_article,article_content,article_content_html,created_time,updated_time)
values (#{idArticle},#{articleContent},#{articleContentHtml},sysdate(),sysdate()) values (#{idArticle},#{articleContent},#{articleContentHtml},sysdate(),sysdate())
</insert> </insert>
<update id="updateArticleContent"> <update id="updateArticleContent">
update vertical_article_content set article_content = #{articleContent},article_content_html = #{articleContentHtml},updated_time = sysdate() where id_article = #{idArticle} update forest_article_content set article_content = #{articleContent},article_content_html = #{articleContentHtml},updated_time = sysdate() where id_article = #{idArticle}
</update> </update>
<update id="updateArticleViewCount"> <update id="updateArticleViewCount">
update vertical_article set article_view_count = #{articleViewCount} where id = #{id} update forest_article set article_view_count = #{articleViewCount} where id = #{id}
</update> </update>
<update id="updateArticleTags"> <update id="updateArticleTags">
update vertical_article set article_tags = #{tags} where id = #{idArticle} update forest_article set article_tags = #{tags} where id = #{idArticle}
</update> </update>
<update id="updateArticleLinkAndPreviewContent"> <update id="updateArticleLinkAndPreviewContent">
update vertical_article set article_link = #{articleLink}, article_permalink = #{articlePermalink}, article_preview_content = #{articlePreviewContent} where id = #{idArticle} update forest_article set article_link = #{articleLink}, article_permalink = #{articlePermalink}, article_preview_content = #{articlePreviewContent} where id = #{idArticle}
</update> </update>
<update id="updatePerfect"> <update id="updatePerfect">
update vertical_article set article_perfect = #{articlePerfect} where id = #{idArticle} update forest_article set article_perfect = #{articlePerfect} where id = #{idArticle}
</update> </update>
<delete id="deleteTagArticle"> <delete id="deleteTagArticle">
delete from vertical_tag_article where id_article = #{id} delete from forest_tag_article where id_article = #{id}
</delete> </delete>
<delete id="deleteUnusedArticleTag"> <delete id="deleteUnusedArticleTag">
delete from vertical_tag_article where id = #{idArticleTag} delete from forest_tag_article where id = #{idArticleTag}
</delete> </delete>
<delete id="deleteLinkedPortfolioData"> <delete id="deleteLinkedPortfolioData">
delete from vertical_portfolio_article where id_vertical_article = #{id} delete from forest_portfolio_article where id_article = #{id}
</delete> </delete>
<select id="selectArticles" resultMap="DTOResultMap"> <select id="selectArticles" resultMap="DTOResultMap">
select art.*,su.nickname,su.avatar_url from vertical_article art join vertical_user su on art.article_author_id = su.id select art.*,su.nickname,su.avatar_url from forest_article art join forest_user su on art.article_author_id = su.id
where article_status = 0 where article_status = 0
<if test="topicUri != 'news'"> <if test="topicUri != 'news'">
and FIND_IN_SET('划水',art.article_tags) = 0 and FIND_IN_SET('划水',art.article_tags) = 0
@ -106,48 +106,48 @@
order by updated_time desc order by updated_time desc
</select> </select>
<select id="selectArticleDTOById" resultMap="DTOResultMap"> <select id="selectArticleDTOById" resultMap="DTOResultMap">
select art.*,su.nickname,su.avatar_url from vertical_article art join vertical_user su on art.article_author_id = su.id where art.id = #{id} select art.*,su.nickname,su.avatar_url from forest_article art join forest_user su on art.article_author_id = su.id where art.id = #{id}
<if test="type == 1"> <if test="type == 1">
and art.article_status = 0 and art.article_status = 0
</if> </if>
</select> </select>
<select id="selectArticleContent" resultMap="ArticleContentResultMap"> <select id="selectArticleContent" resultMap="ArticleContentResultMap">
select article_content,article_content_html from vertical_article_content where id_article = #{idArticle} select article_content,article_content_html from forest_article_content where id_article = #{idArticle}
</select> </select>
<select id="selectArticlesByTopicUri" resultMap="DTOResultMap"> <select id="selectArticlesByTopicUri" resultMap="DTOResultMap">
select art.*,su.nickname,su.avatar_url from vertical_article art join vertical_user su on art.article_author_id = su.id select art.*,su.nickname,su.avatar_url from forest_article art join forest_user su on art.article_author_id = su.id
where art.article_status = 0 and exists(select * from vertical_tag_article vta where vta.id_article = art.id and exists(select * from vertical_topic_tag vtt where art.article_status = 0 and exists(select * from forest_tag_article vta where vta.id_article = art.id and exists(select * from forest_topic_tag vtt
join vertical_tag vt on vtt.id_tag = vt.id where vt.id = vta.id_tag and exists(select * from vertical_topic topic join forest_tag vt on vtt.id_tag = vt.id where vt.id = vta.id_tag and exists(select * from forest_topic topic
where topic.id = vtt.id_topic and topic.topic_uri = #{topicName}))) order by updated_time desc where topic.id = vtt.id_topic and topic.topic_uri = #{topicName}))) order by updated_time desc
</select> </select>
<select id="selectArticlesByTagName" resultMap="DTOResultMap"> <select id="selectArticlesByTagName" resultMap="DTOResultMap">
select art.*,su.nickname,su.avatar_url from vertical_article art join vertical_user su on art.article_author_id = su.id order by updated_time desc select art.*,su.nickname,su.avatar_url from forest_article art join forest_user su on art.article_author_id = su.id order by updated_time desc
</select> </select>
<select id="selectUserArticles" resultMap="DTOResultMap"> <select id="selectUserArticles" resultMap="DTOResultMap">
select art.*,su.nickname,su.avatar_url from vertical_article art join vertical_user su on su.id = #{idUser} select art.*,su.nickname,su.avatar_url from forest_article art join forest_user su on su.id = #{idUser}
and art.article_author_id = su.id where article_author_id = #{idUser} and art.article_status = 0 order by updated_time desc and art.article_author_id = su.id where article_author_id = #{idUser} and art.article_status = 0 order by updated_time desc
</select> </select>
<select id="selectTags" resultMap="ArticleTagDTOResultMap"> <select id="selectTags" resultMap="ArticleTagDTOResultMap">
select vta.id, vta.id_tag, vta.id_article, vt.tag_title, vt.tag_icon_path, vt.tag_uri, vt.tag_description from vertical_tag vt join vertical_tag_article vta on vt.id = vta.id_tag where vta.id_article = #{idArticle} select vta.id, vta.id_tag, vta.id_article, vt.tag_title, vt.tag_icon_path, vt.tag_uri, vt.tag_description from forest_tag vt join forest_tag_article vta on vt.id = vta.id_tag where vta.id_article = #{idArticle}
</select> </select>
<select id="selectDrafts" resultMap="DTOResultMap"> <select id="selectDrafts" resultMap="DTOResultMap">
select art.*,su.nickname,su.avatar_url from vertical_article art join vertical_user su on art.article_author_id = su.id where article_status = '1' and art.article_author_id = #{idUser} order by updated_time desc select art.*,su.nickname,su.avatar_url from forest_article art join forest_user su on art.article_author_id = su.id where article_status = '1' and art.article_author_id = #{idUser} order by updated_time desc
</select> </select>
<select id="selectArticlesByIdPortfolio" resultMap="DTOResultMap"> <select id="selectArticlesByIdPortfolio" resultMap="DTOResultMap">
select art.*,su.nickname,su.avatar_url,vpa.sort_no from vertical_article art join vertical_portfolio_article vpa on vpa.id_vertical_article = art.id and vpa.id_vertical_portfolio = #{idPortfolio} select art.*,su.nickname,su.avatar_url,vpa.sort_no from forest_article art join forest_portfolio_article vpa on vpa.id_article = art.id and vpa.id_portfolio = #{idPortfolio}
join vertical_user su on art.article_author_id = su.id where art.article_status = 0 and vpa.id_vertical_portfolio = #{idPortfolio} order by sort_no join forest_user su on art.article_author_id = su.id where art.article_status = 0 and vpa.id_portfolio = #{idPortfolio} order by sort_no
</select> </select>
<select id="selectUnbindArticlesByIdPortfolio" resultMap="DTOResultMap"> <select id="selectUnbindArticlesByIdPortfolio" resultMap="DTOResultMap">
select art.*,su.nickname,su.avatar_url from vertical_article art join vertical_user su on su.id = #{idUser} and art.article_author_id = su.id where art.article_author_id = #{idUser} and art.article_status = 0 select art.*,su.nickname,su.avatar_url from forest_article art join forest_user su on su.id = #{idUser} and art.article_author_id = su.id where art.article_author_id = #{idUser} and art.article_status = 0
and instr(art.article_title, #{searchText}) > 0 and art.id not in (select id_vertical_article from vertical_portfolio_article where id_vertical_portfolio = #{idPortfolio}) order by updated_time desc and instr(art.article_title, #{searchText}) > 0 and art.id not in (select id_article from forest_portfolio_article where id_portfolio = #{idPortfolio}) order by updated_time desc
</select> </select>
<select id="selectPortfolioArticles" resultMap="PortfolioArticleResultMap"> <select id="selectPortfolioArticles" resultMap="PortfolioArticleResultMap">
select vp.portfolio_title,vp.portfolio_head_img_url,vpa.id_vertical_portfolio,vpa.id_vertical_article,vpa.sort_no from vertical_portfolio vp join vertical_portfolio_article vpa on vp.id = vpa.id_vertical_portfolio where vpa.id_vertical_article = #{idArticle} select vp.portfolio_title,vp.portfolio_head_img_url,vpa.id_portfolio,vpa.id_article,vpa.sort_no from forest_portfolio vp join forest_portfolio_article vpa on vp.id = vpa.id_portfolio where vpa.id_article = #{idArticle}
</select> </select>
<select id="existsCommentWithPrimaryKey" resultType="java.lang.Boolean"> <select id="existsCommentWithPrimaryKey" resultType="java.lang.Boolean">
select exists (select * from vertical_comment where comment_article_id = #{id}) select exists (select * from forest_comment where comment_article_id = #{id})
</select> </select>
<select id="selectPortfolioArticlesByIdPortfolioAndSortNo" resultMap="DTOResultMap"> <select id="selectPortfolioArticlesByIdPortfolioAndSortNo" resultMap="DTOResultMap">
select va.article_title, va.id, va.article_permalink from vertical_portfolio_article vpa join vertical_article va on va.id = vpa.id_vertical_article where id_vertical_portfolio = #{idPortfolio} order by sort_no select va.article_title, va.id, va.article_permalink from forest_portfolio_article vpa join forest_article va on va.id = vpa.id_article where id_portfolio = #{idPortfolio} order by sort_no
</select> </select>
</mapper> </mapper>

View File

@ -2,6 +2,6 @@
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd" > <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd" >
<mapper namespace="com.rymcu.forest.mapper.ArticleThumbsUpMapper"> <mapper namespace="com.rymcu.forest.mapper.ArticleThumbsUpMapper">
<update id="updateArticleThumbsUpNumber"> <update id="updateArticleThumbsUpNumber">
update vertical_article set article_thumbs_up_count = article_thumbs_up_count + #{thumbsUpNumber} where id = #{idArticle} update forest_article set article_thumbs_up_count = article_thumbs_up_count + #{thumbsUpNumber} where id = #{idArticle}
</update> </update>
</mapper> </mapper>

View File

@ -12,9 +12,9 @@
<result column="created_time" property="createdTime"></result> <result column="created_time" property="createdTime"></result>
</resultMap> </resultMap>
<select id="selectBankAccounts" resultMap="DTOResultMap"> <select id="selectBankAccounts" resultMap="DTOResultMap">
select vb.bank_name, vu.nickname as account_owner_name, vba.* from vertical_bank_account vba select vb.bank_name, vu.nickname as account_owner_name, vba.* from forest_bank_account vba
join vertical_bank vb on vba.id_bank = vb.id join forest_bank vb on vba.id_bank = vb.id
join vertical_user vu on vba.account_owner = vu.id where vba.account_type = 0 join forest_user vu on vba.account_owner = vu.id where vba.account_type = 0
<if test="bankName != null and bankName != ''"> <if test="bankName != null and bankName != ''">
and vb.bank_name = #{bankName} and vb.bank_name = #{bankName}
</if> </if>
@ -26,10 +26,10 @@
</if> </if>
</select> </select>
<select id="selectBankAccount" resultMap="DTOResultMap"> <select id="selectBankAccount" resultMap="DTOResultMap">
select vb.bank_name, vba.* from vertical_bank_account vba select vb.bank_name, vba.* from forest_bank_account vba
join vertical_bank vb on vba.id_bank = vb.id where vba.id = #{idBank} join forest_bank vb on vba.id_bank = vb.id where vba.id = #{idBank}
</select> </select>
<select id="selectMaxBankAccount" resultType="java.lang.String"> <select id="selectMaxBankAccount" resultType="java.lang.String">
select max(bank_account) as max_bank_account from vertical_bank_account where account_type = 0 select max(bank_account) as max_bank_account from forest_bank_account where account_type = 0
</select> </select>
</mapper> </mapper>

View File

@ -13,7 +13,7 @@
<result column="bank_description" property="bankDescription"></result> <result column="bank_description" property="bankDescription"></result>
</resultMap> </resultMap>
<select id="selectBanks" resultMap="DTOResultMap"> <select id="selectBanks" resultMap="DTOResultMap">
select vb.*, vba.bank_account, vba.account_balance from vertical_bank_account vba select vb.*, vba.bank_account, vba.account_balance from forest_bank_account vba
join vertical_bank vb on vba.account_owner = vb.id where vba.account_type = 1 join forest_bank vb on vba.account_owner = vb.id where vba.account_type = 1
</select> </select>
</mapper> </mapper>

View File

@ -35,15 +35,15 @@
<result column="avatar_url" property="userAvatarURL"/> <result column="avatar_url" property="userAvatarURL"/>
</resultMap> </resultMap>
<update id="updateCommentSharpUrl"> <update id="updateCommentSharpUrl">
update vertical_comment set comment_sharp_url = #{commentSharpUrl} where id = #{idComment} update forest_comment set comment_sharp_url = #{commentSharpUrl} where id = #{idComment}
</update> </update>
<select id="selectArticleComments" resultMap="DTOResultMap"> <select id="selectArticleComments" resultMap="DTOResultMap">
select * from vertical_comment where comment_article_id = #{idArticle} order by created_time desc select * from forest_comment where comment_article_id = #{idArticle} order by created_time desc
</select> </select>
<select id="selectAuthor" resultMap="AuthorResultMap"> <select id="selectAuthor" resultMap="AuthorResultMap">
select id,nickname,avatar_url from vertical_user where id = #{commentAuthorId} select id,nickname,avatar_url from forest_user where id = #{commentAuthorId}
</select> </select>
<select id="selectCommentOriginalAuthor" resultMap="AuthorResultMap"> <select id="selectCommentOriginalAuthor" resultMap="AuthorResultMap">
select vu.id,vu.nickname,vu.avatar_url from vertical_comment vc left join vertical_user vu on vu.id = vc.comment_author_id where vc.id = #{commentOriginalCommentId} select vu.id,vu.nickname,vu.avatar_url from forest_comment vc left join forest_user vu on vu.id = vc.comment_author_id where vc.id = #{commentOriginalCommentId}
</select> </select>
</mapper> </mapper>

View File

@ -6,45 +6,45 @@
<result column="value" property="value"></result> <result column="value" property="value"></result>
</resultMap> </resultMap>
<select id="selectUserCount" resultType="java.lang.Integer"> <select id="selectUserCount" resultType="java.lang.Integer">
select count(*) from vertical_user select count(*) from forest_user
</select> </select>
<select id="selectNewUserCount" resultType="java.lang.Integer"> <select id="selectNewUserCount" resultType="java.lang.Integer">
select count(*) from vertical_user where created_time > str_to_date(date_format(sysdate(),'%Y-%m-%d'),'%Y-%m-%d') select count(*) from forest_user where created_time > str_to_date(date_format(sysdate(),'%Y-%m-%d'),'%Y-%m-%d')
</select> </select>
<select id="selectArticleCount" resultType="java.lang.Integer"> <select id="selectArticleCount" resultType="java.lang.Integer">
select count(*) from vertical_article select count(*) from forest_article
</select> </select>
<select id="selectNewArticleCount" resultType="java.lang.Integer"> <select id="selectNewArticleCount" resultType="java.lang.Integer">
select count(*) from vertical_article where created_time > str_to_date(date_format(sysdate(),'%Y-%m-%d'),'%Y-%m-%d') and article_status = 0 select count(*) from forest_article where created_time > str_to_date(date_format(sysdate(),'%Y-%m-%d'),'%Y-%m-%d') and article_status = 0
</select> </select>
<select id="selectCountViewNum" resultType="java.lang.Integer"> <select id="selectCountViewNum" resultType="java.lang.Integer">
select count(*) from vertical_visit select count(*) from forest_visit
</select> </select>
<select id="selectTodayViewNum" resultType="java.lang.Integer"> <select id="selectTodayViewNum" resultType="java.lang.Integer">
select count(*) from vertical_visit where created_time > str_to_date(date_format(sysdate(),'%Y-%m-%d'),'%Y-%m-%d') select count(*) from forest_visit where created_time > str_to_date(date_format(sysdate(),'%Y-%m-%d'),'%Y-%m-%d')
</select> </select>
<select id="selectLastThirtyDaysArticleData" resultMap="DashboardDataResultMap"> <select id="selectLastThirtyDaysArticleData" resultMap="DashboardDataResultMap">
select COUNT(*) as value, date_format(created_time, '%Y-%m-%d') as label from vertical_article select COUNT(*) as value, date_format(created_time, '%Y-%m-%d') as label from forest_article
where created_time > str_to_date(date_format(date_sub(sysdate(),interval + 30 day),'%Y-%m-%d'),'%Y-%m-%d') and article_status = 0 GROUP BY date_format(created_time, '%Y-%m-%d') where created_time > str_to_date(date_format(date_sub(sysdate(),interval + 30 day),'%Y-%m-%d'),'%Y-%m-%d') and article_status = 0 GROUP BY date_format(created_time, '%Y-%m-%d')
</select> </select>
<select id="selectLastThirtyDaysUserData" resultMap="DashboardDataResultMap"> <select id="selectLastThirtyDaysUserData" resultMap="DashboardDataResultMap">
select COUNT(*) as value, date_format(created_time, '%Y-%m-%d') as label from vertical_user select COUNT(*) as value, date_format(created_time, '%Y-%m-%d') as label from forest_user
where created_time > str_to_date(date_format(date_sub(sysdate(),interval + 30 day),'%Y-%m-%d'),'%Y-%m-%d') GROUP BY date_format(created_time, '%Y-%m-%d') where created_time > str_to_date(date_format(date_sub(sysdate(),interval + 30 day),'%Y-%m-%d'),'%Y-%m-%d') GROUP BY date_format(created_time, '%Y-%m-%d')
</select> </select>
<select id="selectLastThirtyDaysVisitData" resultMap="DashboardDataResultMap"> <select id="selectLastThirtyDaysVisitData" resultMap="DashboardDataResultMap">
select COUNT(*) as value, date_format(created_time, '%Y-%m-%d') as label from vertical_visit select COUNT(*) as value, date_format(created_time, '%Y-%m-%d') as label from forest_visit
where created_time > str_to_date(date_format(date_sub(sysdate(),interval + 30 day),'%Y-%m-%d'),'%Y-%m-%d') GROUP BY date_format(created_time, '%Y-%m-%d') where created_time > str_to_date(date_format(date_sub(sysdate(),interval + 30 day),'%Y-%m-%d'),'%Y-%m-%d') GROUP BY date_format(created_time, '%Y-%m-%d')
</select> </select>
<select id="selectHistoryArticleData" resultMap="DashboardDataResultMap"> <select id="selectHistoryArticleData" resultMap="DashboardDataResultMap">
select COUNT(*) as value, date_format(created_time, '%Y-%m') as label from vertical_article select COUNT(*) as value, date_format(created_time, '%Y-%m') as label from forest_article
where created_time > str_to_date(date_format(date_sub(sysdate(),interval + 1 year),'%Y-%m-%d'),'%Y-%m-%d') and article_status = 0 GROUP BY date_format(created_time, '%Y-%m') where created_time > str_to_date(date_format(date_sub(sysdate(),interval + 1 year),'%Y-%m-%d'),'%Y-%m-%d') and article_status = 0 GROUP BY date_format(created_time, '%Y-%m')
</select> </select>
<select id="selectHistoryUserData" resultMap="DashboardDataResultMap"> <select id="selectHistoryUserData" resultMap="DashboardDataResultMap">
select COUNT(*) as value, date_format(created_time, '%Y-%m') as label from vertical_user select COUNT(*) as value, date_format(created_time, '%Y-%m') as label from forest_user
where created_time > str_to_date(date_format(date_sub(sysdate(),interval + 1 year),'%Y-%m-%d'),'%Y-%m-%d') GROUP BY date_format(created_time, '%Y-%m') where created_time > str_to_date(date_format(date_sub(sysdate(),interval + 1 year),'%Y-%m-%d'),'%Y-%m-%d') GROUP BY date_format(created_time, '%Y-%m')
</select> </select>
<select id="selectHistoryVisitData" resultMap="DashboardDataResultMap"> <select id="selectHistoryVisitData" resultMap="DashboardDataResultMap">
select COUNT(*) as value, date_format(created_time, '%Y-%m') as label from vertical_visit select COUNT(*) as value, date_format(created_time, '%Y-%m') as label from forest_visit
where created_time > str_to_date(date_format(date_sub(sysdate(),interval + 1 year),'%Y-%m-%d'),'%Y-%m-%d') GROUP BY date_format(created_time, '%Y-%m') where created_time > str_to_date(date_format(date_sub(sysdate(),interval + 1 year),'%Y-%m-%d'),'%Y-%m-%d') GROUP BY date_format(created_time, '%Y-%m')
</select> </select>
</mapper> </mapper>

View File

@ -10,15 +10,15 @@
<result column="signature" property="signature"/> <result column="signature" property="signature"/>
</resultMap> </resultMap>
<select id="isFollow" resultType="java.lang.Boolean"> <select id="isFollow" resultType="java.lang.Boolean">
select ifnull((select true from vertical_follow where follower_id = #{followerId} select ifnull((select true from forest_follow where follower_id = #{followerId}
and following_id = #{followingId} and following_type = #{followingType}), false) and following_id = #{followingId} and following_type = #{followingType}), false)
</select> </select>
<select id="selectUserFollowersByUser" resultMap="DTOResultMapper"> <select id="selectUserFollowersByUser" resultMap="DTOResultMapper">
select id, nickname, avatar_type, avatar_url, account, signature from vertical_user vu select id, nickname, avatar_type, avatar_url, account, signature from forest_user vu
where exists (select * from vertical_follow vf where following_type = 0 and following_id = #{idUser} and follower_id = vu.id limit 1) where exists (select * from forest_follow vf where following_type = 0 and following_id = #{idUser} and follower_id = vu.id limit 1)
</select> </select>
<select id="selectUserFollowingsByUser" resultMap="DTOResultMapper"> <select id="selectUserFollowingsByUser" resultMap="DTOResultMapper">
select id, nickname, avatar_type, avatar_url, account, signature from vertical_user vu select id, nickname, avatar_type, avatar_url, account, signature from forest_user vu
where exists (select * from vertical_follow vf where following_type = 0 and follower_id = #{idUser} and following_id = vu.id limit 1) where exists (select * from forest_follow vf where following_type = 0 and follower_id = #{idUser} and following_id = vu.id limit 1)
</select> </select>
</mapper> </mapper>

View File

@ -11,18 +11,18 @@
<result column="created_time" property="createdTime"></result> <result column="created_time" property="createdTime"></result>
</resultMap> </resultMap>
<insert id="insertNotification"> <insert id="insertNotification">
insert into vertical_notification (id_user, data_type, data_id, data_summary, created_time) values (#{idUser}, #{dataType}, #{dataId}, #{dataSummary}, sysdate()) insert into forest_notification (id_user, data_type, data_id, data_summary, created_time) values (#{idUser}, #{dataType}, #{dataId}, #{dataSummary}, sysdate())
</insert> </insert>
<update id="readNotification"> <update id="readNotification">
update vertical_notification set has_read = '1' where id = #{id} update forest_notification set has_read = '1' where id = #{id}
</update> </update>
<select id="selectUnreadNotifications" resultMap="BaseResultMapper"> <select id="selectUnreadNotifications" resultMap="BaseResultMapper">
select * from vertical_notification where has_read = '0' and id_user = #{idUser} order by created_time desc select * from forest_notification where has_read = '0' and id_user = #{idUser} order by created_time desc
</select> </select>
<select id="selectNotifications" resultMap="BaseResultMapper"> <select id="selectNotifications" resultMap="BaseResultMapper">
select * from vertical_notification where id_user = #{idUser} order by created_time desc select * from forest_notification where id_user = #{idUser} order by created_time desc
</select> </select>
<select id="selectNotification" resultMap="BaseResultMapper"> <select id="selectNotification" resultMap="BaseResultMapper">
select * from vertical_notification where id_user = #{idUser} and data_id = #{dataId} and data_type = #{dataType} select * from forest_notification where id_user = #{idUser} and data_id = #{dataId} and data_type = #{dataType}
</select> </select>
</mapper> </mapper>

View File

@ -10,6 +10,6 @@
</resultMap> </resultMap>
<select id="selectMenuByIdRole" resultMap="BaseResultMap"> <select id="selectMenuByIdRole" resultMap="BaseResultMap">
select * from vertical_role_permission srm left join vertical_permission sm on srm.id = sm.id select * from forest_role_permission srm left join forest_permission sm on srm.id = sm.id
</select> </select>
</mapper> </mapper>

View File

@ -19,16 +19,16 @@
<result column="updated_time" property="updatedTime"></result> <result column="updated_time" property="updatedTime"></result>
</resultMap> </resultMap>
<insert id="insertPortfolioArticle"> <insert id="insertPortfolioArticle">
insert into vertical_portfolio_article (id_vertical_portfolio, id_vertical_article, sort_no) values (#{idPortfolio}, #{idArticle}, #{maxSortNo}) insert into forest_portfolio_article (id_portfolio, id_article, sort_no) values (#{idPortfolio}, #{idArticle}, #{maxSortNo})
</insert> </insert>
<update id="updateArticleSortNo"> <update id="updateArticleSortNo">
update vertical_portfolio_article set sort_no = #{sortNo} where id_vertical_portfolio = #{idPortfolio} and id_vertical_article = #{idArticle} update forest_portfolio_article set sort_no = #{sortNo} where id_portfolio = #{idPortfolio} and id_article = #{idArticle}
</update> </update>
<delete id="unbindArticle"> <delete id="unbindArticle">
delete from vertical_portfolio_article where id_vertical_portfolio = #{idPortfolio} and id_vertical_article = #{idArticle} delete from forest_portfolio_article where id_portfolio = #{idPortfolio} and id_article = #{idArticle}
</delete> </delete>
<select id="selectUserPortfoliosByIdUser" resultMap="DTOResultMap"> <select id="selectUserPortfoliosByIdUser" resultMap="DTOResultMap">
select id, portfolio_head_img_url, portfolio_title, portfolio_author_id, portfolio_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 forest_portfolio where portfolio_author_id = #{idUser}
</select> </select>
<select id="selectPortfolioDTOById" resultMap="DTOResultMap"> <select id="selectPortfolioDTOById" resultMap="DTOResultMap">
select id, portfolio_head_img_url, portfolio_title, portfolio_author_id, select id, portfolio_head_img_url, portfolio_title, portfolio_author_id,
@ -40,15 +40,15 @@
portfolio_description, portfolio_description,
</otherwise> </otherwise>
</choose> </choose>
updated_time from vertical_portfolio where id = #{id} updated_time from forest_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 forest_portfolio_article where id_portfolio = #{idPortfolio}
</select> </select>
<select id="selectCountPortfolioArticle" resultType="java.lang.Integer"> <select id="selectCountPortfolioArticle" resultType="java.lang.Integer">
select count(*) from vertical_portfolio_article where id_vertical_portfolio = #{idPortfolio} and id_vertical_article = #{idArticle} select count(*) from forest_portfolio_article where id_portfolio = #{idPortfolio} and id_article = #{idArticle}
</select> </select>
<select id="selectMaxSortNo" resultType="java.lang.Integer"> <select id="selectMaxSortNo" resultType="java.lang.Integer">
select ifnull(max(sort_no),0) + 1 from vertical_portfolio_article where id_vertical_portfolio = #{idPortfolio} select ifnull(max(sort_no),0) + 1 from forest_portfolio_article where id_portfolio = #{idPortfolio}
</select> </select>
</mapper> </mapper>

View File

@ -14,17 +14,17 @@
<result column="status" jdbcType="INTEGER" property="status"/> <result column="status" jdbcType="INTEGER" property="status"/>
</resultMap> </resultMap>
<update id="updateStatus"> <update id="updateStatus">
update vertical_role set status = #{status},updated_time = sysdate() where id = #{idRole} update forest_role set status = #{status},updated_time = sysdate() where id = #{idRole}
</update> </update>
<update id="update"> <update id="update">
update vertical_role set name = #{name}, input_code = #{inputCode}, weights = #{weights}, updated_time = sysdate() where id = #{idRole} update forest_role set name = #{name}, input_code = #{inputCode}, weights = #{weights}, updated_time = sysdate() where id = #{idRole}
</update> </update>
<select id="selectRoleByIdUser" resultMap="BaseResultMap"> <select id="selectRoleByIdUser" resultMap="BaseResultMap">
select sr.* from vertical_user_role sur left join vertical_role sr on sur.id_role = sr.id where id_user = #{id} select sr.* from forest_user_role sur left join forest_role sr on sur.id_role = sr.id where id_user = #{id}
</select> </select>
<select id="selectRoleByInputCode" resultMap="BaseResultMap"> <select id="selectRoleByInputCode" resultMap="BaseResultMap">
select * from vertical_role where input_code = #{inputCode} select * from forest_role where input_code = #{inputCode}
</select> </select>
</mapper> </mapper>

View File

@ -7,12 +7,12 @@
<result column="type" property="type"></result> <result column="type" property="type"></result>
</resultMap> </resultMap>
<select id="searchInitialArticleSearch" resultMap="BaseResultMap"> <select id="searchInitialArticleSearch" resultMap="BaseResultMap">
select article_title as label, id as value, 'article' as type from vertical_article where article_status = 0 select article_title as label, id as value, 'article' as type from forest_article where article_status = 0
</select> </select>
<select id="searchInitialPortfolioSearch" resultMap="BaseResultMap"> <select id="searchInitialPortfolioSearch" resultMap="BaseResultMap">
select portfolio_title as label, id as value, 'portfolio' as type from vertical_portfolio select portfolio_title as label, id as value, 'portfolio' as type from forest_portfolio
</select> </select>
<select id="searchInitialUserSearch" resultMap="BaseResultMap"> <select id="searchInitialUserSearch" resultMap="BaseResultMap">
select nickname as label, nickname as value, 'user' as type from vertical_user where status = 0 select nickname as label, nickname as value, 'user' as type from forest_user where status = 0
</select> </select>
</mapper> </mapper>

View File

@ -2,6 +2,6 @@
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd" > <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd" >
<mapper namespace="com.rymcu.forest.mapper.SponsorMapper"> <mapper namespace="com.rymcu.forest.mapper.SponsorMapper">
<update id="updateArticleSponsorCount"> <update id="updateArticleSponsorCount">
update vertical_article set article_sponsor_count = article_sponsor_count + 1 where id = #{idArticle} update forest_article set article_sponsor_count = article_sponsor_count + 1 where id = #{idArticle}
</update> </update>
</mapper> </mapper>

View File

@ -23,24 +23,24 @@
<result column="tag_title" property="value"></result> <result column="tag_title" property="value"></result>
</resultMap> </resultMap>
<insert id="insertTagArticle"> <insert id="insertTagArticle">
insert into vertical_tag_article (id_tag,id_article,created_time,updated_time) values (#{idTag},#{idArticle},sysdate(),sysdate()) insert into forest_tag_article (id_tag,id_article,created_time,updated_time) values (#{idTag},#{idArticle},sysdate(),sysdate())
</insert> </insert>
<insert id="insertUserTag"> <insert id="insertUserTag">
insert into vertical_user_tag (id_tag,id_user,type,created_time,updated_time) values (#{idTag},#{idUser},#{type},sysdate(),sysdate()) insert into forest_user_tag (id_tag,id_user,type,created_time,updated_time) values (#{idTag},#{idUser},#{type},sysdate(),sysdate())
</insert> </insert>
<update id="update"> <update id="update">
update vertical_tag set tag_uri = #{tagUri}, tag_icon_path = #{tagIconPath}, tag_status = #{tagStatus}, tag_description = #{tagDescription}, tag_reservation = #{tagReservation} where id = #{idTag} update forest_tag set tag_uri = #{tagUri}, tag_icon_path = #{tagIconPath}, tag_status = #{tagStatus}, tag_description = #{tagDescription}, tag_reservation = #{tagReservation} where id = #{idTag}
</update> </update>
<delete id="deleteUnusedTag"> <delete id="deleteUnusedTag">
delete from vertical_tag where tag_reservation = 0 and id not in (select * from (select id_tag from vertical_tag_article vta left join vertical_article va on vta.id_article = va.id where va.id is not null) tmp); delete from forest_tag where tag_reservation = 0 and id not in (select * from (select id_tag from forest_tag_article vta left join forest_article va on vta.id_article = va.id where va.id is not null) tmp);
</delete> </delete>
<select id="selectCountTagArticleById" resultType="java.lang.Integer"> <select id="selectCountTagArticleById" resultType="java.lang.Integer">
select count(*) from vertical_tag_article where id_tag = #{idTag} and id_article = #{idArticle} select count(*) from forest_tag_article where id_tag = #{idTag} and id_article = #{idArticle}
</select> </select>
<select id="selectCountUserTagById" resultType="java.lang.Integer"> <select id="selectCountUserTagById" resultType="java.lang.Integer">
select count(*) from vertical_user_tag where id_tag = #{idTag} and id_user = #{idUser} select count(*) from forest_user_tag where id_tag = #{idTag} and id_user = #{idUser}
</select> </select>
<select id="selectTagLabels" resultMap="TagLabelResultMap"> <select id="selectTagLabels" resultMap="TagLabelResultMap">
select tag_title from vertical_tag where tag_status = 0 select tag_title from forest_tag where tag_status = 0
</select> </select>
</mapper> </mapper>

View File

@ -51,27 +51,27 @@
<id column="updated_time" property="updatedTime"/> <id column="updated_time" property="updatedTime"/>
</resultMap> </resultMap>
<insert id="insertTopicTag"> <insert id="insertTopicTag">
insert into vertical_topic_tag (id_topic, id_tag, created_time, updated_time) values (#{idTopic}, #{idTag}, sysdate(), sysdate()) insert into forest_topic_tag (id_topic, id_tag, created_time, updated_time) values (#{idTopic}, #{idTag}, sysdate(), sysdate())
</insert> </insert>
<update id="update"> <update id="update">
update vertical_topic set topic_title = #{topicTitle},topic_uri = #{topicUri},topic_icon_path = #{topicIconPath}, updated_time = sysdate(), update forest_topic set topic_title = #{topicTitle},topic_uri = #{topicUri},topic_icon_path = #{topicIconPath}, updated_time = sysdate(),
topic_nva = #{topicNva},topic_status = #{topicStatus},topic_sort = #{topicSort},topic_description = #{topicDescription},topic_description_html = #{topicDescriptionHtml} topic_nva = #{topicNva},topic_status = #{topicStatus},topic_sort = #{topicSort},topic_description = #{topicDescription},topic_description_html = #{topicDescriptionHtml}
where id = #{idTopic} where id = #{idTopic}
</update> </update>
<delete id="deleteTopicTag"> <delete id="deleteTopicTag">
delete from vertical_topic_tag where id_topic = #{idTopic} and id_tag = #{idTag} delete from forest_topic_tag where id_topic = #{idTopic} and id_tag = #{idTag}
</delete> </delete>
<select id="selectTopicNav" resultMap="BaseResultMap"> <select id="selectTopicNav" resultMap="BaseResultMap">
select id,topic_title,topic_uri,topic_icon_path from vertical_topic where topic_nva = 0 and topic_status = 0 order by topic_sort select id,topic_title,topic_uri,topic_icon_path from forest_topic where topic_nva = 0 and topic_status = 0 order by topic_sort
</select> </select>
<select id="selectTopicByTopicUri" resultMap="DTOResultMap"> <select id="selectTopicByTopicUri" resultMap="DTOResultMap">
select id,topic_title,topic_uri,topic_icon_path,topic_description,topic_tag_count,topic_status from vertical_topic where topic_uri = #{topicUri} select id,topic_title,topic_uri,topic_icon_path,topic_description,topic_tag_count,topic_status from forest_topic where topic_uri = #{topicUri}
</select> </select>
<select id="selectTopicTag" resultMap="TagDTOResultMap"> <select id="selectTopicTag" resultMap="TagDTOResultMap">
select vt.id,vt.tag_title,vt.tag_uri,vt.tag_description,vt.tag_icon_path from vertical_tag vt left join vertical_topic_tag vtt on vt.id = vtt.id_tag where vtt.id_topic = #{idTopic} order by vtt.created_time desc select vt.id,vt.tag_title,vt.tag_uri,vt.tag_description,vt.tag_icon_path from forest_tag vt left join forest_topic_tag vtt on vt.id = vtt.id_tag where vtt.id_topic = #{idTopic} order by vtt.created_time desc
</select> </select>
<select id="selectUnbindTagsById" resultMap="TagResultMap"> <select id="selectUnbindTagsById" resultMap="TagResultMap">
select * from vertical_tag vt where not exists(select * from vertical_topic_tag vtt where vtt.id_topic = #{idTopic} and vtt.id_tag = vt.id) select * from forest_tag vt where not exists(select * from forest_topic_tag vtt where vtt.id_topic = #{idTopic} and vtt.id_tag = vt.id)
<if test="tagTitle != '' and tagTitle != null"> <if test="tagTitle != '' and tagTitle != null">
and LOCATE(#{tagTitle}, vt.tag_title) > 0 and LOCATE(#{tagTitle}, vt.tag_title) > 0
</if> </if>

View File

@ -12,10 +12,10 @@
<result column="transaction_time" property="transactionTime"></result> <result column="transaction_time" property="transactionTime"></result>
</resultMap> </resultMap>
<update id="transfer"> <update id="transfer">
update vertical_bank_account set account_balance = account_balance - #{money} where bank_account = #{formBankAccount}; update forest_bank_account set account_balance = account_balance - #{money} where bank_account = #{formBankAccount};
update vertical_bank_account set account_balance = account_balance + #{money} where bank_account = #{toBankAccount}; update forest_bank_account set account_balance = account_balance + #{money} where bank_account = #{toBankAccount};
</update> </update>
<select id="selectTransactionRecords" resultMap="DTOResultMap"> <select id="selectTransactionRecords" resultMap="DTOResultMap">
select * from vertical_transaction_record where form_bank_account = #{bankAccount} or to_bank_account = #{bankAccount} select * from forest_transaction_record where form_bank_account = #{bankAccount} or to_bank_account = #{bankAccount}
</select> </select>
</mapper> </mapper>

View File

@ -10,7 +10,7 @@
<result column="blog" property="blog"></result> <result column="blog" property="blog"></result>
</resultMap> </resultMap>
<select id="selectUserExtendByNickname" resultMap="BaseResultMap"> <select id="selectUserExtendByNickname" resultMap="BaseResultMap">
select vue.* from vertical_user_extend vue join vertical_user vu on vue.id_user = vu.id select vue.* from forest_user_extend vue join forest_user vu on vue.id_user = vu.id
where vu.nickname = #{nickname} limit 1 where vu.nickname = #{nickname} limit 1
</select> </select>
</mapper> </mapper>

View File

@ -47,57 +47,57 @@
<result column="avatar_url" property="userAvatarURL"/> <result column="avatar_url" property="userAvatarURL"/>
</resultMap> </resultMap>
<insert id="insertUserRole"> <insert id="insertUserRole">
insert into vertical_user_role (id_user,id_role,created_time) values (#{idUser},#{idRole},sysdate()) insert into forest_user_role (id_user,id_role,created_time) values (#{idUser},#{idRole},sysdate())
</insert> </insert>
<update id="updatePasswordByAccount"> <update id="updatePasswordByAccount">
update vertical_user set password = #{password} where account = #{account} update forest_user set password = #{password} where account = #{account}
</update> </update>
<update id="updateUserRole"> <update id="updateUserRole">
update vertical_user_role set id_role = #{idRole},created_time = sysdate() where id_user = #{idUser} update forest_user_role set id_role = #{idRole},created_time = sysdate() where id_user = #{idUser}
</update> </update>
<update id="updateStatus"> <update id="updateStatus">
update vertical_user set status = #{status} where id = #{idUser} update forest_user set status = #{status} where id = #{idUser}
</update> </update>
<update id="updateUserInfo"> <update id="updateUserInfo">
update vertical_user set nickname = #{nickname},email = #{email},signature = #{signature},avatar_type = #{avatarType},avatar_url = #{avatarUrl},sex = #{sex} update forest_user set nickname = #{nickname},email = #{email},signature = #{signature},avatar_type = #{avatarType},avatar_url = #{avatarUrl},sex = #{sex}
<if test="phone != null and phone != ''"> <if test="phone != null and phone != ''">
,phone = #{phone} ,phone = #{phone}
</if> </if>
where id = #{idUser} where id = #{idUser}
</update> </update>
<update id="updateLastLoginTime"> <update id="updateLastLoginTime">
update vertical_user set last_login_time = sysdate() where id = #{idUser} update forest_user set last_login_time = sysdate() where id = #{idUser}
</update> </update>
<update id="updateEmail"> <update id="updateEmail">
update vertical_user set email = #{email} where id = #{idUser} update forest_user set email = #{email} where id = #{idUser}
</update> </update>
<update id="updatePasswordById"> <update id="updatePasswordById">
update vertical_user set password = #{password} where id = #{idUser} update forest_user set password = #{password} where id = #{idUser}
</update> </update>
<select id="findByAccount" resultMap="BaseResultMap"> <select id="findByAccount" resultMap="BaseResultMap">
select id, nickname, account, password, status, avatar_type, avatar_url from vertical_user where (account = #{account} or email = #{account} ) and status = 0 select id, nickname, account, password, status, avatar_type, avatar_url from forest_user where (account = #{account} or email = #{account} ) and status = 0
</select> </select>
<select id="findUserInfoByAccount" resultMap="UserInfoResultMapper"> <select id="findUserInfoByAccount" resultMap="UserInfoResultMapper">
select id, nickname, sex, avatar_type, avatar_url, email, phone, account, status, signature, last_login_time from vertical_user where account = #{account} select id, nickname, sex, avatar_type, avatar_url, email, phone, account, status, signature, last_login_time from forest_user where account = #{account}
</select> </select>
<select id="selectUserDTOByNickname" resultMap="DTOResultMapper"> <select id="selectUserDTOByNickname" resultMap="DTOResultMapper">
select id, nickname, avatar_type, avatar_url, account, signature from vertical_user where nickname = #{nickname} and status = 0 select id, nickname, avatar_type, avatar_url, account, signature from forest_user where nickname = #{nickname} and status = 0
</select> </select>
<select id="selectRoleWeightsByUser" resultType="java.lang.Integer"> <select id="selectRoleWeightsByUser" resultType="java.lang.Integer">
select vr.weights from vertical_role vr left join vertical_user_role vur on vr.id = vur.id_role where vur.id_user = #{idUser} select vr.weights from forest_role vr left join forest_user_role vur on vr.id = vur.id_role where vur.id_user = #{idUser}
</select> </select>
<select id="selectCountByNickName" resultType="java.lang.Integer"> <select id="selectCountByNickName" resultType="java.lang.Integer">
select count(*) from vertical_user where nickname = #{nickname} select count(*) from forest_user where nickname = #{nickname}
</select> </select>
<select id="selectUserInfo" resultMap="UserInfoResultMapper"> <select id="selectUserInfo" resultMap="UserInfoResultMapper">
select id, nickname, sex, avatar_type, avatar_url, email, phone, account, status, signature, last_login_time from vertical_user where id = #{idUser} select id, nickname, sex, avatar_type, avatar_url, email, phone, account, status, signature, last_login_time from forest_user where id = #{idUser}
</select> </select>
<select id="checkNicknameByIdUser" resultType="java.lang.Integer"> <select id="checkNicknameByIdUser" resultType="java.lang.Integer">
select count(*) from vertical_user where nickname = #{nickname} and id != #{idUser} select count(*) from forest_user where nickname = #{nickname} and id != #{idUser}
</select> </select>
<select id="selectAuthor" resultMap="AuthorResultMap"> <select id="selectAuthor" resultMap="AuthorResultMap">
select * from vertical_user where id = #{id} select * from forest_user where id = #{id}
</select> </select>
</mapper> </mapper>