SELECT * FROM WHERE RECEIVE_FLAG = 1 AND REMOVE_FLAG = 0 AND CANCEL_FLAG = 0 用Querywrapper方式怎么写
时间: 2024-02-20 13:57:37 浏览: 57
您可以使用以下代码来使用QueryWrapper实现您的SQL语句:
```
QueryWrapper<Entity> queryWrapper = new QueryWrapper<>();
queryWrapper.eq("RECEIVE_FLAG", 1)
.eq("REMOVE_FLAG", 0)
.eq("CANCEL_FLAG", 0);
List<Entity> entityList = entityMapper.selectList(queryWrapper);
```
其中,Entity是您的实体类,entityMapper是您的Mapper接口。这段代码将会查询符合条件的实体列表并返回给您。
相关问题
SELECT* from biz_tt_finance_category where organize_id=1459090536851894273 and del_flag=0 and finance_type=pay;这个SQL语句错误嘛
这个 SQL 语句有一个错误,应该将 `pay` 加上单引号,即 `finance_type='pay'`。正确的 SQL 语句为:
```
SELECT * FROM biz_tt_finance_category WHERE organize_id=1459090536851894273 AND del_flag=0 AND finance_type='pay';
```
select distinct admin_sn from sys_dept where status = '0' and del_flag = '0' start with dept_id = (select dept_id from ( select * from sys_dept where status = '0' and del_flag = '0' start with dept_id = '100' CONNECT BY PRIOR parent_id = dept_id and dept_id != parent_id) where parent_id = '0') connect by prior dept_id = parent_id and dept_id != parent_id 改成mysql写法
SELECT DISTINCT admin_sn FROM sys_dept WHERE status = 0 AND del_flag = 0 START WITH dept_id = (SELECT dept_id FROM (SELECT * FROM sys_dept WHERE status = 0 AND del_flag = 0 START WITH dept_id = 100 CONNECT BY PRIOR parent_id = dept_id AND dept_id != parent_id) WHERE parent_id = 0) CONNECT BY PRIOR dept_id = parent_id AND dept_id != parent_id;
阅读全文