diff --git a/yudao-module-farm/src/main/java/cn/iocoder/yudao/module/farm/dal/dataobject/farmingrecordinput/FarmingRecordInputDO.java b/yudao-module-farm/src/main/java/cn/iocoder/yudao/module/farm/dal/dataobject/farmingrecordinput/FarmingRecordInputDO.java
index 4ed1bbfb..a47d3dc1 100644
--- a/yudao-module-farm/src/main/java/cn/iocoder/yudao/module/farm/dal/dataobject/farmingrecordinput/FarmingRecordInputDO.java
+++ b/yudao-module-farm/src/main/java/cn/iocoder/yudao/module/farm/dal/dataobject/farmingrecordinput/FarmingRecordInputDO.java
@@ -68,6 +68,7 @@ public class FarmingRecordInputDO extends BaseDO {
/**
* 用法
*/
+ @TableField(value = "`usage`")
private String usage;
/**
* 逻辑删除标识符
diff --git a/yudao-module-farm/src/main/java/cn/iocoder/yudao/module/farm/dal/dataobject/inputlibrary/InputLibraryDO.java b/yudao-module-farm/src/main/java/cn/iocoder/yudao/module/farm/dal/dataobject/inputlibrary/InputLibraryDO.java
index 80a0389d..40f39b75 100644
--- a/yudao-module-farm/src/main/java/cn/iocoder/yudao/module/farm/dal/dataobject/inputlibrary/InputLibraryDO.java
+++ b/yudao-module-farm/src/main/java/cn/iocoder/yudao/module/farm/dal/dataobject/inputlibrary/InputLibraryDO.java
@@ -77,6 +77,7 @@ public class InputLibraryDO extends BaseDO {
/**
* 防治对象及使用方法
*/
+ @TableField(value = "`usage`")
private String usage;
/**
* 0=启用,1=停用
diff --git a/yudao-module-farm/src/main/java/cn/iocoder/yudao/module/farm/dal/dataobject/modelfarmingoperationinput/ModelFarmingOperationInputDO.java b/yudao-module-farm/src/main/java/cn/iocoder/yudao/module/farm/dal/dataobject/modelfarmingoperationinput/ModelFarmingOperationInputDO.java
index 5d429cbc..46dbe198 100644
--- a/yudao-module-farm/src/main/java/cn/iocoder/yudao/module/farm/dal/dataobject/modelfarmingoperationinput/ModelFarmingOperationInputDO.java
+++ b/yudao-module-farm/src/main/java/cn/iocoder/yudao/module/farm/dal/dataobject/modelfarmingoperationinput/ModelFarmingOperationInputDO.java
@@ -51,6 +51,7 @@ public class ModelFarmingOperationInputDO extends BaseDO {
/**
* 用法
*/
+ @TableField(value = "`usage`")
private String usage;
/**
* 基地id
diff --git a/yudao-module-farm/src/main/java/cn/iocoder/yudao/module/farm/service/disasterdata/DisasterDataServiceImpl.java b/yudao-module-farm/src/main/java/cn/iocoder/yudao/module/farm/service/disasterdata/DisasterDataServiceImpl.java
index bf75352c..d40340d2 100644
--- a/yudao-module-farm/src/main/java/cn/iocoder/yudao/module/farm/service/disasterdata/DisasterDataServiceImpl.java
+++ b/yudao-module-farm/src/main/java/cn/iocoder/yudao/module/farm/service/disasterdata/DisasterDataServiceImpl.java
@@ -1,23 +1,21 @@
package cn.iocoder.yudao.module.farm.service.disasterdata;
import cn.hutool.core.util.IdUtil;
-import cn.iocoder.yudao.module.farm.controller.admin.dict.vo.sys.SysDictReqVO;
+import cn.iocoder.yudao.framework.common.pojo.PageResult;
+import cn.iocoder.yudao.framework.common.util.object.BeanUtils;
import cn.iocoder.yudao.module.farm.controller.admin.disasterdata.vo.DisasterDataPageReqVO;
import cn.iocoder.yudao.module.farm.controller.admin.disasterdata.vo.DisasterDataSaveReqVO;
+import cn.iocoder.yudao.module.farm.dal.dataobject.disasterdata.DisasterDataDO;
+import cn.iocoder.yudao.module.farm.dal.mysql.disasterdata.DisasterDataMapper;
import cn.iocoder.yudao.module.farm.dal.mysql.sysDict.SysDictDO;
import cn.iocoder.yudao.module.farm.dal.mysql.sysDict.SysDictMapper;
import cn.iocoder.yudao.module.farm.enums.CommonConstants;
-import org.springframework.stereotype.Service;
+import cn.iocoder.yudao.module.farm.framework.util.ImageCollectionUtil;
import jakarta.annotation.Resource;
+import org.springframework.stereotype.Service;
import org.springframework.validation.annotation.Validated;
-import cn.iocoder.yudao.module.farm.dal.dataobject.disasterdata.DisasterDataDO;
-import cn.iocoder.yudao.framework.common.pojo.PageResult;
-import cn.iocoder.yudao.framework.common.util.object.BeanUtils;
-
-import cn.iocoder.yudao.module.farm.dal.mysql.disasterdata.DisasterDataMapper;
-import cn.iocoder.yudao.module.farm.framework.util.ImageCollectionUtil;
-
+import java.time.LocalDateTime;
import java.util.List;
import java.util.Map;
import java.util.stream.Collectors;
@@ -43,7 +41,7 @@ public class DisasterDataServiceImpl implements DisasterDataService {
@Override
public String createDisasterData(DisasterDataSaveReqVO createReqVO) {
- getLoginUser();
+
// 插入
DisasterDataDO disasterData = BeanUtils.toBean(createReqVO, DisasterDataDO.class);
// 将图片集合转换为数据库存储的字符串,仅当前端传了列表时进行转换
@@ -51,6 +49,8 @@ public class DisasterDataServiceImpl implements DisasterDataService {
disasterData.setImgUrl(ImageCollectionUtil.toDatabaseString(disasterData.getImageList()));
}
disasterData.setId(IdUtil.fastUUID());
+ disasterData.setCreateTime(LocalDateTime.now());
+ disasterData.setCreator(getLoginUser().getId().toString());
disasterDataMapper.insert(disasterData);
// 返回
@@ -67,6 +67,8 @@ public class DisasterDataServiceImpl implements DisasterDataService {
if (updateObj.getImageList() != null) {
updateObj.setImgUrl(ImageCollectionUtil.toDatabaseString(updateObj.getImageList()));
}
+ updateObj.setUpdater(getLoginUser().getId().toString());
+ updateObj.setUpdateTime(LocalDateTime.now());
disasterDataMapper.updateById(updateObj);
}
@@ -133,7 +135,7 @@ public class DisasterDataServiceImpl implements DisasterDataService {
long total = disasterDataMapper.selectDisasterDataCount(reqVO);
- return new PageResult<>(list,total);
+ return new PageResult<>(list, total);
}
}
\ No newline at end of file
diff --git a/yudao-module-farm/src/main/resources/mapper/SysDictMapper.xml b/yudao-module-farm/src/main/resources/mapper/SysDictMapper.xml
index d2142842..e0ef40a2 100644
--- a/yudao-module-farm/src/main/resources/mapper/SysDictMapper.xml
+++ b/yudao-module-farm/src/main/resources/mapper/SysDictMapper.xml
@@ -118,9 +118,7 @@
AND status = #{status}
-
- AND deleted = #{deleted}
-
+ AND deleted = 0
diff --git a/yudao-module-farm/src/main/resources/mapper/baseinfo/BaseInfoMapper.xml b/yudao-module-farm/src/main/resources/mapper/baseinfo/BaseInfoMapper.xml
index c32aa53c..dab7e11c 100644
--- a/yudao-module-farm/src/main/resources/mapper/baseinfo/BaseInfoMapper.xml
+++ b/yudao-module-farm/src/main/resources/mapper/baseinfo/BaseInfoMapper.xml
@@ -13,5 +13,6 @@
select count(*)
from farm_base_info
where tenant_id = #{tenantId}
+ and deleted = 0
\ No newline at end of file
diff --git a/yudao-module-farm/src/main/resources/mapper/farmingtypemaintenance/FarmingTypeMaintenanceMapper.xml b/yudao-module-farm/src/main/resources/mapper/farmingtypemaintenance/FarmingTypeMaintenanceMapper.xml
index 7e5e4e1a..c143f57a 100644
--- a/yudao-module-farm/src/main/resources/mapper/farmingtypemaintenance/FarmingTypeMaintenanceMapper.xml
+++ b/yudao-module-farm/src/main/resources/mapper/farmingtypemaintenance/FarmingTypeMaintenanceMapper.xml
@@ -44,9 +44,7 @@
AND t.use_status = #{req.useStatus}
-
- AND t.deleted = #{req.deleted}
-
+ AND t.deleted = 0
diff --git a/yudao-module-farm/src/main/resources/mapper/modelcycle/ModelCycleMapper.xml b/yudao-module-farm/src/main/resources/mapper/modelcycle/ModelCycleMapper.xml
index 63ec5d15..a606e5ab 100644
--- a/yudao-module-farm/src/main/resources/mapper/modelcycle/ModelCycleMapper.xml
+++ b/yudao-module-farm/src/main/resources/mapper/modelcycle/ModelCycleMapper.xml
@@ -14,5 +14,6 @@
select *
from farm_model_cycle
where model_id = #{modelId}
+ and deleted = 0
\ No newline at end of file
diff --git a/yudao-module-farm/src/main/resources/mapper/modelenvironmentindex/ModelEnvironmentIndexMapper.xml b/yudao-module-farm/src/main/resources/mapper/modelenvironmentindex/ModelEnvironmentIndexMapper.xml
index 87d97b1f..2a25ced1 100644
--- a/yudao-module-farm/src/main/resources/mapper/modelenvironmentindex/ModelEnvironmentIndexMapper.xml
+++ b/yudao-module-farm/src/main/resources/mapper/modelenvironmentindex/ModelEnvironmentIndexMapper.xml
@@ -14,5 +14,6 @@
select *
from farm_model_environment_index
where cycle_id = #{cycleId}
+ and deleted = 0
\ No newline at end of file
diff --git a/yudao-module-farm/src/main/resources/mapper/modelfarmingoperation/ModelFarmingOperationMapper.xml b/yudao-module-farm/src/main/resources/mapper/modelfarmingoperation/ModelFarmingOperationMapper.xml
index ca7efca7..2ca34065 100644
--- a/yudao-module-farm/src/main/resources/mapper/modelfarmingoperation/ModelFarmingOperationMapper.xml
+++ b/yudao-module-farm/src/main/resources/mapper/modelfarmingoperation/ModelFarmingOperationMapper.xml
@@ -11,6 +11,9 @@
\ No newline at end of file
diff --git a/yudao-module-farm/src/main/resources/mapper/modelfarmingoperationinput/ModelFarmingOperationInputMapper.xml b/yudao-module-farm/src/main/resources/mapper/modelfarmingoperationinput/ModelFarmingOperationInputMapper.xml
index a54c8a3b..3d2b1eb5 100644
--- a/yudao-module-farm/src/main/resources/mapper/modelfarmingoperationinput/ModelFarmingOperationInputMapper.xml
+++ b/yudao-module-farm/src/main/resources/mapper/modelfarmingoperationinput/ModelFarmingOperationInputMapper.xml
@@ -14,5 +14,6 @@
select *
from farm_model_farming_operation_input
where farming_id = #{farmingId}
+ and deleted = 0
\ No newline at end of file
diff --git a/yudao-module-farm/src/main/resources/mapper/modelpestdiseaseweed/ModelPestDiseaseWeedMapper.xml b/yudao-module-farm/src/main/resources/mapper/modelpestdiseaseweed/ModelPestDiseaseWeedMapper.xml
index 9a886599..9fe341a0 100644
--- a/yudao-module-farm/src/main/resources/mapper/modelpestdiseaseweed/ModelPestDiseaseWeedMapper.xml
+++ b/yudao-module-farm/src/main/resources/mapper/modelpestdiseaseweed/ModelPestDiseaseWeedMapper.xml
@@ -14,5 +14,6 @@
select *
from farm_model_pest_disease_weed
where cycle_id = #{cycleId}
+ and deleted = 0
\ No newline at end of file
diff --git a/yudao-module-farm/src/main/resources/mapper/modelweatherdisaster/ModelWeatherDisasterMapper.xml b/yudao-module-farm/src/main/resources/mapper/modelweatherdisaster/ModelWeatherDisasterMapper.xml
index 8c72997b..72871b62 100644
--- a/yudao-module-farm/src/main/resources/mapper/modelweatherdisaster/ModelWeatherDisasterMapper.xml
+++ b/yudao-module-farm/src/main/resources/mapper/modelweatherdisaster/ModelWeatherDisasterMapper.xml
@@ -14,5 +14,6 @@
select *
from farm_model_weather_disaster
where cycle_id = #{cycleId}
+ and deleted = 0
\ No newline at end of file
diff --git a/yudao-module-farm/src/main/resources/mapper/personnelmanagement/PersonnelManagementMapper.xml b/yudao-module-farm/src/main/resources/mapper/personnelmanagement/PersonnelManagementMapper.xml
index a97aa9d7..2e53d0a0 100644
--- a/yudao-module-farm/src/main/resources/mapper/personnelmanagement/PersonnelManagementMapper.xml
+++ b/yudao-module-farm/src/main/resources/mapper/personnelmanagement/PersonnelManagementMapper.xml
@@ -14,5 +14,6 @@
from farm_personnel_management
where tenant_id = #{tenantId}
and account_status = 0
+ and deleted = 0
\ No newline at end of file
diff --git a/yudao-module-farm/src/main/resources/mapper/productionplan/ProductionPlanMapper.xml b/yudao-module-farm/src/main/resources/mapper/productionplan/ProductionPlanMapper.xml
index 8a2789a1..e63e430c 100644
--- a/yudao-module-farm/src/main/resources/mapper/productionplan/ProductionPlanMapper.xml
+++ b/yudao-module-farm/src/main/resources/mapper/productionplan/ProductionPlanMapper.xml
@@ -13,10 +13,12 @@
select count(plant_species_code)
from farm_production_plan
where tenant_id = #{tenantId}
+ and deleted = 0
\ No newline at end of file
diff --git a/yudao-module-farm/src/main/resources/mapper/speciesclassifylibrary/SpeciesClassifyLibraryMapper.xml b/yudao-module-farm/src/main/resources/mapper/speciesclassifylibrary/SpeciesClassifyLibraryMapper.xml
index 2437c665..cc1dfaf2 100644
--- a/yudao-module-farm/src/main/resources/mapper/speciesclassifylibrary/SpeciesClassifyLibraryMapper.xml
+++ b/yudao-module-farm/src/main/resources/mapper/speciesclassifylibrary/SpeciesClassifyLibraryMapper.xml
@@ -46,6 +46,7 @@
AND t.use_status = #{req.useStatus}
+ AND t.deleted = 0