From d3c1fd3e3c3662bccb5d7459d61096b67ec2da9d Mon Sep 17 00:00:00 2001
From: yyhouc <792163605@qq.com>
Date: Tue, 11 Apr 2023 10:01:34 +0800
Subject: [PATCH 1/3] submit
---
.../src/main/java/mapper/ContactMapper.xml | 19 -------------------
1 file changed, 19 deletions(-)
delete mode 100644 kn-service/biz-vordm/src/main/java/mapper/ContactMapper.xml
diff --git a/kn-service/biz-vordm/src/main/java/mapper/ContactMapper.xml b/kn-service/biz-vordm/src/main/java/mapper/ContactMapper.xml
deleted file mode 100644
index 3f3c255..0000000
--- a/kn-service/biz-vordm/src/main/java/mapper/ContactMapper.xml
+++ /dev/null
@@ -1,19 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
- user_name,email,organization,
- message,id
-
-
From 274af1d4a2326dd1710e0b1fd0b5dfe5b33144a3 Mon Sep 17 00:00:00 2001
From: yyhouc <792163605@qq.com>
Date: Tue, 11 Apr 2023 15:51:29 +0800
Subject: [PATCH 2/3] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E5=90=8E=E7=AB=AF?=
=?UTF-8?q?=E5=AD=97=E5=85=B8?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../system/controller/DictBizController.java | 22 ++++++++++++++++++-
.../auth/system/dto/DictBizDTO.java | 15 +++++++++++++
2 files changed, 36 insertions(+), 1 deletion(-)
create mode 100644 kn-sys-manager/src/main/java/org/springblade/auth/system/dto/DictBizDTO.java
diff --git a/kn-sys-manager/src/main/java/org/springblade/auth/system/controller/DictBizController.java b/kn-sys-manager/src/main/java/org/springblade/auth/system/controller/DictBizController.java
index 2c40fbb..29d1e5d 100644
--- a/kn-sys-manager/src/main/java/org/springblade/auth/system/controller/DictBizController.java
+++ b/kn-sys-manager/src/main/java/org/springblade/auth/system/controller/DictBizController.java
@@ -1,6 +1,7 @@
package org.springblade.auth.system.controller;
import com.baomidou.mybatisplus.core.metadata.IPage;
+import com.baomidou.mybatisplus.core.toolkit.Wrappers;
import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiImplicitParam;
@@ -8,6 +9,7 @@ import io.swagger.annotations.ApiImplicitParams;
import io.swagger.annotations.ApiOperation;
import io.swagger.annotations.ApiParam;
import lombok.AllArgsConstructor;
+import org.springblade.auth.system.dto.DictBizDTO;
import org.springblade.auth.system.entity.DictBiz;
import org.springblade.auth.system.service.IDictBizService;
import org.springblade.auth.system.vo.DictBizVO;
@@ -166,6 +168,24 @@ public class DictBizController {
List tree = dictService.getList(code);
return R.data(DictBizWrapper.build().listNodeVO(tree));
}
-
+ /**
+ * 新增或修改
+ */
+ @PostMapping("/submit2")
+ @ApiOperationSupport(order = 6)
+ @ApiOperation(value = "新增或修改", notes = "传入dict")
+ public R submit2(@Valid @RequestBody DictBizDTO dict) {
+ CacheUtil.clear(DICT_CACHE);
+ dictService.submit(dict);
+ List list = dict.getChildren();
+ dictService.remove(Wrappers.update().lambda().eq(DictBiz::getParentId,dict.getId()));
+ for (DictBiz dictBiz : list) {
+ //清空id
+ dictBiz.setId(null);
+ //添加父子关系
+ dictBiz.setParentId(dict.getId());
+ }
+ return R.success(dictService.saveBatch(list)||list.size()==0?"操作成功":"操作失败");
+ }
}
diff --git a/kn-sys-manager/src/main/java/org/springblade/auth/system/dto/DictBizDTO.java b/kn-sys-manager/src/main/java/org/springblade/auth/system/dto/DictBizDTO.java
new file mode 100644
index 0000000..b9eee4a
--- /dev/null
+++ b/kn-sys-manager/src/main/java/org/springblade/auth/system/dto/DictBizDTO.java
@@ -0,0 +1,15 @@
+package org.springblade.auth.system.dto;
+
+import io.swagger.annotations.ApiModel;
+import lombok.Data;
+import lombok.EqualsAndHashCode;
+import org.springblade.auth.system.entity.DictBiz;
+
+import java.util.List;
+
+@Data
+@EqualsAndHashCode(callSuper = true)
+@ApiModel(value = "DictBizDTO对象", description = "DictBizDTO对象")
+public class DictBizDTO extends DictBiz {
+ private List children;
+}
From bc575f6bcb52489fb90142d9a702f97bafdd5bb5 Mon Sep 17 00:00:00 2001
From: yyhouc <792163605@qq.com>
Date: Wed, 12 Apr 2023 09:08:25 +0800
Subject: [PATCH 3/3] =?UTF-8?q?=E6=8F=90=E4=BA=A4callforhelp=E7=AD=89?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../controller/DisasterInfoController.java | 28 ++++++++++++-
.../vordm/mapper/DisasterInfoMapper.java | 4 ++
.../vordm/mapper/DisasterInfoMapper.xml | 40 ++++++++++++++++++-
.../vordm/service/DisasterInfoService.java | 4 ++
.../service/impl/DisasterInfoServiceImpl.java | 7 ++++
5 files changed, 80 insertions(+), 3 deletions(-)
diff --git a/kn-service/biz-vordm/src/main/java/com/kening/vordm/controller/DisasterInfoController.java b/kn-service/biz-vordm/src/main/java/com/kening/vordm/controller/DisasterInfoController.java
index 7612b9b..b57c59a 100644
--- a/kn-service/biz-vordm/src/main/java/com/kening/vordm/controller/DisasterInfoController.java
+++ b/kn-service/biz-vordm/src/main/java/com/kening/vordm/controller/DisasterInfoController.java
@@ -6,12 +6,16 @@ import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.core.toolkit.IdWorker;
import com.baomidou.mybatisplus.core.toolkit.StringUtils;
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
+import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport;
import com.kening.vordm.entity.*;
import com.kening.vordm.service.*;
import com.kening.vordm.vo.CallForHelpVo;
import com.kening.vordm.vo.DisasterInfoVo;
import com.kening.vordm.vo.GroupByUse;
import com.kening.vordm.vo.UserTenantVo;
+import io.swagger.annotations.ApiImplicitParam;
+import io.swagger.annotations.ApiImplicitParams;
+import io.swagger.annotations.ApiOperation;
import lombok.RequiredArgsConstructor;
import org.springblade.core.mp.support.Condition;
import org.springblade.core.mp.support.Query;
@@ -20,6 +24,7 @@ import org.springblade.core.tool.utils.DateUtil;
import org.springframework.web.bind.annotation.*;
import java.time.LocalDate;
+import java.util.Date;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
@@ -45,7 +50,17 @@ public class DisasterInfoController {
private final DownloadRecordService downloadRecordService;
private final DisasterInfoVoService disasterInfoVoService;
-
+ @ApiOperationSupport(order = 1)
+ @ApiOperation(value = "分页", notes = "传入Tool")
+ @ApiImplicitParams({
+ @ApiImplicitParam(name = "current", value = "当前页", paramType = "query", dataType = "int"),
+ @ApiImplicitParam(name = "size", value = "分页大小", paramType = "query", dataType = "int")
+ })
+ @GetMapping("/list")
+ public R> list(CallForHelpVo CallForHelpVo, Query query) {
+ IPage pages = disasterInfoService.page(Condition.getPage(query),CallForHelpVo);
+ return R.data(pages);
+ }
/**
* 首页数据,轮播和定位相关
* @return
@@ -219,17 +234,26 @@ public class DisasterInfoController {
DisasterInfo disasterInfo = new DisasterInfo();
BeanUtil.copyProperties(callForHelpVo, disasterInfo);
disasterInfo.setId(IdWorker.getId());
+ disasterInfo.setUploadTime(new Date());
GuestManageDisasterRef GuestManageDisasterRef = new GuestManageDisasterRef();
GuestManageDisasterRef.setId(IdWorker.getId());
GuestManageDisasterRef.setSponsorId(guestInfo.getId());
String vordm_id="test";
GuestManageDisasterRef.setDisasterId(disasterInfo.getId());
Boolean flag1=guestInfoService.save(guestInfo);
- Boolean flag2= guestManageDisasterRefService.save(GuestManageDisasterRef);
+ Boolean flag2=guestManageDisasterRefService.save(GuestManageDisasterRef);
Boolean flag3=disasterInfoService.save(disasterInfo);
Boolean callForHelp= flag1&flag2&flag3;
// callForHelpVo.setId(IdWorker.getId());
// Boolean insertFlag=accountInfoService.save(accountInfo);
return R.data(callForHelp);
}
+ @PostMapping("review")
+ public R review( String id){
+ DisasterInfo disasterInfo = new DisasterInfo();
+ disasterInfo.setId(Long.valueOf(id));
+ disasterInfo.setRespondStatus(1);
+ Boolean flag=disasterInfoService.updateById(disasterInfo);
+ return R.data(flag);
+ }
}
diff --git a/kn-service/biz-vordm/src/main/java/com/kening/vordm/mapper/DisasterInfoMapper.java b/kn-service/biz-vordm/src/main/java/com/kening/vordm/mapper/DisasterInfoMapper.java
index 0d39144..390b28d 100644
--- a/kn-service/biz-vordm/src/main/java/com/kening/vordm/mapper/DisasterInfoMapper.java
+++ b/kn-service/biz-vordm/src/main/java/com/kening/vordm/mapper/DisasterInfoMapper.java
@@ -4,10 +4,12 @@ package com.kening.vordm.mapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.kening.vordm.entity.DisasterInfo;
+import com.kening.vordm.vo.CallForHelpVo;
import com.kening.vordm.vo.DisasterMangerInfo;
import com.kening.vordm.vo.GroupByUse;
import com.kening.vordm.vo.UserTenantVo;
import org.apache.ibatis.annotations.Param;
+import org.apache.poi.ss.formula.functions.T;
import java.util.List;
@@ -44,4 +46,6 @@ public interface DisasterInfoMapper extends BaseMapper {
List getLeft1Data();
List getLeft2Data();
+
+ List page(IPage page,@Param("callForHelpVo" )CallForHelpVo callForHelpVo);
}
diff --git a/kn-service/biz-vordm/src/main/java/com/kening/vordm/mapper/DisasterInfoMapper.xml b/kn-service/biz-vordm/src/main/java/com/kening/vordm/mapper/DisasterInfoMapper.xml
index d382336..e3f5f1d 100644
--- a/kn-service/biz-vordm/src/main/java/com/kening/vordm/mapper/DisasterInfoMapper.xml
+++ b/kn-service/biz-vordm/src/main/java/com/kening/vordm/mapper/DisasterInfoMapper.xml
@@ -118,5 +118,43 @@
limit 7) b on c.flagname = b.`name`
-
+
diff --git a/kn-service/biz-vordm/src/main/java/com/kening/vordm/service/DisasterInfoService.java b/kn-service/biz-vordm/src/main/java/com/kening/vordm/service/DisasterInfoService.java
index 323dbe7..c9f6611 100644
--- a/kn-service/biz-vordm/src/main/java/com/kening/vordm/service/DisasterInfoService.java
+++ b/kn-service/biz-vordm/src/main/java/com/kening/vordm/service/DisasterInfoService.java
@@ -4,9 +4,11 @@ package com.kening.vordm.service;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.service.IService;
import com.kening.vordm.entity.DisasterInfo;
+import com.kening.vordm.vo.CallForHelpVo;
import com.kening.vordm.vo.DisasterMangerInfo;
import com.kening.vordm.vo.GroupByUse;
import com.kening.vordm.vo.UserTenantVo;
+import org.apache.poi.ss.formula.functions.T;
import java.util.List;
@@ -50,4 +52,6 @@ public interface DisasterInfoService extends IService {
List getLeft1Data();
List getLeft2Data();
+
+ IPage page(IPage page, CallForHelpVo callForHelpVo);
}
diff --git a/kn-service/biz-vordm/src/main/java/com/kening/vordm/service/impl/DisasterInfoServiceImpl.java b/kn-service/biz-vordm/src/main/java/com/kening/vordm/service/impl/DisasterInfoServiceImpl.java
index 5b2bfd3..ea84969 100644
--- a/kn-service/biz-vordm/src/main/java/com/kening/vordm/service/impl/DisasterInfoServiceImpl.java
+++ b/kn-service/biz-vordm/src/main/java/com/kening/vordm/service/impl/DisasterInfoServiceImpl.java
@@ -6,10 +6,12 @@ import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.kening.vordm.entity.DisasterInfo;
import com.kening.vordm.mapper.DisasterInfoMapper;
import com.kening.vordm.service.DisasterInfoService;
+import com.kening.vordm.vo.CallForHelpVo;
import com.kening.vordm.vo.DisasterMangerInfo;
import com.kening.vordm.vo.GroupByUse;
import com.kening.vordm.vo.UserTenantVo;
import lombok.RequiredArgsConstructor;
+import org.apache.poi.ss.formula.functions.T;
import org.springframework.stereotype.Service;
import java.util.ArrayList;
@@ -114,5 +116,10 @@ implements DisasterInfoService {
return this.baseMapper.getLeft2Data();
}
+ @Override
+ public IPage page(IPage page, CallForHelpVo callForHelpVo) {
+ return page.setRecords(this.baseMapper.page(page,callForHelpVo));
+ }
+
}