欢迎您访问程序员文章站本站旨在为大家提供分享程序员计算机编程知识!
您现在的位置是: 首页

spring data jpa 分页

程序员文章站 2022-04-25 11:17:13
...
  • 接口
/**
 * 操作日志
 */
@Repository
public interface OperationLogVoRepository extends CrudRepository<OperationLog, String>, JpaSpecificationExecutor<OperationLog> {

    List<OperationLog> findAllByEnvironmentAndOperObjType(String environmentId, String serviceName);

}
  • 实体类
@Entity(name = "operation_log")
@Data
public class OperationLog  {

    @Id
    @GenericGenerator(name = "uuid", strategy = "com.common.cloud.id.UUIDGenerator")
    @GeneratedValue(generator = "uuid")
    private String id;

    private String username;  //登录名

    private String clientIp;//客户端ip

    @Enumerated(EnumType.STRING)
    private OperLogType logType;//日志类型

    private String environment;//环境

    @Enumerated(EnumType.STRING)
    private OperObjType operObjType;//操作对象类型

    private String operObjName;//操作对象名称

    @Enumerated(EnumType.STRING)
    private OperAction operActio
相关标签: 和彡十一起学java