From 35cc83ec00e3d061054915ecea7f149f7cdd171b Mon Sep 17 00:00:00 2001 From: ronger Date: Mon, 25 Jul 2022 06:43:13 +0800 Subject: [PATCH] =?UTF-8?q?:art:=20style(entity,dto,service,...):=20?= =?UTF-8?q?=E5=AE=9E=E4=BD=93=E7=AD=89pojo=E4=B8=BB=E9=94=AE=E5=8F=98?= =?UTF-8?q?=E4=B8=BALong=E7=B1=BB=E5=9E=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/main/java/com/rymcu/forest/dto/ChangeEmailDTO.java | 4 +++- .../java/com/rymcu/forest/dto/UpdatePasswordDTO.java | 4 +++- .../java/com/rymcu/forest/dto/admin/TopicTagDTO.java | 7 +++++-- .../java/com/rymcu/forest/dto/admin/UserRoleDTO.java | 8 ++++++-- .../java/com/rymcu/forest/entity/ArticleContent.java | 4 +++- .../java/com/rymcu/forest/entity/ArticleThumbsUp.java | 6 ++++-- src/main/java/com/rymcu/forest/entity/Bank.java | 9 ++++++--- src/main/java/com/rymcu/forest/entity/BankAccount.java | 6 ++++-- .../java/com/rymcu/forest/entity/CurrencyIssue.java | 7 +++++-- .../java/com/rymcu/forest/entity/CurrencyRule.java | 4 +++- src/main/java/com/rymcu/forest/entity/Permission.java | 4 +++- src/main/java/com/rymcu/forest/entity/Product.java | 4 +++- .../java/com/rymcu/forest/entity/ProductContent.java | 4 +++- src/main/java/com/rymcu/forest/entity/Role.java | 4 +++- src/main/java/com/rymcu/forest/entity/SpecialDay.java | 4 +++- src/main/java/com/rymcu/forest/entity/Sponsor.java | 3 ++- src/main/java/com/rymcu/forest/entity/Tag.java | 4 +++- src/main/java/com/rymcu/forest/entity/Topic.java | 4 +++- .../com/rymcu/forest/entity/TransactionRecord.java | 4 +++- src/main/java/com/rymcu/forest/entity/UserExtend.java | 2 ++ src/main/java/com/rymcu/forest/entity/WxUser.java | 4 +++- .../com/rymcu/forest/mapper/ArticleThumbsUpMapper.java | 2 +- .../com/rymcu/forest/mapper/BankAccountMapper.java | 2 +- .../java/com/rymcu/forest/mapper/PermissionMapper.java | 2 +- src/main/java/com/rymcu/forest/mapper/RoleMapper.java | 4 ++-- src/main/java/com/rymcu/forest/mapper/TagMapper.java | 10 +++++----- src/main/java/com/rymcu/forest/mapper/TopicMapper.java | 8 ++++---- src/main/java/com/rymcu/forest/mapper/UserMapper.java | 10 +++++----- .../java/com/rymcu/forest/service/RoleService.java | 2 +- .../java/com/rymcu/forest/service/TopicService.java | 2 +- .../java/com/rymcu/forest/service/UserService.java | 4 ++-- .../forest/service/impl/BankAccountServiceImpl.java | 4 ++-- .../com/rymcu/forest/service/impl/RoleServiceImpl.java | 2 +- .../rymcu/forest/service/impl/TopicServiceImpl.java | 2 +- .../com/rymcu/forest/service/impl/UserServiceImpl.java | 6 +++--- .../rymcu/forest/web/api/admin/AdminController.java | 2 +- .../rymcu/forest/web/api/user/UserInfoController.java | 2 +- 37 files changed, 105 insertions(+), 59 deletions(-) diff --git a/src/main/java/com/rymcu/forest/dto/ChangeEmailDTO.java b/src/main/java/com/rymcu/forest/dto/ChangeEmailDTO.java index e3a9e06..0e2bf71 100644 --- a/src/main/java/com/rymcu/forest/dto/ChangeEmailDTO.java +++ b/src/main/java/com/rymcu/forest/dto/ChangeEmailDTO.java @@ -1,5 +1,6 @@ package com.rymcu.forest.dto; +import com.fasterxml.jackson.annotation.JsonFormat; import lombok.Data; /** @@ -8,7 +9,8 @@ import lombok.Data; @Data public class ChangeEmailDTO { - private Integer idUser; + @JsonFormat(shape = JsonFormat.Shape.STRING) + private Long idUser; private String email; diff --git a/src/main/java/com/rymcu/forest/dto/UpdatePasswordDTO.java b/src/main/java/com/rymcu/forest/dto/UpdatePasswordDTO.java index 8e8ab47..296caac 100644 --- a/src/main/java/com/rymcu/forest/dto/UpdatePasswordDTO.java +++ b/src/main/java/com/rymcu/forest/dto/UpdatePasswordDTO.java @@ -1,5 +1,6 @@ package com.rymcu.forest.dto; +import com.fasterxml.jackson.annotation.JsonFormat; import lombok.Data; /** @@ -8,7 +9,8 @@ import lombok.Data; @Data public class UpdatePasswordDTO { - private Integer idUser; + @JsonFormat(shape = JsonFormat.Shape.STRING) + private Long idUser; private String password; diff --git a/src/main/java/com/rymcu/forest/dto/admin/TopicTagDTO.java b/src/main/java/com/rymcu/forest/dto/admin/TopicTagDTO.java index 3bad3b5..1ceba63 100644 --- a/src/main/java/com/rymcu/forest/dto/admin/TopicTagDTO.java +++ b/src/main/java/com/rymcu/forest/dto/admin/TopicTagDTO.java @@ -1,5 +1,6 @@ package com.rymcu.forest.dto.admin; +import com.fasterxml.jackson.annotation.JsonFormat; import lombok.Data; /** @@ -8,7 +9,9 @@ import lombok.Data; @Data public class TopicTagDTO { - private Integer idTopic; + @JsonFormat(shape = JsonFormat.Shape.STRING) + private Long idTopic; - private Integer idTag; + @JsonFormat(shape = JsonFormat.Shape.STRING) + private Long idTag; } diff --git a/src/main/java/com/rymcu/forest/dto/admin/UserRoleDTO.java b/src/main/java/com/rymcu/forest/dto/admin/UserRoleDTO.java index a33f8c5..af78c3b 100644 --- a/src/main/java/com/rymcu/forest/dto/admin/UserRoleDTO.java +++ b/src/main/java/com/rymcu/forest/dto/admin/UserRoleDTO.java @@ -1,5 +1,6 @@ package com.rymcu.forest.dto.admin; +import com.fasterxml.jackson.annotation.JsonFormat; import lombok.Data; /** @@ -7,7 +8,10 @@ import lombok.Data; */ @Data public class UserRoleDTO { - private Integer idUser; - private Integer idRole; + @JsonFormat(shape = JsonFormat.Shape.STRING) + private Long idUser; + + @JsonFormat(shape = JsonFormat.Shape.STRING) + private Long idRole; } diff --git a/src/main/java/com/rymcu/forest/entity/ArticleContent.java b/src/main/java/com/rymcu/forest/entity/ArticleContent.java index 846b477..75cdd91 100644 --- a/src/main/java/com/rymcu/forest/entity/ArticleContent.java +++ b/src/main/java/com/rymcu/forest/entity/ArticleContent.java @@ -1,5 +1,6 @@ package com.rymcu.forest.entity; +import com.fasterxml.jackson.annotation.JsonFormat; import lombok.Data; import javax.persistence.Column; @@ -18,7 +19,8 @@ public class ArticleContent { @Id @Column(name = "id") @GeneratedValue(generator = "JDBC") - private Integer idArticle; + @JsonFormat(shape = JsonFormat.Shape.STRING) + private Long idArticle; private String articleContent; diff --git a/src/main/java/com/rymcu/forest/entity/ArticleThumbsUp.java b/src/main/java/com/rymcu/forest/entity/ArticleThumbsUp.java index 2d6f72a..3ff6332 100644 --- a/src/main/java/com/rymcu/forest/entity/ArticleThumbsUp.java +++ b/src/main/java/com/rymcu/forest/entity/ArticleThumbsUp.java @@ -22,11 +22,13 @@ public class ArticleThumbsUp implements Serializable, Cloneable { @Id @Column(name = "id") @GeneratedValue(generator = "JDBC") - private Integer idArticleThumbsUp; + @JsonFormat(shape = JsonFormat.Shape.STRING) + private Long idArticleThumbsUp; /** * 文章表主键 */ - private Integer idArticle; + @JsonFormat(shape = JsonFormat.Shape.STRING) + private Long idArticle; /** * 用户表主键 */ diff --git a/src/main/java/com/rymcu/forest/entity/Bank.java b/src/main/java/com/rymcu/forest/entity/Bank.java index 97405fb..d1ecd9c 100644 --- a/src/main/java/com/rymcu/forest/entity/Bank.java +++ b/src/main/java/com/rymcu/forest/entity/Bank.java @@ -1,6 +1,7 @@ package com.rymcu.forest.entity; import com.alibaba.fastjson.annotation.JSONField; +import com.fasterxml.jackson.annotation.JsonFormat; import lombok.Data; import javax.persistence.Column; @@ -21,15 +22,17 @@ public class Bank { @Id @Column(name = "id") @GeneratedValue(generator = "JDBC") - private Integer idBank; + @JsonFormat(shape = JsonFormat.Shape.STRING) + private Long idBank; /** 银行名称 */ private String bankName; /** 银行负责人 */ - private Integer bankOwner; + private Long bankOwner; /** 银行描述 */ private String bankDescription; /** 创建人 */ - private Integer createdBy; + @JsonFormat(shape = JsonFormat.Shape.STRING) + private Long createdBy; /** 创建时间 */ @JSONField(format = "yyyy-MM-dd HH:mm:ss") private Date createdTime; diff --git a/src/main/java/com/rymcu/forest/entity/BankAccount.java b/src/main/java/com/rymcu/forest/entity/BankAccount.java index f7498a9..c6a3a85 100644 --- a/src/main/java/com/rymcu/forest/entity/BankAccount.java +++ b/src/main/java/com/rymcu/forest/entity/BankAccount.java @@ -22,9 +22,11 @@ public class BankAccount { @Id @Column(name = "id") @GeneratedValue(generator = "JDBC") - private Integer idBankAccount; + @JsonFormat(shape = JsonFormat.Shape.STRING) + private Long idBankAccount; /** 所属银行 */ - private Integer idBank; + @JsonFormat(shape = JsonFormat.Shape.STRING) + private Long idBank; /** 银行账户 */ private String bankAccount; /** 账户余额 */ diff --git a/src/main/java/com/rymcu/forest/entity/CurrencyIssue.java b/src/main/java/com/rymcu/forest/entity/CurrencyIssue.java index 4ab315c..0ed9caf 100644 --- a/src/main/java/com/rymcu/forest/entity/CurrencyIssue.java +++ b/src/main/java/com/rymcu/forest/entity/CurrencyIssue.java @@ -1,5 +1,6 @@ package com.rymcu.forest.entity; +import com.fasterxml.jackson.annotation.JsonFormat; import lombok.Data; import javax.persistence.GeneratedValue; @@ -18,11 +19,13 @@ public class CurrencyIssue { /** 主键 */ @Id @GeneratedValue(generator = "JDBC") - private Integer id; + @JsonFormat(shape = JsonFormat.Shape.STRING) + private Long id; /** 发行数额 */ private BigDecimal issueValue; /** 发行人 */ - private Integer createdBy; + @JsonFormat(shape = JsonFormat.Shape.STRING) + private Long createdBy; /** 发行时间 */ private Date createdTime; diff --git a/src/main/java/com/rymcu/forest/entity/CurrencyRule.java b/src/main/java/com/rymcu/forest/entity/CurrencyRule.java index 243a5cc..934b02e 100644 --- a/src/main/java/com/rymcu/forest/entity/CurrencyRule.java +++ b/src/main/java/com/rymcu/forest/entity/CurrencyRule.java @@ -1,5 +1,6 @@ package com.rymcu.forest.entity; +import com.fasterxml.jackson.annotation.JsonFormat; import lombok.Data; import javax.persistence.Column; @@ -21,7 +22,8 @@ public class CurrencyRule implements Serializable, Cloneable { @Id @GeneratedValue(generator = "JDBC") @Column(name = "id") - private Integer idCurrencyRule; + @JsonFormat(shape = JsonFormat.Shape.STRING) + private Long idCurrencyRule; /** * 规则名称 */ diff --git a/src/main/java/com/rymcu/forest/entity/Permission.java b/src/main/java/com/rymcu/forest/entity/Permission.java index d5b0bb8..f5c27d7 100644 --- a/src/main/java/com/rymcu/forest/entity/Permission.java +++ b/src/main/java/com/rymcu/forest/entity/Permission.java @@ -1,5 +1,6 @@ package com.rymcu.forest.entity; +import com.fasterxml.jackson.annotation.JsonFormat; import lombok.Data; import tk.mybatis.mapper.annotation.ColumnType; @@ -19,7 +20,8 @@ public class Permission implements Serializable,Cloneable { @Id @Column(name = "id") @GeneratedValue(generator = "JDBC") - private Integer idPermission; + @JsonFormat(shape = JsonFormat.Shape.STRING) + private Long idPermission; /** * 权限标识 diff --git a/src/main/java/com/rymcu/forest/entity/Product.java b/src/main/java/com/rymcu/forest/entity/Product.java index fdbcf6c..88c670d 100644 --- a/src/main/java/com/rymcu/forest/entity/Product.java +++ b/src/main/java/com/rymcu/forest/entity/Product.java @@ -1,6 +1,7 @@ package com.rymcu.forest.entity; import com.alibaba.fastjson.annotation.JSONField; +import com.fasterxml.jackson.annotation.JsonFormat; import lombok.Data; import javax.persistence.Column; @@ -26,7 +27,8 @@ public class Product implements Serializable, Cloneable { @Id @GeneratedValue(generator = "JDBC") @Column(name = "id") - private Integer idProduct; + @JsonFormat(shape = JsonFormat.Shape.STRING) + private Long idProduct; /** * 产品名 */ diff --git a/src/main/java/com/rymcu/forest/entity/ProductContent.java b/src/main/java/com/rymcu/forest/entity/ProductContent.java index deafecd..70d2066 100644 --- a/src/main/java/com/rymcu/forest/entity/ProductContent.java +++ b/src/main/java/com/rymcu/forest/entity/ProductContent.java @@ -1,6 +1,7 @@ package com.rymcu.forest.entity; import com.alibaba.fastjson.annotation.JSONField; +import com.fasterxml.jackson.annotation.JsonFormat; import lombok.Data; import javax.persistence.Table; @@ -20,7 +21,8 @@ public class ProductContent implements Serializable, Cloneable { /** * 产品表主键 */ - private Integer idProduct; + @JsonFormat(shape = JsonFormat.Shape.STRING) + private Long idProduct; /** * 产品详情原文 */ diff --git a/src/main/java/com/rymcu/forest/entity/Role.java b/src/main/java/com/rymcu/forest/entity/Role.java index 99c2511..92af0a9 100644 --- a/src/main/java/com/rymcu/forest/entity/Role.java +++ b/src/main/java/com/rymcu/forest/entity/Role.java @@ -1,6 +1,7 @@ package com.rymcu.forest.entity; import com.alibaba.fastjson.annotation.JSONField; +import com.fasterxml.jackson.annotation.JsonFormat; import lombok.Data; import javax.persistence.Column; @@ -19,7 +20,8 @@ public class Role implements Serializable,Cloneable { @Id @Column(name = "id") @GeneratedValue(generator = "JDBC") - private Integer idRole; + @JsonFormat(shape = JsonFormat.Shape.STRING) + private Long idRole; /** * 角色名称 diff --git a/src/main/java/com/rymcu/forest/entity/SpecialDay.java b/src/main/java/com/rymcu/forest/entity/SpecialDay.java index 5455d6a..744c98a 100644 --- a/src/main/java/com/rymcu/forest/entity/SpecialDay.java +++ b/src/main/java/com/rymcu/forest/entity/SpecialDay.java @@ -1,5 +1,6 @@ package com.rymcu.forest.entity; +import com.fasterxml.jackson.annotation.JsonFormat; import lombok.Data; import javax.persistence.Column; @@ -19,7 +20,8 @@ public class SpecialDay implements Serializable,Cloneable{ @Id @Column(name = "id") @GeneratedValue(generator = "JDBC") - private Integer idSpecialDay; + @JsonFormat(shape = JsonFormat.Shape.STRING) + private Long idSpecialDay; /** 名称 */ private String specialDayName; /** 权重/优先级,小数优秀 */ diff --git a/src/main/java/com/rymcu/forest/entity/Sponsor.java b/src/main/java/com/rymcu/forest/entity/Sponsor.java index edb8b4a..1dbb03f 100644 --- a/src/main/java/com/rymcu/forest/entity/Sponsor.java +++ b/src/main/java/com/rymcu/forest/entity/Sponsor.java @@ -21,7 +21,8 @@ public class Sponsor implements Serializable, Cloneable { */ @Id @GeneratedValue(generator = "JDBC") - private Integer id; + @JsonFormat(shape = JsonFormat.Shape.STRING) + private Long id; /** * 数据类型 */ diff --git a/src/main/java/com/rymcu/forest/entity/Tag.java b/src/main/java/com/rymcu/forest/entity/Tag.java index 8a2e5f2..6419807 100644 --- a/src/main/java/com/rymcu/forest/entity/Tag.java +++ b/src/main/java/com/rymcu/forest/entity/Tag.java @@ -1,5 +1,6 @@ package com.rymcu.forest.entity; +import com.fasterxml.jackson.annotation.JsonFormat; import lombok.Data; import javax.persistence.Column; @@ -19,7 +20,8 @@ public class Tag implements Serializable,Cloneable { @Id @Column(name = "id") @GeneratedValue(generator = "JDBC") - private Integer idTag; + @JsonFormat(shape = JsonFormat.Shape.STRING) + private Long idTag; /** 标签名 */ private String tagTitle; /** 标签图标 */ diff --git a/src/main/java/com/rymcu/forest/entity/Topic.java b/src/main/java/com/rymcu/forest/entity/Topic.java index cab07de..920de24 100644 --- a/src/main/java/com/rymcu/forest/entity/Topic.java +++ b/src/main/java/com/rymcu/forest/entity/Topic.java @@ -1,5 +1,6 @@ package com.rymcu.forest.entity; +import com.fasterxml.jackson.annotation.JsonFormat; import lombok.Data; import javax.persistence.Column; @@ -19,7 +20,8 @@ public class Topic { @Id @Column(name = "id") @GeneratedValue(generator = "JDBC") - private Integer idTopic; + @JsonFormat(shape = JsonFormat.Shape.STRING) + private Long idTopic; /** 专题标题 */ private String topicTitle; /** 专题路径 */ diff --git a/src/main/java/com/rymcu/forest/entity/TransactionRecord.java b/src/main/java/com/rymcu/forest/entity/TransactionRecord.java index c7e34c8..b310c5a 100644 --- a/src/main/java/com/rymcu/forest/entity/TransactionRecord.java +++ b/src/main/java/com/rymcu/forest/entity/TransactionRecord.java @@ -1,5 +1,6 @@ package com.rymcu.forest.entity; +import com.fasterxml.jackson.annotation.JsonFormat; import lombok.Data; import javax.persistence.Column; @@ -20,7 +21,8 @@ public class TransactionRecord { @Id @Column(name = "id") @GeneratedValue(generator = "JDBC") - private Integer idTransactionRecord; + @JsonFormat(shape = JsonFormat.Shape.STRING) + private Long idTransactionRecord; /** 交易流水号 */ private String transactionNo; /** 款项 */ diff --git a/src/main/java/com/rymcu/forest/entity/UserExtend.java b/src/main/java/com/rymcu/forest/entity/UserExtend.java index 7df4944..59a3d4d 100644 --- a/src/main/java/com/rymcu/forest/entity/UserExtend.java +++ b/src/main/java/com/rymcu/forest/entity/UserExtend.java @@ -1,5 +1,6 @@ package com.rymcu.forest.entity; +import com.fasterxml.jackson.annotation.JsonFormat; import lombok.Data; import javax.persistence.Id; @@ -13,6 +14,7 @@ import javax.persistence.Table; public class UserExtend { @Id + @JsonFormat(shape = JsonFormat.Shape.STRING) private Long idUser; private String github; diff --git a/src/main/java/com/rymcu/forest/entity/WxUser.java b/src/main/java/com/rymcu/forest/entity/WxUser.java index 81fdce4..34f8d77 100644 --- a/src/main/java/com/rymcu/forest/entity/WxUser.java +++ b/src/main/java/com/rymcu/forest/entity/WxUser.java @@ -1,5 +1,6 @@ package com.rymcu.forest.entity; +import com.fasterxml.jackson.annotation.JsonFormat; import lombok.Data; import javax.persistence.Column; @@ -17,7 +18,8 @@ public class WxUser { @Id @Column(name = "id") @GeneratedValue(generator = "JDBC") - private Integer idWxUser; + @JsonFormat(shape = JsonFormat.Shape.STRING) + private Long idWxUser; private Boolean subscribe; diff --git a/src/main/java/com/rymcu/forest/mapper/ArticleThumbsUpMapper.java b/src/main/java/com/rymcu/forest/mapper/ArticleThumbsUpMapper.java index 7a192f5..7d6f78d 100644 --- a/src/main/java/com/rymcu/forest/mapper/ArticleThumbsUpMapper.java +++ b/src/main/java/com/rymcu/forest/mapper/ArticleThumbsUpMapper.java @@ -14,5 +14,5 @@ public interface ArticleThumbsUpMapper extends Mapper { * @param thumbsUpNumber * @return */ - Integer updateArticleThumbsUpNumber(@Param("idArticle") Integer idArticle, @Param("thumbsUpNumber") Integer thumbsUpNumber); + Integer updateArticleThumbsUpNumber(@Param("idArticle") Long idArticle, @Param("thumbsUpNumber") Integer thumbsUpNumber); } diff --git a/src/main/java/com/rymcu/forest/mapper/BankAccountMapper.java b/src/main/java/com/rymcu/forest/mapper/BankAccountMapper.java index a067c76..151905b 100644 --- a/src/main/java/com/rymcu/forest/mapper/BankAccountMapper.java +++ b/src/main/java/com/rymcu/forest/mapper/BankAccountMapper.java @@ -25,7 +25,7 @@ public interface BankAccountMapper extends Mapper { * @param idBank * @return */ - BankAccountDTO selectBankAccount(@Param("idBank") Integer idBank); + BankAccountDTO selectBankAccount(@Param("idBank") Long idBank); /** * 获取当前最大卡号 diff --git a/src/main/java/com/rymcu/forest/mapper/PermissionMapper.java b/src/main/java/com/rymcu/forest/mapper/PermissionMapper.java index 1db3cb3..45ed3e6 100644 --- a/src/main/java/com/rymcu/forest/mapper/PermissionMapper.java +++ b/src/main/java/com/rymcu/forest/mapper/PermissionMapper.java @@ -8,5 +8,5 @@ import java.util.List; public interface PermissionMapper extends Mapper { - List selectMenuByIdRole(@Param("role") Integer role); + List selectMenuByIdRole(@Param("role") Long role); } \ No newline at end of file diff --git a/src/main/java/com/rymcu/forest/mapper/RoleMapper.java b/src/main/java/com/rymcu/forest/mapper/RoleMapper.java index 89d2a4b..8f9fab3 100644 --- a/src/main/java/com/rymcu/forest/mapper/RoleMapper.java +++ b/src/main/java/com/rymcu/forest/mapper/RoleMapper.java @@ -12,7 +12,7 @@ public interface RoleMapper extends Mapper { Role selectRoleByInputCode(@Param("inputCode") String inputCode); - Integer updateStatus(@Param("idRole") Integer idRole, @Param("status") String status); + Integer updateStatus(@Param("idRole") Long idRole, @Param("status") String status); - Integer update(@Param("idRole") Integer idRole, @Param("name") String name, @Param("inputCode") String inputCode, @Param("weights") Integer weights); + Integer update(@Param("idRole") Long idRole, @Param("name") String name, @Param("inputCode") String inputCode, @Param("weights") Integer weights); } \ No newline at end of file diff --git a/src/main/java/com/rymcu/forest/mapper/TagMapper.java b/src/main/java/com/rymcu/forest/mapper/TagMapper.java index 63a1500..fda04c0 100644 --- a/src/main/java/com/rymcu/forest/mapper/TagMapper.java +++ b/src/main/java/com/rymcu/forest/mapper/TagMapper.java @@ -18,7 +18,7 @@ public interface TagMapper extends Mapper { * @param idArticle * @return */ - Integer insertTagArticle(@Param("idTag") Integer idTag, @Param("idArticle") Long idArticle); + Integer insertTagArticle(@Param("idTag") Long idTag, @Param("idArticle") Long idArticle); /** * 统计标签使用数(文章) @@ -26,7 +26,7 @@ public interface TagMapper extends Mapper { * @param idArticle * @return */ - Integer selectCountTagArticleById(@Param("idTag") Integer idTag, @Param("idArticle") Long idArticle); + Integer selectCountTagArticleById(@Param("idTag") Long idTag, @Param("idArticle") Long idArticle); /** * 获取用户标签数 @@ -34,7 +34,7 @@ public interface TagMapper extends Mapper { * @param idTag * @return */ - Integer selectCountUserTagById(@Param("idUser") Long idUser, @Param("idTag") Integer idTag); + Integer selectCountUserTagById(@Param("idUser") Long idUser, @Param("idTag") Long idTag); /** * 插入用户标签信息 @@ -43,7 +43,7 @@ public interface TagMapper extends Mapper { * @param type * @return */ - Integer insertUserTag(@Param("idTag") Integer idTag, @Param("idUser") Long idUser, @Param("type") Integer type); + Integer insertUserTag(@Param("idTag") Long idTag, @Param("idUser") Long idUser, @Param("type") Integer type); /** * 删除未使用标签 @@ -61,7 +61,7 @@ public interface TagMapper extends Mapper { * @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); + Integer update(@Param("idTag") Long idTag, @Param("tagUri") String tagUri, @Param("tagIconPath") String tagIconPath, @Param("tagStatus") String tagStatus, @Param("tagDescription") String tagDescription, @Param("tagReservation") String tagReservation); /** * 查询标签列表 diff --git a/src/main/java/com/rymcu/forest/mapper/TopicMapper.java b/src/main/java/com/rymcu/forest/mapper/TopicMapper.java index 3c348cc..3bad454 100644 --- a/src/main/java/com/rymcu/forest/mapper/TopicMapper.java +++ b/src/main/java/com/rymcu/forest/mapper/TopicMapper.java @@ -44,21 +44,21 @@ public interface TopicMapper extends Mapper { * @param topicDescriptionHtml * @return */ - Integer update(@Param("idTopic") Integer idTopic, @Param("topicTitle") String topicTitle, @Param("topicUri") String topicUri, @Param("topicIconPath") String topicIconPath, @Param("topicNva") String topicNva, @Param("topicStatus") String topicStatus, @Param("topicSort") Integer topicSort, @Param("topicDescription") String topicDescription, @Param("topicDescriptionHtml") String topicDescriptionHtml); + Integer update(@Param("idTopic") Long idTopic, @Param("topicTitle") String topicTitle, @Param("topicUri") String topicUri, @Param("topicIconPath") String topicIconPath, @Param("topicNva") String topicNva, @Param("topicStatus") String topicStatus, @Param("topicSort") Integer topicSort, @Param("topicDescription") String topicDescription, @Param("topicDescriptionHtml") String topicDescriptionHtml); /** * @param idTopic * @param tagTitle * @return */ - List selectUnbindTagsById(@Param("idTopic") Integer idTopic, @Param("tagTitle") String tagTitle); + List selectUnbindTagsById(@Param("idTopic") Long idTopic, @Param("tagTitle") String tagTitle); - Integer insertTopicTag(@Param("idTopic") Integer idTopic, @Param("idTag") Integer idTag); + Integer insertTopicTag(@Param("idTopic") Long idTopic, @Param("idTag") Long idTag); /** * @param idTopic * @param idTag * @return */ - Integer deleteTopicTag(@Param("idTopic") Integer idTopic, @Param("idTag") Integer idTag); + Integer deleteTopicTag(@Param("idTopic") Long idTopic, @Param("idTag") Long idTag); } diff --git a/src/main/java/com/rymcu/forest/mapper/UserMapper.java b/src/main/java/com/rymcu/forest/mapper/UserMapper.java index 2cdfef5..ce13898 100644 --- a/src/main/java/com/rymcu/forest/mapper/UserMapper.java +++ b/src/main/java/com/rymcu/forest/mapper/UserMapper.java @@ -28,7 +28,7 @@ public interface UserMapper extends Mapper { * @param idRole * @return */ - Integer insertUserRole(@Param("idUser") Long idUser, @Param("idRole") Integer idRole); + Integer insertUserRole(@Param("idUser") Long idUser, @Param("idRole") Long idRole); /** * 根据账号获取获取用户信息 @@ -65,7 +65,7 @@ public interface UserMapper extends Mapper { * @param idRole * @return */ - Integer updateUserRole(@Param("idUser") Integer idUser, @Param("idRole") Integer idRole); + Integer updateUserRole(@Param("idUser") Long idUser, @Param("idRole") Long idRole); /** * 更新用户状态 @@ -87,7 +87,7 @@ public interface UserMapper extends Mapper { * @param idUser * @return */ - UserInfoDTO selectUserInfo(@Param("idUser") Integer idUser); + UserInfoDTO selectUserInfo(@Param("idUser") Long idUser); /** * 更新用户信息 @@ -128,7 +128,7 @@ public interface UserMapper extends Mapper { * @param email * @return */ - Integer updateEmail(@Param("idUser") Integer idUser, @Param("email") String email); + Integer updateEmail(@Param("idUser") Long idUser, @Param("email") String email); /** * 更新密码 @@ -136,7 +136,7 @@ public interface UserMapper extends Mapper { * @param password * @return */ - Integer updatePasswordById(@Param("idUser") Integer idUser, @Param("password") String password); + Integer updatePasswordById(@Param("idUser") Long idUser, @Param("password") String password); /** * 查询用户数据 diff --git a/src/main/java/com/rymcu/forest/service/RoleService.java b/src/main/java/com/rymcu/forest/service/RoleService.java index 3afa2ce..a63ae5e 100644 --- a/src/main/java/com/rymcu/forest/service/RoleService.java +++ b/src/main/java/com/rymcu/forest/service/RoleService.java @@ -35,7 +35,7 @@ public interface RoleService extends Service { * @param status * @return * */ - Map updateStatus(Integer idRole, String status); + Map updateStatus(Long idRole, String status); /** * 添加/更新角色 diff --git a/src/main/java/com/rymcu/forest/service/TopicService.java b/src/main/java/com/rymcu/forest/service/TopicService.java index 4fda791..2e4a04a 100644 --- a/src/main/java/com/rymcu/forest/service/TopicService.java +++ b/src/main/java/com/rymcu/forest/service/TopicService.java @@ -39,7 +39,7 @@ public interface TopicService extends Service { * @param tagTitle * @return */ - List findUnbindTagsById(Integer idTopic, String tagTitle); + List findUnbindTagsById(Long idTopic, String tagTitle); /** * 绑定标签 diff --git a/src/main/java/com/rymcu/forest/service/UserService.java b/src/main/java/com/rymcu/forest/service/UserService.java index fa6dbcb..04e7665 100644 --- a/src/main/java/com/rymcu/forest/service/UserService.java +++ b/src/main/java/com/rymcu/forest/service/UserService.java @@ -63,7 +63,7 @@ public interface UserService extends Service { * @param idRole 角色 id * @return Map * */ - Map updateUserRole(Integer idUser, Integer idRole); + Map updateUserRole(Long idUser, Long idRole); /** * 更新用户状态 @@ -78,7 +78,7 @@ public interface UserService extends Service { * @param idUser * @return */ - Map findUserInfo(Integer idUser); + Map findUserInfo(Long idUser); /** * 更新用户信息 diff --git a/src/main/java/com/rymcu/forest/service/impl/BankAccountServiceImpl.java b/src/main/java/com/rymcu/forest/service/impl/BankAccountServiceImpl.java index 7ee2b2f..960c592 100644 --- a/src/main/java/com/rymcu/forest/service/impl/BankAccountServiceImpl.java +++ b/src/main/java/com/rymcu/forest/service/impl/BankAccountServiceImpl.java @@ -49,7 +49,7 @@ public class BankAccountServiceImpl extends AbstractService impleme } else { bankAccount.setAccountBalance(new BigDecimal("0")); // 默认为社区发展与改革银行 - bankAccount.setIdBank(2); + bankAccount.setIdBank(2L); bankAccount.setBankAccount(nextBankAccount()); bankAccount.setCreatedTime(new Date()); bankAccountMapper.insertSelective(bankAccount); @@ -77,7 +77,7 @@ public class BankAccountServiceImpl extends AbstractService impleme @Override public BankAccount findSystemBankAccount() { BankAccount bankAccount = new BankAccount(); - bankAccount.setIdBank(1); + bankAccount.setIdBank(1L); bankAccount.setAccountType("1"); bankAccount.setAccountOwner(2L); return bankAccountMapper.selectOne(bankAccount); diff --git a/src/main/java/com/rymcu/forest/service/impl/RoleServiceImpl.java b/src/main/java/com/rymcu/forest/service/impl/RoleServiceImpl.java index 7a0df7b..e7fec58 100644 --- a/src/main/java/com/rymcu/forest/service/impl/RoleServiceImpl.java +++ b/src/main/java/com/rymcu/forest/service/impl/RoleServiceImpl.java @@ -38,7 +38,7 @@ public class RoleServiceImpl extends AbstractService implements RoleServic @Override @Transactional - public Map updateStatus(Integer idRole, String status) { + public Map updateStatus(Long idRole, String status) { Map map = new HashMap(1); Integer result = roleMapper.updateStatus(idRole,status); if(result == 0) { diff --git a/src/main/java/com/rymcu/forest/service/impl/TopicServiceImpl.java b/src/main/java/com/rymcu/forest/service/impl/TopicServiceImpl.java index bb81f9b..b514a96 100644 --- a/src/main/java/com/rymcu/forest/service/impl/TopicServiceImpl.java +++ b/src/main/java/com/rymcu/forest/service/impl/TopicServiceImpl.java @@ -101,7 +101,7 @@ public class TopicServiceImpl extends AbstractService implements TopicSer } @Override - public List findUnbindTagsById(Integer idTopic, String tagTitle) { + public List findUnbindTagsById(Long idTopic, String tagTitle) { if (StringUtils.isBlank(tagTitle)) { tagTitle = ""; } diff --git a/src/main/java/com/rymcu/forest/service/impl/UserServiceImpl.java b/src/main/java/com/rymcu/forest/service/impl/UserServiceImpl.java index 455cd0f..932786c 100644 --- a/src/main/java/com/rymcu/forest/service/impl/UserServiceImpl.java +++ b/src/main/java/com/rymcu/forest/service/impl/UserServiceImpl.java @@ -158,7 +158,7 @@ public class UserServiceImpl extends AbstractService implements UserServic @Override @Transactional(rollbackFor = Exception.class) - public Map updateUserRole(Integer idUser, Integer idRole) { + public Map updateUserRole(Long idUser, Long idRole) { Map map = new HashMap(2); Integer result = userMapper.updateUserRole(idUser, idRole); if (result == 0) { @@ -179,7 +179,7 @@ public class UserServiceImpl extends AbstractService implements UserServic } @Override - public Map findUserInfo(Integer idUser) { + public Map findUserInfo(Long idUser) { Map map = new HashMap(2); UserInfoDTO user = userMapper.selectUserInfo(idUser); if (user == null) { @@ -271,7 +271,7 @@ public class UserServiceImpl extends AbstractService implements UserServic public Map updateEmail(ChangeEmailDTO changeEmailDTO) { Map map = new HashMap(2); map.put("message", "验证码无效!"); - Integer idUser = changeEmailDTO.getIdUser(); + Long idUser = changeEmailDTO.getIdUser(); String email = changeEmailDTO.getEmail(); String code = changeEmailDTO.getCode(); String vCode = redisService.get(email); diff --git a/src/main/java/com/rymcu/forest/web/api/admin/AdminController.java b/src/main/java/com/rymcu/forest/web/api/admin/AdminController.java index 05875d5..214400c 100644 --- a/src/main/java/com/rymcu/forest/web/api/admin/AdminController.java +++ b/src/main/java/com/rymcu/forest/web/api/admin/AdminController.java @@ -129,7 +129,7 @@ public class AdminController { @GetMapping("/topic/unbind-topic-tags") public GlobalResult> unbindTopicTags(@RequestParam(defaultValue = "0") Integer page, @RequestParam(defaultValue = "10") Integer rows, HttpServletRequest request){ - Integer idTopic = Integer.valueOf(request.getParameter("idTopic")); + Long idTopic = Long.valueOf(request.getParameter("idTopic")); String tagTitle = request.getParameter("tagTitle"); PageHelper.startPage(page, rows); List list = topicService.findUnbindTagsById(idTopic, tagTitle); diff --git a/src/main/java/com/rymcu/forest/web/api/user/UserInfoController.java b/src/main/java/com/rymcu/forest/web/api/user/UserInfoController.java index 7a6f826..204b357 100644 --- a/src/main/java/com/rymcu/forest/web/api/user/UserInfoController.java +++ b/src/main/java/com/rymcu/forest/web/api/user/UserInfoController.java @@ -34,7 +34,7 @@ public class UserInfoController { @GetMapping("/detail/{idUser}") @SecurityInterceptor - public GlobalResult detail(@PathVariable Integer idUser) { + public GlobalResult detail(@PathVariable Long idUser) { Map map = userService.findUserInfo(idUser); return GlobalResultGenerator.genSuccessResult(map); }