From 58e85930c69780b951db699965fd37dd9e00cfd5 Mon Sep 17 00:00:00 2001
From: dongdingding <207595406@qq.com>
Date: Fri, 15 Sep 2023 13:31:41 +0800
Subject: [PATCH] bug fix
---
.../controller/TcDataSourceTjController.java | 1 +
.../zongzhi/controller/TcSgjTjController.java | 1 +
.../com/ruoyi/zongzhi/domain/TcSgjTj.java | 97 ++-----------------
.../mapper/zongzhi/TcSgjTjMapper.xml | 8 +-
4 files changed, 17 insertions(+), 90 deletions(-)
diff --git a/ruoyi-admin/src/main/java/com/ruoyi/zongzhi/controller/TcDataSourceTjController.java b/ruoyi-admin/src/main/java/com/ruoyi/zongzhi/controller/TcDataSourceTjController.java
index 02f1edb..91e5dc9 100644
--- a/ruoyi-admin/src/main/java/com/ruoyi/zongzhi/controller/TcDataSourceTjController.java
+++ b/ruoyi-admin/src/main/java/com/ruoyi/zongzhi/controller/TcDataSourceTjController.java
@@ -70,6 +70,7 @@ public class TcDataSourceTjController extends BaseController {
@Log(title = "数据来源统计", businessType = BusinessType.INSERT)
@PostMapping
public AjaxResult add(@RequestBody TcDataSourceTj tcDataSourceTj) {
+ tcDataSourceTj.setIsStatus(true);
return toAjax(tcDataSourceTjService.insertTcDataSourceTj(tcDataSourceTj));
}
diff --git a/ruoyi-admin/src/main/java/com/ruoyi/zongzhi/controller/TcSgjTjController.java b/ruoyi-admin/src/main/java/com/ruoyi/zongzhi/controller/TcSgjTjController.java
index 4c1afb3..df754e1 100644
--- a/ruoyi-admin/src/main/java/com/ruoyi/zongzhi/controller/TcSgjTjController.java
+++ b/ruoyi-admin/src/main/java/com/ruoyi/zongzhi/controller/TcSgjTjController.java
@@ -71,6 +71,7 @@ public class TcSgjTjController extends BaseController {
@Log(title = "安全监测受攻击统计", businessType = BusinessType.INSERT)
@PostMapping
public AjaxResult add(@RequestBody TcSgjTj tcSgjTj) {
+ tcSgjTj.setIsStatus(true);
return toAjax(tcSgjTjService.insertTcSgjTj(tcSgjTj));
}
diff --git a/ruoyi-admin/src/main/java/com/ruoyi/zongzhi/domain/TcSgjTj.java b/ruoyi-admin/src/main/java/com/ruoyi/zongzhi/domain/TcSgjTj.java
index 1e9b7ec..523788b 100644
--- a/ruoyi-admin/src/main/java/com/ruoyi/zongzhi/domain/TcSgjTj.java
+++ b/ruoyi-admin/src/main/java/com/ruoyi/zongzhi/domain/TcSgjTj.java
@@ -3,6 +3,7 @@ package com.ruoyi.zongzhi.domain;
import com.ruoyi.common.annotation.Excel;
import com.ruoyi.common.core.domain.BaseEntity;
import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
@@ -12,6 +13,7 @@ import org.apache.commons.lang3.builder.ToStringStyle;
* @author ruoyi
* @date 2023-09-13
*/
+@Data
public class TcSgjTj extends BaseEntity {
private static final long serialVersionUID = 1L;
@@ -62,95 +64,12 @@ public class TcSgjTj extends BaseEntity {
*/
private Long updateId;
- public void setId(Long id) {
- this.id = id;
- }
- public Long getId() {
- return id;
- }
-
- public void setTownId(Long townId) {
- this.townId = townId;
- }
-
- public Long getTownId() {
- return townId;
- }
-
- public void setVillageId(Long villageId) {
- this.villageId = villageId;
- }
-
- public Long getVillageId() {
- return villageId;
- }
-
- public void setTotalSum(Long totalSum) {
- this.totalSum = totalSum;
- }
-
- public Long getTotalSum() {
- return totalSum;
- }
-
- public void setRqSum(Long rqSum) {
- this.rqSum = rqSum;
- }
-
- public Long getRqSum() {
- return rqSum;
- }
-
- public void setEySum(Long eySum) {
- this.eySum = eySum;
- }
-
- public Long getEySum() {
- return eySum;
- }
-
- public void setJmrSum(Long jmrSum) {
- this.jmrSum = jmrSum;
- }
-
- public Long getJmrSum() {
- return jmrSum;
- }
-
- public void setCreateId(Long createId) {
- this.createId = createId;
- }
-
- public Long getCreateId() {
- return createId;
- }
-
- public void setUpdateId(Long updateId) {
- this.updateId = updateId;
- }
-
- public Long getUpdateId() {
- return updateId;
- }
+ /**
+ * 使用状态
+ */
+ @Excel(name = "0:禁用,1:启用")
+ @ApiModelProperty(value = "0:禁用,1:启用")
+ private Boolean isStatus ;
- @Override
- public String toString() {
- return new ToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE)
- .append("id", getId())
- .append("townId", getTownId())
- .append("villageId", getVillageId())
- .append("totalSum", getTotalSum())
- .append("rqSum", getRqSum())
- .append("eySum", getEySum())
- .append("jmrSum", getJmrSum())
- .append("createId", getCreateId())
- .append("createBy", getCreateBy())
- .append("createTime", getCreateTime())
- .append("updateId", getUpdateId())
- .append("updateBy", getUpdateBy())
- .append("updateTime", getUpdateTime())
- .append("remark", getRemark())
- .toString();
- }
}
diff --git a/ruoyi-system/src/main/resources/mapper/zongzhi/TcSgjTjMapper.xml b/ruoyi-system/src/main/resources/mapper/zongzhi/TcSgjTjMapper.xml
index 97defc8..b13403e 100644
--- a/ruoyi-system/src/main/resources/mapper/zongzhi/TcSgjTjMapper.xml
+++ b/ruoyi-system/src/main/resources/mapper/zongzhi/TcSgjTjMapper.xml
@@ -19,6 +19,7 @@
+
@@ -35,7 +36,8 @@
update_id,
update_by,
update_time,
- remark
+ remark,
+ is_status
from tc_sgj_tj
@@ -44,6 +46,7 @@
and total_sum = #{totalSum}
and rq_sum = #{rqSum}
+ and is_status = #{isStatus}
@@ -68,6 +71,7 @@
update_by,
update_time,
remark,
+ is_status,
#{townId},
@@ -83,6 +87,7 @@
#{updateBy},
#{updateTime},
#{remark},
+ #{isStatus},
@@ -102,6 +107,7 @@
update_by = #{updateBy},
update_time = #{updateTime},
remark = #{remark},
+ is_status=#{isStatus},
where id = #{id}