diff --git a/AutoSprout-admin/pom.xml b/AutoSprout-admin/pom.xml
index 66c1e2e..c454171 100644
--- a/AutoSprout-admin/pom.xml
+++ b/AutoSprout-admin/pom.xml
@@ -86,17 +86,18 @@
-
- org.apache.maven.plugins
- maven-war-plugin
- 3.1.0
+
+ org.apache.maven.plugins
+ maven-war-plugin
+ 3.1.0
false
${project.artifactId}
-
-
+
+
- ${project.artifactId}
+
+ autosprout-admin
-
\ No newline at end of file
+
diff --git a/AutoSprout-watering/src/main/java/com/ruoyi/device/controller/AsPlantController.java b/AutoSprout-watering/src/main/java/com/ruoyi/device/controller/AsPlantController.java
index c28a6d5..eb1f95d 100644
--- a/AutoSprout-watering/src/main/java/com/ruoyi/device/controller/AsPlantController.java
+++ b/AutoSprout-watering/src/main/java/com/ruoyi/device/controller/AsPlantController.java
@@ -23,7 +23,7 @@ import com.ruoyi.common.core.page.TableDataInfo;
/**
* 植物Controller
- *
+ *
* @author qiuzhenzhao
* @date 2023-11-14
*/
@@ -62,7 +62,7 @@ public class AsPlantController extends BaseController
/**
* 获取植物详细信息
*/
- @PreAuthorize("@ss.hasPermi('plant:plant:query')")
+// @PreAuthorize("@ss.hasPermi('plant:plant:query')")
@GetMapping(value = "/{plantId}")
public AjaxResult getInfo(@PathVariable("plantId") Long plantId)
{
diff --git a/AutoSprout-watering/src/main/java/com/ruoyi/device/domain/AsPlant.java b/AutoSprout-watering/src/main/java/com/ruoyi/device/domain/AsPlant.java
index cc8e5fd..01ec012 100644
--- a/AutoSprout-watering/src/main/java/com/ruoyi/device/domain/AsPlant.java
+++ b/AutoSprout-watering/src/main/java/com/ruoyi/device/domain/AsPlant.java
@@ -7,7 +7,7 @@ import com.ruoyi.common.core.domain.BaseEntity;
/**
* 植物对象 as_plant
- *
+ *
* @author qiuzhenzhao
* @date 2023-11-14
*/
@@ -52,4 +52,19 @@ public class AsPlant extends BaseEntity
@Excel(name = "介绍")
private String introduce;
+ /** 难易程度 */
+ @Excel(name = "难易程度")
+ private String complexity;
+
+ /** 功能 */
+ @Excel(name = "功能")
+ private String func;
+
+ /** 适合的空间 */
+ @Excel(name = "适合的空间")
+ private String fitSpace;
+
+ /** 养护重点 */
+ @Excel(name = "养护重点")
+ private String maintenanceFocus;
}
diff --git a/AutoSprout-watering/src/main/java/com/ruoyi/device/service/impl/AsArticleServiceImpl.java b/AutoSprout-watering/src/main/java/com/ruoyi/device/service/impl/AsArticleServiceImpl.java
index 7229428..e9c5f15 100644
--- a/AutoSprout-watering/src/main/java/com/ruoyi/device/service/impl/AsArticleServiceImpl.java
+++ b/AutoSprout-watering/src/main/java/com/ruoyi/device/service/impl/AsArticleServiceImpl.java
@@ -5,6 +5,7 @@ import com.ruoyi.device.domain.AsArticle;
import com.ruoyi.device.mapper.AsArticleMapper;
import com.ruoyi.device.service.IAsArticleService;
import com.ruoyi.system.mapper.SysDictDataMapper;
+import org.apache.commons.lang3.ObjectUtils;
import org.springframework.stereotype.Service;
import javax.annotation.Resource;
@@ -35,14 +36,16 @@ public class AsArticleServiceImpl implements IAsArticleService
public AsArticle selectAsArticleByArticleId(Long articleId)
{
AsArticle asArticle = asArticleMapper.selectAsArticleByArticleId(articleId);
- asArticle.setFormatCreateTime(DateUtils.getYYYY_MM_DD(asArticle.getCreateTime()));
+ if(ObjectUtils.isNotEmpty(asArticle)){
+ asArticle.setFormatCreateTime(DateUtils.getYYYY_MM_DD(asArticle.getCreateTime()));
+ }
return asArticle;
}
/**
* 查询文章列表
*
- * @param AsArticle 文章
+ * @param asArticle 文章
* @return 文章
*/
@Override
@@ -58,7 +61,7 @@ public class AsArticleServiceImpl implements IAsArticleService
/**
* 新增文章
*
- * @param AsArticle 文章
+ * @param asArticle 文章
* @return 结果
*/
@Override
@@ -71,7 +74,7 @@ public class AsArticleServiceImpl implements IAsArticleService
/**
* 修改文章
*
- * @param AsArticle 文章
+ * @param asArticle 文章
* @return 结果
*/
@Override
diff --git a/AutoSprout-watering/src/main/resources/mapper/plant/AsPlantMapper.xml b/AutoSprout-watering/src/main/resources/mapper/plant/AsPlantMapper.xml
index 838a8e2..2920211 100644
--- a/AutoSprout-watering/src/main/resources/mapper/plant/AsPlantMapper.xml
+++ b/AutoSprout-watering/src/main/resources/mapper/plant/AsPlantMapper.xml
@@ -3,7 +3,7 @@
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
-
+
@@ -18,15 +18,19 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
+
+
+
+
- select plant_id, plant_name, classify_id, classify_name, picture, watering_cycle, beam, sprout_cycle, create_by, create_time, update_by, update_time, introduce from as_plant
+ select plant_id, plant_name, classify_id, classify_name, picture, watering_cycle, beam, sprout_cycle, create_by, create_time, update_by, update_time, introduce,complexity,func,fit_space,maintenance_focus from as_plant
-
+
-
+
insert into as_plant
@@ -55,6 +59,10 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
update_by,
update_time,
introduce,
+ complexity,
+ func,
+ fit_space,
+ maintenance_focus,
#{plantName},
@@ -69,6 +77,10 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
#{updateBy},
#{updateTime},
#{introduce},
+ #{complexity},
+ #{func},
+ #{fitSpace},
+ #{maintenanceFocus},
@@ -87,6 +99,10 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
update_by = #{updateBy},
update_time = #{updateTime},
introduce = #{introduce},
+ complexity = #{complexity},
+ func = #{func},
+ fit_space = #{fitSpace},
+ maintenance_focus = #{maintenanceFocus},
where plant_id = #{plantId}
@@ -96,9 +112,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
- delete from as_plant where plant_id in
+ delete from as_plant where plant_id in
#{plantId}
-
\ No newline at end of file
+