[重大更新] 增加mybatis-plus扩展工具 大幅简化整体业务代码写法 优雅舒适

This commit is contained in:
疯狂的狮子Li
2026-05-15 11:39:20 +08:00
parent fdf9e4ae39
commit 7a5d6b4723
44 changed files with 1535 additions and 483 deletions
@@ -1,11 +1,10 @@
package org.dromara.demo.controller;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import lombok.RequiredArgsConstructor;
import org.dromara.common.core.domain.R;
import org.dromara.common.web.core.BaseController;
import org.dromara.demo.domain.TestDemo;
import org.dromara.demo.mapper.TestDemoMapper;
import lombok.RequiredArgsConstructor;
import org.springframework.web.bind.annotation.DeleteMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
@@ -83,8 +82,9 @@ public class TestBatchController extends BaseController {
@DeleteMapping()
// @DS("slave")
public R<Void> remove() {
return toAjax(testDemoMapper.delete(new LambdaQueryWrapper<TestDemo>()
.eq(TestDemo::getOrderNum, -1L)));
return toAjax(testDemoMapper.lambda()
.eq(TestDemo::getOrderNum, -1L)
.deleteCount());
}
}