Jpa主键生成策略修正
This commit is contained in:
parent
b3538d2b91
commit
7e3fedc64a
@ -3,10 +3,7 @@ package com.xhpc.evcs.domain;
|
||||
import lombok.Getter;
|
||||
import lombok.Setter;
|
||||
|
||||
import javax.persistence.Entity;
|
||||
import javax.persistence.GeneratedValue;
|
||||
import javax.persistence.Id;
|
||||
import javax.persistence.Table;
|
||||
import javax.persistence.*;
|
||||
import java.util.Date;
|
||||
|
||||
@Getter
|
||||
@ -19,7 +16,7 @@ public class AuthSecretToken {
|
||||
public final static String SECRET_TOKEN_TYPE_OUT = "OUT";
|
||||
|
||||
@Id
|
||||
@GeneratedValue()
|
||||
@GeneratedValue(strategy = GenerationType.IDENTITY)
|
||||
private Integer id;
|
||||
|
||||
private String operatorId;
|
||||
|
||||
@ -10,7 +10,7 @@ public class EtOrderMapping extends BaseEntity {
|
||||
|
||||
@Id
|
||||
@Column(name = "id", nullable = false)
|
||||
@GeneratedValue
|
||||
@GeneratedValue(strategy = GenerationType.IDENTITY)
|
||||
private Long id;
|
||||
|
||||
@Column(name = "xh_order_no", nullable = false, length = 50)
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user