为提高效率,提问时请提供以下信息,问题描述清晰可优先响应。
【DM版本】: DM8
【操作系统】:LIUNX
【CPU】:4
【问题描述】*:在使用 @Query(value = "SELECT login_date as loginDate, count(DISTINCT user_id) as userNum, count(user_id) as num from " +
"(SELECT " +
"a.user_id," +
"DATE_FORMAT(a.login_time,'%Y-%m-%d') login_date " +
"FROM t_permission_useraction_record a " +
"JOIN t_permission_user b ON a.user_id = b.id " +
"where if(?1 !='',a.app_channel_code=?1,1=1) " +
"and if(?2 !='' & ?2 ='1',b.account_type=?2,2=2) " +
"and if(?2 !='' & ?2 ='2',b.account_type!=1,2=2) " +
"and if(?3 !='',a.user_id=?3,3=3) " +
"and if(?4 !='',a.login_time>=?4,4=4) " +
"and if(?5 !='',a.login_time<=?5,5=5)) c " +
"group by login_date",
nativeQuery = true
)
List<Object[]> queryUserLoginRecord(String appChannelCode, Integer accountType, Integer userId, LocalDateTime from, LocalDateTime to); 这块在是JPA Hibernate 实现,在mysql可以,在达梦数据库一直报错,请问如何解决?

1.DM数据库上报什么错,请提供一下。
2.提供一下相关的表结构和最终执行的SQL语句吧。