zhangshiyu_branch
ZSY 1 year ago
parent c3f0356195
commit 13dac81762

@ -13,6 +13,11 @@
<option name="LAST_RESOLUTION" value="IGNORE" />
</component>
<component name="Git.Settings">
<option name="RECENT_BRANCH_BY_REPOSITORY">
<map>
<entry key="$PROJECT_DIR$" value="master" />
</map>
</option>
<option name="RECENT_GIT_ROOT_PATH" value="$PROJECT_DIR$" />
</component>
<component name="ProjectColorInfo">{
@ -56,6 +61,8 @@
<workItem from="1733319501582" duration="660000" />
<workItem from="1733551199232" duration="11000" />
<workItem from="1733555290604" duration="376000" />
<workItem from="1733569271209" duration="156000" />
<workItem from="1733788858614" duration="13000" />
</task>
<servers />
</component>

@ -0,0 +1,70 @@
package com.liuyanzhao.ssm.blog.mapper;
import com.liuyanzhao.ssm.blog.entity.ArticleCategoryRef;
import com.liuyanzhao.ssm.blog.entity.Category;
import org.apache.ibatis.annotations.Mapper;
import java.util.List;
/**
* Mapper
* @author liuyanzhao
*/
@Mapper
public interface ArticleCategoryRefMapper {
/**
*
* @param record
* @return
*/
int insert(ArticleCategoryRef record);
/**
* ID
* @param categoryId ID
* @return
*/
int deleteByCategoryId(Integer categoryId);
/**
* ID
* @param articleId ID
* @return
*/
int deleteByArticleId(Integer articleId);
/**
* ID
* @param categoryId ID
* @return
*/
int countArticleByCategoryId(Integer categoryId);
/**
* IDID
*
* @param articleId ID
* @return ID
*/
List<Integer> selectCategoryIdByArticleId(Integer articleId);
/**
* IDID
*
* @param categoryId ID
* @return ID
*/
List<Integer> selectArticleIdByCategoryId(Integer categoryId);
/**
* ID
*
* @param articleId ID
* @return
*/
List<Category> listCategoryByArticleId(Integer articleId);
}

@ -0,0 +1,223 @@
package com.liuyanzhao.ssm.blog.mapper;
import com.liuyanzhao.ssm.blog.entity.Article;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import java.util.HashMap;
import java.util.List;
/**
* Mapper
*
* @author liuyanzhao
*/
@Mapper
public interface ArticleMapper {
/**
* ID
*
* @param articleId ID
* @return
*/
Integer deleteById(Integer articleId);
/**
* ID
*
* @param userId ID
* @return
*/
Integer deleteByUserId(Integer userId);
/**
*
*
* @param article
* @return
*/
Integer insert(Article article);
/**
*
*
* @param article
* @return
*/
Integer update(Article article);
/**
*
*
* @param criteria
* @return
*/
List<Article> findAll(HashMap<String, Object> criteria);
/**
*
*
* @return
*/
List<Article> listAllNotWithContent();
/**
*
*
* @param status
* @return
*/
Integer countArticle(@Param(value = "status") Integer status);
/**
*
*
* @return
*/
Integer countArticleComment();
/**
*
*
* @return
*/
Integer countArticleView();
/**
* ()
*
* @return
*/
List<Article> listArticle();
/**
* id
*
* @param status
* @param id ID
* @return
*/
Article getArticleByStatusAndId(@Param(value = "status") Integer status, @Param(value = "id") Integer id);
/**
*
*
* @param status
* @param pageIndex
* @param pageSize
* @return
*/
@Deprecated
List<Article> pageArticle(@Param(value = "status") Integer status,
@Param(value = "pageIndex") Integer pageIndex,
@Param(value = "pageSize") Integer pageSize);
/**
* 访()
*
* @param limit
* @return
*/
List<Article> listArticleByViewCount(@Param(value = "limit") Integer limit);
/**
*
*
* @param id ID
* @return
*/
Article getAfterArticle(@Param(value = "id") Integer id);
/**
*
*
* @param id ID
* @return
*/
Article getPreArticle(@Param(value = "id") Integer id);
/**
*
*
* @param limit
* @return
*/
List<Article> listRandomArticle(@Param(value = "limit") Integer limit);
/**
*
*
* @param limit
* @return
*/
List<Article> listArticleByCommentCount(@Param(value = "limit") Integer limit);
/**
*
*
* @param articleId ID
*/
void updateCommentCount(@Param(value = "articleId") Integer articleId);
/**
*
*
* @return
*/
Article getLastUpdateArticle();
/**
*
*
* @param id ID
* @return
*/
Integer countArticleByUser(@Param(value = "id") Integer id);
/**
* ID
*
* @param categoryId ID
* @param limit
* @return
*/
List<Article> findArticleByCategoryId(@Param("categoryId") Integer categoryId,
@Param("limit") Integer limit);
/**
* ID
*
* @param categoryIds ID
* @param limit
* @return
*/
List<Article> findArticleByCategoryIds(@Param("categoryIds") List<Integer> categoryIds,
@Param("limit") Integer limit);
/**
*
*
* @param limit
* @return
*/
List<Article> listArticleByLimit(@Param("userId") Integer userId, @Param("limit") Integer limit);
/**
*
*
* @param ids Id
* @return
*/
Integer deleteBatch(@Param("ids") List<Integer> ids);
/**
* id
*
* @param userId
* @return
*/
List<Integer> listArticleIdsByUserId(Integer userId);
}

@ -0,0 +1,54 @@
package com.liuyanzhao.ssm.blog.mapper;
import com.liuyanzhao.ssm.blog.entity.ArticleTagRef;
import com.liuyanzhao.ssm.blog.entity.Tag;
import org.apache.ibatis.annotations.Mapper;
import java.util.List;
/**
* Mapper
* @author liuyanzhao
*/
@Mapper
public interface ArticleTagRefMapper {
/**
*
* @param record
* @return
*/
int insert(ArticleTagRef record);
/**
* ID
* @param tagId ID
* @return
*/
int deleteByTagId(Integer tagId);
/**
* ID
* @param articleId ID
* @return
*/
int deleteByArticleId(Integer articleId);
/**
* ID
* @param tagId ID
* @return
*/
int countArticleByTagId(Integer tagId);
/**
*
*
* @param articleId ID
* @return
*/
List<Tag> listTagByArticleId(Integer articleId);
}

@ -0,0 +1,79 @@
package com.liuyanzhao.ssm.blog.mapper;
import com.liuyanzhao.ssm.blog.entity.Category;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import java.util.List;
/**
* @author liuyanzhao
*/
@Mapper
public interface CategoryMapper {
/**
*
*
* @param category
* @return
*/
int insert(Category category);
/**
*
*
* @param category
* @return
*/
int update(Category category);
/**
* id
*
* @param id ID
* @return
*/
Category getCategoryById(Integer id);
/**
*
*
* @param id ID
*/
int deleteCategory(Integer id);
/**
*
*
* @return
*/
Integer countCategory();
/**
*
*
* @return
*/
List<Category> listCategory();
/**
*
*
* @param id ID
* @return
*/
List<Category> findChildCategory(@Param(value = "id") Integer id);
/**
*
*
* @param name
* @return
*/
Category getCategoryByName(String name);
}

@ -0,0 +1,111 @@
package com.liuyanzhao.ssm.blog.mapper;
import com.liuyanzhao.ssm.blog.entity.Comment;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import java.util.HashMap;
import java.util.List;
@Mapper
public interface CommentMapper {
/**
* ID
*
* @param commentId ID
* @return
*/
int deleteById(Integer commentId);
/**
*
*
* @param comment
* @return
*/
int insert(Comment comment);
/**
* ID
*
* @param commentId ID
* @return
*/
Comment getCommentById(Integer commentId);
/**
*
*
* @param comment
* @return
*/
int update(Comment comment);
/**
* id
*
* @param id ID
* @return
*/
List<Comment> listCommentByArticleId(@Param(value = "id") Integer id);
/**
*
*
* @return
*/
List<Comment> listComment(HashMap<String, Object> criteria);
/**
*
*
* @return
*/
List<Comment> getReceiveComment(List<Integer> articleIds);
/**
*
*
* @return
*/
Integer countComment();
/**
*
*
* @param limit
* @return
*/
List<Comment> listRecentComment(@Param(value = "userId") Integer userId,
@Param(value = "limit") Integer limit);
/**
*
*
* @param id ID
* @return
*/
List<Comment> listChildComment(@Param(value = "id") Integer id);
/**
* ID
*
* @param userId ID
* @return
*/
Integer deleteByUserId(Integer userId);
/**
* ID
*
* @param articleId ID
* @return
*/
Integer deleteByArticleId(Integer articleId);
}

@ -0,0 +1,61 @@
package com.liuyanzhao.ssm.blog.mapper;
import com.liuyanzhao.ssm.blog.entity.Link;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import java.util.List;
/**
* @author liuyanzhao
*/
@Mapper
public interface LinkMapper {
/**
*
* @param linkId ID
* @return
*/
int deleteById(Integer linkId);
/**
*
*
* @param link
* @return
*/
int insert(Link link);
/**
* ID
*
* @param linkId ID
* @return
*/
Link getLinkById(Integer linkId);
/**
*
*
* @param link ID
* @return
*/
int update(Link link);
/**
*
*
* @param status
* @return
*/
Integer countLink(@Param(value = "status") Integer status);
/**
*
*
* @param status
* @return
*/
List<Link> listLink(@Param(value = "status") Integer status);
}

@ -0,0 +1,49 @@
package com.liuyanzhao.ssm.blog.mapper;
import com.liuyanzhao.ssm.blog.entity.Menu;
import java.util.List;
/**
* @author liuyanzhao
*/
public interface MenuMapper {
/**
*
*
* @param menuId ID
* @return
*/
int deleteById(Integer menuId);
/**
*
* @param menu
* @return
*/
int insert(Menu menu);
/**
* ID
*
* @param menuId ID
* @return
*/
Menu getMenuById(Integer menuId);
/**
*
*
* @param menu
* @return
*/
int update(Menu menu);
/**
*
*
* @return
*/
List<Menu> listMenu() ;
}

@ -0,0 +1,70 @@
package com.liuyanzhao.ssm.blog.mapper;
import com.liuyanzhao.ssm.blog.entity.Notice;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import java.util.List;
/**
* @author liuyanzhao
*/
@Mapper
public interface NoticeMapper {
/**
* ID
*
* @param noticeId ID
* @return
*/
int deleteById(Integer noticeId);
/**
*
*
* @param notice
* @return
*/
int insert(Notice notice);
/**
* ID
*
* @param noticeId ID
* @return
*/
Notice getNoticeById(Integer noticeId);
/**
*
*
* @param notice
* @return
*/
int update(Notice notice);
/**
*
*
* @param notice
* @return
*/
int updateByPrimaryKey(Notice notice);
/**
*
*
* @param status
* @return
*/
Integer countNotice(@Param(value = "status") Integer status);
/**
*
*
* @param status
* @return
*/
List<Notice> listNotice(@Param(value = "status") Integer status);
}

@ -0,0 +1,48 @@
package com.liuyanzhao.ssm.blog.mapper;
import com.liuyanzhao.ssm.blog.entity.Options;
import org.apache.ibatis.annotations.Mapper;
/**
* @author liuyanzhao
*/
@Mapper
public interface OptionsMapper {
/**
* ID
* @param optionId ID
* @return
*/
int deleteById(Integer optionId);
/**
*
* @param options
* @return
*/
int insert(Options options);
/**
* ID
*
* @param optionId ID
* @return
*/
Options getOptionsById(Integer optionId);
/**
*
*
* @param options
* @return
*/
int update(Options options);
/**
*
*
* @return
*/
Options getOptions();
}

@ -0,0 +1,63 @@
package com.liuyanzhao.ssm.blog.mapper;
import com.liuyanzhao.ssm.blog.entity.Page;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import java.util.List;
/**
* @author liuyanzhao
*/
@Mapper
public interface PageMapper {
/**
* ID
*
* @param pageId ID
* @return
*/
int deleteById(Integer pageId);
/**
*
*
* @param page
* @return
*/
int insert(Page page);
/**
* ID
*
* @param pageId ID
* @return
*/
Page getPageById(Integer pageId);
/**
*
*
* @param page
* @return
*/
int update(Page page);
/**
*
*
* @param status
* @return
*/
List<Page> listPage(@Param(value = "status") Integer status);
/**
* key
*
* @param status
* @param key
* @return
*/
Page getPageByKey(@Param(value = "status") Integer status,
@Param(value = "key") String key);
}

@ -0,0 +1,67 @@
package com.liuyanzhao.ssm.blog.mapper;
import com.liuyanzhao.ssm.blog.entity.Tag;
import org.apache.ibatis.annotations.Mapper;
import java.util.List;
/**
* @author liuyanzhao
*/
@Mapper
public interface TagMapper {
/**
* ID
*
* @param tagId ID
* @return
*/
int deleteById(Integer tagId);
/**
*
*
* @param tag
* @return
*/
int insert(Tag tag);
/**
* ID
*
* @param tagId ID
* @return
*/
Tag getTagById(Integer tagId);
/**
*
* @param tag
* @return
*/
int update(Tag tag);
/**
*
*
* @return
*/
Integer countTag() ;
/**
*
*
* @return
*/
List<Tag> listTag() ;
/**
*
*
* @param name
* @return
*/
Tag getTagByName(String name) ;
}

@ -0,0 +1,79 @@
package com.liuyanzhao.ssm.blog.mapper;
import com.liuyanzhao.ssm.blog.entity.User;
import org.apache.ibatis.annotations.Mapper;
import java.util.List;
/**
* @author liuyanzhao
*/
@Mapper
public interface UserMapper {
/**
* ID
*
* @param userId ID
* @return
*/
int deleteById(Integer userId);
/**
*
*
* @param user
* @return
*/
int insert(User user);
/**
* ID
*
* @param userId ID
* @return
*/
User getUserById(Integer userId);
/**
*
*
* @param user
* @return
*/
int update(User user);
/**
*
*
* @return
*/
List<User> listUser() ;
/**
* Email
*
* @param str Email
* @return
*/
User getUserByNameOrEmail(String str) ;
/**
*
*
* @param name
* @return
*/
User getUserByName(String name) ;
/**
* Email
*
* @param email
* @return
*/
User getUserByEmail(String email) ;
}

@ -97,7 +97,7 @@ public class ArticleServiceImpl implements ArticleService {
return articleTagRefMapper.countArticleByTagId(tagId);
}
//sjhdfg
@Override
public List<Article> listArticle(HashMap<String, Object> criteria) {
return articleMapper.findAll(criteria);

Loading…
Cancel
Save