6/16 完成后台页面会员管理的搜索按钮和公共字段自动填充

This commit is contained in:
zyx 2023-06-16 16:47:51 +08:00
parent c407d63f2f
commit b4d66110b3
2 changed files with 8 additions and 0 deletions

View File

@ -1,5 +1,7 @@
package io.renren.modules.takeout.entity; 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 com.baomidou.mybatisplus.annotation.TableName;
import lombok.Data; import lombok.Data;
@ -54,17 +56,21 @@ public class UserEntity {
/** /**
* 创建者 * 创建者
*/ */
@TableField(fill = FieldFill.INSERT)
private Long creator; private Long creator;
/** /**
* 创建时间 * 创建时间
*/ */
@TableField(fill = FieldFill.INSERT)
private Date createDate; private Date createDate;
/** /**
* 更新者 * 更新者
*/ */
@TableField(fill = FieldFill.INSERT_UPDATE)
private Long updater; private Long updater;
/** /**
* 更新时间 * 更新时间
*/ */
@TableField(fill = FieldFill.INSERT_UPDATE)
private Date updateDate; private Date updateDate;
} }

View File

@ -23,9 +23,11 @@ public class UserServiceImpl extends CrudServiceImpl<UserDao, UserEntity, UserDT
@Override @Override
public QueryWrapper<UserEntity> getWrapper(Map<String, Object> params){ public QueryWrapper<UserEntity> getWrapper(Map<String, Object> params){
String id = (String)params.get("id"); String id = (String)params.get("id");
String phone = (String) params.get("phone");
QueryWrapper<UserEntity> wrapper = new QueryWrapper<>(); QueryWrapper<UserEntity> wrapper = new QueryWrapper<>();
wrapper.eq(StringUtils.isNotBlank(id), "id", id); wrapper.eq(StringUtils.isNotBlank(id), "id", id);
wrapper.like(StringUtils.isNotBlank(phone), "phone", phone);
return wrapper; return wrapper;
} }