shardingsphere oracle各种问题总结( 二 )

  • 实体 , DAO , Service
@Entity@Table(name = "T_ORDER")public class Orders extends BaseEntity{ private String sno ; private String address ; private String name ; @JsonFormat(shape = JsonFormat.Shape.STRING, pattern="yyyy-MM-dd HH:mm:ss", timezone="GMT+8") @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss") private Date orderDate ; @Column(columnDefinition = "int default 0") private Integer status ;}【shardingsphere oracle各种问题总结】public interface OrdersMapper {int saveOrders(Orders order) ;List queryOrders(@Param("params") Map params) ; } insert into t_order (id, name, address, sno, order_date, status, create_time) values (#{id}, #{name},#{address}, #{sno}, #{orderDate}, #{status}, #{createTime}) SELECT * FROM t_order T WHERE 1 = 1 @Servicepublic class OrdersService {@Resource private OrdersMapper orderMapper ;@Transactional public int save(Orders order) {return orderMapper.saveOrders(order) ; }public List queryOrdersMapperNormal(Map params) {return orderMapper.queryOrders(params) ; }public Pager queryOrdersMapperPager(Map params) {return Pager.query(params, () -> orderMapper.queryOrders(params)) ; } }项目代码说完了
准备测试
1、启动服务报错
莫名其妙的说表不存在
shardingsphere oracle各种问题总结文章插图
开始跟踪源码:
shardingsphere oracle各种问题总结文章插图
这里的loadAllTableNames方法回获取所有的表
shardingsphere oracle各种问题总结文章插图


推荐阅读