mirror of
http://git.pig4cloud.com/pig/pigx.git
synced 2026-11-08 04:39:00 +08:00
🐛 修复 BUG. 代码修改,对于批量删除的处理
This commit is contained in:
1 parent
5c8ecf4ea6
commit
8d59163bfb
2 files changed
+110
-109
No files matched your search
+55
-54
@@ -26,80 +26,81 @@ import com.pig4cloud.pigx.daemon.service.ExecutionLogService;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import java.util.Arrays;
|
||||
import java.util.Map;
|
||||
|
||||
|
||||
/**
|
||||
*
|
||||
*
|
||||
* @author lengleng
|
||||
* @date 2018-08-03 22:15:56
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/executionlog")
|
||||
public class ExecutionLogController {
|
||||
@Autowired
|
||||
private ExecutionLogService executionLogService;
|
||||
@Autowired
|
||||
private ExecutionLogService executionLogService;
|
||||
|
||||
|
||||
/**
|
||||
* 列表
|
||||
* @param params
|
||||
* @return
|
||||
*/
|
||||
@GetMapping("/page")
|
||||
public Page page(@RequestParam Map<String, Object> params) {
|
||||
return executionLogService.selectPage(new Query<>(params), new EntityWrapper<>());
|
||||
}
|
||||
/**
|
||||
* 列表
|
||||
*
|
||||
* @param params
|
||||
* @return
|
||||
*/
|
||||
@GetMapping("/page")
|
||||
public Page page(@RequestParam Map<String, Object> params) {
|
||||
return executionLogService.selectPage(new Query<>(params), new EntityWrapper<>());
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 信息
|
||||
* @param id
|
||||
* @return R
|
||||
*/
|
||||
@GetMapping("/{id}")
|
||||
public R info(@PathVariable("id") String id){
|
||||
ExecutionLog executionLog = executionLogService.selectById(id);
|
||||
/**
|
||||
* 信息
|
||||
*
|
||||
* @param id
|
||||
* @return R
|
||||
*/
|
||||
@GetMapping("/{id}")
|
||||
public R info(@PathVariable("id") String id) {
|
||||
ExecutionLog executionLog = executionLogService.selectById(id);
|
||||
|
||||
return new R<>(executionLog);
|
||||
}
|
||||
return new R<>(executionLog);
|
||||
}
|
||||
|
||||
/**
|
||||
* 保存
|
||||
* @param executionLog
|
||||
* @return R
|
||||
*/
|
||||
@PostMapping("/save")
|
||||
public R save(@RequestBody ExecutionLog executionLog){
|
||||
executionLogService.insert(executionLog);
|
||||
/**
|
||||
* 保存
|
||||
*
|
||||
* @param executionLog
|
||||
* @return R
|
||||
*/
|
||||
@PostMapping("/save")
|
||||
public R save(@RequestBody ExecutionLog executionLog) {
|
||||
executionLogService.insert(executionLog);
|
||||
|
||||
return new R<>(Boolean.TRUE);
|
||||
}
|
||||
return new R<>(Boolean.TRUE);
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改
|
||||
* @param executionLog
|
||||
* @return R
|
||||
*/
|
||||
@PutMapping("/update")
|
||||
public R update(@RequestBody ExecutionLog executionLog){
|
||||
executionLogService.updateById(executionLog);
|
||||
/**
|
||||
* 修改
|
||||
*
|
||||
* @param executionLog
|
||||
* @return R
|
||||
*/
|
||||
@PutMapping("/update")
|
||||
public R update(@RequestBody ExecutionLog executionLog) {
|
||||
executionLogService.updateById(executionLog);
|
||||
|
||||
return new R<>(Boolean.TRUE);
|
||||
}
|
||||
return new R<>(Boolean.TRUE);
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除
|
||||
* @param ids
|
||||
* @return R
|
||||
*/
|
||||
@DeleteMapping("/delete")
|
||||
public R delete(@RequestBody String[] ids){
|
||||
executionLogService.deleteBatchIds(Arrays.asList(ids));
|
||||
/**
|
||||
* 删除
|
||||
*
|
||||
* @param id
|
||||
* @return R
|
||||
*/
|
||||
@DeleteMapping("/{id}")
|
||||
public R delete(@PathVariable String id) {
|
||||
|
||||
return new R<>(Boolean.TRUE);
|
||||
}
|
||||
return new R<>(executionLogService.deleteById(id));
|
||||
}
|
||||
|
||||
}
|
||||
+55
-55
@@ -26,80 +26,80 @@ import com.pig4cloud.pigx.daemon.service.StatusTraceLogService;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import java.util.Arrays;
|
||||
import java.util.Map;
|
||||
|
||||
|
||||
/**
|
||||
*
|
||||
*
|
||||
* @author lengleng
|
||||
* @date 2018-08-03 22:15:45
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/statustracelog")
|
||||
public class StatusTraceLogController {
|
||||
@Autowired
|
||||
private StatusTraceLogService statusTraceLogService;
|
||||
@Autowired
|
||||
private StatusTraceLogService statusTraceLogService;
|
||||
|
||||
|
||||
/**
|
||||
* 列表
|
||||
* @param params
|
||||
* @return
|
||||
*/
|
||||
@GetMapping("/page")
|
||||
public Page page(@RequestParam Map<String, Object> params) {
|
||||
return statusTraceLogService.selectPage(new Query<>(params), new EntityWrapper<>());
|
||||
}
|
||||
/**
|
||||
* 列表
|
||||
*
|
||||
* @param params
|
||||
* @return
|
||||
*/
|
||||
@GetMapping("/page")
|
||||
public Page page(@RequestParam Map<String, Object> params) {
|
||||
return statusTraceLogService.selectPage(new Query<>(params), new EntityWrapper<>());
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 信息
|
||||
* @param id
|
||||
* @return R
|
||||
*/
|
||||
@GetMapping("/{id}")
|
||||
public R info(@PathVariable("id") String id){
|
||||
StatusTraceLog statusTraceLog = statusTraceLogService.selectById(id);
|
||||
/**
|
||||
* 信息
|
||||
*
|
||||
* @param id
|
||||
* @return R
|
||||
*/
|
||||
@GetMapping("/{id}")
|
||||
public R info(@PathVariable("id") String id) {
|
||||
StatusTraceLog statusTraceLog = statusTraceLogService.selectById(id);
|
||||
|
||||
return new R<>(statusTraceLog);
|
||||
}
|
||||
return new R<>(statusTraceLog);
|
||||
}
|
||||
|
||||
/**
|
||||
* 保存
|
||||
* @param statusTraceLog
|
||||
* @return R
|
||||
*/
|
||||
@PostMapping("/save")
|
||||
public R save(@RequestBody StatusTraceLog statusTraceLog){
|
||||
statusTraceLogService.insert(statusTraceLog);
|
||||
/**
|
||||
* 保存
|
||||
*
|
||||
* @param statusTraceLog
|
||||
* @return R
|
||||
*/
|
||||
@PostMapping("/save")
|
||||
public R save(@RequestBody StatusTraceLog statusTraceLog) {
|
||||
statusTraceLogService.insert(statusTraceLog);
|
||||
|
||||
return new R<>(Boolean.TRUE);
|
||||
}
|
||||
return new R<>(Boolean.TRUE);
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改
|
||||
* @param statusTraceLog
|
||||
* @return R
|
||||
*/
|
||||
@PutMapping("/update")
|
||||
public R update(@RequestBody StatusTraceLog statusTraceLog){
|
||||
statusTraceLogService.updateById(statusTraceLog);
|
||||
/**
|
||||
* 修改
|
||||
*
|
||||
* @param statusTraceLog
|
||||
* @return R
|
||||
*/
|
||||
@PutMapping("/update")
|
||||
public R update(@RequestBody StatusTraceLog statusTraceLog) {
|
||||
statusTraceLogService.updateById(statusTraceLog);
|
||||
|
||||
return new R<>(Boolean.TRUE);
|
||||
}
|
||||
return new R<>(Boolean.TRUE);
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除
|
||||
* @param ids
|
||||
* @return R
|
||||
*/
|
||||
@DeleteMapping("/delete")
|
||||
public R delete(@RequestBody String[] ids){
|
||||
statusTraceLogService.deleteBatchIds(Arrays.asList(ids));
|
||||
|
||||
return new R<>(Boolean.TRUE);
|
||||
}
|
||||
/**
|
||||
* 删除
|
||||
*
|
||||
* @param id
|
||||
* @return R
|
||||
*/
|
||||
@DeleteMapping("/{id}")
|
||||
public R delete(@PathVariable("id") String id) {
|
||||
return new R<>(statusTraceLogService.deleteById(id));
|
||||
}
|
||||
|
||||
}
|
||||
Reference in new issue
Block a user