需求分析

数据模型

代码开发

搭建框架

实体类ShoppingCart.java
package com.taotao.reggie.entity;
import lombok.Data;
import java.io.Serializable;
import java.math.BigDecimal;
import java.time.LocalDateTime;
@Data
public class ShoppingCart implements Serializable {
private static final long serialVersionUID = 1L;
private Long id;
private String name;
private Long userId;
private Long dishId;
private Long setmealId;
private String dishFlavor;
private Integer number;
private BigDecimal amount;
private String image;
private LocalDateTime createTime;
}
Mapper接口ShoppingCartMapper.java
package com.taotao.reggie.mapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.taotao.reggie.entity.ShoppingCart;
import org.apache.ibatis.annotations.Mapper;
@SuppressWarnings({
"all"})
@Mapper
public interface ShoppingCartMapper extends BaseMapper<ShoppingCart> {
}
业务层接口ShoppingCartService.java
package com.taotao.reggie.service;
import com.baomidou.mybatisplus.extension.service.IService;
import com.