diff --git a/src/main/java/com/kwan/springbootkwan/controller/VueChatController.java b/src/main/java/com/kwan/springbootkwan/controller/VueChatController.java index f75b4d28fef5cbb8e180a91c20da9be27f5cd7e7..731795e20b7331f7cbc6a1d21a0c211f2d82f6a4 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 2e19d4900ee91c82886ef116fb263db036cd55ec..fe2def29d496d991da047c37d92dca29e3e0d5e9 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