使id自增

This commit is contained in:
dongjie 2024-06-09 22:37:07 +08:00
parent c1a879f9d4
commit 5399d16135
5 changed files with 20 additions and 0 deletions

View File

@ -1,5 +1,8 @@
package com.zoo.entity; package com.zoo.entity;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import java.io.Serializable; import java.io.Serializable;
/** /**
@ -17,6 +20,7 @@ public class Account implements Serializable {
/** /**
* 编号 * 编号
*/ */
@TableId(type = IdType.AUTO)
private Integer id; private Integer id;
/** /**

View File

@ -1,5 +1,8 @@
package com.zoo.entity; package com.zoo.entity;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import java.io.Serializable; import java.io.Serializable;
/** /**
@ -17,6 +20,7 @@ public class Animal implements Serializable {
/** /**
* 动物ID * 动物ID
*/ */
@TableId(type = IdType.AUTO)
private Integer aId; private Integer aId;
/** /**

View File

@ -1,5 +1,8 @@
package com.zoo.entity; package com.zoo.entity;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import java.io.Serializable; import java.io.Serializable;
/** /**
@ -17,6 +20,7 @@ public class Archive implements Serializable {
/** /**
* 档案号 * 档案号
*/ */
@TableId(type = IdType.AUTO)
private Integer id; private Integer id;
/** /**

View File

@ -1,6 +1,9 @@
package com.zoo.entity; package com.zoo.entity;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import java.io.Serializable; import java.io.Serializable;
/** /**
@ -18,6 +21,7 @@ public class Breedingplan implements Serializable {
/** /**
* 饲养计划id * 饲养计划id
*/ */
@TableId(type = IdType.AUTO)
private Integer id; private Integer id;
/** /**

View File

@ -1,5 +1,8 @@
package com.zoo.entity; package com.zoo.entity;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import java.io.Serializable; import java.io.Serializable;
/** /**
@ -17,6 +20,7 @@ public class Health implements Serializable {
/** /**
* 健康数据编号 * 健康数据编号
*/ */
@TableId(type = IdType.AUTO)
private Integer id; private Integer id;
/** /**