|
@@ -1,6 +1,7 @@
|
|
|
package com.huimv.management.service.impl;
|
|
|
|
|
|
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
|
|
+import com.baomidou.mybatisplus.core.toolkit.StringUtils;
|
|
|
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
|
|
|
import com.huimv.management.entity.EmployeeEntity;
|
|
|
import com.huimv.management.entity.EmployeeEntity;
|
|
@@ -39,6 +40,9 @@ public class EmployeeServiceImpl extends ServiceImpl<EmployeeDao, EmployeeEntity
|
|
|
public PageUtils queryPage(Map<String, Object> params) {
|
|
|
|
|
|
LambdaQueryWrapper<EmployeeEntity> lambdaQuery = Wrappers.lambdaQuery();
|
|
|
+ String farmId = (String)params.get("formFarmId");
|
|
|
+ lambdaQuery.eq(StringUtils.isNotBlank(farmId),EmployeeEntity::getFarmId,farmId);
|
|
|
+
|
|
|
String keywords = (String) params.get("keywords");
|
|
|
//没有参数
|
|
|
if (keywords == null || keywords.equals("")){
|
|
@@ -59,8 +63,12 @@ public class EmployeeServiceImpl extends ServiceImpl<EmployeeDao, EmployeeEntity
|
|
|
}
|
|
|
|
|
|
@Override
|
|
|
- public List findAll() {
|
|
|
+ public List findAll(Integer formFarmId) {
|
|
|
LambdaQueryWrapper<EmployeeEntity> lambdaQuery = Wrappers.lambdaQuery();
|
|
|
+ if (formFarmId != null){
|
|
|
+ lambdaQuery.eq(EmployeeEntity::getFarmId,formFarmId);
|
|
|
+ }
|
|
|
+
|
|
|
List<EmployeeEntity> pastureEntities = employeeDao.selectList(lambdaQuery);
|
|
|
return pastureEntities;
|
|
|
}
|