提交 a93f8d7d authored 作者: 133's avatar 133

[政策] 添加删除接口

上级 1cace708
......@@ -51,6 +51,15 @@ public class PolicyDocController {
}
/**
* 查询政策文件 -分页
*/
@ApiOperation(value = "删除政策文件")
@GetMapping("/delete/{id}")
public ResponseEntity deleteById( @PathVariable Integer id) {
policyDocumentService.deleteById(id);
return ResponseEntity.ok("删除成功");
}
}
package com.tykj.dev.device.policydocument;
\ No newline at end of file
package com.tykj.dev.device.policydocument;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
/**
* @author LJJ cnljj1995@gmail.com
* on 1/22/21
*/
@SpringBootApplication(scanBasePackages = {
"com.tykj.dev.*"
})
public class pdApplication {
public static void main(String[] args) {
SpringApplication.run(pdApplication.class, args);
}
}
......@@ -17,4 +17,6 @@ public interface PolicyDocumentService {
Page<PolicyDocument> findAllPage(PolicyDocVo policyDocVo);
void deleteById(Integer id);
}
......@@ -47,6 +47,11 @@ public class PolicyDocumentServiceImpl implements PolicyDocumentService {
);
}
@Override
public void deleteById(Integer id) {
policyDocumentDao.deleteById(id);
}
private Specification<PolicyDocument> getPredicateBuilder(PolicyDocVo policyDocVo) {
PredicateBuilder<PolicyDocument> predicateBuilder = Specifications.and();
if (policyDocVo != null) {
......
......@@ -185,6 +185,18 @@
</exclusions>
</dependency>
<dependency>
<groupId>com.tykj</groupId>
<artifactId>dev-policydocument</artifactId>
<version>1.0-SNAPSHOT</version>
<exclusions>
<exclusion>
<groupId>com.tykj.dev</groupId>
<artifactId>union</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>com.tykj</groupId>
<artifactId>dev-destroy</artifactId>
......
......@@ -99,7 +99,7 @@ public class MessageServiceImpl implements MessageService {
List<Integer> ids = messageUserVos.stream().map(MessageUserVo::getId).collect(Collectors.toList());
//休眠100ms保证用户第一次登录不会创建二条userRecord
try {
Thread.sleep(100);
Thread.sleep(200);
} catch (InterruptedException e) {
e.printStackTrace();
}
......
......@@ -44,4 +44,11 @@ public class GroupsController {
public ResponseEntity findByid(@PathVariable Integer id){
return ResponseEntity.ok(groupService.findById(id));
}
@GetMapping(value = "/delete/{id}")
@ApiOperation(value = "根据id删除组", notes = "根据id删除组")
public ResponseEntity deleteById(@PathVariable Integer id){
groupService.delectGroup(id);
return ResponseEntity.ok("删除成功");
}
}
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论