java - Mybatis executes sql summation problem
淡淡烟草味
淡淡烟草味 2017-06-14 10:51:48
0
1
715

This is a summation sql I need to execute, and the query value count in the client is 0.
select count(1) as COUNT from dd_mst where ac_id=1000002400 and ac_seqn<>1 and ac_sts =' 1'

Call through the following tool class in the program:

The problem is that the program will return Count as 1, but other statistical SQLs are quite normal, which makes me very depressed.
Can you give me some ideas in this regard, about the logic of the selectList() method executed at the bottom of mybatis. (ps: I probably also understand that querying it through limited conditions will return a list<map>, and then the COUNT of item 0 of this map is the value of the statistical field)

淡淡烟草味
淡淡烟草味

reply all(1)
阿神

Why is it so complicated?

Isn’t it good to directly define the return Integer? Why put it in a Map?

The question is not very clear, so I can only guess:

The column names of the database are not case-sensitive, but the keys of the Java Map are case-sensitive.

Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template