Home > Back-end >  Please comment mybatis data returned result sets 0, database query data is how to return a responsib
Please comment mybatis data returned result sets 0, database query data is how to return a responsib

Time:10-02

I copy console promise of SQL to the database query is data, but the number of results returned mybatis is 0, I ask may be what reason be cause?

CodePudding user response:

Mapping error table and attribute names

CodePudding user response:

reference 1st floor qq_34446485 response:
mapping error table and the property name


I am using the Map to receive data

CodePudding user response:

Abnormal and debug log didn't find it slowly

CodePudding user response:

CodePudding user response:

reference qq_34446485 reply: 3/f
anomaly and debug log didn't find it slowly

No abnormal

CodePudding user response:

Have a look at your Mapper method

CodePudding user response:

First, look at your map of useid first, put in, is how much, is a string type?
Second, look at you again, as useid, found out the useid is string type, because the return type is a string,

CodePudding user response:

refer to 6th floor xiaohe_com response:
have a look at your Mapper method


CodePudding user response:

refer to 7th floor zhang_kang_user response:
first, first take a look at your map of useid, put in, how much is, a string type?
Second, look at you again, as useid, found out the useid is string type, because the return type is a string,


When I removed the where condition is added behind the condition of data and parameter is passed in the can't check the data

CodePudding user response:

CodePudding user response:

See if the username is empty or see if type String

CodePudding user response:

11 references xiaohe_com response:
see if userId is null or see if type String

A map on the fourth floor is not the problem

CodePudding user response:

List QueryUserIdList (@ Param (value="https://bbs.csdn.net/topics/userId") String userId); So try!!

CodePudding user response:

Try the PARENT_ID=# {0}

CodePudding user response:

reference 13 floor xiaohe_com reply:
List QueryUserIdList (@ Param (value="https://bbs.csdn.net/topics/userId") String userId); So try!!

Passed as parameters are actually as before it would be a problem WHERE conditions but I don't know what's the problem

CodePudding user response:

On the 14th floor wuli_genji
reference response:
try PARENT_ID=# {0}

And this kind of operation used tried an error

CodePudding user response:

Remove the jdbcType=VARCHAR try again. If you do not check or data, in the console and see your SQL, look at your parameters.

CodePudding user response:

refer to 17th floor xiaohe_com response:
try to remove the jdbcType=VARCHAR. If do not check or data, in the console and see your SQL, look at your parameters.

These are seen are normal is checked data database is not looking for a half a day didn't find out why

CodePudding user response:

Add a qq: 214440127

CodePudding user response:

Where there is wrong? Try the example joining together

CodePudding user response:

# {} is the incoming value into a string, you directly put (" userid ", 400311)?
Still have even if you have not try, can write SQL statements to death see yao, write directly parent_id="400311"; Look have value, or is it parses' '? Make a mistake, ' ',

CodePudding user response:

reference qq_34446485 20 floor response:
where is wrong? Try the example joining together


No error is less than data query there is data in the database query

CodePudding user response:

refer to 21st floor zhang_kang_user response:
# {} is the incoming value into a string, you directly put (" userid ", 400311)?
Still have even if you have not try, can write SQL statements to death see yao, write directly parent_id="400311"; Look have value, or is it parses' '? Make a mistake, ' ',
write dead tried and have data, # {userId, jdbcType=VARCHAR} parameters after the feeling do not check as parameters of the lost data

CodePudding user response:

Where stitching parameters failed or type do not match, so useless where can query to all

CodePudding user response:

You have put in userId to give it a name. Remove the jdbcType behind to try again, could it parses "?" , is the incoming parameters, analytical problem, become another value, is there a parsed SQL,

CodePudding user response:

reference 24th floor qq_34446485 response:
where stitching parameters failed or type do not match, so useless where can query to all
parameter type does not match will be in the console

CodePudding user response:

Remove jdbcType, add a if judgment joining together again

CodePudding user response:

reference 25 floor zhang_kang_user response:
you give it a change of name, put in userId remove the jdbcType behind to try again, could it parses "?" , is the incoming parameters, analytical problem, become another value, have parsed SQL,
tried the problem still haven't found out

CodePudding user response:

nullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnull
  • Related