update Page.size to long
This commit is contained in:
@ -23,7 +23,7 @@ public interface ArticleMapper extends BaseMapper<Article, Long> {
|
||||
|
||||
long countByKeyword(String keyword);
|
||||
|
||||
List<Article> selectByKeyword(String keyword, Long offset, int limit);
|
||||
List<Article> selectByKeyword(String keyword, Long offset, long limit);
|
||||
|
||||
@Select("UPDATE `article` SET `likes` = `likes` + 1 WHERE `id` = #{articleId}")
|
||||
void like(Long articleId);
|
||||
|
||||
@ -376,12 +376,25 @@ public class CommonController {
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 上传临时文件
|
||||
*
|
||||
* @param files
|
||||
* @return
|
||||
*/
|
||||
@AOPLog
|
||||
@PostMapping("/temp/file/upload")
|
||||
public List<TempFileResponse> uploadFile(@RequestParam("file") List<MultipartFile> files) {
|
||||
return tempFileService.store(files);
|
||||
}
|
||||
|
||||
/**
|
||||
* 读取临时文件
|
||||
*
|
||||
* @param fileId
|
||||
* @param req
|
||||
* @param resp
|
||||
*/
|
||||
@AOPLog
|
||||
@RequestRateLimit
|
||||
@IgnoreGlobalReturn
|
||||
@ -406,6 +419,13 @@ public class CommonController {
|
||||
resp.setStatus(HttpServletResponse.SC_INTERNAL_SERVER_ERROR);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 下载临时文件
|
||||
*
|
||||
* @param fileId
|
||||
* @param resp
|
||||
*/
|
||||
@AOPLog
|
||||
@RequestRateLimit
|
||||
@IgnoreGlobalReturn
|
||||
|
||||
@ -36,11 +36,11 @@ public interface CommentMapper extends BaseMapper<Comment, Long> {
|
||||
|
||||
long countAll(Comment.BizType bizType, Long bizId);
|
||||
|
||||
List<CommentView> list(Comment.BizType bizType, Long bizId, Long offset, int limit, LinkedHashMap<String, OrderType> orderMap);
|
||||
List<CommentView> list(Comment.BizType bizType, Long bizId, Long offset, long limit, LinkedHashMap<String, OrderType> orderMap);
|
||||
|
||||
long countByUserId(Long userId);
|
||||
|
||||
List<CommentView> listByUserId(Long userId, Long offset, int limit, LinkedHashMap<String, OrderType> orderMap);
|
||||
List<CommentView> listByUserId(Long userId, Long offset, long limit, LinkedHashMap<String, OrderType> orderMap);
|
||||
|
||||
@Update("UPDATE comment SET deleted_at = FLOOR(UNIX_TIMESTAMP(NOW(3)) * 1000) WHERE user_id = #{userId} ")
|
||||
void deleteByUserId(Long userId);
|
||||
|
||||
@ -25,7 +25,7 @@ public interface CommentReplyMapper extends BaseMapper<CommentReply, Long> {
|
||||
long countByBizType(CommentReplyPage.BizType bizType, Long bizId);
|
||||
|
||||
@Select("SELECT * FROM comment_reply WHERE ${bizType.column} = #{bizId} AND ignored_at IS NULL" + NOT_DELETE + PAGE)
|
||||
List<CommentReplyView> listByBizType(CommentReplyPage.BizType bizType, Long bizId, Long offset, int limit);
|
||||
List<CommentReplyView> listByBizType(CommentReplyPage.BizType bizType, Long bizId, Long offset, long limit);
|
||||
|
||||
@Update("UPDATE comment_reply SET deleted_at = " + UNIX_TIME + " WHERE sender_id = #{userId} OR receiver_id = #{userId}")
|
||||
void deleteByUserId(Long userId);
|
||||
|
||||
@ -21,15 +21,15 @@ public interface IconMapper extends BaseMapper<Icon, Long> {
|
||||
long countByName(String name);
|
||||
|
||||
@Select("SELECT * FROM icon WHERE name LIKE CONCAT('%', #{name}, '%')" + PAGE)
|
||||
List<Icon> listByName(String name, long offset, int limit);
|
||||
List<Icon> listByName(String name, long offset, long limit);
|
||||
|
||||
long countByLabel(String lang, String label);
|
||||
|
||||
List<Icon> listByLabel(String lang, String label, long offset, int limit);
|
||||
List<Icon> listByLabel(String lang, String label, long offset, long limit);
|
||||
|
||||
@Select("SELECT COUNT(1) FROM icon WHERE unicode = #{unicode}" + NOT_DELETE)
|
||||
long countByUnicode(String unicode);
|
||||
|
||||
@Select("SELECT * FROM icon WHERE unicode = #{unicode}" + PAGE)
|
||||
List<Icon> listByUnicode(String unicode, long offset, int limit);
|
||||
List<Icon> listByUnicode(String unicode, long offset, long limit);
|
||||
}
|
||||
|
||||
@ -31,5 +31,5 @@ public interface IssueMapper extends BaseMapper<Issue, Long> {
|
||||
* @param limit 数据量
|
||||
* @return 反馈列表
|
||||
*/
|
||||
List<Issue> listByIssuePage(@Param("issuePage") IssuePage issuePage, long offset, int limit);
|
||||
List<Issue> listByIssuePage(@Param("issuePage") IssuePage issuePage, long offset, long limit);
|
||||
}
|
||||
|
||||
@ -19,5 +19,5 @@ public interface MergeMapper extends BaseMapper<Merge, Long> {
|
||||
|
||||
long countByMergePage(@Param("mergePage") MergePage mergePage);
|
||||
|
||||
List<Merge> listByMergePage(@Param("mergePage") MergePage mergePage, long offset, int limit);
|
||||
List<Merge> listByMergePage(@Param("mergePage") MergePage mergePage, long offset, long limit);
|
||||
}
|
||||
|
||||
@ -16,7 +16,7 @@ public interface ReleaseMapper extends BaseMapper<Release, Long> {
|
||||
@Select("SELECT COUNT(1) FROM git_release WHERE repository_id = #{repositoryId}" + NOT_DELETE)
|
||||
long countByRepositoryId(long repositoryId);
|
||||
|
||||
List<ReleaseView> listByRepositoryId(long repositoryId, long offset, int limit);
|
||||
List<ReleaseView> listByRepositoryId(long repositoryId, long offset, long limit);
|
||||
|
||||
@Select("SELECT * FROM git_release WHERE repository_id = #{repositoryId}" + NOT_DELETE + "ORDER BY created_at DESC" + LIMIT_1)
|
||||
Release queryLatestByRepositoryId(long repositoryId);
|
||||
|
||||
@ -1,10 +1,10 @@
|
||||
package com.imyeyu.api.modules.git.vo.issue;
|
||||
|
||||
import com.imyeyu.api.modules.common.entity.Comment;
|
||||
import com.imyeyu.spring.bean.Page;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import com.imyeyu.api.modules.common.entity.Comment;
|
||||
import com.imyeyu.spring.bean.Page;
|
||||
|
||||
/**
|
||||
* @author 夜雨
|
||||
@ -13,7 +13,7 @@ import com.imyeyu.spring.bean.Page;
|
||||
@Data
|
||||
@AllArgsConstructor
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
public class CommentPage extends Page {
|
||||
public class CommentPage extends Page<Comment> {
|
||||
|
||||
private Comment.BizType bizType;
|
||||
|
||||
|
||||
@ -12,5 +12,5 @@ public interface ActionMapper {
|
||||
|
||||
long count(Long repoId, String branch, ActionLogDTO.Operation operation);
|
||||
|
||||
List<ActionLogDTO> list(Long repoId, String branch, ActionLogDTO.Operation operation, long offset, int limit);
|
||||
List<ActionLogDTO> list(Long repoId, String branch, ActionLogDTO.Operation operation, long offset, long limit);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user