|
@@ -8,14 +8,7 @@ import com.ruoyi.system.entity.DragTable;
|
|
|
import com.ruoyi.system.entity.vo.DragTableVo;
|
|
|
import org.springframework.security.access.prepost.PreAuthorize;
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
-import org.springframework.web.bind.annotation.GetMapping;
|
|
|
-import org.springframework.web.bind.annotation.PostMapping;
|
|
|
-import org.springframework.web.bind.annotation.PutMapping;
|
|
|
-import org.springframework.web.bind.annotation.DeleteMapping;
|
|
|
-import org.springframework.web.bind.annotation.PathVariable;
|
|
|
-import org.springframework.web.bind.annotation.RequestBody;
|
|
|
-import org.springframework.web.bind.annotation.RequestMapping;
|
|
|
-import org.springframework.web.bind.annotation.RestController;
|
|
|
+import org.springframework.web.bind.annotation.*;
|
|
|
import com.ruoyi.common.annotation.Log;
|
|
|
import com.ruoyi.common.core.controller.BaseController;
|
|
|
import com.ruoyi.common.core.domain.AjaxResult;
|
|
@@ -84,21 +77,24 @@ public class DragTableController extends BaseController {
|
|
|
// return toAjax(dragTableService.updateDragTable(dragTable));
|
|
|
// }
|
|
|
|
|
|
- /**
|
|
|
- * 删除动态格
|
|
|
- */
|
|
|
- @Log(title = "动态格", businessType = BusinessType.DELETE)
|
|
|
- @DeleteMapping("/{tIds}")
|
|
|
- public AjaxResult remove(@PathVariable Long[] tIds) {
|
|
|
- return toAjax(dragTableService.deleteDragTableByTIds(tIds));
|
|
|
- }
|
|
|
+// /**
|
|
|
+// * 删除动态格
|
|
|
+// */
|
|
|
+// @Log(title = "动态格", businessType = BusinessType.DELETE)
|
|
|
+// @DeleteMapping("/{tIds}")
|
|
|
+// public AjaxResult remove(@PathVariable Long[] tIds) {
|
|
|
+// return toAjax(dragTableService.deleteDragTableByTIds(tIds));
|
|
|
+// }
|
|
|
|
|
|
/**
|
|
|
* 新增动态表格模版数据
|
|
|
*/
|
|
|
@PostMapping("/addDragTable")
|
|
|
public AjaxResult addDragTable(@RequestBody DragTableVo dragTableVo){
|
|
|
- return toAjax(dragTableService.addDragTable(dragTableVo));
|
|
|
+ AjaxResult ajax = AjaxResult.success();
|
|
|
+ String sqlKey = dragTableService.addDragTable(dragTableVo);
|
|
|
+ ajax.put("sqlKey",sqlKey);
|
|
|
+ return ajax;
|
|
|
}
|
|
|
|
|
|
/**
|
|
@@ -118,5 +114,14 @@ public class DragTableController extends BaseController {
|
|
|
}
|
|
|
|
|
|
|
|
|
+ /**
|
|
|
+ * 删除动态格
|
|
|
+ */
|
|
|
+ @DeleteMapping("/remove")
|
|
|
+ public AjaxResult remove(@RequestParam("tIds") List<Long> tIds,@RequestParam("sqlKeys") List<String> sqlKeys) {
|
|
|
+ return toAjax(dragTableService.deleteDragTable(tIds,sqlKeys));
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
|
|
|
}
|