mirror of
https://gitee.com/y_project/RuoYi-Cloud.git
synced 2026-01-26 19:51:56 +08:00
框架集成MyBatis-Plus使得编码更加方便
This commit is contained in:
@@ -116,11 +116,16 @@
|
||||
<groupId>javax.servlet</groupId>
|
||||
<artifactId>javax.servlet-api</artifactId>
|
||||
</dependency>
|
||||
<!-- mybatis-flex -->
|
||||
<!-- mybatis-plus-->
|
||||
<dependency>
|
||||
<groupId>com.baomidou</groupId>
|
||||
<artifactId>mybatis-plus-boot-starter</artifactId>
|
||||
</dependency>
|
||||
<!-- mybatis-flex -->
|
||||
<!-- <dependency>
|
||||
<groupId>com.mybatis-flex</groupId>
|
||||
<artifactId>mybatis-flex-spring-boot-starter</artifactId>
|
||||
</dependency>
|
||||
</dependency>-->
|
||||
<!-- Swagger -->
|
||||
<dependency>
|
||||
<groupId>io.swagger</groupId>
|
||||
|
||||
@@ -1,11 +1,12 @@
|
||||
package com.ruoyi.common.core.web.domain;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.TableField;
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.util.Date;
|
||||
import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import com.mybatisflex.annotation.Column;
|
||||
|
||||
/**
|
||||
* Entity基类
|
||||
@@ -17,7 +18,7 @@ public class BaseEntity implements Serializable
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/** 搜索值 */
|
||||
@Column(ignore = true)
|
||||
@TableField(exist = false)
|
||||
private String searchValue;
|
||||
|
||||
/** 创建者 */
|
||||
@@ -25,7 +26,6 @@ public class BaseEntity implements Serializable
|
||||
|
||||
/** 创建时间 */
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@Column(onInsertValue = "now()")
|
||||
private Date createTime;
|
||||
|
||||
/** 更新者 */
|
||||
@@ -33,14 +33,13 @@ public class BaseEntity implements Serializable
|
||||
|
||||
/** 更新时间 */
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@Column(onUpdateValue = "now()", onInsertValue = "now()")
|
||||
private Date updateTime;
|
||||
|
||||
/** 备注 */
|
||||
private String remark;
|
||||
|
||||
/** 请求参数 */
|
||||
@Column(ignore = true)
|
||||
@TableField(exist = false)
|
||||
private Map<String, Object> params;
|
||||
|
||||
public String getSearchValue()
|
||||
|
||||
@@ -34,9 +34,13 @@
|
||||
<artifactId>ruoyi-common-redis</artifactId>
|
||||
</dependency>
|
||||
<!-- mybatis-flex -->
|
||||
<dependency>
|
||||
<!-- <dependency>
|
||||
<groupId>com.mybatis-flex</groupId>
|
||||
<artifactId>mybatis-flex-spring-boot-starter</artifactId>
|
||||
</dependency>-->
|
||||
<dependency>
|
||||
<groupId>com.baomidou</groupId>
|
||||
<artifactId>mybatis-plus-boot-starter</artifactId>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user