fix:添加购物车的接口

上级 213a0066
...@@ -6,6 +6,7 @@ import com.baomidou.mybatisplus.extension.plugins.pagination.Page; ...@@ -6,6 +6,7 @@ import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.kwan.springbootkwan.entity.Result; import com.kwan.springbootkwan.entity.Result;
import com.kwan.springbootkwan.entity.VueChat; import com.kwan.springbootkwan.entity.VueChat;
import com.kwan.springbootkwan.service.VueChatService; 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.DeleteMapping;
import org.springframework.web.bind.annotation.GetMapping; import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable; import org.springframework.web.bind.annotation.PathVariable;
...@@ -28,6 +29,7 @@ import java.util.List; ...@@ -28,6 +29,7 @@ import java.util.List;
*/ */
@RestController @RestController
@RequestMapping("vueChat") @RequestMapping("vueChat")
@CrossOrigin(origins = "http://localhost:8080")
public class VueChatController { public class VueChatController {
/** /**
* 服务对象 * 服务对象
......
...@@ -3,7 +3,7 @@ package com.kwan.springbootkwan.entity; ...@@ -3,7 +3,7 @@ package com.kwan.springbootkwan.entity;
import com.baomidou.mybatisplus.extension.activerecord.Model; import com.baomidou.mybatisplus.extension.activerecord.Model;
import lombok.Data; import lombok.Data;
import java.util.Date; import java.math.BigDecimal;
/** /**
* vue购物车项目(VueChat)表实体类 * vue购物车项目(VueChat)表实体类
...@@ -14,16 +14,28 @@ import java.util.Date; ...@@ -14,16 +14,28 @@ import java.util.Date;
@SuppressWarnings("serial") @SuppressWarnings("serial")
@Data @Data
public class VueChat extends Model<VueChat> { public class VueChat extends Model<VueChat> {
/**
* 主键id
*/
private Integer id; private Integer id;
//商品名称 /**
* 商品名称
*/
private String goodsName; private String goodsName;
//商品图片 /**
* 商品图片
*/
private String goodsImg; private String goodsImg;
//商品价格 /**
private Double goodsPrice; * 商品价格
//商品购买状态 */
private String goodsState; private BigDecimal goodsPrice;
//商品价格 /**
private Double goodsCount; * 商品购买状态
private Date createTime; */
private Boolean goodsState;
/**
* 商品价格
*/
private BigDecimal goodsCount;
} }
\ No newline at end of file
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册