Merge pull request #5 from rymcu/master

💬 添加注释
This commit is contained in:
ronger 2020-03-31 08:50:07 +08:00 committed by GitHub
commit e759a836fd
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
5 changed files with 55 additions and 3 deletions

View File

@ -55,7 +55,6 @@ public class ShiroConfig implements EnvironmentAware {
filterChainDefinitionMap.put("/api/**", "anon");
filterChainDefinitionMap.put("/ws/**", "anon");
filterChainDefinitionMap.put("/wx/**", "anon");
filterChainDefinitionMap.put("/**", "auth");
//配置shiro默认登录界面地址前后端分离中登录界面跳转应由前端路由控制后台仅返回json数据
shiroFilterFactoryBean.setLoginUrl("/login");

View File

@ -8,28 +8,35 @@ import org.apache.ibatis.annotations.Param;
import java.util.List;
/**
* @author ronger
*/
public interface CommentMapper extends Mapper<Comment> {
/**
* 获取文章评论列表
* @param idArticle
* @return
*/
List<CommentDTO> selectArticleComments(@Param("idArticle") Integer idArticle);
/**
* 查询评论作者
* @param commentAuthorId
* @return
*/
Author selectAuthor(@Param("commentAuthorId") Integer commentAuthorId);
/**
* 查询父评论作者
* @param commentOriginalCommentId
* @return
*/
Author selectCommentOriginalAuthor(@Param("commentOriginalCommentId") Integer commentOriginalCommentId);
/**
* 更新文章评论分享链接
* @param idComment
* @param toString
* @param commentSharpUrl
* @return
*/
Integer updateCommentSharpUrl(@Param("idComment") Integer idComment, @Param("commentSharpUrl") String commentSharpUrl);

View File

@ -7,20 +7,64 @@ import org.apache.ibatis.annotations.Param;
import java.util.List;
/**
* @author ronger
*/
public interface TagMapper extends Mapper<Tag> {
/**
* 插入标签文章表(vertical_tag_article)相关信息
* @param idTag
* @param idArticle
* @return
*/
Integer insertTagArticle(@Param("idTag") Integer idTag, @Param("idArticle") Integer idArticle);
/**
* 统计标签使用数(文章)
* @param idTag
* @param idArticle
* @return
*/
Integer selectCountTagArticleById(@Param("idTag") Integer idTag, @Param("idArticle") Integer idArticle);
/**
* 获取用户标签数
* @param idUser
* @param idTag
* @return
*/
Integer selectCountUserTagById(@Param("idUser") Integer idUser, @Param("idTag") Integer idTag);
/**
* 插入用户标签信息
* @param idTag
* @param idUser
* @param type
* @return
*/
Integer insertUserTag(@Param("idTag") Integer idTag, @Param("idUser") Integer idUser, @Param("type") Integer type);
/**
* 删除未使用标签
* @return
*/
Integer deleteUnusedTag();
/**
* 更新标签信息
* @param idTag
* @param tagUri
* @param tagIconPath
* @param tagStatus
* @param tagDescription
* @param tagReservation
* @return
*/
Integer update(@Param("idTag") Integer idTag, @Param("tagUri") String tagUri, @Param("tagIconPath") String tagIconPath, @Param("tagStatus") String tagStatus, @Param("tagDescription") String tagDescription, @Param("tagReservation") String tagReservation);
/**
* 查询标签列表
* @return
*/
List<LabelModel> selectTagLabels();

View File

@ -7,6 +7,9 @@ import org.springframework.beans.factory.annotation.Value;
import org.springframework.scheduling.annotation.Scheduled;
import org.springframework.stereotype.Component;
/**
* @author ronger
*/
@Component
@Slf4j
public class BaiduCronTask {

View File

@ -6,7 +6,6 @@ import com.rymcu.vertical.core.result.GlobalResult;
import com.rymcu.vertical.core.result.GlobalResultGenerator;
import com.rymcu.vertical.dto.ArticleDTO;
import com.rymcu.vertical.dto.LabelModel;
import com.rymcu.vertical.entity.Tag;
import com.rymcu.vertical.service.ArticleService;
import com.rymcu.vertical.service.TagService;
import com.rymcu.vertical.util.Utils;