From 63aa7cc672e9db873dd1bf3a62088d02035af1a9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=A7=A6=E8=8B=B1=E6=9D=B0?= <327782001@qq.com> Date: Sun, 9 Jul 2023 16:15:01 +0800 Subject: [PATCH] =?UTF-8?q?fix:=E6=B7=BB=E5=8A=A0=E8=B4=AD=E7=89=A9?= =?UTF-8?q?=E8=BD=A6=E7=9A=84=E6=8E=A5=E5=8F=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../controller/VueChatController.java | 2 ++ .../kwan/springbootkwan/entity/VueChat.java | 32 +++++++++++++------ 2 files changed, 24 insertions(+), 10 deletions(-) diff --git a/src/main/java/com/kwan/springbootkwan/controller/VueChatController.java b/src/main/java/com/kwan/springbootkwan/controller/VueChatController.java index f75b4d2..731795e 100644 --- a/src/main/java/com/kwan/springbootkwan/controller/VueChatController.java +++ b/src/main/java/com/kwan/springbootkwan/controller/VueChatController.java @@ -6,6 +6,7 @@ import com.baomidou.mybatisplus.extension.plugins.pagination.Page; import com.kwan.springbootkwan.entity.Result; import com.kwan.springbootkwan.entity.VueChat; import com.kwan.springbootkwan.service.VueChatService; +import org.springframework.web.bind.annotation.CrossOrigin; import org.springframework.web.bind.annotation.DeleteMapping; import org.springframework.web.bind.annotation.GetMapping; import org.springframework.web.bind.annotation.PathVariable; @@ -28,6 +29,7 @@ import java.util.List; */ @RestController @RequestMapping("vueChat") +@CrossOrigin(origins = "http://localhost:8080") public class VueChatController { /** * 服务对象 diff --git a/src/main/java/com/kwan/springbootkwan/entity/VueChat.java b/src/main/java/com/kwan/springbootkwan/entity/VueChat.java index 2e19d49..fe2def2 100644 --- a/src/main/java/com/kwan/springbootkwan/entity/VueChat.java +++ b/src/main/java/com/kwan/springbootkwan/entity/VueChat.java @@ -3,7 +3,7 @@ package com.kwan.springbootkwan.entity; import com.baomidou.mybatisplus.extension.activerecord.Model; import lombok.Data; -import java.util.Date; +import java.math.BigDecimal; /** * vue购物车项目(VueChat)表实体类 @@ -14,16 +14,28 @@ import java.util.Date; @SuppressWarnings("serial") @Data public class VueChat extends Model { + /** + * 主键id + */ private Integer id; - //商品名称 + /** + * 商品名称 + */ private String goodsName; - //商品图片 + /** + * 商品图片 + */ private String goodsImg; - //商品价格 - private Double goodsPrice; - //商品购买状态 - private String goodsState; - //商品价格 - private Double goodsCount; - private Date createTime; + /** + * 商品价格 + */ + private BigDecimal goodsPrice; + /** + * 商品购买状态 + */ + private Boolean goodsState; + /** + * 商品价格 + */ + private BigDecimal goodsCount; } \ No newline at end of file -- GitLab