oracle 时间类型 与java mybatis.xml 文件配置 resultMap 对应时间类型 JsonConfig 转换oracle里的时间类型
来源:互联网 发布:vivo清除所有数据密码 编辑:程序博客网 时间:2024/06/09 21:06
oracle:时间类型为 date java java..util.Date 类型
mybatis.xml 映射文件配置:resultMap
<mapper namespace="ssmy.dao.SaleChanceDao">
<resultMap type="ssmy.dto.SaleChance" id="SaleChance">
<!--<resultMap type="User" id="User"> 如果在sprin文件里配置初始化 mybatis里配置了别名就是有-->
<!-- 用id属性来映射主键字段 -->
<id property="id" column="id" jdbcType="INTEGER"/>
<!-- 用result属性来映射非主键字段 -->
<result property="chanceSource" column="chanceSource" jdbcType="VARCHAR"/>
<result property="customerName" column="customerName" jdbcType="VARCHAR"/>
<result property="cgjl" column="cgjl" jdbcType="INTEGER"/>
<result property="overView" column="overView" jdbcType="VARCHAR"/>
<result property="linkMan" column="linkMan" jdbcType="VARCHAR"/>
<result property="linkPhone" column="linkPhone" jdbcType="VARCHAR"/>
<result property="description" column="description" jdbcType="VARCHAR"/>
<result property="createMan" column="createMan" jdbcType="VARCHAR"/>
<result property="createTime" column="createTime" jdbcType="TIMESTAMP"/>
<result property="assignMan" column="assignMan" jdbcType="VARCHAR"/>
<result property="assignTime" column="assignTime" jdbcType="TIMESTAMP"/>
<result property="state" column="state" jdbcType="INTEGER"/>
<result property="devResult" column="devResult" jdbcType="INTEGER"/>
</resultMap>
JsonConfig 转换时间 oracle里查出的时间 date类型
JSONObject result=new JSONObject();JsonConfig jsonConfig=new JsonConfig();
jsonConfig.registerJsonValueProcessor(java.util.Date.class, new DateJsonValueProcessor("yyyy-MM-dd HH:mm"));
JSONArray jsonArray=JSONArray.fromObject(list,jsonConfig);
result.put("rows", jsonArray);
result.put("total", total);
ResponseUtil.write(response, result);
- oracle 时间类型 与java mybatis.xml 文件配置 resultMap 对应时间类型 JsonConfig 转换oracle里的时间类型
- mybatis mapper映射配置时间类型对应oracle,java里的Date 类型 TIMESTAMP
- Oracle转换时间类型
- Oracle时间运算与日期类型转换
- 转换oracle的时间戳类型:
- oracle中日期类型与unix 时间戳的转换
- oracle中日期类型与unix 时间戳的转换
- oracle中日期类型与unix 时间戳的转换
- oracle中日期类型与unix 时间戳的转换
- oracle中日期类型与unix 时间戳的转换
- oracle中日期类型与unix 时间戳的转换
- oracle中日期类型与unix 时间戳的转换
- java oracle 关于时间类型的问题
- java操作oracle数据库的时间类型
- oracle时间类型的查询
- Oracle时间类型
- Oracle时间类型
- oracle时间类型总结
- 十进制转换二进制
- 集成融云遇到的问题合集
- 测试 top (@num) 是否能重用执行计划
- Cocos2d-x与OpenGL底层的感想
- RNN及其简单Python代码示例
- oracle 时间类型 与java mybatis.xml 文件配置 resultMap 对应时间类型 JsonConfig 转换oracle里的时间类型
- JSONUtil工具类
- What is saturating activation function?
- fabric源码解析2——peer命令结构
- 重建二叉树
- 【最大流模板题】POJ 3281 Dining
- 面向对象程序设计六大原则-迪米特法则
- MarkDown基本使用
- swift 懒加载