|
@@ -1,8 +1,10 @@
|
|
|
package org.jeecg.modules.orderplatform.controller;
|
|
|
|
|
|
+import com.alibaba.fastjson.JSONObject;
|
|
|
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
|
|
import com.baomidou.mybatisplus.core.metadata.IPage;
|
|
|
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
|
|
+import com.github.pagehelper.PageInfo;
|
|
|
import lombok.extern.slf4j.Slf4j;
|
|
|
import org.jeecg.common.api.vo.Result;
|
|
|
import org.jeecg.common.system.query.QueryGenerator;
|
|
@@ -27,19 +29,17 @@ public class PlatformScriptController {
|
|
|
/**
|
|
|
* 分页列表查询
|
|
|
*/
|
|
|
- @GetMapping(value = "/list")
|
|
|
- public Result<IPage<PlatformScript>> queryPageList(PlatformScript platformScript,
|
|
|
- @RequestParam(name="pageNo", defaultValue="1") Integer pageNo,
|
|
|
- @RequestParam(name="pageSize", defaultValue="10") Integer pageSize,
|
|
|
- HttpServletRequest req) {
|
|
|
- Result<IPage<PlatformScript>> result = new Result<>();
|
|
|
- QueryWrapper<PlatformScript> queryWrapper = QueryGenerator.initQueryWrapper(platformScript, req.getParameterMap());
|
|
|
- Page<PlatformScript> page = new Page<>(pageNo, pageSize);
|
|
|
+/* @GetMapping(value = "/list")
|
|
|
+ public Result<PageInfo<JSONObject>> queryPageList(PlatformScript platformScript,
|
|
|
+ @RequestParam(name="pageNo", defaultValue="1") Integer pageNo,
|
|
|
+ @RequestParam(name="pageSize", defaultValue="10") Integer pageSize,
|
|
|
+ HttpServletRequest req) {
|
|
|
+ Result<PageInfo<JSONObject>> result = new Result<>();
|
|
|
IPage<PlatformScript> pageList = platformScriptService.page(page, queryWrapper);
|
|
|
result.setSuccess(true);
|
|
|
result.setResult(pageList);
|
|
|
return result;
|
|
|
- }
|
|
|
+ }*/
|
|
|
|
|
|
/**
|
|
|
* 添加
|
|
@@ -77,35 +77,6 @@ public class PlatformScriptController {
|
|
|
}
|
|
|
|
|
|
/**
|
|
|
- * 通过id删除
|
|
|
- */
|
|
|
- @PostMapping(value = "/delete")
|
|
|
- public Result<?> delete(@RequestParam(name="id",required=true) String id) {
|
|
|
- try {
|
|
|
- platformScriptService.removeById(id);
|
|
|
- } catch (Exception e) {
|
|
|
- log.error("删除失败",e.getMessage());
|
|
|
- return Result.error("删除失败!");
|
|
|
- }
|
|
|
- return Result.ok("删除成功!");
|
|
|
- }
|
|
|
-
|
|
|
- /**
|
|
|
- * 批量删除
|
|
|
- */
|
|
|
- @PostMapping(value = "/deleteBatch")
|
|
|
- public Result<PlatformScript> deleteBatch(@RequestParam(name="ids",required=true) String ids) {
|
|
|
- Result<PlatformScript> result = new Result<>();
|
|
|
- if(ids==null || "".equals(ids.trim())) {
|
|
|
- result.error500("参数不识别!");
|
|
|
- }else {
|
|
|
- this.platformScriptService.removeByIds(Arrays.asList(ids.split(",")));
|
|
|
- result.success("删除成功!");
|
|
|
- }
|
|
|
- return result;
|
|
|
- }
|
|
|
-
|
|
|
- /**
|
|
|
* 通过id查询
|
|
|
*/
|
|
|
@GetMapping(value = "/queryById")
|