use of io.leopard.jdbc.builder.InsertBuilder in project leopard by tanhaichao.
the class AdminDaoMysqlImpl method add.
@Override
public boolean add(Admin admin) {
InsertBuilder builder = new NullInsertBuilder("admin");
builder.setLong("adminId", admin.getAdminId());
builder.setString("username", admin.getUsername());
builder.setString("password", admin.getPassword());
builder.setList("roles", admin.getRoleList());
builder.setString("salt", admin.getSalt());
builder.setString("name", admin.getName());
builder.setBool("disabled", admin.isDisabled());
builder.setDate("posttime", admin.getPosttime());
return jdbc.insertForBoolean(builder);
}
use of io.leopard.jdbc.builder.InsertBuilder in project leopard by tanhaichao.
the class CaptchaDaoMysqlImpl method add.
@Override
public boolean add(Captcha captcha) {
InsertBuilder builder = new InsertBuilder(tableName);
builder.setString("captchaId", captcha.getCaptchaId());
builder.setString("type", captcha.getType());
builder.setString("target", captcha.getTarget());
builder.setString("account", captcha.getAccount());
builder.setString("captcha", captcha.getCaptcha());
builder.setString("data", captcha.getData());
builder.setBool("used", captcha.isUsed());
builder.setDate("posttime", captcha.getPosttime());
builder.setDate("expiryTime", captcha.getExpiryTime());
builder.setDate("lmodify", captcha.getLmodify());
return jdbc.insertForBoolean(builder);
}
Aggregations