Skip to content

Commit

Permalink
fix:add param for ConfigInfoMapperByMySql#findAllConfigInfoBaseFetchR…
Browse files Browse the repository at this point in the history
…ows (#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>
  • Loading branch information
Tangmingyao1998 and publicize-y authored Apr 2, 2024
1 parent 19a857b commit facf4c8
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -85,8 +85,8 @@ public MapperResult findAllConfigKey(MapperContext context) {
@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());
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -143,8 +143,8 @@ public void testFindAllConfigKey() {
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);
}

Expand Down

0 comments on commit facf4c8

Please sign in to comment.