From b042d6a5ae1959ad79b489e1d0b01c057b68d5f6 Mon Sep 17 00:00:00 2001
From: liurunyu <lry9898@163.com>
Date: 星期四, 19 六月 2025 10:45:44 +0800
Subject: [PATCH] 水肥机、墒情站、气象站增、改、查、删功能实现
---
pipIrr-platform/pipIrr-global/src/main/resources/mapper/PrStManureMapper.xml | 5
pipIrr-platform/pipIrr-web/pipIrr-web-project/src/main/java/com/dy/pipIrrProject/mqtt/manure/ManureCtrl.java | 164 ++++++++++
pipIrr-platform/pipIrr-global/src/main/resources/mapper/PrStSoilMapper.xml | 5
pipIrr-platform/pipIrr-global/src/main/java/com/dy/pipIrrGlobal/daoPr/PrStSoilMapper.java | 7
pipIrr-platform/pipIrr-global/src/main/java/com/dy/pipIrrGlobal/daoPr/PrStWeatherMapper.java | 7
pipIrr-platform/pipIrr-web/pipIrr-web-project/src/main/java/com/dy/pipIrrProject/mqtt/manure/ManureDto.java | 55 +++
pipIrr-platform/pipIrr-web/pipIrr-web-project/src/main/java/com/dy/pipIrrProject/mqtt/weather/WeatherSv.java | 41 ++
pipIrr-platform/pipIrr-web/pipIrr-web-project/src/main/java/com/dy/pipIrrProject/mqtt/manure/ManureSv.java | 40 ++
/dev/null | 9
pipIrr-platform/pipIrr-web/pipIrr-web-project/src/main/java/com/dy/pipIrrProject/mqtt/soil/SoilCtrl.java | 171 +++++++++++
pipIrr-platform/pipIrr-web/pipIrr-web-project/src/main/java/com/dy/pipIrrProject/mqtt/soil/SoilDto.java | 64 ++++
pipIrr-platform/pipIrr-web/pipIrr-web-project/src/main/java/com/dy/pipIrrProject/mqtt/weather/WeatherDto.java | 64 ++++
pipIrr-platform/pipIrr-web/pipIrr-web-project/src/main/java/com/dy/pipIrrProject/mqtt/soil/SoilSv.java | 41 ++
pipIrr-platform/pipIrr-web/pipIrr-web-project/src/main/java/com/dy/pipIrrProject/mqtt/weather/WeatherCtrl.java | 171 +++++++++++
pipIrr-platform/pipIrr-global/src/main/java/com/dy/pipIrrGlobal/daoPr/PrStManureMapper.java | 7
pipIrr-platform/pipIrr-global/src/main/resources/mapper/PrStWeatherMapper.xml | 5
16 files changed, 846 insertions(+), 10 deletions(-)
diff --git a/pipIrr-platform/pipIrr-global/src/main/java/com/dy/pipIrrGlobal/daoPr/PrStManureMapper.java b/pipIrr-platform/pipIrr-global/src/main/java/com/dy/pipIrrGlobal/daoPr/PrStManureMapper.java
index f43a8b7..62a2163 100644
--- a/pipIrr-platform/pipIrr-global/src/main/java/com/dy/pipIrrGlobal/daoPr/PrStManureMapper.java
+++ b/pipIrr-platform/pipIrr-global/src/main/java/com/dy/pipIrrGlobal/daoPr/PrStManureMapper.java
@@ -16,6 +16,13 @@
public interface PrStManureMapper extends BaseMapper<PrStManure> {
int deleteByPrimaryKey(Long id);
+ /**
+ * 閫昏緫鍒犻櫎
+ * @param id primaryKey
+ * @return update count
+ */
+ int deleteLogicById(Long id);
+
int insert(PrStManure record);
int insertSelective(PrStManure record);
diff --git a/pipIrr-platform/pipIrr-global/src/main/java/com/dy/pipIrrGlobal/daoPr/PrStSoilMapper.java b/pipIrr-platform/pipIrr-global/src/main/java/com/dy/pipIrrGlobal/daoPr/PrStSoilMapper.java
index da92847..63e744b 100644
--- a/pipIrr-platform/pipIrr-global/src/main/java/com/dy/pipIrrGlobal/daoPr/PrStSoilMapper.java
+++ b/pipIrr-platform/pipIrr-global/src/main/java/com/dy/pipIrrGlobal/daoPr/PrStSoilMapper.java
@@ -16,6 +16,13 @@
public interface PrStSoilMapper extends BaseMapper<PrStSoil> {
int deleteByPrimaryKey(Long id);
+ /**
+ * 閫昏緫鍒犻櫎
+ * @param id primaryKey
+ * @return update count
+ */
+ int deleteLogicById(Long id);
+
int insert(PrStSoil record);
int insertSelective(PrStSoil record);
diff --git a/pipIrr-platform/pipIrr-global/src/main/java/com/dy/pipIrrGlobal/daoPr/PrStWeatherMapper.java b/pipIrr-platform/pipIrr-global/src/main/java/com/dy/pipIrrGlobal/daoPr/PrStWeatherMapper.java
index 275adf0..0a66151 100644
--- a/pipIrr-platform/pipIrr-global/src/main/java/com/dy/pipIrrGlobal/daoPr/PrStWeatherMapper.java
+++ b/pipIrr-platform/pipIrr-global/src/main/java/com/dy/pipIrrGlobal/daoPr/PrStWeatherMapper.java
@@ -16,6 +16,13 @@
public interface PrStWeatherMapper extends BaseMapper<PrStWeather> {
int deleteByPrimaryKey(Long id);
+ /**
+ * 閫昏緫鍒犻櫎
+ * @param id primaryKey
+ * @return update count
+ */
+ int deleteLogicById(Long id);
+
int insert(PrStWeather record);
int insertSelective(PrStWeather record);
diff --git a/pipIrr-platform/pipIrr-global/src/main/resources/mapper/PrStManureMapper.xml b/pipIrr-platform/pipIrr-global/src/main/resources/mapper/PrStManureMapper.xml
index 215196e..c16fe8a 100644
--- a/pipIrr-platform/pipIrr-global/src/main/resources/mapper/PrStManureMapper.xml
+++ b/pipIrr-platform/pipIrr-global/src/main/resources/mapper/PrStManureMapper.xml
@@ -43,6 +43,11 @@
delete from pr_st_manure
where id = #{id,jdbcType=BIGINT}
</delete>
+ <delete id="deleteLogicById" parameterType="java.lang.Long">
+ <!--@mbg.generated-->
+ update pr_st_manure set deleted = 1
+ where id = #{id,jdbcType=BIGINT}
+ </delete>
<insert id="insert" parameterType="com.dy.pipIrrGlobal.pojoPr.PrStManure">
<!--@mbg.generated-->
insert into pr_st_manure (id, `no`, `name`, lng,
diff --git a/pipIrr-platform/pipIrr-global/src/main/resources/mapper/PrStSoilMapper.xml b/pipIrr-platform/pipIrr-global/src/main/resources/mapper/PrStSoilMapper.xml
index 5e058e8..682efa1 100644
--- a/pipIrr-platform/pipIrr-global/src/main/resources/mapper/PrStSoilMapper.xml
+++ b/pipIrr-platform/pipIrr-global/src/main/resources/mapper/PrStSoilMapper.xml
@@ -43,6 +43,11 @@
delete from pr_st_soil
where id = #{id,jdbcType=BIGINT}
</delete>
+ <delete id="deleteLogicById" parameterType="java.lang.Long">
+ <!--@mbg.generated-->
+ update pr_st_soil set deleted = 1
+ where id = #{id,jdbcType=BIGINT}
+ </delete>
<insert id="insert" parameterType="com.dy.pipIrrGlobal.pojoPr.PrStSoil">
<!--@mbg.generated-->
insert into pr_st_soil (id, `no`, `name`, lng,
diff --git a/pipIrr-platform/pipIrr-global/src/main/resources/mapper/PrStWeatherMapper.xml b/pipIrr-platform/pipIrr-global/src/main/resources/mapper/PrStWeatherMapper.xml
index a4fdc45..e971ed2 100644
--- a/pipIrr-platform/pipIrr-global/src/main/resources/mapper/PrStWeatherMapper.xml
+++ b/pipIrr-platform/pipIrr-global/src/main/resources/mapper/PrStWeatherMapper.xml
@@ -43,6 +43,11 @@
delete from pr_st_weather
where id = #{id,jdbcType=BIGINT}
</delete>
+ <delete id="deleteLogicById" parameterType="java.lang.Long">
+ <!--@mbg.generated-->
+ update pr_st_weather set deleted = 1
+ where id = #{id,jdbcType=BIGINT}
+ </delete>
<insert id="insert" parameterType="com.dy.pipIrrGlobal.pojoPr.PrStWeather">
<!--@mbg.generated-->
insert into pr_st_weather (id, `no`, `name`, lng,
diff --git a/pipIrr-platform/pipIrr-web/pipIrr-web-project/src/main/java/com/dy/pipIrrProject/mqtt/manure/ManureCtrl.java b/pipIrr-platform/pipIrr-web/pipIrr-web-project/src/main/java/com/dy/pipIrrProject/mqtt/manure/ManureCtrl.java
index ccb4ca3..19dad05 100644
--- a/pipIrr-platform/pipIrr-web/pipIrr-web-project/src/main/java/com/dy/pipIrrProject/mqtt/manure/ManureCtrl.java
+++ b/pipIrr-platform/pipIrr-web/pipIrr-web-project/src/main/java/com/dy/pipIrrProject/mqtt/manure/ManureCtrl.java
@@ -1,9 +1,171 @@
package com.dy.pipIrrProject.mqtt.manure;
+import com.dy.common.aop.SsoAop;
+import com.dy.common.webUtil.BaseResponse;
+import com.dy.common.webUtil.BaseResponseUtils;
+import com.dy.common.webUtil.ResultCodeMsg;
+import com.dy.pipIrrGlobal.pojoPr.PrStManure;
+import io.swagger.v3.oas.annotations.Operation;
+import io.swagger.v3.oas.annotations.media.Content;
+import io.swagger.v3.oas.annotations.media.Schema;
+import io.swagger.v3.oas.annotations.responses.ApiResponse;
+import io.swagger.v3.oas.annotations.responses.ApiResponses;
+import io.swagger.v3.oas.annotations.tags.Tag;
+import jakarta.validation.Valid;
+import lombok.RequiredArgsConstructor;
+import lombok.extern.slf4j.Slf4j;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.http.MediaType;
+import org.springframework.validation.BindingResult;
+import org.springframework.web.bind.annotation.*;
+
+import java.util.Objects;
+
/**
* @Author: liurunyu
- * @Date: 2025/6/18 14:51
+ * @Date: 2025/6/19 10:41
* @Description
*/
+@Slf4j
+@Tag(name = "姘磋偉鏈虹鐞�", description = "姘磋偉鏈虹鐞�")
+@RestController
+@RequestMapping(path = "manureStation")
+@RequiredArgsConstructor
public class ManureCtrl {
+ private ManureSv sv;
+
+ @Autowired
+ private void setSv(ManureSv sv){
+ this.sv = sv ;
+ }
+
+
+ /**
+ * 寰楀埌涓�濂楁按鑲ユ満鏁版嵁
+ * @return 涓�濂楁按鑲ユ満鏁版嵁
+ */
+ @Operation(summary = "涓�濂楁按鑲ユ満", description = "寰楀埌涓�濂楁按鑲ユ満鏁版嵁")
+ @ApiResponses(value = {
+ @ApiResponse(
+ responseCode = ResultCodeMsg.RsCode.SUCCESS_CODE,
+ description = "杩斿洖涓�濂楁按鑲ユ満鏁版嵁锛圔aseResponse.content:{}锛�",
+ content = {@Content(mediaType = MediaType.APPLICATION_JSON_VALUE,
+ schema = @Schema(implementation = PrStManure.class))}
+ )
+ })
+ @GetMapping(path = "one")
+ @SsoAop()
+ public BaseResponse<PrStManure> one(Long id){
+ return BaseResponseUtils.buildSuccess(this.sv.selectById(id));
+ }
+
+ /**
+ * 淇濆瓨姘磋偉鏈�
+ * @param dto 淇濆瓨姘磋偉鏈篺orm琛ㄥ崟瀵硅薄
+ * @return 鏄惁鎴愬姛
+ */
+ @Operation(summary = "淇濆瓨姘磋偉鏈�", description = "鎻愪氦姘磋偉鏈烘暟鎹紙form琛ㄥ崟锛夛紝杩涜淇濆瓨")
+ @ApiResponses(value = {
+ @ApiResponse(
+ responseCode = ResultCodeMsg.RsCode.SUCCESS_CODE,
+ description = "鎿嶄綔缁撴灉锛歵rue锛氭垚鍔燂紝false锛氬け璐ワ紙BaseResponse.content锛�",
+ content = {@Content(mediaType = MediaType.APPLICATION_JSON_VALUE,
+ schema = @Schema(implementation = Boolean.class))}
+ )
+ })
+ @PostMapping(path = "save", consumes = MediaType.APPLICATION_JSON_VALUE)
+ @SsoAop()
+ public BaseResponse<Boolean> save(@RequestBody @Valid ManureDto dto, BindingResult bindingResult){
+ if(bindingResult != null && bindingResult.hasErrors()){
+ return BaseResponseUtils.buildFail(Objects.requireNonNull(bindingResult.getFieldError()).getDefaultMessage());
+ }
+ PrStManure po = dto.toNewPo() ;
+ po.deleted = 0 ;
+ int count;
+ try {
+ count = this.sv.save(po);
+ } catch (Exception e) {
+ log.error("淇濆瓨姘磋偉鏈哄紓甯�", e);
+ return BaseResponseUtils.buildException(e.getMessage()) ;
+ }
+ if(count <= 0){
+ return BaseResponseUtils.buildFail("鏁版嵁搴撳瓨鍌ㄥけ璐�") ;
+ }else{
+ return BaseResponseUtils.buildSuccess(true) ;
+ }
+ }
+
+ /**
+ * 缂栬緫淇敼姘磋偉鏈�
+ * @param dto 淇濆瓨姘磋偉鏈篺orm琛ㄥ崟瀵硅薄
+ * @return 鏄惁鎴愬姛
+ */
+ @Operation(summary = "缂栬緫淇敼姘磋偉鏈�", description = "鎻愪氦姘磋偉鏈烘暟鎹紙form琛ㄥ崟锛夛紝杩涜淇敼")
+ @ApiResponses(value = {
+ @ApiResponse(
+ responseCode = ResultCodeMsg.RsCode.SUCCESS_CODE,
+ description = "鎿嶄綔缁撴灉锛歵rue锛氭垚鍔燂紝false锛氬け璐ワ紙BaseResponse.content锛�",
+ content = {@Content(mediaType = MediaType.APPLICATION_JSON_VALUE,
+ schema = @Schema(implementation = Boolean.class))}
+ )
+ })
+ @PostMapping(path = "update", consumes = MediaType.APPLICATION_JSON_VALUE)
+ @SsoAop()
+ public BaseResponse<Boolean> update(@RequestBody @Valid ManureDto dto, BindingResult bindingResult){
+ if(bindingResult != null && bindingResult.hasErrors()){
+ return BaseResponseUtils.buildFail(Objects.requireNonNull(bindingResult.getFieldError()).getDefaultMessage());
+ }
+ PrStManure po = dto.toPo() ;
+ if(po.id == null){
+ return BaseResponseUtils.buildFail("鏃犳暟鎹疄浣揑D") ;
+ }
+ int count;
+ try {
+ count = this.sv.update(po);
+ } catch (Exception e) {
+ log.error("淇濆瓨姘磋偉鏈哄紓甯�", e);
+ return BaseResponseUtils.buildException(e.getMessage()) ;
+ }
+ if(count <= 0){
+ return BaseResponseUtils.buildFail("鏁版嵁搴撳瓨鍌ㄥけ璐�") ;
+ }else{
+ return BaseResponseUtils.buildSuccess(true) ;
+ }
+ }
+
+
+ /**
+ * 鍒犻櫎姘磋偉鏈�
+ * @param id 姘磋偉鏈篒D
+ * @return 鏄惁鎴愬姛
+ */
+ @Operation(summary = "鍒犻櫎姘磋偉鏈�", description = "鎻愪氦姘磋偉鏈篒D锛岃繘琛岄�昏緫鍒犻櫎")
+ @ApiResponses(value = {
+ @ApiResponse(
+ responseCode = ResultCodeMsg.RsCode.SUCCESS_CODE,
+ description = "鎿嶄綔缁撴灉锛歵rue锛氭垚鍔燂紝false锛氬け璐ワ紙BaseResponse.content锛�",
+ content = {@Content(mediaType = MediaType.APPLICATION_JSON_VALUE,
+ schema = @Schema(implementation = Boolean.class))}
+ )
+ })
+ @GetMapping(path = "delete")
+ @SsoAop()
+ public BaseResponse<Boolean> delete(Long id){
+ if(id == null){
+ return BaseResponseUtils.buildFail("id涓嶈兘涓虹┖") ;
+ }
+ int count;
+ try {
+ count = this.sv.delete(id);
+ } catch (Exception e) {
+ log.error("淇濆瓨姘磋偉鏈哄紓甯�", e);
+ return BaseResponseUtils.buildException(e.getMessage()) ;
+ }
+ if(count <= 0){
+ return BaseResponseUtils.buildFail("鏁版嵁搴撳瓨鍌ㄥけ璐�") ;
+ }else{
+ return BaseResponseUtils.buildSuccess(true) ;
+ }
+ }
+
}
diff --git a/pipIrr-platform/pipIrr-web/pipIrr-web-project/src/main/java/com/dy/pipIrrProject/mqtt/manure/ManureDto.java b/pipIrr-platform/pipIrr-web/pipIrr-web-project/src/main/java/com/dy/pipIrrProject/mqtt/manure/ManureDto.java
index ddace7c..251a613 100644
--- a/pipIrr-platform/pipIrr-web/pipIrr-web-project/src/main/java/com/dy/pipIrrProject/mqtt/manure/ManureDto.java
+++ b/pipIrr-platform/pipIrr-web/pipIrr-web-project/src/main/java/com/dy/pipIrrProject/mqtt/manure/ManureDto.java
@@ -1,9 +1,64 @@
package com.dy.pipIrrProject.mqtt.manure;
+import com.dy.pipIrrGlobal.pojoPr.PrStManure;
+import io.swagger.v3.oas.annotations.media.Schema;
+import jakarta.validation.constraints.NotEmpty;
+import lombok.Data;
+
/**
* @Author: liurunyu
* @Date: 2025/6/18 14:52
* @Description
*/
+@Data
+@Schema(name = "姘磋偉鏈�")
public class ManureDto {
+ public static final long serialVersionUID = 202506091032001L;
+ /**
+ * 涓婚敭
+ */
+ public String id;
+
+ /**
+ * 姘磋偉鏈哄悕绉�
+ */
+ @NotEmpty(message = "姘磋偉鏈哄悕绉颁笉鑳戒负绌�") //涓嶈兘涓虹┖涔熶笉鑳戒负null
+ public String name;
+ /**
+ * 姘磋偉鏈虹紪鍙�
+ */
+ @NotEmpty(message = "姘磋偉鏈虹紪鍙蜂笉鑳戒负绌�") //涓嶈兘涓虹┖涔熶笉鑳戒负null
+ public Integer no;
+
+
+ /**
+ * 缁忓害
+ */
+ public Double lng;
+
+ /**
+ * 绾害
+ */
+ public Double lat;
+
+ /**
+ * 澶囨敞
+ */
+ public String remark;
+
+ public PrStManure toNewPo(){
+ PrStManure po = new PrStManure();
+ po.name = this.name;
+ po.no = this.no;
+ po.lng = this.lng;
+ po.lat = this.lat;
+ po.remark = this.remark;
+ return po;
+ }
+ public PrStManure toPo(){
+ PrStManure po = this.toNewPo();
+ po.id = Long.parseLong(this.id) ;
+ return po;
+ }
}
+
diff --git a/pipIrr-platform/pipIrr-web/pipIrr-web-project/src/main/java/com/dy/pipIrrProject/mqtt/manure/ManureQo.java b/pipIrr-platform/pipIrr-web/pipIrr-web-project/src/main/java/com/dy/pipIrrProject/mqtt/manure/ManureQo.java
deleted file mode 100644
index e1b3e96..0000000
--- a/pipIrr-platform/pipIrr-web/pipIrr-web-project/src/main/java/com/dy/pipIrrProject/mqtt/manure/ManureQo.java
+++ /dev/null
@@ -1,9 +0,0 @@
-package com.dy.pipIrrProject.mqtt.manure;
-
-/**
- * @Author: liurunyu
- * @Date: 2025/6/18 14:52
- * @Description
- */
-public class ManureQo {
-}
diff --git a/pipIrr-platform/pipIrr-web/pipIrr-web-project/src/main/java/com/dy/pipIrrProject/mqtt/manure/ManureSv.java b/pipIrr-platform/pipIrr-web/pipIrr-web-project/src/main/java/com/dy/pipIrrProject/mqtt/manure/ManureSv.java
index 8562ac4..afcf207 100644
--- a/pipIrr-platform/pipIrr-web/pipIrr-web-project/src/main/java/com/dy/pipIrrProject/mqtt/manure/ManureSv.java
+++ b/pipIrr-platform/pipIrr-web/pipIrr-web-project/src/main/java/com/dy/pipIrrProject/mqtt/manure/ManureSv.java
@@ -1,10 +1,12 @@
package com.dy.pipIrrProject.mqtt.manure;
import com.dy.pipIrrGlobal.daoPr.PrStManureMapper;
+import com.dy.pipIrrGlobal.pojoPr.PrStManure;
import com.dy.pipIrrGlobal.voPr.VoMqttSimple;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
+import org.springframework.transaction.annotation.Transactional;
import java.util.List;
@@ -23,4 +25,42 @@
public List<VoMqttSimple> allSimple(){
return this.dao.selectAllSimple() ;
}
+
+ /**
+ * 寰楀埌涓�涓疄浣�
+ * @param id 瀹炰綋ID
+ * @return 瀹炰綋
+ */
+ public PrStManure selectById(Long id){
+ return this.dao.selectById(id) ;
+ }
+ /**
+ * 淇濆瓨锛堟坊鍔狅級瑙嗛鐩戞帶鐐�
+ * @param po
+ * @return
+ */
+ @Transactional
+ Integer save(PrStManure po) {
+ return dao.insert(po);
+ }
+
+ /**
+ * 淇敼瀹炰綋
+ * @param po 瀹炰綋
+ * @return 鏁伴噺
+ */
+ @Transactional
+ public int update(PrStManure po) {
+ return this.dao.updateByPrimaryKeySelective(po);
+ }
+
+ /**
+ * 淇濆瓨淇敼瀹炰綋
+ * @param id 瀹炰綋ID
+ * @return 褰卞搷璁板綍鏁伴噺
+ */
+ @Transactional
+ public int delete(Long id){
+ return this.dao.deleteLogicById(id) ;
+ }
}
diff --git a/pipIrr-platform/pipIrr-web/pipIrr-web-project/src/main/java/com/dy/pipIrrProject/mqtt/soil/SoilCtrl.java b/pipIrr-platform/pipIrr-web/pipIrr-web-project/src/main/java/com/dy/pipIrrProject/mqtt/soil/SoilCtrl.java
new file mode 100644
index 0000000..7386c4f
--- /dev/null
+++ b/pipIrr-platform/pipIrr-web/pipIrr-web-project/src/main/java/com/dy/pipIrrProject/mqtt/soil/SoilCtrl.java
@@ -0,0 +1,171 @@
+package com.dy.pipIrrProject.mqtt.soil;
+
+import com.dy.common.aop.SsoAop;
+import com.dy.common.webUtil.BaseResponse;
+import com.dy.common.webUtil.BaseResponseUtils;
+import com.dy.common.webUtil.ResultCodeMsg;
+import com.dy.pipIrrGlobal.pojoPr.PrStSoil;
+import io.swagger.v3.oas.annotations.Operation;
+import io.swagger.v3.oas.annotations.media.Content;
+import io.swagger.v3.oas.annotations.media.Schema;
+import io.swagger.v3.oas.annotations.responses.ApiResponse;
+import io.swagger.v3.oas.annotations.responses.ApiResponses;
+import io.swagger.v3.oas.annotations.tags.Tag;
+import jakarta.validation.Valid;
+import lombok.RequiredArgsConstructor;
+import lombok.extern.slf4j.Slf4j;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.http.MediaType;
+import org.springframework.validation.BindingResult;
+import org.springframework.web.bind.annotation.*;
+
+import java.util.Objects;
+
+/**
+ * @Author: liurunyu
+ * @Date: 2025/6/19 10:41
+ * @Description
+ */
+@Slf4j
+@Tag(name = "澧掓儏绔欑鐞�", description = "澧掓儏绔欑鐞�")
+@RestController
+@RequestMapping(path = "soilStation")
+@RequiredArgsConstructor
+public class SoilCtrl {
+ private SoilSv sv;
+
+ @Autowired
+ private void setSv(SoilSv sv){
+ this.sv = sv ;
+ }
+
+
+ /**
+ * 寰楀埌涓�濂楀鎯呯珯鏁版嵁
+ * @return 涓�濂楀鎯呯珯鏁版嵁
+ */
+ @Operation(summary = "涓�濂楀鎯呯珯", description = "寰楀埌涓�濂楀鎯呯珯鏁版嵁")
+ @ApiResponses(value = {
+ @ApiResponse(
+ responseCode = ResultCodeMsg.RsCode.SUCCESS_CODE,
+ description = "杩斿洖涓�濂楀鎯呯珯鏁版嵁锛圔aseResponse.content:{}锛�",
+ content = {@Content(mediaType = MediaType.APPLICATION_JSON_VALUE,
+ schema = @Schema(implementation = PrStSoil.class))}
+ )
+ })
+ @GetMapping(path = "one")
+ @SsoAop()
+ public BaseResponse<PrStSoil> one(Long id){
+ return BaseResponseUtils.buildSuccess(this.sv.selectById(id));
+ }
+
+ /**
+ * 淇濆瓨澧掓儏绔�
+ * @param dto 淇濆瓨澧掓儏绔檉orm琛ㄥ崟瀵硅薄
+ * @return 鏄惁鎴愬姛
+ */
+ @Operation(summary = "淇濆瓨澧掓儏绔�", description = "鎻愪氦澧掓儏绔欐暟鎹紙form琛ㄥ崟锛夛紝杩涜淇濆瓨")
+ @ApiResponses(value = {
+ @ApiResponse(
+ responseCode = ResultCodeMsg.RsCode.SUCCESS_CODE,
+ description = "鎿嶄綔缁撴灉锛歵rue锛氭垚鍔燂紝false锛氬け璐ワ紙BaseResponse.content锛�",
+ content = {@Content(mediaType = MediaType.APPLICATION_JSON_VALUE,
+ schema = @Schema(implementation = Boolean.class))}
+ )
+ })
+ @PostMapping(path = "save", consumes = MediaType.APPLICATION_JSON_VALUE)
+ @SsoAop()
+ public BaseResponse<Boolean> save(@RequestBody @Valid SoilDto dto, BindingResult bindingResult){
+ if(bindingResult != null && bindingResult.hasErrors()){
+ return BaseResponseUtils.buildFail(Objects.requireNonNull(bindingResult.getFieldError()).getDefaultMessage());
+ }
+ PrStSoil po = dto.toNewPo() ;
+ po.deleted = 0 ;
+ int count;
+ try {
+ count = this.sv.save(po);
+ } catch (Exception e) {
+ log.error("淇濆瓨澧掓儏绔欏紓甯�", e);
+ return BaseResponseUtils.buildException(e.getMessage()) ;
+ }
+ if(count <= 0){
+ return BaseResponseUtils.buildFail("鏁版嵁搴撳瓨鍌ㄥけ璐�") ;
+ }else{
+ return BaseResponseUtils.buildSuccess(true) ;
+ }
+ }
+
+ /**
+ * 缂栬緫淇敼澧掓儏绔�
+ * @param dto 淇濆瓨澧掓儏绔檉orm琛ㄥ崟瀵硅薄
+ * @return 鏄惁鎴愬姛
+ */
+ @Operation(summary = "缂栬緫淇敼澧掓儏绔�", description = "鎻愪氦澧掓儏绔欐暟鎹紙form琛ㄥ崟锛夛紝杩涜淇敼")
+ @ApiResponses(value = {
+ @ApiResponse(
+ responseCode = ResultCodeMsg.RsCode.SUCCESS_CODE,
+ description = "鎿嶄綔缁撴灉锛歵rue锛氭垚鍔燂紝false锛氬け璐ワ紙BaseResponse.content锛�",
+ content = {@Content(mediaType = MediaType.APPLICATION_JSON_VALUE,
+ schema = @Schema(implementation = Boolean.class))}
+ )
+ })
+ @PostMapping(path = "update", consumes = MediaType.APPLICATION_JSON_VALUE)
+ @SsoAop()
+ public BaseResponse<Boolean> update(@RequestBody @Valid SoilDto dto, BindingResult bindingResult){
+ if(bindingResult != null && bindingResult.hasErrors()){
+ return BaseResponseUtils.buildFail(Objects.requireNonNull(bindingResult.getFieldError()).getDefaultMessage());
+ }
+ PrStSoil po = dto.toPo() ;
+ if(po.id == null){
+ return BaseResponseUtils.buildFail("鏃犳暟鎹疄浣揑D") ;
+ }
+ int count;
+ try {
+ count = this.sv.update(po);
+ } catch (Exception e) {
+ log.error("淇濆瓨澧掓儏绔欏紓甯�", e);
+ return BaseResponseUtils.buildException(e.getMessage()) ;
+ }
+ if(count <= 0){
+ return BaseResponseUtils.buildFail("鏁版嵁搴撳瓨鍌ㄥけ璐�") ;
+ }else{
+ return BaseResponseUtils.buildSuccess(true) ;
+ }
+ }
+
+
+ /**
+ * 鍒犻櫎澧掓儏绔�
+ * @param id 澧掓儏绔橧D
+ * @return 鏄惁鎴愬姛
+ */
+ @Operation(summary = "鍒犻櫎澧掓儏绔�", description = "鎻愪氦澧掓儏绔橧D锛岃繘琛岄�昏緫鍒犻櫎")
+ @ApiResponses(value = {
+ @ApiResponse(
+ responseCode = ResultCodeMsg.RsCode.SUCCESS_CODE,
+ description = "鎿嶄綔缁撴灉锛歵rue锛氭垚鍔燂紝false锛氬け璐ワ紙BaseResponse.content锛�",
+ content = {@Content(mediaType = MediaType.APPLICATION_JSON_VALUE,
+ schema = @Schema(implementation = Boolean.class))}
+ )
+ })
+ @GetMapping(path = "delete")
+ @SsoAop()
+ public BaseResponse<Boolean> delete(Long id){
+ if(id == null){
+ return BaseResponseUtils.buildFail("id涓嶈兘涓虹┖") ;
+ }
+ int count;
+ try {
+ count = this.sv.delete(id);
+ } catch (Exception e) {
+ log.error("淇濆瓨澧掓儏绔欏紓甯�", e);
+ return BaseResponseUtils.buildException(e.getMessage()) ;
+ }
+ if(count <= 0){
+ return BaseResponseUtils.buildFail("鏁版嵁搴撳瓨鍌ㄥけ璐�") ;
+ }else{
+ return BaseResponseUtils.buildSuccess(true) ;
+ }
+ }
+
+}
diff --git a/pipIrr-platform/pipIrr-web/pipIrr-web-project/src/main/java/com/dy/pipIrrProject/mqtt/soil/SoilDto.java b/pipIrr-platform/pipIrr-web/pipIrr-web-project/src/main/java/com/dy/pipIrrProject/mqtt/soil/SoilDto.java
new file mode 100644
index 0000000..800cfc5
--- /dev/null
+++ b/pipIrr-platform/pipIrr-web/pipIrr-web-project/src/main/java/com/dy/pipIrrProject/mqtt/soil/SoilDto.java
@@ -0,0 +1,64 @@
+package com.dy.pipIrrProject.mqtt.soil;
+
+import com.dy.pipIrrGlobal.pojoPr.PrStSoil;
+import io.swagger.v3.oas.annotations.media.Schema;
+import jakarta.validation.constraints.NotEmpty;
+import lombok.Data;
+
+/**
+ * @Author: liurunyu
+ * @Date: 2025/6/18 14:52
+ * @Description
+ */
+@Data
+@Schema(name = "澧掓儏绔�")
+public class SoilDto {
+ public static final long serialVersionUID = 202506191032001L;
+ /**
+ * 涓婚敭
+ */
+ public String id;
+
+ /**
+ * 澧掓儏绔欏悕绉�
+ */
+ @NotEmpty(message = "澧掓儏绔欏悕绉颁笉鑳戒负绌�") //涓嶈兘涓虹┖涔熶笉鑳戒负null
+ public String name;
+ /**
+ * 澧掓儏绔欑紪鍙�
+ */
+ @NotEmpty(message = "澧掓儏绔欑紪鍙蜂笉鑳戒负绌�") //涓嶈兘涓虹┖涔熶笉鑳戒负null
+ public Integer no;
+
+
+ /**
+ * 缁忓害
+ */
+ public Double lng;
+
+ /**
+ * 绾害
+ */
+ public Double lat;
+
+ /**
+ * 澶囨敞
+ */
+ public String remark;
+
+ public PrStSoil toNewPo(){
+ PrStSoil po = new PrStSoil();
+ po.name = this.name;
+ po.no = this.no;
+ po.lng = this.lng;
+ po.lat = this.lat;
+ po.remark = this.remark;
+ return po;
+ }
+ public PrStSoil toPo(){
+ PrStSoil po = this.toNewPo();
+ po.id = Long.parseLong(this.id) ;
+ return po;
+ }
+}
+
diff --git a/pipIrr-platform/pipIrr-web/pipIrr-web-project/src/main/java/com/dy/pipIrrProject/mqtt/soil/SoilSv.java b/pipIrr-platform/pipIrr-web/pipIrr-web-project/src/main/java/com/dy/pipIrrProject/mqtt/soil/SoilSv.java
index 5742099..e0303c6 100644
--- a/pipIrr-platform/pipIrr-web/pipIrr-web-project/src/main/java/com/dy/pipIrrProject/mqtt/soil/SoilSv.java
+++ b/pipIrr-platform/pipIrr-web/pipIrr-web-project/src/main/java/com/dy/pipIrrProject/mqtt/soil/SoilSv.java
@@ -1,10 +1,12 @@
package com.dy.pipIrrProject.mqtt.soil;
import com.dy.pipIrrGlobal.daoPr.PrStSoilMapper;
+import com.dy.pipIrrGlobal.pojoPr.PrStSoil;
import com.dy.pipIrrGlobal.voPr.VoMqttSimple;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
+import org.springframework.transaction.annotation.Transactional;
import java.util.List;
@@ -23,4 +25,43 @@
public List<VoMqttSimple> allSimple(){
return this.dao.selectAllSimple() ;
}
+
+
+ /**
+ * 寰楀埌涓�涓疄浣�
+ * @param id 瀹炰綋ID
+ * @return 瀹炰綋
+ */
+ public PrStSoil selectById(Long id){
+ return this.dao.selectById(id) ;
+ }
+ /**
+ * 淇濆瓨锛堟坊鍔狅級瑙嗛鐩戞帶鐐�
+ * @param po
+ * @return
+ */
+ @Transactional
+ Integer save(PrStSoil po) {
+ return dao.insert(po);
+ }
+
+ /**
+ * 淇敼瀹炰綋
+ * @param po 瀹炰綋
+ * @return 鏁伴噺
+ */
+ @Transactional
+ public int update(PrStSoil po) {
+ return this.dao.updateByPrimaryKeySelective(po);
+ }
+
+ /**
+ * 淇濆瓨淇敼瀹炰綋
+ * @param id 瀹炰綋ID
+ * @return 褰卞搷璁板綍鏁伴噺
+ */
+ @Transactional
+ public int delete(Long id){
+ return this.dao.deleteLogicById(id) ;
+ }
}
diff --git a/pipIrr-platform/pipIrr-web/pipIrr-web-project/src/main/java/com/dy/pipIrrProject/mqtt/weather/WeatherCtrl.java b/pipIrr-platform/pipIrr-web/pipIrr-web-project/src/main/java/com/dy/pipIrrProject/mqtt/weather/WeatherCtrl.java
new file mode 100644
index 0000000..f40de60
--- /dev/null
+++ b/pipIrr-platform/pipIrr-web/pipIrr-web-project/src/main/java/com/dy/pipIrrProject/mqtt/weather/WeatherCtrl.java
@@ -0,0 +1,171 @@
+package com.dy.pipIrrProject.mqtt.weather;
+
+import com.dy.common.aop.SsoAop;
+import com.dy.common.webUtil.BaseResponse;
+import com.dy.common.webUtil.BaseResponseUtils;
+import com.dy.common.webUtil.ResultCodeMsg;
+import com.dy.pipIrrGlobal.pojoPr.PrStWeather;
+import io.swagger.v3.oas.annotations.Operation;
+import io.swagger.v3.oas.annotations.media.Content;
+import io.swagger.v3.oas.annotations.media.Schema;
+import io.swagger.v3.oas.annotations.responses.ApiResponse;
+import io.swagger.v3.oas.annotations.responses.ApiResponses;
+import io.swagger.v3.oas.annotations.tags.Tag;
+import jakarta.validation.Valid;
+import lombok.RequiredArgsConstructor;
+import lombok.extern.slf4j.Slf4j;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.http.MediaType;
+import org.springframework.validation.BindingResult;
+import org.springframework.web.bind.annotation.*;
+
+import java.util.Objects;
+
+/**
+ * @Author: liurunyu
+ * @Date: 2025/6/19 10:41
+ * @Description
+ */
+@Slf4j
+@Tag(name = "姘旇薄绔欑鐞�", description = "姘旇薄绔欑鐞�")
+@RestController
+@RequestMapping(path = "weatherStation")
+@RequiredArgsConstructor
+public class WeatherCtrl {
+ private WeatherSv sv;
+
+ @Autowired
+ private void setSv(WeatherSv sv){
+ this.sv = sv ;
+ }
+
+
+ /**
+ * 寰楀埌涓�濂楁皵璞$珯鏁版嵁
+ * @return 涓�濂楁皵璞$珯鏁版嵁
+ */
+ @Operation(summary = "涓�濂楁皵璞$珯", description = "寰楀埌涓�濂楁皵璞$珯鏁版嵁")
+ @ApiResponses(value = {
+ @ApiResponse(
+ responseCode = ResultCodeMsg.RsCode.SUCCESS_CODE,
+ description = "杩斿洖涓�濂楁皵璞$珯鏁版嵁锛圔aseResponse.content:{}锛�",
+ content = {@Content(mediaType = MediaType.APPLICATION_JSON_VALUE,
+ schema = @Schema(implementation = PrStWeather.class))}
+ )
+ })
+ @GetMapping(path = "one")
+ @SsoAop()
+ public BaseResponse<PrStWeather> one(Long id){
+ return BaseResponseUtils.buildSuccess(this.sv.selectById(id));
+ }
+
+ /**
+ * 淇濆瓨姘旇薄绔�
+ * @param dto 淇濆瓨姘旇薄绔檉orm琛ㄥ崟瀵硅薄
+ * @return 鏄惁鎴愬姛
+ */
+ @Operation(summary = "淇濆瓨姘旇薄绔�", description = "鎻愪氦姘旇薄绔欐暟鎹紙form琛ㄥ崟锛夛紝杩涜淇濆瓨")
+ @ApiResponses(value = {
+ @ApiResponse(
+ responseCode = ResultCodeMsg.RsCode.SUCCESS_CODE,
+ description = "鎿嶄綔缁撴灉锛歵rue锛氭垚鍔燂紝false锛氬け璐ワ紙BaseResponse.content锛�",
+ content = {@Content(mediaType = MediaType.APPLICATION_JSON_VALUE,
+ schema = @Schema(implementation = Boolean.class))}
+ )
+ })
+ @PostMapping(path = "save", consumes = MediaType.APPLICATION_JSON_VALUE)
+ @SsoAop()
+ public BaseResponse<Boolean> save(@RequestBody @Valid WeatherDto dto, BindingResult bindingResult){
+ if(bindingResult != null && bindingResult.hasErrors()){
+ return BaseResponseUtils.buildFail(Objects.requireNonNull(bindingResult.getFieldError()).getDefaultMessage());
+ }
+ PrStWeather po = dto.toNewPo() ;
+ po.deleted = 0 ;
+ int count;
+ try {
+ count = this.sv.save(po);
+ } catch (Exception e) {
+ log.error("淇濆瓨姘旇薄绔欏紓甯�", e);
+ return BaseResponseUtils.buildException(e.getMessage()) ;
+ }
+ if(count <= 0){
+ return BaseResponseUtils.buildFail("鏁版嵁搴撳瓨鍌ㄥけ璐�") ;
+ }else{
+ return BaseResponseUtils.buildSuccess(true) ;
+ }
+ }
+
+ /**
+ * 缂栬緫淇敼姘旇薄绔�
+ * @param dto 淇濆瓨姘旇薄绔檉orm琛ㄥ崟瀵硅薄
+ * @return 鏄惁鎴愬姛
+ */
+ @Operation(summary = "缂栬緫淇敼姘旇薄绔�", description = "鎻愪氦姘旇薄绔欐暟鎹紙form琛ㄥ崟锛夛紝杩涜淇敼")
+ @ApiResponses(value = {
+ @ApiResponse(
+ responseCode = ResultCodeMsg.RsCode.SUCCESS_CODE,
+ description = "鎿嶄綔缁撴灉锛歵rue锛氭垚鍔燂紝false锛氬け璐ワ紙BaseResponse.content锛�",
+ content = {@Content(mediaType = MediaType.APPLICATION_JSON_VALUE,
+ schema = @Schema(implementation = Boolean.class))}
+ )
+ })
+ @PostMapping(path = "update", consumes = MediaType.APPLICATION_JSON_VALUE)
+ @SsoAop()
+ public BaseResponse<Boolean> update(@RequestBody @Valid WeatherDto dto, BindingResult bindingResult){
+ if(bindingResult != null && bindingResult.hasErrors()){
+ return BaseResponseUtils.buildFail(Objects.requireNonNull(bindingResult.getFieldError()).getDefaultMessage());
+ }
+ PrStWeather po = dto.toPo() ;
+ if(po.id == null){
+ return BaseResponseUtils.buildFail("鏃犳暟鎹疄浣揑D") ;
+ }
+ int count;
+ try {
+ count = this.sv.update(po);
+ } catch (Exception e) {
+ log.error("淇濆瓨姘旇薄绔欏紓甯�", e);
+ return BaseResponseUtils.buildException(e.getMessage()) ;
+ }
+ if(count <= 0){
+ return BaseResponseUtils.buildFail("鏁版嵁搴撳瓨鍌ㄥけ璐�") ;
+ }else{
+ return BaseResponseUtils.buildSuccess(true) ;
+ }
+ }
+
+
+ /**
+ * 鍒犻櫎姘旇薄绔�
+ * @param id 姘旇薄绔橧D
+ * @return 鏄惁鎴愬姛
+ */
+ @Operation(summary = "鍒犻櫎姘旇薄绔�", description = "鎻愪氦姘旇薄绔橧D锛岃繘琛岄�昏緫鍒犻櫎")
+ @ApiResponses(value = {
+ @ApiResponse(
+ responseCode = ResultCodeMsg.RsCode.SUCCESS_CODE,
+ description = "鎿嶄綔缁撴灉锛歵rue锛氭垚鍔燂紝false锛氬け璐ワ紙BaseResponse.content锛�",
+ content = {@Content(mediaType = MediaType.APPLICATION_JSON_VALUE,
+ schema = @Schema(implementation = Boolean.class))}
+ )
+ })
+ @GetMapping(path = "delete")
+ @SsoAop()
+ public BaseResponse<Boolean> delete(Long id){
+ if(id == null){
+ return BaseResponseUtils.buildFail("id涓嶈兘涓虹┖") ;
+ }
+ int count;
+ try {
+ count = this.sv.delete(id);
+ } catch (Exception e) {
+ log.error("淇濆瓨姘旇薄绔欏紓甯�", e);
+ return BaseResponseUtils.buildException(e.getMessage()) ;
+ }
+ if(count <= 0){
+ return BaseResponseUtils.buildFail("鏁版嵁搴撳瓨鍌ㄥけ璐�") ;
+ }else{
+ return BaseResponseUtils.buildSuccess(true) ;
+ }
+ }
+
+}
diff --git a/pipIrr-platform/pipIrr-web/pipIrr-web-project/src/main/java/com/dy/pipIrrProject/mqtt/weather/WeatherDto.java b/pipIrr-platform/pipIrr-web/pipIrr-web-project/src/main/java/com/dy/pipIrrProject/mqtt/weather/WeatherDto.java
new file mode 100644
index 0000000..c20b7f5
--- /dev/null
+++ b/pipIrr-platform/pipIrr-web/pipIrr-web-project/src/main/java/com/dy/pipIrrProject/mqtt/weather/WeatherDto.java
@@ -0,0 +1,64 @@
+package com.dy.pipIrrProject.mqtt.weather;
+
+import com.dy.pipIrrGlobal.pojoPr.PrStWeather;
+import io.swagger.v3.oas.annotations.media.Schema;
+import jakarta.validation.constraints.NotEmpty;
+import lombok.Data;
+
+/**
+ * @Author: liurunyu
+ * @Date: 2025/6/18 14:52
+ * @Description
+ */
+@Data
+@Schema(name = "姘旇薄绔�")
+public class WeatherDto {
+ public static final long serialVersionUID = 202506191038001L;
+ /**
+ * 涓婚敭
+ */
+ public String id;
+
+ /**
+ * 姘旇薄绔欏悕绉�
+ */
+ @NotEmpty(message = "姘旇薄绔欏悕绉颁笉鑳戒负绌�") //涓嶈兘涓虹┖涔熶笉鑳戒负null
+ public String name;
+ /**
+ * 姘旇薄绔欑紪鍙�
+ */
+ @NotEmpty(message = "姘旇薄绔欑紪鍙蜂笉鑳戒负绌�") //涓嶈兘涓虹┖涔熶笉鑳戒负null
+ public Integer no;
+
+
+ /**
+ * 缁忓害
+ */
+ public Double lng;
+
+ /**
+ * 绾害
+ */
+ public Double lat;
+
+ /**
+ * 澶囨敞
+ */
+ public String remark;
+
+ public PrStWeather toNewPo(){
+ PrStWeather po = new PrStWeather();
+ po.name = this.name;
+ po.no = this.no;
+ po.lng = this.lng;
+ po.lat = this.lat;
+ po.remark = this.remark;
+ return po;
+ }
+ public PrStWeather toPo(){
+ PrStWeather po = this.toNewPo();
+ po.id = Long.parseLong(this.id) ;
+ return po;
+ }
+}
+
diff --git a/pipIrr-platform/pipIrr-web/pipIrr-web-project/src/main/java/com/dy/pipIrrProject/mqtt/weather/WeatherSv.java b/pipIrr-platform/pipIrr-web/pipIrr-web-project/src/main/java/com/dy/pipIrrProject/mqtt/weather/WeatherSv.java
index 490e91c..6b93d7e 100644
--- a/pipIrr-platform/pipIrr-web/pipIrr-web-project/src/main/java/com/dy/pipIrrProject/mqtt/weather/WeatherSv.java
+++ b/pipIrr-platform/pipIrr-web/pipIrr-web-project/src/main/java/com/dy/pipIrrProject/mqtt/weather/WeatherSv.java
@@ -1,10 +1,12 @@
package com.dy.pipIrrProject.mqtt.weather;
import com.dy.pipIrrGlobal.daoPr.PrStWeatherMapper;
+import com.dy.pipIrrGlobal.pojoPr.PrStWeather;
import com.dy.pipIrrGlobal.voPr.VoMqttSimple;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
+import org.springframework.transaction.annotation.Transactional;
import java.util.List;
@@ -23,4 +25,43 @@
public List<VoMqttSimple> allSimple(){
return this.dao.selectAllSimple() ;
}
+
+
+ /**
+ * 寰楀埌涓�涓疄浣�
+ * @param id 瀹炰綋ID
+ * @return 瀹炰綋
+ */
+ public PrStWeather selectById(Long id){
+ return this.dao.selectById(id) ;
+ }
+ /**
+ * 淇濆瓨锛堟坊鍔狅級瑙嗛鐩戞帶鐐�
+ * @param po
+ * @return
+ */
+ @Transactional
+ Integer save(PrStWeather po) {
+ return dao.insert(po);
+ }
+
+ /**
+ * 淇敼瀹炰綋
+ * @param po 瀹炰綋
+ * @return 鏁伴噺
+ */
+ @Transactional
+ public int update(PrStWeather po) {
+ return this.dao.updateByPrimaryKeySelective(po);
+ }
+
+ /**
+ * 淇濆瓨淇敼瀹炰綋
+ * @param id 瀹炰綋ID
+ * @return 褰卞搷璁板綍鏁伴噺
+ */
+ @Transactional
+ public int delete(Long id){
+ return this.dao.deleteLogicById(id) ;
+ }
}
--
Gitblit v1.8.0