Browse Source

事务提交

master
PoffyZhang 9 months ago
parent
commit
e2a77c29bc
4 changed files with 29 additions and 7 deletions
  1. +0
    -1
      kqapi/src/main/java/com/ningdatech/kqapi/common/helper/basic/AbstractMatterCacheHelper.java
  2. +10
    -0
      kqapi/src/main/java/com/ningdatech/kqapi/zzsfw/controller/PolicyRegulationsController.java
  3. +19
    -0
      kqapi/src/main/java/com/ningdatech/kqapi/zzsfw/manage/PolicyManage.java
  4. +0
    -6
      ningda-generator/pom.xml

+ 0
- 1
kqapi/src/main/java/com/ningdatech/kqapi/common/helper/basic/AbstractMatterCacheHelper.java View File

@@ -62,7 +62,6 @@ public abstract class AbstractMatterCacheHelper implements InitializingBean {
.select(DscSxAdsShareItemQltQlsxCommonIDVKq::getRowguid,
DscSxAdsShareItemQltQlsxCommonIDVKq::getQlName,
DscSxAdsShareItemQltQlsxCommonIDVKq::getQlState,
DscSxAdsShareItemQltQlsxCommonIDVKq::getQlInnerCodeItem,
DscSxAdsShareItemQltQlsxCommonIDVKq::getQlInnerCode,
DscSxAdsShareItemQltQlsxCommonIDVKq::getWebapplyurl)
// .eq(DscSxAdsShareItemQltQlsxCommonIDVKq::getQlState, "1")


+ 10
- 0
kqapi/src/main/java/com/ningdatech/kqapi/zzsfw/controller/PolicyRegulationsController.java View File

@@ -11,6 +11,8 @@ import lombok.extern.slf4j.Slf4j;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.*;

import java.util.List;

/**
* @Classname PolicyRegulationsController
* @Description
@@ -38,6 +40,14 @@ public class PolicyRegulationsController {
return policyManage.save(dto);
}

@ApiOperation(value = "政策条例保存", notes = "政策条例保存")
@PostMapping("/save-batch")
public String saveBatch(@RequestBody List<NdKqZzsfwPolicyDTO> dtos) {

return policyManage.saveBatch(dtos);
}


@ApiOperation(value = "政务事项数据清空", notes = "政务事项数据清空")
@GetMapping("/remove-all")
public String removeAll() {


+ 19
- 0
kqapi/src/main/java/com/ningdatech/kqapi/zzsfw/manage/PolicyManage.java View File

@@ -63,4 +63,23 @@ public class PolicyManage {
policyService.remove(Wrappers.lambdaQuery(NdKqZzsfwPolicy.class));
return "删除成功";
}

/**
* 批量保存
* @param dtos
* @return
*/
public String saveBatch(List<NdKqZzsfwPolicyDTO> dtos) {
if(CollUtil.isEmpty(dtos)){
return "保存失败 传入为空";
}

List<NdKqZzsfwPolicy> entitys = dtos.stream().map(d -> BeanUtil.copyProperties(d,NdKqZzsfwPolicy.class))
.collect(Collectors.toList());
if(policyService.saveBatch(entitys)){
return "保存成功";
}else{
return "保存失败";
}
}
}

+ 0
- 6
ningda-generator/pom.xml View File

@@ -56,11 +56,5 @@
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-test</artifactId>
</dependency>

<dependency>
<groupId>com.ningdatech</groupId>
<artifactId>ningda-car-api</artifactId>
<version>1.0.0</version>
</dependency>
</dependencies>
</project>

Loading…
Cancel
Save