|
|
@@ -16,6 +16,7 @@
|
|
|
*/
|
|
|
package org.springblade.bank.postchange.controller;
|
|
|
|
|
|
+import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
|
|
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
|
|
import io.swagger.annotations.Api;
|
|
|
import io.swagger.annotations.ApiOperation;
|
|
|
@@ -203,16 +204,7 @@ public class PostChangeController extends BladeController {
|
|
|
@ApiOperationSupport(order = 8)
|
|
|
@ApiOperation(value = "获取最新一条记录", notes = "")
|
|
|
public R getLastRecord() {
|
|
|
- Query query = new Query();
|
|
|
- query.setSize(1);
|
|
|
- query.setCurrent(1);
|
|
|
- IPage<PostChangeVO> pages = postChangeService.selectPostChangePage(Condition.getPage(query), new PostChangeVO());
|
|
|
- List<PostChangeVO> records = pages.getRecords();
|
|
|
- if (records.size() > 0){
|
|
|
- return R.data(records.get(0));
|
|
|
- }else{
|
|
|
- return R.data(null);
|
|
|
- }
|
|
|
+ return R.data( postChangeService.getLastRecord());
|
|
|
}
|
|
|
|
|
|
|