qq_37990007 2021-06-10 12:29 采纳率: 100%
浏览 227
已采纳

Mybatis连接查询查询不到数据,但是把参数和语句写在SQlServer中能查到

控制台输出的是==>  Preparing: select count(*) as count from( select * from ( select d.order_id,d.agent,d.order_number,d.model,d.order_quantity,d.nocheduled_quantity ,d.acceptance_date,d.delivery_date,d.norder_number,d.shipserver,d.dischargeserver,d.navigationarea,d.state,d.order_remarks, e.progress_id,e.machine_number,e.task_number,e.progress_state,e.progress_investment,e.progress_online,e.progress_offline,e.progress_testrun,e.progress_finished, e.progress_shipment,e.progress_remarks from order1 d left join (select * from progress) e on d.order_id=e.order_id )f where 1=1 and progress_investment >= ? )g
==> Parameters: 2021-06-01(String)
<==    Columns: count
<==        Row: 0
<==      Total: 1
Closing non transactional SqlSession [org.apache.ibatis.session.defaults.DefaultSqlSession@5c9d1904]
Creating a new SqlSession
SqlSession [org.apache.ibatis.session.defaults.DefaultSqlSession@44b11bf6] was not registered for synchronization because synchronization is not active
JDBC Connection [HikariProxyConnection@1996920418 wrapping ConnectionID:1 ClientConnectionId: 2aaaf779-5d90-42e8-975f-89ff90b131e4] will not be managed by Spring
==>  Preparing: select * from( select top 0 * from( select top 0* FROM (select * from (select d.order_id,d.agent,d.order_number,d.model,d.order_quantity,d.nocheduled_quantity ,d.acceptance_date,d.delivery_date,d.norder_number,d.shipserver,d.dischargeserver,d.navigationarea,d.state,d.order_remarks, e.progress_id,e.machine_number,e.task_number,e.progress_state,e.progress_investment,e.progress_online,e.progress_offline,e.progress_testrun,e.progress_finished, e.progress_shipment,e.progress_remarks from order1 d left join (select * from progress) e on d.order_id=e.order_id)d where 1=1 and progress_investment >= ? )a order by order_id desc )b order by order_id asc )c order by order_id desc
==> Parameters: 2021-06-01(String)
<==      Total: 0

但是在sqlserver中使用相同的语句,和参数能查询到数据,能帮我看看这是什么问题,应该怎么解决呢?(datetime类型的日期查询查询不到,其它参数能查到)

  • 写回答

4条回答

      报告相同问题?

      相关推荐 更多相似问题

      悬赏问题

      • ¥15 用MATLAB解决问题,需要代码
      • ¥45 关于C语言设计井字棋游戏问题的实现
      • ¥20 vuforia的Unity3D开发,模型附上特效后大量报错
      • ¥35 Python实现文本关键词提取
      • ¥20 如何使用c++语言完成实验仪器管理系统
      • ¥15 请问Unity使用Magica Cloth插件怎么调整散兵的帘子和振袖比较好?
      • ¥15 请问为什么原神模型导入Unity做动画默认姿势会站不直?
      • ¥15 ld: cannot open C:\Program: No such file or directory
      • ¥15 请问汏佬要怎么访问这种过滤了post和get的php内容?
      • ¥15 C语言调用python脚本出现Debug Assertion Failed错误