用mybatisplus query wrapper帮我实现该sql语句:SELECT DISTINCT (`ota_os`), `act_push_date`, `car_model_code` FROM `dim_ota_os_bss_related_hf` WHERE `car_model_code` = 'DC1E' and `act_push_date` IS NOT NULL AND `car_model_code` is NOT null ORDER BY act_push_date ASC;
时间: 2023-08-18 15:06:30 浏览: 98
从mybatis日志中解析出可执行的sql语句
使用MyBatis Plus QueryWrapper,您可以像这样实现您的SQL查询:
```java
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.toolkit.StringUtils;
// 创建QueryWrapper对象
QueryWrapper<DimOtaOsBssRelatedHf> queryWrapper = new QueryWrapper<>();
queryWrapper.select("DISTINCT ota_os", "act_push_date", "car_model_code")
.eq("car_model_code", "DC1E")
.isNotNull("act_push_date")
.isNotNull("car_model_code")
.orderByAsc("act_push_date");
// 执行查询
List<DimOtaOsBssRelatedHf> result = dimOtaOsBssRelatedHfMapper.selectList(queryWrapper);
```
请确保根据您的业务情况适当替换`DimOtaOsBssRelatedHf`和`dimOtaOsBssRelatedHfMapper`,并在您的实体类中添加相应的注解和字段。
阅读全文