diff --git a/trading_platform/src/main/java/com/trading_platform/controller/ProductController.java b/trading_platform/src/main/java/com/trading_platform/controller/ProductController.java index 9182413..22b2436 100644 --- a/trading_platform/src/main/java/com/trading_platform/controller/ProductController.java +++ b/trading_platform/src/main/java/com/trading_platform/controller/ProductController.java @@ -2,10 +2,7 @@ package com.trading_platform.controller; import com.trading_platform.entity.Result; import org.springframework.validation.annotation.Validated; -import org.springframework.web.bind.annotation.DeleteMapping; -import org.springframework.web.bind.annotation.GetMapping; -import org.springframework.web.bind.annotation.PostMapping; -import org.springframework.web.bind.annotation.RestController; +import org.springframework.web.bind.annotation.*; /** * ProductController类负责处理与商品相关的HTTP请求 @@ -30,21 +27,21 @@ public class ProductController { //获取商品详情 @GetMapping("/detail/{id}") - public Result detail() { + public Result detail(@PathVariable String id) { return Result.success(); } //删除商品 @DeleteMapping("/delete/{id}") - public Result delete() { + public Result delete(@PathVariable String id) { return Result.success(); } //更新商品信息 @PostMapping("/update/{id}") - public Result update() { + public Result update(@PathVariable String id) { return Result.success(); } diff --git a/trading_platform/src/main/java/com/trading_platform/entity/Deliveries.java b/trading_platform/src/main/java/com/trading_platform/entity/Deliveries.java index ca39d4c..902b0e8 100644 --- a/trading_platform/src/main/java/com/trading_platform/entity/Deliveries.java +++ b/trading_platform/src/main/java/com/trading_platform/entity/Deliveries.java @@ -4,9 +4,10 @@ import lombok.Data; @Data public class Deliveries { - private int delivery_id; - private int order_id; - private int delivery_person_id; - private String delivery_status ; - private String delivery_at; + //快递员表 + private int delivery_id;//配送id + private int order_id;//订单id + private int delivery_person_id;//配送员id + private String delivery_status ;//配送状态 + private String delivery_at;//配送时间 } diff --git a/trading_platform/src/main/java/com/trading_platform/entity/ItemCategories.java b/trading_platform/src/main/java/com/trading_platform/entity/ItemCategories.java new file mode 100644 index 0000000..1e7a0be --- /dev/null +++ b/trading_platform/src/main/java/com/trading_platform/entity/ItemCategories.java @@ -0,0 +1,10 @@ +package com.trading_platform.entity; + +import lombok.Data; + +@Data +public class ItemCategories { + //商品类别表 + private int categoryId;//商品类别id + private String categoryName;//商品类别名称 +} diff --git a/trading_platform/src/main/java/com/trading_platform/entity/ItemComments.java b/trading_platform/src/main/java/com/trading_platform/entity/ItemComments.java new file mode 100644 index 0000000..40422d8 --- /dev/null +++ b/trading_platform/src/main/java/com/trading_platform/entity/ItemComments.java @@ -0,0 +1,13 @@ +package com.trading_platform.entity; + +import lombok.Data; + +@Data +public class ItemComments { + //商品评论表 + private int commentId;//评论id + private int userId;//用户id + private int itemId;//商品id + private String content;//评论内容 + private String commentAt;//评论时间 +} diff --git a/trading_platform/src/main/java/com/trading_platform/entity/ItemFavorites.java b/trading_platform/src/main/java/com/trading_platform/entity/ItemFavorites.java new file mode 100644 index 0000000..c8d271a --- /dev/null +++ b/trading_platform/src/main/java/com/trading_platform/entity/ItemFavorites.java @@ -0,0 +1,12 @@ +package com.trading_platform.entity; + +import lombok.Data; + +@Data +public class ItemFavorites { + // 商品收藏表 + private int favoriteId;// 收藏ID + private int userId;// 用户ID + private int itemId;// 商品ID + private String createAt;// 收藏时间 +} diff --git a/trading_platform/src/main/java/com/trading_platform/entity/ItemImages.java b/trading_platform/src/main/java/com/trading_platform/entity/ItemImages.java new file mode 100644 index 0000000..80e189a --- /dev/null +++ b/trading_platform/src/main/java/com/trading_platform/entity/ItemImages.java @@ -0,0 +1,12 @@ +package com.trading_platform.entity; + +import lombok.Data; + +@Data +public class ItemImages { + //商品图片表 + private int imageId;//图片ID + private int itemId;//商品ID + private String imagePath;//图片路径 + private String createAt;//创建时间 +} diff --git a/trading_platform/src/main/java/com/trading_platform/entity/ItemLikes.java b/trading_platform/src/main/java/com/trading_platform/entity/ItemLikes.java new file mode 100644 index 0000000..5126b27 --- /dev/null +++ b/trading_platform/src/main/java/com/trading_platform/entity/ItemLikes.java @@ -0,0 +1,12 @@ +package com.trading_platform.entity; + +import lombok.Data; + +@Data +public class ItemLikes { + //商品点赞表 + private int likeId;//点赞ID + private int userId;//用户ID + private int itemId;//商品ID + private String createAt;///点赞时间 +} diff --git a/trading_platform/src/main/java/com/trading_platform/entity/ItemOffers.java b/trading_platform/src/main/java/com/trading_platform/entity/ItemOffers.java new file mode 100644 index 0000000..c6c7397 --- /dev/null +++ b/trading_platform/src/main/java/com/trading_platform/entity/ItemOffers.java @@ -0,0 +1,13 @@ +package com.trading_platform.entity; + +import lombok.Data; + +@Data +public class ItemOffers { + //商品下架表 + private int offerId;//下架ID + private int userId;//卖家ID + private int itemId;//商品ID + private String reason;//原因 + private String createAt;//创建时间 +} diff --git a/trading_platform/src/main/java/com/trading_platform/entity/Items.java b/trading_platform/src/main/java/com/trading_platform/entity/Items.java index e26be49..bd8bb69 100644 --- a/trading_platform/src/main/java/com/trading_platform/entity/Items.java +++ b/trading_platform/src/main/java/com/trading_platform/entity/Items.java @@ -4,13 +4,14 @@ import lombok.Data; @Data public class Items { - private int item_id; - private int user_id; - private String item_name; - private String description; - private int category_id; - private double price; - private String status; - private String create_at; - private String update_at; + //商品表 + private int itemId;//商品ID + private int userId;//用户ID + private String itemName;//商品名称 + private String description;//商品描述 + private int categoryId;//商品分类ID + private double price;//商品价格 + private String status;//商品状态 + private String createAt;//创建时间 + private String updateAt;///更新时间 } diff --git a/trading_platform/src/main/java/com/trading_platform/entity/Orders.java b/trading_platform/src/main/java/com/trading_platform/entity/Orders.java new file mode 100644 index 0000000..fb817c4 --- /dev/null +++ b/trading_platform/src/main/java/com/trading_platform/entity/Orders.java @@ -0,0 +1,17 @@ +package com.trading_platform.entity; + +import lombok.Data; + +@Data +public class Orders { + // 订单表 + private int orderId;// 订单ID + private int buyerId;// 买家ID + private int itemId;// 商品ID + private int sellId;// 卖家ID + private String address;// 地址 + private double totalAmount;// 总价 + private String status;// 订单状态 + private String createAt;// 创建时间 + private String updateAt;// 更新时间 +} diff --git a/trading_platform/src/main/java/com/trading_platform/entity/Role.java b/trading_platform/src/main/java/com/trading_platform/entity/Role.java new file mode 100644 index 0000000..f736b91 --- /dev/null +++ b/trading_platform/src/main/java/com/trading_platform/entity/Role.java @@ -0,0 +1,14 @@ +package com.trading_platform.entity; + +import lombok.Data; + +@Data +public class Role { + // 角色权限表 + private int roleId;// 角色ID + private String roleName;// 角色名称 + private String remark;// 备注 + private String status;// 状态 + private String createTime;// 创建时间 + private String updateTime;// 更新时间 +} diff --git a/trading_platform/src/main/java/com/trading_platform/entity/UserRole.java b/trading_platform/src/main/java/com/trading_platform/entity/UserRole.java new file mode 100644 index 0000000..d230c2c --- /dev/null +++ b/trading_platform/src/main/java/com/trading_platform/entity/UserRole.java @@ -0,0 +1,10 @@ +package com.trading_platform.entity; + +import lombok.Data; + +@Data +public class UserRole { + // 用户角色表 + private int userId;// 用户ID + private int roleId;// 角色ID +} diff --git a/trading_platform/src/main/java/com/trading_platform/entity/Users.java b/trading_platform/src/main/java/com/trading_platform/entity/Users.java index ca79053..843324a 100644 --- a/trading_platform/src/main/java/com/trading_platform/entity/Users.java +++ b/trading_platform/src/main/java/com/trading_platform/entity/Users.java @@ -4,7 +4,8 @@ import lombok.Data; @Data public class Users { - private int userId; // 用户id + // 用户表 + private int userId; // 用户ID private String headPicUrl; // 用户头像 private String nickName; // 用户昵称 private String username; // 用户名 diff --git a/trading_platform/target/classes/com/trading_platform/controller/ProductController.class b/trading_platform/target/classes/com/trading_platform/controller/ProductController.class index 1eed30c..8304f88 100644 Binary files a/trading_platform/target/classes/com/trading_platform/controller/ProductController.class and b/trading_platform/target/classes/com/trading_platform/controller/ProductController.class differ diff --git a/trading_platform/target/classes/com/trading_platform/entity/Deliveries.class b/trading_platform/target/classes/com/trading_platform/entity/Deliveries.class new file mode 100644 index 0000000..4bd42da Binary files /dev/null and b/trading_platform/target/classes/com/trading_platform/entity/Deliveries.class differ diff --git a/trading_platform/target/classes/com/trading_platform/entity/Items.class b/trading_platform/target/classes/com/trading_platform/entity/Items.class new file mode 100644 index 0000000..49ae9c1 Binary files /dev/null and b/trading_platform/target/classes/com/trading_platform/entity/Items.class differ diff --git a/trading_platform/target/classes/com/trading_platform/entity/Orders.class b/trading_platform/target/classes/com/trading_platform/entity/Orders.class new file mode 100644 index 0000000..e3793a9 Binary files /dev/null and b/trading_platform/target/classes/com/trading_platform/entity/Orders.class differ