摘要:
一、获取系统当前时间 1、System.currentTimeMillis(); // 获取当前系统的毫秒值 Long nowTime = System.currentTimeMillis(); // 毫秒值转换为date Date date = new Date(nowTime); 2、new D 阅读全文
摘要:
主键回填一般是插入一条数据,id设为自增,当插入一条记录时,并返回该记录id值 一、JDBC原生写法: public int insert(Person person) { Connection con = null; PreparedStatement ps = null; ResultSet r 阅读全文
摘要:
一、别名 操作sql语句时给字段起别名,别名和实体类属性字段一致 <select id="getUserList" resultType="User"> select USER_ID as id,USER_NAME as name,USER_PASSWORD as password from use 阅读全文