From 94cad317c825a515ee60d7f1895a82143b3cf7d1 Mon Sep 17 00:00:00 2001 From: Yueng <14617246+YuengMeYuuer@user.noreply.gitee.com> Date: Tue, 10 Sep 2024 19:31:10 +0800 Subject: [PATCH] =?UTF-8?q?fix:()=20=E4=BC=98=E5=8C=96=E4=BB=BB=E5=8A=A1?= =?UTF-8?q?=E8=B0=83=E5=8A=A8=E6=96=B9=E6=B3=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../java/com/muyu/common/domain/ProductData.java | 7 ++++++- .../server/service/impl/DataSourceServiceImpl.java | 13 +++++++------ 2 files changed, 13 insertions(+), 7 deletions(-) diff --git a/cloud-property-common/src/main/java/com/muyu/common/domain/ProductData.java b/cloud-property-common/src/main/java/com/muyu/common/domain/ProductData.java index cf682e9..a7a2a56 100644 --- a/cloud-property-common/src/main/java/com/muyu/common/domain/ProductData.java +++ b/cloud-property-common/src/main/java/com/muyu/common/domain/ProductData.java @@ -30,7 +30,7 @@ public class ProductData extends BaseEntity { * 主键/编号 */ @TableId(value = "id",type = IdType.AUTO) - private Integer id; + private Integer pid; /** * 姓名 @@ -72,5 +72,10 @@ public class ProductData extends BaseEntity { */ private String credit; + /** + * 编号 + */ + private String id; + } diff --git a/cloud-property-server/src/main/java/com/muyu/server/service/impl/DataSourceServiceImpl.java b/cloud-property-server/src/main/java/com/muyu/server/service/impl/DataSourceServiceImpl.java index 277b46d..cc99d25 100644 --- a/cloud-property-server/src/main/java/com/muyu/server/service/impl/DataSourceServiceImpl.java +++ b/cloud-property-server/src/main/java/com/muyu/server/service/impl/DataSourceServiceImpl.java @@ -75,9 +75,9 @@ public class DataSourceServiceImpl while (rs.next()) { - int id = 0; - if (substring.contains("id")){ - id = rs.getInt("id"); + int pid = 0; + if (substring.contains("pid")){ + pid = rs.getInt("pid"); } String name = (rs.getString("COLUMN_NAME")); String gender = (rs.getString("gender")); @@ -87,10 +87,11 @@ public class DataSourceServiceImpl String idCard = (rs.getString("idCard")); String email = (rs.getString("email")); String credit = (rs.getString("credit")); - ProductData productData = new ProductData( - id,name,gender,birthday,address,mibile,idCard,email,credit + String id = (rs.getString("id")); + ProductData productDatas = new ProductData( + pid,name,gender,birthday,address,mibile,idCard,email,credit,id ); - productData.add(productData); + productData.add(productDatas); } if (!rs.next()){ break;