spring boot、mybatis基于注解实现多表查询(多级菜单)
实体类层entity
CardPhrase
//在CardPhrase中新建
@TableField(exist = false)
private List cardList;
存储卡片信息
package com.example.gameboxadminserver.entity;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.extension.activerecord.Model;
import com.baomidou.mybatisplus.annotation.TableId;
import java.io.Serializable;
import java.util.List;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;
/**
* <p>
*
* </p>
*
* @author firstGroup
* @since 2020-11-02
*/
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@TableName("gm_card_phrase")
public class CardPhrase extends Model<CardPhrase> {
private static final long serialVersionUID = 1L;
/**
* 牌组编号
*/
@TableId(value = "phrase_id", type = IdType.AUTO)
private Integer phrase_id;
/**