Buggy code:
@ MybatisMapper public interface UserMapper { @ Select ( "select<seq2seq4repair_space>id,<seq2seq4repair_space>username,<seq2seq4repair_space>password,<seq2seq4repair_space>status,<seq2seq4repair_space>created_time,<seq2seq4repair_space>updated_time<seq2seq4repair_space>from<seq2seq4repair_space>users<seq2seq4repair_space>where<seq2seq4repair_space>id<seq2seq4repair_space>=<seq2seq4repair_space>#{id}" ) @ ResultMap ( "UserResult" ) User find ( @ Param ( "id" ) String id ) { } @ Select ( "select<seq2seq4repair_space>id,<seq2seq4repair_space>username,<seq2seq4repair_space>password,<seq2seq4repair_space>status,<seq2seq4repair_space>created_time,<seq2seq4repair_space>updated_time<seq2seq4repair_space>from<seq2seq4repair_space>users<seq2seq4repair_space>where<seq2seq4repair_space>username<seq2seq4repair_space>=<seq2seq4repair_space>#{username}<seq2seq4repair_space>and<seq2seq4repair_space>password<seq2seq4repair_space>=<seq2seq4repair_space>#{password}" ) @ ResultMap ( "UserResult" ) User findByUsernameAndPassword ( @ Param ( "username" ) String username , @ Param ( "password" ) String password ) { } @ Update ( "update<seq2seq4repair_space>users<seq2seq4repair_space>set<seq2seq4repair_space>password<seq2seq4repair_space>=<seq2seq4repair_space>#{password},<seq2seq4repair_space>updated_time<seq2seq4repair_space>=<seq2seq4repair_space>#{updatedTime}<seq2seq4repair_space>where<seq2seq4repair_space>id<seq2seq4repair_space>=<seq2seq4repair_space>#{id}" ) void updatePassword ( @ Param ( "id" ) String id , @ Param ( "password" ) String password , @ Param ( "updatedTime" ) Date updatedTime ) { } @ Select ( "select<seq2seq4repair_space>count(1)<seq2seq4repair_space>from<seq2seq4repair_space>users" ) <START_BUG> long count ( ) ; <END_BUG> @ Select ( "select<seq2seq4repair_space>id,<seq2seq4repair_space>username,<seq2seq4repair_space>password,<seq2seq4repair_space>status,<seq2seq4repair_space>created_time,<seq2seq4repair_space>updated_time<seq2seq4repair_space>from<seq2seq4repair_space>users<seq2seq4repair_space>order<seq2seq4repair_space>by<seq2seq4repair_space>created_time<seq2seq4repair_space>desc<seq2seq4repair_space>limit<seq2seq4repair_space>#{limit}<seq2seq4repair_space>offset<seq2seq4repair_space>#{offset}" ) @ ResultMap ( "UserResult" ) List < User > page ( @ Param ( "limit" ) int limit , @ Param ( "offset" ) long offset ) { } @ Insert ( "insert<seq2seq4repair_space>into<seq2seq4repair_space>users(id,<seq2seq4repair_space>username,<seq2seq4repair_space>password,<seq2seq4repair_space>status,<seq2seq4repair_space>created_time)" + "<seq2seq4repair_space>values<seq2seq4repair_space>(#{id},<seq2seq4repair_space>#{username},<seq2seq4repair_space>#{password},<seq2seq4repair_space>#{status},<seq2seq4repair_space>#{createdTime})" ) void insert ( User user ) { } @ Select ( "select<seq2seq4repair_space>id,<seq2seq4repair_space>username,<seq2seq4repair_space>password,<seq2seq4repair_space>status,<seq2seq4repair_space>created_time,<seq2seq4repair_space>updated_time<seq2seq4repair_space>from<seq2seq4repair_space>users<seq2seq4repair_space>where<seq2seq4repair_space>username<seq2seq4repair_space>=<seq2seq4repair_space>#{username}" ) @ ResultMap ( "UserResult" ) User findByUsername ( @ Param ( "username" ) String username ) { } @ Update ( "update<seq2seq4repair_space>users<seq2seq4repair_space>set<seq2seq4repair_space>username<seq2seq4repair_space>=<seq2seq4repair_space>#{username},<seq2seq4repair_space>password<seq2seq4repair_space>=<seq2seq4repair_space>#{password}," + "<seq2seq4repair_space>status<seq2seq4repair_space>=<seq2seq4repair_space>#{status},<seq2seq4repair_space>updated_time<seq2seq4repair_space>=<seq2seq4repair_space>#{updatedTime}<seq2seq4repair_space>where<seq2seq4repair_space>id<seq2seq4repair_space>=<seq2seq4repair_space>#{id}" ) void update ( User user ) { } @ Update ( "update<seq2seq4repair_space>users<seq2seq4repair_space>set<seq2seq4repair_space>status<seq2seq4repair_space>=<seq2seq4repair_space>#{status},<seq2seq4repair_space>updated_time<seq2seq4repair_space>=<seq2seq4repair_space>#{updatedTime}<seq2seq4repair_space>where<seq2seq4repair_space>id<seq2seq4repair_space>=<seq2seq4repair_space>#{id}" ) void updateStatus ( @ Param ( "id" ) String id , @ Param ( "status" ) User . Status status , @ Param ( "updatedTime" ) Date updatedTime ) { } }

Fix:
Long count ( ) ;