package com.iplatform.model.po;
|
|
import com.walker.jdbc.BaseMapper;
|
import com.walker.jdbc.ResultSetUtils;
|
import com.walker.jdbc.SqlAndParameters;
|
import com.walker.jdbc.sqlgen.DeleteBuilder;
|
import com.walker.jdbc.sqlgen.InsertBuilder;
|
import com.walker.jdbc.sqlgen.SelectBuilder;
|
import com.walker.jdbc.sqlgen.UpdateBuilder;
|
import com.walker.jdbc.util.StringUtils;
|
|
import org.springframework.jdbc.core.RowMapper;
|
|
import java.sql.ResultSet;
|
import java.sql.SQLException;
|
import java.util.Map;
|
|
/**
|
* 表名:S_PAY_NOTIFY *
|
* @author genrator
|
*/
|
public class S_pay_notify_mapper extends S_pay_notify implements BaseMapper<S_pay_notify> {
|
// 序列化版本号
|
private static final long serialVersionUID = 1L;
|
|
public static final RowMapper<S_pay_notify> ROW_MAPPER = new S_pay_notifyRowMapper();
|
|
// 主键
|
public static final String ORDER_ID = "order_id";
|
// 普通属性
|
public static final String NOTIFY_ID = "notify_id";
|
public static final String CREATE_TIME = "create_time";
|
public static final String TRADE_NO = "trade_no";
|
public static final String NOTIFY_TYPE = "notify_type";
|
public static final String NOTIFY_AMOUNT = "notify_amount";
|
public static final String NOTIFY_ACCT = "notify_acct";
|
public static final String NOTIFY_STATUS = "notify_status";
|
public static final String NOTIFY_SOURCE = "notify_source";
|
public static final String PAY_STATUS = "pay_status";
|
|
/**
|
* 默认构造函数
|
*/
|
public S_pay_notify_mapper(S_pay_notify s_pay_notify) {
|
if (s_pay_notify == null) {
|
throw new IllegalArgumentException("po参数不允许为空!");
|
}
|
//主键
|
if (s_pay_notify.isset_order_id) {
|
this.setOrder_id(s_pay_notify.getOrder_id());
|
}
|
//普通属性
|
if (s_pay_notify.isset_notify_id) {
|
this.setNotify_id(s_pay_notify.getNotify_id());
|
}
|
if (s_pay_notify.isset_create_time) {
|
this.setCreate_time(s_pay_notify.getCreate_time());
|
}
|
if (s_pay_notify.isset_trade_no) {
|
this.setTrade_no(s_pay_notify.getTrade_no());
|
}
|
if (s_pay_notify.isset_notify_type) {
|
this.setNotify_type(s_pay_notify.getNotify_type());
|
}
|
if (s_pay_notify.isset_notify_amount) {
|
this.setNotify_amount(s_pay_notify.getNotify_amount());
|
}
|
if (s_pay_notify.isset_notify_acct) {
|
this.setNotify_acct(s_pay_notify.getNotify_acct());
|
}
|
if (s_pay_notify.isset_notify_status) {
|
this.setNotify_status(s_pay_notify.getNotify_status());
|
}
|
if (s_pay_notify.isset_notify_source) {
|
this.setNotify_source(s_pay_notify.getNotify_source());
|
}
|
if (s_pay_notify.isset_pay_status) {
|
this.setPay_status(s_pay_notify.getPay_status());
|
}
|
// 去掉,2022-09-07
|
// this.setDatabaseName_(s_pay_notify.getDatabaseName_());
|
}
|
|
/**
|
* 获取表名
|
*/
|
@Override
|
public String getTableName_() {
|
String tableName = "s_pay_notify";
|
/**
|
if (StringUtils.isNotEmpty(this.getDatabaseName_())) {
|
return this.getDatabaseName_() + "." + tableName;
|
} else {
|
return tableName;
|
}
|
*/
|
return tableName;
|
}
|
|
/**
|
* 获取主键名称
|
*/
|
@Override
|
public String getPkName_() {
|
return ORDER_ID;
|
}
|
|
/**
|
* 获取主键值
|
*/
|
@Override
|
public Object getPkValue_() {
|
return this.getOrder_id();
|
}
|
|
/**
|
* 获取插入语句和参数
|
*/
|
@Override
|
public SqlAndParameters<Map<String, Object>> getInsertSql_() {
|
InsertBuilder ib = new InsertBuilder(this.getTableName_());
|
ib.set(ORDER_ID, this.getOrder_id());
|
ib.set(NOTIFY_ID, this.getNotify_id(), this.isset_notify_id);
|
ib.set(CREATE_TIME, this.getCreate_time(), this.isset_create_time);
|
ib.set(TRADE_NO, this.getTrade_no(), this.isset_trade_no);
|
ib.set(NOTIFY_TYPE, this.getNotify_type(), this.isset_notify_type);
|
ib.set(NOTIFY_AMOUNT, this.getNotify_amount(), this.isset_notify_amount);
|
ib.set(NOTIFY_ACCT, this.getNotify_acct(), this.isset_notify_acct);
|
ib.set(NOTIFY_STATUS, this.getNotify_status(), this.isset_notify_status);
|
ib.set(NOTIFY_SOURCE, this.getNotify_source(), this.isset_notify_source);
|
ib.set(PAY_STATUS, this.getPay_status(), this.isset_pay_status);
|
return ib.genMapSql();
|
}
|
|
/**
|
* 获取更新语句和参数
|
*/
|
@Override
|
public SqlAndParameters<Map<String, Object>> getUpdateSql_() {
|
UpdateBuilder ub = new UpdateBuilder(this.getTableName_());
|
ub.set(NOTIFY_ID, this.getNotify_id(), this.isset_notify_id);
|
ub.set(CREATE_TIME, this.getCreate_time(), this.isset_create_time);
|
ub.set(TRADE_NO, this.getTrade_no(), this.isset_trade_no);
|
ub.set(NOTIFY_TYPE, this.getNotify_type(), this.isset_notify_type);
|
ub.set(NOTIFY_AMOUNT, this.getNotify_amount(), this.isset_notify_amount);
|
ub.set(NOTIFY_ACCT, this.getNotify_acct(), this.isset_notify_acct);
|
ub.set(NOTIFY_STATUS, this.getNotify_status(), this.isset_notify_status);
|
ub.set(NOTIFY_SOURCE, this.getNotify_source(), this.isset_notify_source);
|
ub.set(PAY_STATUS, this.getPay_status(), this.isset_pay_status);
|
ub.where(this.getPkName_(), this.getPkValue_());
|
return ub.genMapSql();
|
}
|
|
/**
|
* 获取更新语句和参数
|
*/
|
@Override
|
public SqlAndParameters<Map<String, Object>> getUpdateSql_(String where, Map<String, Object> parameters) {
|
UpdateBuilder ub = new UpdateBuilder(this.getTableName_());
|
ub.set(NOTIFY_ID, this.getNotify_id(), this.isset_notify_id);
|
ub.set(CREATE_TIME, this.getCreate_time(), this.isset_create_time);
|
ub.set(TRADE_NO, this.getTrade_no(), this.isset_trade_no);
|
ub.set(NOTIFY_TYPE, this.getNotify_type(), this.isset_notify_type);
|
ub.set(NOTIFY_AMOUNT, this.getNotify_amount(), this.isset_notify_amount);
|
ub.set(NOTIFY_ACCT, this.getNotify_acct(), this.isset_notify_acct);
|
ub.set(NOTIFY_STATUS, this.getNotify_status(), this.isset_notify_status);
|
ub.set(NOTIFY_SOURCE, this.getNotify_source(), this.isset_notify_source);
|
ub.set(PAY_STATUS, this.getPay_status(), this.isset_pay_status);
|
|
return ub.genMapSql(where, parameters);
|
}
|
|
/**
|
* 获取更新语句和参数
|
*/
|
@Override
|
public SqlAndParameters<Object[]> getUpdateSql_(String where, Object[] parameters) {
|
UpdateBuilder ub = new UpdateBuilder(this.getTableName_());
|
ub.set(NOTIFY_ID, this.getNotify_id(), this.isset_notify_id);
|
ub.set(CREATE_TIME, this.getCreate_time(), this.isset_create_time);
|
ub.set(TRADE_NO, this.getTrade_no(), this.isset_trade_no);
|
ub.set(NOTIFY_TYPE, this.getNotify_type(), this.isset_notify_type);
|
ub.set(NOTIFY_AMOUNT, this.getNotify_amount(), this.isset_notify_amount);
|
ub.set(NOTIFY_ACCT, this.getNotify_acct(), this.isset_notify_acct);
|
ub.set(NOTIFY_STATUS, this.getNotify_status(), this.isset_notify_status);
|
ub.set(NOTIFY_SOURCE, this.getNotify_source(), this.isset_notify_source);
|
ub.set(PAY_STATUS, this.getPay_status(), this.isset_pay_status);
|
|
return ub.genArraySql(where, parameters);
|
}
|
|
/**
|
* 获取删除语句和参数
|
*/
|
@Override
|
public SqlAndParameters<Map<String, Object>> getDeleteSql_() {
|
DeleteBuilder db = new DeleteBuilder(this.getTableName_());
|
db.where(this.getPkName_(), this.getPkValue_());
|
return db.genMapSql();
|
}
|
|
/**
|
* 获取删除语句和参数
|
*/
|
@Override
|
public SqlAndParameters<Map<String, Object>> getDeleteSql_(String where, Map<String, Object> parameters) {
|
DeleteBuilder db = new DeleteBuilder(this.getTableName_());
|
return db.genMapSql(where, parameters);
|
}
|
|
/**
|
* 获取删除语句和参数
|
*/
|
@Override
|
public SqlAndParameters<Object[]> getDeleteSql_(String where, Object[] parameters) {
|
DeleteBuilder db = new DeleteBuilder(this.getTableName_());
|
return db.genArraySql(where, parameters);
|
}
|
|
/**
|
* 获取单行查询语句和参数
|
*/
|
@Override
|
public SqlAndParameters<Map<String, Object>> getSingleSql_() {
|
SelectBuilder sb = new SelectBuilder(this.getTableName_());
|
sb.where(this.getPkName_(), this.getPkValue_());
|
return sb.genMapSql();
|
}
|
|
|
/**
|
* 获取查询语句和参数
|
*/
|
@Override
|
public SqlAndParameters<Map<String, Object>> getSelectSql_(String where, Map<String, Object> parameters) {
|
return new SqlAndParameters<>("select order_id, notify_id, create_time, trade_no, notify_type, notify_amount, notify_acct, notify_status, notify_source, pay_status from " + this.getTableName_() + " " + where, parameters);
|
}
|
|
/**
|
* 获取查询语句和参数
|
*/
|
@Override
|
public SqlAndParameters<Object[]> getSelectSql_(String where, Object[] parameters) {
|
return new SqlAndParameters<>("select order_id, notify_id, create_time, trade_no, notify_type, notify_amount, notify_acct, notify_status, notify_source, pay_status from " + this.getTableName_() + " " + where, parameters);
|
}
|
|
/**
|
* 将resultset的一行转化为po
|
*/
|
@Override
|
public S_pay_notify mapRow(ResultSet rs, int i) throws SQLException {
|
return ROW_MAPPER.mapRow(rs, i);
|
}
|
|
/**
|
* 克隆
|
*/
|
public S_pay_notify toS_pay_notify() {
|
return super.$clone();
|
}
|
}
|
|
/**
|
* s_pay_notify RowMapper
|
*
|
* @author genrator
|
*/
|
class S_pay_notifyRowMapper implements RowMapper<S_pay_notify> {
|
|
@Override
|
public S_pay_notify mapRow(ResultSet rs, int i) throws SQLException {
|
ResultSetUtils resultSetUtils = new ResultSetUtils();
|
S_pay_notify s_pay_notify = new S_pay_notify();
|
Integer columnIndex;
|
//主键
|
columnIndex = resultSetUtils.findColumn(rs, S_pay_notify_mapper.ORDER_ID);
|
if (columnIndex > 0) {
|
s_pay_notify.setOrder_id(rs.getLong(columnIndex));
|
}
|
//普通属性
|
columnIndex = resultSetUtils.findColumn(rs, S_pay_notify_mapper.NOTIFY_ID);
|
if (columnIndex > 0) {
|
s_pay_notify.setNotify_id(rs.getString(columnIndex));
|
}
|
columnIndex = resultSetUtils.findColumn(rs, S_pay_notify_mapper.CREATE_TIME);
|
if (columnIndex > 0) {
|
if (rs.getBigDecimal(columnIndex) == null) {
|
s_pay_notify.setCreate_time(null);
|
} else {
|
s_pay_notify.setCreate_time(rs.getLong(columnIndex));
|
}
|
}
|
columnIndex = resultSetUtils.findColumn(rs, S_pay_notify_mapper.TRADE_NO);
|
if (columnIndex > 0) {
|
s_pay_notify.setTrade_no(rs.getString(columnIndex));
|
}
|
columnIndex = resultSetUtils.findColumn(rs, S_pay_notify_mapper.NOTIFY_TYPE);
|
if (columnIndex > 0) {
|
s_pay_notify.setNotify_type(rs.getString(columnIndex));
|
}
|
columnIndex = resultSetUtils.findColumn(rs, S_pay_notify_mapper.NOTIFY_AMOUNT);
|
if (columnIndex > 0) {
|
if (rs.getBigDecimal(columnIndex) == null) {
|
s_pay_notify.setNotify_amount(null);
|
} else {
|
s_pay_notify.setNotify_amount(rs.getLong(columnIndex));
|
}
|
}
|
columnIndex = resultSetUtils.findColumn(rs, S_pay_notify_mapper.NOTIFY_ACCT);
|
if (columnIndex > 0) {
|
s_pay_notify.setNotify_acct(rs.getString(columnIndex));
|
}
|
columnIndex = resultSetUtils.findColumn(rs, S_pay_notify_mapper.NOTIFY_STATUS);
|
if (columnIndex > 0) {
|
s_pay_notify.setNotify_status(rs.getString(columnIndex));
|
}
|
columnIndex = resultSetUtils.findColumn(rs, S_pay_notify_mapper.NOTIFY_SOURCE);
|
if (columnIndex > 0) {
|
s_pay_notify.setNotify_source(rs.getString(columnIndex));
|
}
|
columnIndex = resultSetUtils.findColumn(rs, S_pay_notify_mapper.PAY_STATUS);
|
if (columnIndex > 0) {
|
s_pay_notify.setPay_status(rs.getString(columnIndex));
|
}
|
return s_pay_notify;
|
}
|
}
|