diff --git a/renren-admin/src/main/java/io/renren/modules/takeout/entity/UserEntity.java b/renren-admin/src/main/java/io/renren/modules/takeout/entity/UserEntity.java index d304b8f..0ba72b2 100644 --- a/renren-admin/src/main/java/io/renren/modules/takeout/entity/UserEntity.java +++ b/renren-admin/src/main/java/io/renren/modules/takeout/entity/UserEntity.java @@ -1,5 +1,7 @@ package io.renren.modules.takeout.entity; +import com.baomidou.mybatisplus.annotation.FieldFill; +import com.baomidou.mybatisplus.annotation.TableField; import com.baomidou.mybatisplus.annotation.TableName; import lombok.Data; @@ -54,17 +56,21 @@ public class UserEntity { /** * 创建者 */ + @TableField(fill = FieldFill.INSERT) private Long creator; /** * 创建时间 */ + @TableField(fill = FieldFill.INSERT) private Date createDate; /** * 更新者 */ + @TableField(fill = FieldFill.INSERT_UPDATE) private Long updater; /** * 更新时间 */ + @TableField(fill = FieldFill.INSERT_UPDATE) private Date updateDate; } \ No newline at end of file diff --git a/renren-admin/src/main/java/io/renren/modules/takeout/service/impl/UserServiceImpl.java b/renren-admin/src/main/java/io/renren/modules/takeout/service/impl/UserServiceImpl.java index 072b81f..01d366f 100644 --- a/renren-admin/src/main/java/io/renren/modules/takeout/service/impl/UserServiceImpl.java +++ b/renren-admin/src/main/java/io/renren/modules/takeout/service/impl/UserServiceImpl.java @@ -23,9 +23,11 @@ public class UserServiceImpl extends CrudServiceImpl getWrapper(Map params){ String id = (String)params.get("id"); + String phone = (String) params.get("phone"); QueryWrapper wrapper = new QueryWrapper<>(); wrapper.eq(StringUtils.isNotBlank(id), "id", id); + wrapper.like(StringUtils.isNotBlank(phone), "phone", phone); return wrapper; }