fix:add param for ConfigInfoMapperByMySql#findAllConfigInfoBaseFetchRows (#11883)
* fix:add param for ConfigInfoMapperByMySql#findAllConfigInfoBaseFetchRows * fix:code style modify * fix:code style modify * fix:code style modify --------- Co-authored-by: zhangyang <1445621702@qq.com>
This commit is contained in:
parent
19a857b701
commit
facf4c8270
@ -85,8 +85,8 @@ public class ConfigInfoMapperByMySql extends AbstractMapper implements ConfigInf
|
||||
@Override
|
||||
public MapperResult findAllConfigInfoBaseFetchRows(MapperContext context) {
|
||||
String sql = "SELECT t.id,data_id,group_id,content,md5"
|
||||
+ " FROM ( SELECT id FROM config_info ORDER BY id LIMIT ?,? ) "
|
||||
+ " g, config_info t WHERE g.id = t.id ";
|
||||
+ " FROM ( SELECT id FROM config_info ORDER BY id LIMIT " + context.getStartRow() + ","
|
||||
+ context.getPageSize() + " )" + " g, config_info t WHERE g.id = t.id ";
|
||||
return new MapperResult(sql, Collections.emptyList());
|
||||
}
|
||||
|
||||
|
@ -143,8 +143,8 @@ public class ConfigInfoMapperByMySqlTest {
|
||||
public void testFindAllConfigInfoBaseFetchRows() {
|
||||
MapperResult mapperResult = configInfoMapperByMySql.findAllConfigInfoBaseFetchRows(context);
|
||||
Assert.assertEquals(mapperResult.getSql(),
|
||||
"SELECT t.id,data_id,group_id,content,md5 FROM ( SELECT id FROM config_info ORDER BY id LIMIT ?,?"
|
||||
+ " ) g, config_info t WHERE g.id = t.id ");
|
||||
"SELECT t.id,data_id,group_id,content,md5 FROM ( SELECT id FROM config_info ORDER BY id LIMIT " + context.getStartRow() + ","
|
||||
+ context.getPageSize() + " ) g, config_info t WHERE g.id = t.id ");
|
||||
Assert.assertArrayEquals(mapperResult.getParamList().toArray(), emptyObjs);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user