【fix】指定oes.*查询,预防同名字段取值问题

This commit is contained in:
nixj 2024-07-02 17:08:23 +08:00
parent f8f99479e9
commit 6f172c0a3b
1 changed files with 1 additions and 1 deletions

View File

@ -75,7 +75,7 @@ public class ManageOrderDetailRepositoryImpl implements ManageOrderDetailReposit
params.put("offset", pageRequest.getOffset()); params.put("offset", pageRequest.getOffset());
params.put("limit", pageRequest.getPageSize()); params.put("limit", pageRequest.getPageSize());
String pagedQuery ="SELECT * FROM order_exceed_standard oes "+ query + " ORDER BY oes.order_date DESC LIMIT :limit OFFSET :offset"; String pagedQuery ="SELECT oes.* FROM order_exceed_standard oes "+ query + " ORDER BY oes.order_date DESC LIMIT :limit OFFSET :offset";
List<OrderExceedStandard> results = jdbcTemplate.query(pagedQuery, params, BeanPropertyRowMapper.newInstance(OrderExceedStandard.class)); List<OrderExceedStandard> results = jdbcTemplate.query(pagedQuery, params, BeanPropertyRowMapper.newInstance(OrderExceedStandard.class));
String countSql="SELECT COUNT(*) AS count FROM order_exceed_standard oes " + query ; String countSql="SELECT COUNT(*) AS count FROM order_exceed_standard oes " + query ;