如果表中不存在@Id/@Name/@Pk中的任何一种,那么单个字段更新还能这样写吗?dao.update(p, "^age$");
@Table("t_sys_user")
@TableIndexes({@Index(name = "INDEX_SYS_USER_LOGINNAMAE", fields = {"loginname"}, unique = true)})
public class SysUser extends Model implements Serializable {
private static final long serialVersionUID = 1L;
@Column
@Comment("用户名")
@ColDefine(type = ColType.VARCHAR, width = 120)
private String loginname;
@Column
@Comment("密码")
@ColDefine(type = ColType.VARCHAR, width = 100)
private String password;// transient 修饰符可让此字段不在对象里显示
@Column
@Comment("密码盐")
@ColDefine(type = ColType.VARCHAR, width = 50)
private String salt;
@Column
@Comment("昵称")
@ColDefine(type = ColType.VARCHAR, width = 100)
private String nickname;
@Column
@Comment("是否在线")
@ColDefine(type = ColType.BOOLEAN)
private boolean isOnline;
@Column
@Comment("是否禁用")
@ColDefine(type = ColType.BOOLEAN)
private boolean disabled;
@Column
@ColDefine(type = ColType.VARCHAR, width = 255)
private String email;
@Column
@ColDefine(type = ColType.VARCHAR, width = 20)
private String mobile;
@Column
@Comment("登陆时间")
@ColDefine(type = ColType.DATETIME)
private Date loginAt;
@Column
@Comment("登陆IP")
@ColDefine(type = ColType.VARCHAR, width = 255)
private String loginIp;
@Column
@Comment("登陆次数")
@ColDefine(type = ColType.INT)
private Integer loginCount;
@Column
@Comment("账户有效期")
@ColDefine(type = ColType.DATE)
private Date validDate;
@Column
@Comment("登录失败锁定时间")
@ColDefine(type=ColType.DATETIME)
private Date lockTime;
@Column
@Comment("登录失败次数")
@ColDefine(type=ColType.INT)
private Integer failNumber;
private Boolean flag = false;
@ManyMany(from = "userId", relation = "t_sys_user_role", to = "roleId")
private List<SysRole> roles;
protected List<SysMenu> menus;
protected List<SysMenu> firstMenus;
protected Map<String, List<SysMenu>> secondMenus;
private List<SysMenu> customMenus;