Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[xxx] 查询条件切换,数据回显不正确 #801

Open
fw-fw opened this issue Mar 19, 2025 · 5 comments
Open

[xxx] 查询条件切换,数据回显不正确 #801

fw-fw opened this issue Mar 19, 2025 · 5 comments

Comments

@fw-fw
Copy link

fw-fw commented Mar 19, 2025

Description

1.这是整个的查询参数

Image

其中对"standing_medical_order_flag"条件进行切换。
2.首次查询时,即"standing_medical_order_flag"为0时,数据回显正常,只有状态为0的数据。

Image

3.第二次查询时,即"standing_medical_order_flag"为1时,数据回显也正常,只有状态为1的数据。

Image

4.第三次查询时,即"standing_medical_order_flag"切换回0时,数据回显就有问题了,把0和1状态的数据都回显出来了。

Image

5.打断点查看,AbstractSQLExecutor下的execute(),执行的sql没有问题

Image

6.AbstractParser下的putQueryResult()也只有一条数据

Image

7.后边发现在AbstractParser下的onArrayParse()下response.add(),response在不断的加入数据.

Image
8.当我项目重启后,又重回步骤[2,3,4]的轮回。请问作者大大,是设置的有读取缓存的代码逻辑吗?如果有的话,如何去禁用掉呢?还是说我配置的有问题?

@TommyLemon
Copy link
Collaborator

断点调试 AbstractSQLExecutor 的 resultList,可能 JDBC 返回的就有问题,然后把生成的 SQL 也按顺序放数据库里执行

@fw-fw
Copy link
Author

fw-fw commented Mar 24, 2025

感谢作者大大解答,今天莫名奇妙的又可以了,我想复显都复显不了..[enjoy]
作者大大,像这种我想查询闭区间时间范围内的数据,有没有别的写法呢?我照着apidoc上,但是过不了预编译。

Image

@fw-fw
Copy link
Author

fw-fw commented Mar 24, 2025

找到了,再次感谢您帮我解答问题!

Image

@TommyLemon
Copy link
Collaborator

还可以用 BETWEEN AND
key%: "val0,val1"
https://github.com/Tencent/APIJSON/blob/master/Document.md#3.2

@fw-fw
Copy link
Author

fw-fw commented Mar 25, 2025

好的,非常感谢!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants