@@ -62,7 +62,6 @@ public abstract class AbstractMatterCacheHelper implements InitializingBean { | |||||
.select(DscSxAdsShareItemQltQlsxCommonIDVKq::getRowguid, | .select(DscSxAdsShareItemQltQlsxCommonIDVKq::getRowguid, | ||||
DscSxAdsShareItemQltQlsxCommonIDVKq::getQlName, | DscSxAdsShareItemQltQlsxCommonIDVKq::getQlName, | ||||
DscSxAdsShareItemQltQlsxCommonIDVKq::getQlState, | DscSxAdsShareItemQltQlsxCommonIDVKq::getQlState, | ||||
DscSxAdsShareItemQltQlsxCommonIDVKq::getQlInnerCodeItem, | |||||
DscSxAdsShareItemQltQlsxCommonIDVKq::getQlInnerCode, | DscSxAdsShareItemQltQlsxCommonIDVKq::getQlInnerCode, | ||||
DscSxAdsShareItemQltQlsxCommonIDVKq::getWebapplyurl) | DscSxAdsShareItemQltQlsxCommonIDVKq::getWebapplyurl) | ||||
// .eq(DscSxAdsShareItemQltQlsxCommonIDVKq::getQlState, "1") | // .eq(DscSxAdsShareItemQltQlsxCommonIDVKq::getQlState, "1") | ||||
@@ -11,6 +11,8 @@ import lombok.extern.slf4j.Slf4j; | |||||
import org.springframework.validation.annotation.Validated; | import org.springframework.validation.annotation.Validated; | ||||
import org.springframework.web.bind.annotation.*; | import org.springframework.web.bind.annotation.*; | ||||
import java.util.List; | |||||
/** | /** | ||||
* @Classname PolicyRegulationsController | * @Classname PolicyRegulationsController | ||||
* @Description | * @Description | ||||
@@ -38,6 +40,14 @@ public class PolicyRegulationsController { | |||||
return policyManage.save(dto); | return policyManage.save(dto); | ||||
} | } | ||||
@ApiOperation(value = "政策条例保存", notes = "政策条例保存") | |||||
@PostMapping("/save-batch") | |||||
public String saveBatch(@RequestBody List<NdKqZzsfwPolicyDTO> dtos) { | |||||
return policyManage.saveBatch(dtos); | |||||
} | |||||
@ApiOperation(value = "政务事项数据清空", notes = "政务事项数据清空") | @ApiOperation(value = "政务事项数据清空", notes = "政务事项数据清空") | ||||
@GetMapping("/remove-all") | @GetMapping("/remove-all") | ||||
public String removeAll() { | public String removeAll() { | ||||
@@ -63,4 +63,23 @@ public class PolicyManage { | |||||
policyService.remove(Wrappers.lambdaQuery(NdKqZzsfwPolicy.class)); | policyService.remove(Wrappers.lambdaQuery(NdKqZzsfwPolicy.class)); | ||||
return "删除成功"; | 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 "保存失败"; | |||||
} | |||||
} | |||||
} | } |
@@ -56,11 +56,5 @@ | |||||
<groupId>org.springframework.boot</groupId> | <groupId>org.springframework.boot</groupId> | ||||
<artifactId>spring-boot-starter-test</artifactId> | <artifactId>spring-boot-starter-test</artifactId> | ||||
</dependency> | </dependency> | ||||
<dependency> | |||||
<groupId>com.ningdatech</groupId> | |||||
<artifactId>ningda-car-api</artifactId> | |||||
<version>1.0.0</version> | |||||
</dependency> | |||||
</dependencies> | </dependencies> | ||||
</project> | </project> |