【fix bug】修改请求类型 并效验有效参数
This commit is contained in:
+5
-5
@@ -81,7 +81,7 @@ public class OnlCgformAuthController {
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@PostMapping({"/authData"})
|
@PostMapping({"/editAuthData"})
|
||||||
public Result<OnlAuthData> editAuthData(@RequestBody OnlAuthData paramOnlAuthData) {
|
public Result<OnlAuthData> editAuthData(@RequestBody OnlAuthData paramOnlAuthData) {
|
||||||
Result<OnlAuthData> result = new Result<>();
|
Result<OnlAuthData> result = new Result<>();
|
||||||
this.onlAuthDataService.updateById(paramOnlAuthData);
|
this.onlAuthDataService.updateById(paramOnlAuthData);
|
||||||
@@ -168,7 +168,7 @@ public class OnlCgformAuthController {
|
|||||||
|
|
||||||
LambdaQueryWrapper<OnlAuthPage> pageLambdaQueryWrapper = new LambdaQueryWrapper<>();
|
LambdaQueryWrapper<OnlAuthPage> pageLambdaQueryWrapper = new LambdaQueryWrapper<>();
|
||||||
pageLambdaQueryWrapper.eq(OnlAuthPage::getCgformId, paramString).eq(OnlAuthPage::getType, 1);
|
pageLambdaQueryWrapper.eq(OnlAuthPage::getCgformId, paramString).eq(OnlAuthPage::getType, 1);
|
||||||
List<OnlAuthPage> pageList = this.onlAuthPageService.list(pageLambdaQueryWrapper);
|
List<OnlAuthPage> pageList = this.onlAuthPageService.list(pageLambdaQueryWrapper);
|
||||||
|
|
||||||
ArrayList<AuthColumnVO> arrayList = new ArrayList<>();
|
ArrayList<AuthColumnVO> arrayList = new ArrayList<>();
|
||||||
for (OnlCgformField onlCgformField : list) {
|
for (OnlCgformField onlCgformField : list) {
|
||||||
@@ -215,7 +215,7 @@ public class OnlCgformAuthController {
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@PostMapping({"/authColumn"})
|
@PostMapping({"/editAuthColumn"})
|
||||||
public Result<T> editAuthColumn(@RequestBody AuthColumnVO paramAuthColumnVO) {
|
public Result<T> editAuthColumn(@RequestBody AuthColumnVO paramAuthColumnVO) {
|
||||||
try {
|
try {
|
||||||
if (paramAuthColumnVO.getStatus() == 1) {
|
if (paramAuthColumnVO.getStatus() == 1) {
|
||||||
@@ -324,7 +324,7 @@ public class OnlCgformAuthController {
|
|||||||
|
|
||||||
Result<List<AuthColumnVO>> result = new Result<>();
|
Result<List<AuthColumnVO>> result = new Result<>();
|
||||||
LambdaQueryWrapper<OnlCgformField> cgformFieldLambdaQueryWrapper = new LambdaQueryWrapper<>();
|
LambdaQueryWrapper<OnlCgformField> cgformFieldLambdaQueryWrapper = new LambdaQueryWrapper<>();
|
||||||
if(!Objects.isNull(onlCgformHead)){
|
if (!Objects.isNull(onlCgformHead)) {
|
||||||
cgformFieldLambdaQueryWrapper.eq(OnlCgformField::getCgformHeadId, onlCgformHead.getId());
|
cgformFieldLambdaQueryWrapper.eq(OnlCgformField::getCgformHeadId, onlCgformHead.getId());
|
||||||
}
|
}
|
||||||
cgformFieldLambdaQueryWrapper.orderByAsc(OnlCgformField::getOrderNum);
|
cgformFieldLambdaQueryWrapper.orderByAsc(OnlCgformField::getOrderNum);
|
||||||
@@ -335,7 +335,7 @@ public class OnlCgformAuthController {
|
|||||||
ArrayList<AuthColumnVO> arrayList = new ArrayList<>();
|
ArrayList<AuthColumnVO> arrayList = new ArrayList<>();
|
||||||
for (OnlCgformField onlCgformField : list) {
|
for (OnlCgformField onlCgformField : list) {
|
||||||
AuthColumnVO authColumnVO = new AuthColumnVO(onlCgformField);
|
AuthColumnVO authColumnVO = new AuthColumnVO(onlCgformField);
|
||||||
if(!Objects.isNull(onlCgformHead)){
|
if (!Objects.isNull(onlCgformHead)) {
|
||||||
authColumnVO.setTableName(onlCgformHead.getTableName());
|
authColumnVO.setTableName(onlCgformHead.getTableName());
|
||||||
authColumnVO.setTableNameTxt(onlCgformHead.getTableTxt());
|
authColumnVO.setTableNameTxt(onlCgformHead.getTableTxt());
|
||||||
}
|
}
|
||||||
|
|||||||
+5
-5
@@ -122,7 +122,7 @@ public class OnlCgformApiController {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@PutMapping({"/editAll"})
|
@PostMapping({"/editAll"})
|
||||||
public Result<T> b(@RequestBody OnlCgformModel var1) {
|
public Result<T> b(@RequestBody OnlCgformModel var1) {
|
||||||
try {
|
try {
|
||||||
return this.onlCgformHeadService.editAll(var1);
|
return this.onlCgformHeadService.editAll(var1);
|
||||||
@@ -402,7 +402,7 @@ public class OnlCgformApiController {
|
|||||||
module = ModuleType.ONLINE
|
module = ModuleType.ONLINE
|
||||||
)
|
)
|
||||||
@OnlineAuth("form")
|
@OnlineAuth("form")
|
||||||
@PutMapping({"/form/{code}"})
|
@PostMapping({"/form/update/{code}"})
|
||||||
public Result a(@PathVariable("code") String var1, @RequestBody JSONObject var2) {
|
public Result a(@PathVariable("code") String var1, @RequestBody JSONObject var2) {
|
||||||
try {
|
try {
|
||||||
String var3 = this.onlCgformHeadService.editManyFormData(var1, var2);
|
String var3 = this.onlCgformHeadService.editManyFormData(var1, var2);
|
||||||
@@ -421,7 +421,7 @@ public class OnlCgformApiController {
|
|||||||
module = ModuleType.ONLINE
|
module = ModuleType.ONLINE
|
||||||
)
|
)
|
||||||
@OnlineAuth("form")
|
@OnlineAuth("form")
|
||||||
@DeleteMapping({"/form/{code}/{id}"})
|
@PostMapping({"/form/{code}/{id}"})
|
||||||
public Result f(@PathVariable("code") String var1, @PathVariable("id") String var2) {
|
public Result f(@PathVariable("code") String var1, @PathVariable("id") String var2) {
|
||||||
OnlCgformHead var3 = this.onlCgformHeadService.getById(var1);
|
OnlCgformHead var3 = this.onlCgformHeadService.getById(var1);
|
||||||
if (var3 == null) {
|
if (var3 == null) {
|
||||||
@@ -478,7 +478,7 @@ public class OnlCgformApiController {
|
|||||||
value = "online删除数据",
|
value = "online删除数据",
|
||||||
module = ModuleType.ONLINE
|
module = ModuleType.ONLINE
|
||||||
)
|
)
|
||||||
@DeleteMapping({"/formByCode/{code}/{id}"})
|
@PostMapping({"/formByCode/{code}/{id}"})
|
||||||
public Result g(@PathVariable("code") String var1, @PathVariable("id") String var2) {
|
public Result g(@PathVariable("code") String var1, @PathVariable("id") String var2) {
|
||||||
OnlCgformHead var3 = this.onlCgformHeadService.getOne(new LambdaQueryWrapper<OnlCgformHead>().eq(OnlCgformHead::getTableName, var1));
|
OnlCgformHead var3 = this.onlCgformHeadService.getOne(new LambdaQueryWrapper<OnlCgformHead>().eq(OnlCgformHead::getTableName, var1));
|
||||||
if (var3 == null) {
|
if (var3 == null) {
|
||||||
@@ -1119,7 +1119,7 @@ public class OnlCgformApiController {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@PutMapping({"/crazyForm/{name}"})
|
@PostMapping({"/crazyForm/update/{name}"})
|
||||||
public Result<T> c(@PathVariable("name") String var1, @RequestBody JSONObject var2) {
|
public Result<T> c(@PathVariable("name") String var1, @RequestBody JSONObject var2) {
|
||||||
try {
|
try {
|
||||||
var2.remove("create_by");
|
var2.remove("create_by");
|
||||||
|
|||||||
+12
-5
@@ -8,12 +8,14 @@ import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
|||||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||||
import java.util.Arrays;
|
import java.util.Arrays;
|
||||||
|
import java.util.Map;
|
||||||
import javax.servlet.http.HttpServletRequest;
|
import javax.servlet.http.HttpServletRequest;
|
||||||
import com.jero.common.api.vo.Result;
|
import com.jero.common.api.vo.Result;
|
||||||
import com.jero.common.system.query.QueryGenerator;
|
import com.jero.common.system.query.QueryGenerator;
|
||||||
import com.jero.generater.modules.online.cgform.entity.OnlCgformButton;
|
import com.jero.generater.modules.online.cgform.entity.OnlCgformButton;
|
||||||
import com.jero.generater.modules.online.cgform.service.IOnlCgformButtonService;
|
import com.jero.generater.modules.online.cgform.service.IOnlCgformButtonService;
|
||||||
import lombok.extern.slf4j.Slf4j;
|
import lombok.extern.slf4j.Slf4j;
|
||||||
|
import org.apache.commons.lang.StringUtils;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
import org.springframework.web.bind.annotation.DeleteMapping;
|
import org.springframework.web.bind.annotation.DeleteMapping;
|
||||||
import org.springframework.web.bind.annotation.GetMapping;
|
import org.springframework.web.bind.annotation.GetMapping;
|
||||||
@@ -75,7 +77,7 @@ public class OnlCgformButtonController {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@PutMapping({"/edit"})
|
@PostMapping({"/edit"})
|
||||||
public Result<Object> edit(@RequestBody OnlCgformButton cgformButton) {
|
public Result<Object> edit(@RequestBody OnlCgformButton cgformButton) {
|
||||||
OnlCgformButton existCgformButton = this.onlCgformButtonService.getById(cgformButton.getId());
|
OnlCgformButton existCgformButton = this.onlCgformButtonService.getById(cgformButton.getId());
|
||||||
if (existCgformButton == null) {
|
if (existCgformButton == null) {
|
||||||
@@ -90,8 +92,12 @@ public class OnlCgformButtonController {
|
|||||||
return Result.OK();
|
return Result.OK();
|
||||||
}
|
}
|
||||||
|
|
||||||
@DeleteMapping({"/delete"})
|
@PostMapping({"/delete"})
|
||||||
public Result<Object> delete(@RequestParam(name = "id",required = true) String id) {
|
public Result<Object> delete(@RequestBody Map<String,String> map) {
|
||||||
|
String id = map.get("id");
|
||||||
|
if(StringUtils.isEmpty(id)){
|
||||||
|
return Result.error("参数不识别!");
|
||||||
|
}
|
||||||
OnlCgformButton cgformButton = this.onlCgformButtonService.getById(id);
|
OnlCgformButton cgformButton = this.onlCgformButtonService.getById(id);
|
||||||
if (cgformButton == null) {
|
if (cgformButton == null) {
|
||||||
return Result.error(EN_IS_NULL);
|
return Result.error(EN_IS_NULL);
|
||||||
@@ -105,8 +111,9 @@ public class OnlCgformButtonController {
|
|||||||
return Result.OK();
|
return Result.OK();
|
||||||
}
|
}
|
||||||
|
|
||||||
@DeleteMapping({"/deleteBatch"})
|
@PostMapping({"/deleteBatch"})
|
||||||
public Result<Object> deleteBatch(@RequestParam(name = "ids",required = true) String ids) {
|
public Result<Object> deleteBatch(@RequestBody Map<String,String> map) {
|
||||||
|
String ids = map.get("ids");
|
||||||
if (ids != null && !"".equals(ids.trim())) {
|
if (ids != null && !"".equals(ids.trim())) {
|
||||||
this.onlCgformButtonService.removeByIds(Arrays.asList(ids.split(",")));
|
this.onlCgformButtonService.removeByIds(Arrays.asList(ids.split(",")));
|
||||||
return Result.OK("删除成功!");
|
return Result.OK("删除成功!");
|
||||||
|
|||||||
+73
-38
@@ -7,6 +7,7 @@ import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
|||||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||||
|
|
||||||
import java.io.File;
|
import java.io.File;
|
||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
import java.io.InputStream;
|
import java.io.InputStream;
|
||||||
@@ -17,6 +18,7 @@ import javax.servlet.http.HttpServletRequest;
|
|||||||
import com.jero.codegenerate.properties.CodeConfigProperties;
|
import com.jero.codegenerate.properties.CodeConfigProperties;
|
||||||
import com.jero.generater.modules.online.cgform.entity.*;
|
import com.jero.generater.modules.online.cgform.entity.*;
|
||||||
import lombok.extern.slf4j.Slf4j;
|
import lombok.extern.slf4j.Slf4j;
|
||||||
|
import org.apache.commons.lang.StringUtils;
|
||||||
import org.apache.shiro.authz.annotation.RequiresRoles;
|
import org.apache.shiro.authz.annotation.RequiresRoles;
|
||||||
import com.jero.common.api.vo.Result;
|
import com.jero.common.api.vo.Result;
|
||||||
import com.jero.common.constant.enums.CgformEnum;
|
import com.jero.common.constant.enums.CgformEnum;
|
||||||
@@ -62,11 +64,11 @@ public class OnlCgformHeadController {
|
|||||||
private static final String EN_IS_NULL = "未找到对应实体";
|
private static final String EN_IS_NULL = "未找到对应实体";
|
||||||
private static final String SAVE_ERROR = "保存失败!";
|
private static final String SAVE_ERROR = "保存失败!";
|
||||||
private static final String DEL_ERROR = "删除失败!";
|
private static final String DEL_ERROR = "删除失败!";
|
||||||
|
private static final String PARAM_ERROR = "参数不识别!";
|
||||||
|
|
||||||
|
|
||||||
@GetMapping({"/list"})
|
@GetMapping({"/list"})
|
||||||
public Result<IPage<OnlCgformHead>> a(OnlCgformHead var1, @RequestParam(name = "pageNo",defaultValue = "1") Integer var2, @RequestParam(name = "pageSize",defaultValue = "10") Integer var3, HttpServletRequest var4) {
|
public Result<IPage<OnlCgformHead>> a(OnlCgformHead var1, @RequestParam(name = "pageNo", defaultValue = "1") Integer var2, @RequestParam(name = "pageSize", defaultValue = "10") Integer var3, HttpServletRequest var4) {
|
||||||
Result<IPage<OnlCgformHead>> var5 = new Result<>();
|
Result<IPage<OnlCgformHead>> var5 = new Result<>();
|
||||||
QueryWrapper<OnlCgformHead> var6 = QueryGenerator.initQueryWrapper(var1, var4.getParameterMap());
|
QueryWrapper<OnlCgformHead> var6 = QueryGenerator.initQueryWrapper(var1, var4.getParameterMap());
|
||||||
Page<OnlCgformHead> var7 = new Page<>(var2, var3);
|
Page<OnlCgformHead> var7 = new Page<>(var2, var3);
|
||||||
@@ -91,7 +93,7 @@ public class OnlCgformHeadController {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@PutMapping({"/edit"})
|
@PostMapping({"/edit"})
|
||||||
public Result<Object> edit(@RequestBody OnlCgformHead var1) {
|
public Result<Object> edit(@RequestBody OnlCgformHead var1) {
|
||||||
OnlCgformHead var3 = this.onlCgformHeadService.getById(var1.getId());
|
OnlCgformHead var3 = this.onlCgformHeadService.getById(var1.getId());
|
||||||
if (var3 == null) {
|
if (var3 == null) {
|
||||||
@@ -105,8 +107,12 @@ public class OnlCgformHeadController {
|
|||||||
return Result.OK();
|
return Result.OK();
|
||||||
}
|
}
|
||||||
|
|
||||||
@DeleteMapping({"/delete"})
|
@PostMapping({"/delete"})
|
||||||
public Result delete(@RequestParam(name = "id",required = true) String id) {
|
public Result delete(@RequestBody Map<String, String> map) {
|
||||||
|
String id = map.get("id");
|
||||||
|
if (id == null || "".equals(id.trim())) {
|
||||||
|
return Result.error(PARAM_ERROR);
|
||||||
|
}
|
||||||
try {
|
try {
|
||||||
this.onlCgformHeadService.deleteRecordAndTable(id);
|
this.onlCgformHeadService.deleteRecordAndTable(id);
|
||||||
} catch (DBException | SQLException e) {
|
} catch (DBException | SQLException e) {
|
||||||
@@ -116,8 +122,12 @@ public class OnlCgformHeadController {
|
|||||||
return Result.OK("删除成功!");
|
return Result.OK("删除成功!");
|
||||||
}
|
}
|
||||||
|
|
||||||
@DeleteMapping({"/removeRecord"})
|
@PostMapping({"/removeRecord"})
|
||||||
public Result removeRecord(@RequestParam(name = "id",required = true) String id) {
|
public Result removeRecord(@RequestBody Map<String, String> map) {
|
||||||
|
String id = map.get("id");
|
||||||
|
if (id == null || "".equals(id.trim())) {
|
||||||
|
return Result.error(PARAM_ERROR);
|
||||||
|
}
|
||||||
try {
|
try {
|
||||||
this.onlCgformHeadService.deleteRecord(id);
|
this.onlCgformHeadService.deleteRecord(id);
|
||||||
} catch (DBException | SQLException e) {
|
} catch (DBException | SQLException e) {
|
||||||
@@ -127,18 +137,23 @@ public class OnlCgformHeadController {
|
|||||||
return Result.OK("移除成功!");
|
return Result.OK("移除成功!");
|
||||||
}
|
}
|
||||||
|
|
||||||
@DeleteMapping({"/deleteBatch"})
|
@PostMapping({"/deleteBatch"})
|
||||||
public Result<Object> deleteBatch(@RequestParam(name = "ids",required = true) String var1, @RequestParam(name = "flag") String var2) {
|
public Result<Object> deleteBatch(@RequestBody Map<String, String> map) {
|
||||||
|
String var1 = map.get("ids");
|
||||||
|
String var2 = map.get("flag");
|
||||||
|
if (var2 == null || "".equals(var2.trim())) {
|
||||||
|
return Result.error(PARAM_ERROR);
|
||||||
|
}
|
||||||
if (var1 != null && !"".equals(var1.trim())) {
|
if (var1 != null && !"".equals(var1.trim())) {
|
||||||
this.onlCgformHeadService.deleteBatch(var1, var2);
|
this.onlCgformHeadService.deleteBatch(var1, var2);
|
||||||
return Result.OK("删除成功!");
|
return Result.OK("删除成功!");
|
||||||
} else {
|
} else {
|
||||||
return Result.error("参数不识别!");
|
return Result.error(PARAM_ERROR);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@GetMapping({"/queryById"})
|
@GetMapping({"/queryById"})
|
||||||
public Result<OnlCgformHead> queryById(@RequestParam(name = "id",required = true) String id) {
|
public Result<OnlCgformHead> queryById(@RequestParam(name = "id", required = true) String id) {
|
||||||
OnlCgformHead cgformHead = this.onlCgformHeadService.getById(id);
|
OnlCgformHead cgformHead = this.onlCgformHeadService.getById(id);
|
||||||
if (cgformHead == null) {
|
if (cgformHead == null) {
|
||||||
return Result.error(EN_IS_NULL);
|
return Result.error(EN_IS_NULL);
|
||||||
@@ -149,7 +164,7 @@ public class OnlCgformHeadController {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@GetMapping({"/queryByTableNames"})
|
@GetMapping({"/queryByTableNames"})
|
||||||
public Result queryByTableNames(@RequestParam(name = "tableNames",required = true) String var1) {
|
public Result queryByTableNames(@RequestParam(name = "tableNames", required = true) String var1) {
|
||||||
LambdaQueryWrapper<OnlCgformHead> var2 = new LambdaQueryWrapper<>();
|
LambdaQueryWrapper<OnlCgformHead> var2 = new LambdaQueryWrapper<>();
|
||||||
String[] var3 = var1.split(",");
|
String[] var3 = var1.split(",");
|
||||||
var2.in(OnlCgformHead::getTableName, Arrays.asList(var3));
|
var2.in(OnlCgformHead::getTableName, Arrays.asList(var3));
|
||||||
@@ -157,7 +172,7 @@ public class OnlCgformHeadController {
|
|||||||
return var4 == null ? Result.error(EN_IS_NULL) : Result.OK(var4);
|
return var4 == null ? Result.error(EN_IS_NULL) : Result.OK(var4);
|
||||||
}
|
}
|
||||||
|
|
||||||
@PostMapping({"/enhanceJs/{code}"})
|
@PostMapping({"/addEnhanceJs/{code}"})
|
||||||
public Result addEnhanceJs(@PathVariable("code") String var1, @RequestBody OnlCgformEnhanceJs var2) {
|
public Result addEnhanceJs(@PathVariable("code") String var1, @RequestBody OnlCgformEnhanceJs var2) {
|
||||||
try {
|
try {
|
||||||
var2.setCgformHeadId(var1);
|
var2.setCgformHeadId(var1);
|
||||||
@@ -181,7 +196,7 @@ public class OnlCgformHeadController {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@PutMapping({"/enhanceJs/{code}"})
|
@PostMapping({"/enhanceJs/{code}"})
|
||||||
public Result editEnhanceJs(@PathVariable("code") String var1, @RequestBody OnlCgformEnhanceJs var2) {
|
public Result editEnhanceJs(@PathVariable("code") String var1, @RequestBody OnlCgformEnhanceJs var2) {
|
||||||
try {
|
try {
|
||||||
var2.setCgformHeadId(var1);
|
var2.setCgformHeadId(var1);
|
||||||
@@ -211,7 +226,7 @@ public class OnlCgformHeadController {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@RequiresRoles({"admin"})
|
@RequiresRoles({"admin"})
|
||||||
@PostMapping({"/enhanceSql/{formId}"})
|
@PostMapping({"/addEnhanceSql/{formId}"})
|
||||||
public Result addEnhanceSql(@PathVariable("formId") String var1, @RequestBody OnlCgformEnhanceSql var2) {
|
public Result addEnhanceSql(@PathVariable("formId") String var1, @RequestBody OnlCgformEnhanceSql var2) {
|
||||||
try {
|
try {
|
||||||
var2.setCgformHeadId(var1);
|
var2.setCgformHeadId(var1);
|
||||||
@@ -228,7 +243,7 @@ public class OnlCgformHeadController {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@RequiresRoles({"admin"})
|
@RequiresRoles({"admin"})
|
||||||
@PutMapping({"/enhanceSql/{formId}"})
|
@PostMapping({"/enhanceSql/{formId}"})
|
||||||
public Result editEnhanceSql(@PathVariable("formId") String var1, @RequestBody OnlCgformEnhanceSql var2) {
|
public Result editEnhanceSql(@PathVariable("formId") String var1, @RequestBody OnlCgformEnhanceSql var2) {
|
||||||
try {
|
try {
|
||||||
var2.setCgformHeadId(var1);
|
var2.setCgformHeadId(var1);
|
||||||
@@ -244,8 +259,12 @@ public class OnlCgformHeadController {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@DeleteMapping({"/enhanceSql"})
|
@PostMapping({"/enhanceSql"})
|
||||||
public Result deletenhanceSql(@RequestParam(name = "id",required = true) String var1) {
|
public Result deletenhanceSql(@RequestBody Map<String, String> map) {
|
||||||
|
String var1 = map.get("id");
|
||||||
|
if (StringUtils.isBlank(var1)) {
|
||||||
|
return Result.error(PARAM_ERROR);
|
||||||
|
}
|
||||||
try {
|
try {
|
||||||
this.onlCgformEnhanceService.deleteEnhanceSql(var1);
|
this.onlCgformEnhanceService.deleteEnhanceSql(var1);
|
||||||
return Result.OK("删除成功");
|
return Result.OK("删除成功");
|
||||||
@@ -255,8 +274,12 @@ public class OnlCgformHeadController {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@DeleteMapping({"/deletebatchEnhanceSql"})
|
@PostMapping({"/deletebatchEnhanceSql"})
|
||||||
public Result deletebatchEnhanceSql(@RequestParam(name = "ids",required = true) String var1) {
|
public Result deletebatchEnhanceSql(@RequestBody Map<String, String> map) {
|
||||||
|
String var1 = map.get("ids");
|
||||||
|
if (StringUtils.isBlank(var1)) {
|
||||||
|
return Result.error(PARAM_ERROR);
|
||||||
|
}
|
||||||
try {
|
try {
|
||||||
List<String> var2 = Arrays.asList(var1.split(","));
|
List<String> var2 = Arrays.asList(var1.split(","));
|
||||||
this.onlCgformEnhanceService.deleteBatchEnhanceSql(var2);
|
this.onlCgformEnhanceService.deleteBatchEnhanceSql(var2);
|
||||||
@@ -273,7 +296,7 @@ public class OnlCgformHeadController {
|
|||||||
return Result.OK(var3);
|
return Result.OK(var3);
|
||||||
}
|
}
|
||||||
|
|
||||||
@PostMapping({"/enhanceJava/{formId}"})
|
@PostMapping({"/addEnhanceJava/{formId}"})
|
||||||
public Result addEnhanceJava(@PathVariable("formId") String formId, @RequestBody OnlCgformEnhanceJava var2) {
|
public Result addEnhanceJava(@PathVariable("formId") String formId, @RequestBody OnlCgformEnhanceJava var2) {
|
||||||
try {
|
try {
|
||||||
if (!CgformUtil.a(var2)) {
|
if (!CgformUtil.a(var2)) {
|
||||||
@@ -293,7 +316,7 @@ public class OnlCgformHeadController {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@PutMapping({"/enhanceJava/{formId}"})
|
@PostMapping({"/enhanceJava/{formId}"})
|
||||||
public Result c(@PathVariable("formId") String var1, @RequestBody OnlCgformEnhanceJava var2) {
|
public Result c(@PathVariable("formId") String var1, @RequestBody OnlCgformEnhanceJava var2) {
|
||||||
try {
|
try {
|
||||||
if (!CgformUtil.a(var2)) {
|
if (!CgformUtil.a(var2)) {
|
||||||
@@ -313,8 +336,12 @@ public class OnlCgformHeadController {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@DeleteMapping({"/enhanceJava"})
|
@PostMapping({"/enhanceJava"})
|
||||||
public Result g(@RequestParam(name = "id",required = true) String var1) {
|
public Result g(@RequestBody Map<String, String> map) {
|
||||||
|
String var1 = map.get("id");
|
||||||
|
if (StringUtils.isBlank(var1)) {
|
||||||
|
return Result.error(PARAM_ERROR);
|
||||||
|
}
|
||||||
try {
|
try {
|
||||||
this.onlCgformEnhanceService.deleteEnhanceJava(var1);
|
this.onlCgformEnhanceService.deleteEnhanceJava(var1);
|
||||||
return Result.OK("删除成功");
|
return Result.OK("删除成功");
|
||||||
@@ -324,8 +351,12 @@ public class OnlCgformHeadController {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@DeleteMapping({"/deleteBatchEnhanceJava"})
|
@PostMapping({"/deleteBatchEnhanceJava"})
|
||||||
public Result h(@RequestParam(name = "ids",required = true) String var1) {
|
public Result h(@RequestBody Map<String, String> map) {
|
||||||
|
String var1 = map.get("ids");
|
||||||
|
if (StringUtils.isBlank(var1)) {
|
||||||
|
return Result.error(PARAM_ERROR);
|
||||||
|
}
|
||||||
try {
|
try {
|
||||||
List<String> var2 = Arrays.asList(var1.split(","));
|
List<String> var2 = Arrays.asList(var1.split(","));
|
||||||
this.onlCgformEnhanceService.deleteBatchEnhanceJava(var2);
|
this.onlCgformEnhanceService.deleteBatchEnhanceJava(var2);
|
||||||
@@ -337,7 +368,7 @@ public class OnlCgformHeadController {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@GetMapping({"/queryTables"})
|
@GetMapping({"/queryTables"})
|
||||||
public Result a(@RequestParam(name = "tableName",required = false) String var1, @RequestParam(name = "pageNo",defaultValue = "1") Integer var2, @RequestParam(name = "pageSize",defaultValue = "10") Integer var3, HttpServletRequest var4) {
|
public Result a(@RequestParam(name = "tableName", required = false) String var1, @RequestParam(name = "pageNo", defaultValue = "1") Integer var2, @RequestParam(name = "pageSize", defaultValue = "10") Integer var3, HttpServletRequest var4) {
|
||||||
String var5 = JwtUtil.getUserNameByToken(var4);
|
String var5 = JwtUtil.getUserNameByToken(var4);
|
||||||
if (!"admin".equals(var5)) {
|
if (!"admin".equals(var5)) {
|
||||||
return Result.error("noadminauth");
|
return Result.error("noadminauth");
|
||||||
@@ -385,7 +416,7 @@ public class OnlCgformHeadController {
|
|||||||
c = var1;
|
c = var1;
|
||||||
String[] var4 = var1.split(",");
|
String[] var4 = var1.split(",");
|
||||||
|
|
||||||
for(int var5 = 0; var5 < var4.length; ++var5) {
|
for (int var5 = 0; var5 < var4.length; ++var5) {
|
||||||
if (oConvertUtils.isNotEmpty(var4[var5])) {
|
if (oConvertUtils.isNotEmpty(var4[var5])) {
|
||||||
int var6 = this.onlCgformHeadService.count(new LambdaQueryWrapper<OnlCgformHead>().eq(OnlCgformHead::getTableName, var4[var5]));
|
int var6 = this.onlCgformHeadService.count(new LambdaQueryWrapper<OnlCgformHead>().eq(OnlCgformHead::getTableName, var4[var5]));
|
||||||
if (var6 <= 0) {
|
if (var6 <= 0) {
|
||||||
@@ -399,11 +430,13 @@ public class OnlCgformHeadController {
|
|||||||
return Result.OK("同步完成!");
|
return Result.OK("同步完成!");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 获取磁盘根目录
|
* 获取磁盘根目录
|
||||||
* @date 2021/4/6 11:20
|
*
|
||||||
* @param
|
* @param
|
||||||
* @return com.jero.common.api.vo.Result
|
* @return com.jero.common.api.vo.Result
|
||||||
|
* @date 2021/4/6 11:20
|
||||||
*/
|
*/
|
||||||
@GetMapping({"/rootFile"})
|
@GetMapping({"/rootFile"})
|
||||||
public Result rootFile() {
|
public Result rootFile() {
|
||||||
@@ -411,7 +444,7 @@ public class OnlCgformHeadController {
|
|||||||
File[] files = File.listRoots();
|
File[] files = File.listRoots();
|
||||||
int var4 = files.length;
|
int var4 = files.length;
|
||||||
|
|
||||||
for(int i = 0; i < var4; ++i) {
|
for (int i = 0; i < var4; ++i) {
|
||||||
File file = files[i];
|
File file = files[i];
|
||||||
JSONObject jsonObject = new JSONObject();
|
JSONObject jsonObject = new JSONObject();
|
||||||
if (file.isDirectory()) {
|
if (file.isDirectory()) {
|
||||||
@@ -429,20 +462,22 @@ public class OnlCgformHeadController {
|
|||||||
|
|
||||||
return Result.OK(jsonArray);
|
return Result.OK(jsonArray);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 获取磁盘文件树
|
* 获取磁盘文件树
|
||||||
* @date 2021/4/6 11:20
|
*
|
||||||
* @param parentPath
|
* @param parentPath
|
||||||
* @return com.jero.common.api.vo.Result
|
* @return com.jero.common.api.vo.Result
|
||||||
|
* @date 2021/4/6 11:20
|
||||||
*/
|
*/
|
||||||
@GetMapping({"/fileTree"})
|
@GetMapping({"/fileTree"})
|
||||||
public Result fileTree(@RequestParam(name = "parentPath",required = true) String parentPath) {
|
public Result fileTree(@RequestParam(name = "parentPath", required = true) String parentPath) {
|
||||||
JSONArray jsonArray = new JSONArray();
|
JSONArray jsonArray = new JSONArray();
|
||||||
File file = new File(parentPath);
|
File file = new File(parentPath);
|
||||||
File[] files = file.listFiles();
|
File[] files = file.listFiles();
|
||||||
int length = files.length;
|
int length = files.length;
|
||||||
|
|
||||||
for(int i = 0; i < length; ++i) {
|
for (int i = 0; i < length; ++i) {
|
||||||
File file1 = files[i];
|
File file1 = files[i];
|
||||||
if (file1.isDirectory() && oConvertUtils.isNotEmpty(file1.getPath())) {
|
if (file1.isDirectory() && oConvertUtils.isNotEmpty(file1.getPath())) {
|
||||||
JSONObject jsonObject = new JSONObject();
|
JSONObject jsonObject = new JSONObject();
|
||||||
@@ -462,7 +497,7 @@ public class OnlCgformHeadController {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@GetMapping({"/tableInfo"})
|
@GetMapping({"/tableInfo"})
|
||||||
public Result tableInfo(@RequestParam(name = "code",required = true) String code) {
|
public Result tableInfo(@RequestParam(name = "code", required = true) String code) {
|
||||||
OnlCgformHead onlCgformHead = this.onlCgformHeadService.getById(code);
|
OnlCgformHead onlCgformHead = this.onlCgformHeadService.getById(code);
|
||||||
if (onlCgformHead == null) {
|
if (onlCgformHead == null) {
|
||||||
return Result.error(EN_IS_NULL);
|
return Result.error(EN_IS_NULL);
|
||||||
@@ -476,7 +511,7 @@ public class OnlCgformHeadController {
|
|||||||
String[] subTableArray = subTableStr.split(",");
|
String[] subTableArray = subTableStr.split(",");
|
||||||
int length = subTableArray.length;
|
int length = subTableArray.length;
|
||||||
|
|
||||||
for(int i = 0; i < length; ++i) {
|
for (int i = 0; i < length; ++i) {
|
||||||
String subTable = subTableArray[i];
|
String subTable = subTableArray[i];
|
||||||
LambdaQueryWrapper<OnlCgformHead> lambdaQueryWrapper = new LambdaQueryWrapper<>();
|
LambdaQueryWrapper<OnlCgformHead> lambdaQueryWrapper = new LambdaQueryWrapper<>();
|
||||||
lambdaQueryWrapper.eq(OnlCgformHead::getTableName, subTable);
|
lambdaQueryWrapper.eq(OnlCgformHead::getTableName, subTable);
|
||||||
@@ -514,7 +549,7 @@ public class OnlCgformHeadController {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@PostMapping({"/copyOnline"})
|
@PostMapping({"/copyOnline"})
|
||||||
public Result k(@RequestParam(name = "code",required = true) String var1) {
|
public Result k(@RequestParam(name = "code", required = true) String var1) {
|
||||||
try {
|
try {
|
||||||
OnlCgformHead var2 = this.onlCgformHeadService.getById(var1);
|
OnlCgformHead var2 = this.onlCgformHeadService.getById(var1);
|
||||||
if (var2 == null) {
|
if (var2 == null) {
|
||||||
@@ -538,8 +573,8 @@ public class OnlCgformHeadController {
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
var3 = (String)var2.next();
|
var3 = (String) var2.next();
|
||||||
} while(!var1.startsWith(var3) && !var1.startsWith(var3.toUpperCase()));
|
} while (!var1.startsWith(var3) && !var1.startsWith(var3.toUpperCase()));
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|||||||
+12
-5
@@ -9,12 +9,14 @@ import com.jero.common.system.query.QueryGenerator;
|
|||||||
import com.jero.generater.modules.online.cgform.entity.OnlCgformIndex;
|
import com.jero.generater.modules.online.cgform.entity.OnlCgformIndex;
|
||||||
import com.jero.generater.modules.online.cgform.service.IOnlCgformIndexService;
|
import com.jero.generater.modules.online.cgform.service.IOnlCgformIndexService;
|
||||||
import lombok.extern.slf4j.Slf4j;
|
import lombok.extern.slf4j.Slf4j;
|
||||||
|
import org.apache.commons.lang.StringUtils;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
import org.springframework.web.bind.annotation.*;
|
import org.springframework.web.bind.annotation.*;
|
||||||
|
|
||||||
import javax.servlet.http.HttpServletRequest;
|
import javax.servlet.http.HttpServletRequest;
|
||||||
import java.util.Arrays;
|
import java.util.Arrays;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
import java.util.Map;
|
||||||
|
|
||||||
@RestController("onlCgformIndexController")
|
@RestController("onlCgformIndexController")
|
||||||
@RequestMapping({"/online/cgform/index"})
|
@RequestMapping({"/online/cgform/index"})
|
||||||
@@ -58,7 +60,7 @@ public class OnlCgformIndexController {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@PutMapping({"/edit"})
|
@PostMapping({"/edit"})
|
||||||
public Result<Object> edit(@RequestBody OnlCgformIndex cgformIndex) {
|
public Result<Object> edit(@RequestBody OnlCgformIndex cgformIndex) {
|
||||||
OnlCgformIndex existCgformIndex = this.onlCgformIndexService.getById(cgformIndex.getId());
|
OnlCgformIndex existCgformIndex = this.onlCgformIndexService.getById(cgformIndex.getId());
|
||||||
if (existCgformIndex == null) {
|
if (existCgformIndex == null) {
|
||||||
@@ -73,8 +75,12 @@ public class OnlCgformIndexController {
|
|||||||
return Result.OK();
|
return Result.OK();
|
||||||
}
|
}
|
||||||
|
|
||||||
@DeleteMapping({"/delete"})
|
@PostMapping({"/delete"})
|
||||||
public Result<Object> delete(@RequestParam(name = "id",required = true) String id) {
|
public Result<Object> delete(@RequestBody Map<String,String> map) {
|
||||||
|
String id = map.get("id");
|
||||||
|
if(StringUtils.isBlank(id)){
|
||||||
|
return Result.error("参数不识别!");
|
||||||
|
}
|
||||||
OnlCgformIndex cgformIndex = this.onlCgformIndexService.getById(id);
|
OnlCgformIndex cgformIndex = this.onlCgformIndexService.getById(id);
|
||||||
if (cgformIndex == null) {
|
if (cgformIndex == null) {
|
||||||
return Result.error(EN_IS_NULL);
|
return Result.error(EN_IS_NULL);
|
||||||
@@ -88,8 +94,9 @@ public class OnlCgformIndexController {
|
|||||||
return Result.OK();
|
return Result.OK();
|
||||||
}
|
}
|
||||||
|
|
||||||
@DeleteMapping({"/deleteBatch"})
|
@PostMapping({"/deleteBatch"})
|
||||||
public Result<Object> deleteBatch(@RequestParam(name = "ids",required = true) String ids) {
|
public Result<Object> deleteBatch(@RequestBody Map<String,String> map) {
|
||||||
|
String ids = map.get("ids");
|
||||||
if (ids != null && !"".equals(ids.trim())) {
|
if (ids != null && !"".equals(ids.trim())) {
|
||||||
this.onlCgformIndexService.removeByIds(Arrays.asList(ids.split(",")));
|
this.onlCgformIndexService.removeByIds(Arrays.asList(ids.split(",")));
|
||||||
return Result.OK("删除成功!");
|
return Result.OK("删除成功!");
|
||||||
|
|||||||
+15
-9
@@ -4,10 +4,8 @@ package com.jero.generater.modules.online.cgreport.controller;
|
|||||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||||
import java.util.ArrayList;
|
|
||||||
import java.util.HashMap;
|
import java.util.*;
|
||||||
import java.util.Iterator;
|
|
||||||
import java.util.List;
|
|
||||||
import javax.servlet.http.HttpServletRequest;
|
import javax.servlet.http.HttpServletRequest;
|
||||||
|
|
||||||
import com.jero.modules.base.service.BaseCommonService;
|
import com.jero.modules.base.service.BaseCommonService;
|
||||||
@@ -168,7 +166,7 @@ public class OnlCgreportHeadController {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@PutMapping({"/editAll"})
|
@PostMapping({"/editAll"})
|
||||||
public Result editAll(@RequestBody OnlCgreportModel cgreportModel) {
|
public Result editAll(@RequestBody OnlCgreportModel cgreportModel) {
|
||||||
try {
|
try {
|
||||||
return this.onlCgreportHeadService.editAll(cgreportModel);
|
return this.onlCgreportHeadService.editAll(cgreportModel);
|
||||||
@@ -178,13 +176,21 @@ public class OnlCgreportHeadController {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@DeleteMapping({"/delete"})
|
@PostMapping({"/delete"})
|
||||||
public Result delete(@RequestParam(name = "id",required = true) String id) {
|
public Result delete(@RequestBody Map<String,String> map) {
|
||||||
|
String id = map.get("id");
|
||||||
|
if(StringUtils.isBlank(id)){
|
||||||
|
return Result.error("参数不识别!");
|
||||||
|
}
|
||||||
return this.onlCgreportHeadService.delete(id);
|
return this.onlCgreportHeadService.delete(id);
|
||||||
}
|
}
|
||||||
|
|
||||||
@DeleteMapping({"/deleteBatch"})
|
@PostMapping({"/deleteBatch"})
|
||||||
public Result deleteBatch(@RequestParam(name = "ids",required = true) String ids) {
|
public Result<Object> deleteBatch(@RequestBody Map<String,String> map) {
|
||||||
|
String ids = map.get("ids");
|
||||||
|
if(StringUtils.isBlank(ids)){
|
||||||
|
return Result.error("参数不识别!");
|
||||||
|
}
|
||||||
return this.onlCgreportHeadService.bathDelete(ids.split(","));
|
return this.onlCgreportHeadService.bathDelete(ids.split(","));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
+20
-16
@@ -4,23 +4,19 @@ package com.jero.generater.modules.online.cgreport.controller;
|
|||||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||||
import java.util.Arrays;
|
|
||||||
import java.util.List;
|
|
||||||
import javax.servlet.http.HttpServletRequest;
|
|
||||||
import com.jero.common.api.vo.Result;
|
import com.jero.common.api.vo.Result;
|
||||||
import com.jero.common.system.query.QueryGenerator;
|
import com.jero.common.system.query.QueryGenerator;
|
||||||
import com.jero.generater.modules.online.cgreport.entity.OnlCgreportItem;
|
import com.jero.generater.modules.online.cgreport.entity.OnlCgreportItem;
|
||||||
import com.jero.generater.modules.online.cgreport.service.IOnlCgreportItemService;
|
import com.jero.generater.modules.online.cgreport.service.IOnlCgreportItemService;
|
||||||
import lombok.extern.slf4j.Slf4j;
|
import lombok.extern.slf4j.Slf4j;
|
||||||
|
import org.apache.commons.lang.StringUtils;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
import org.springframework.web.bind.annotation.DeleteMapping;
|
import org.springframework.web.bind.annotation.*;
|
||||||
import org.springframework.web.bind.annotation.GetMapping;
|
|
||||||
import org.springframework.web.bind.annotation.PostMapping;
|
import javax.servlet.http.HttpServletRequest;
|
||||||
import org.springframework.web.bind.annotation.PutMapping;
|
import java.util.Arrays;
|
||||||
import org.springframework.web.bind.annotation.RequestBody;
|
import java.util.List;
|
||||||
import org.springframework.web.bind.annotation.RequestMapping;
|
import java.util.Map;
|
||||||
import org.springframework.web.bind.annotation.RequestParam;
|
|
||||||
import org.springframework.web.bind.annotation.RestController;
|
|
||||||
|
|
||||||
@RestController("onlCgreportItemController")
|
@RestController("onlCgreportItemController")
|
||||||
@RequestMapping({"/online/cgreport/item"})
|
@RequestMapping({"/online/cgreport/item"})
|
||||||
@@ -59,20 +55,28 @@ public class OnlCgreportItemController {
|
|||||||
return Result.OK("操作成功!");
|
return Result.OK("操作成功!");
|
||||||
}
|
}
|
||||||
|
|
||||||
@PutMapping({"/edit"})
|
@PostMapping({"/edit"})
|
||||||
public Result b(@RequestBody OnlCgreportItem var1) {
|
public Result b(@RequestBody OnlCgreportItem var1) {
|
||||||
this.onlCgreportItemService.updateById(var1);
|
this.onlCgreportItemService.updateById(var1);
|
||||||
return Result.OK("操作成功!");
|
return Result.OK("操作成功!");
|
||||||
}
|
}
|
||||||
|
|
||||||
@DeleteMapping({"/delete"})
|
@PostMapping({"/delete"})
|
||||||
public Result b(@RequestParam(name = "id",required = true) String var1) {
|
public Result b(@RequestBody Map<String,String> map) {
|
||||||
|
String var1 = map.get("id");
|
||||||
|
if(StringUtils.isEmpty(var1)){
|
||||||
|
return Result.error("参数不识别!");
|
||||||
|
}
|
||||||
this.onlCgreportItemService.removeById(var1);
|
this.onlCgreportItemService.removeById(var1);
|
||||||
return Result.OK("删除成功!");
|
return Result.OK("删除成功!");
|
||||||
}
|
}
|
||||||
|
|
||||||
@DeleteMapping({"/deleteBatch"})
|
@PostMapping({"/deleteBatch"})
|
||||||
public Result c(@RequestParam(name = "ids",required = true) String var1) {
|
public Result c(@RequestBody Map<String,String> map) {
|
||||||
|
String var1 = map.get("ids");
|
||||||
|
if(StringUtils.isBlank(var1)){
|
||||||
|
return Result.error("参数不识别!");
|
||||||
|
}
|
||||||
this.onlCgreportItemService.removeByIds(Arrays.asList(var1.split(",")));
|
this.onlCgreportItemService.removeByIds(Arrays.asList(var1.split(",")));
|
||||||
return Result.OK("批量删除成功!");
|
return Result.OK("批量删除成功!");
|
||||||
}
|
}
|
||||||
|
|||||||
+7
@@ -9,6 +9,7 @@ import com.jero.common.system.query.QueryGenerator;
|
|||||||
import com.jero.generater.modules.online.cgreport.entity.OnlCgreportParam;
|
import com.jero.generater.modules.online.cgreport.entity.OnlCgreportParam;
|
||||||
import com.jero.generater.modules.online.cgreport.service.IOnlCgreportParamService;
|
import com.jero.generater.modules.online.cgreport.service.IOnlCgreportParamService;
|
||||||
import lombok.extern.slf4j.Slf4j;
|
import lombok.extern.slf4j.Slf4j;
|
||||||
|
import org.apache.commons.lang.StringUtils;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
import org.springframework.web.bind.annotation.*;
|
import org.springframework.web.bind.annotation.*;
|
||||||
|
|
||||||
@@ -65,6 +66,9 @@ public class OnlCgreportParamController {
|
|||||||
// public Result b(@RequestParam(name = "id",required = true) String var1) {
|
// public Result b(@RequestParam(name = "id",required = true) String var1) {
|
||||||
public Result<Object> b(@RequestBody Map<String, String> map) {
|
public Result<Object> b(@RequestBody Map<String, String> map) {
|
||||||
String var1 = map.get("id");
|
String var1 = map.get("id");
|
||||||
|
if(StringUtils.isBlank(var1)){
|
||||||
|
return Result.error("参数不识别!");
|
||||||
|
}
|
||||||
this.onlCgreportParamService.removeById(var1);
|
this.onlCgreportParamService.removeById(var1);
|
||||||
return Result.OK("删除成功!");
|
return Result.OK("删除成功!");
|
||||||
}
|
}
|
||||||
@@ -73,6 +77,9 @@ public class OnlCgreportParamController {
|
|||||||
// public Result c(@RequestParam(name = "ids", required = true) String var1) {
|
// public Result c(@RequestParam(name = "ids", required = true) String var1) {
|
||||||
public Result<Object> deleteBatch(@RequestBody Map<String, String> map) {
|
public Result<Object> deleteBatch(@RequestBody Map<String, String> map) {
|
||||||
String var1 = map.get("ids");
|
String var1 = map.get("ids");
|
||||||
|
if(StringUtils.isBlank(var1)){
|
||||||
|
return Result.error("参数不识别!");
|
||||||
|
}
|
||||||
this.onlCgreportParamService.removeByIds(Arrays.asList(var1.split(",")));
|
this.onlCgreportParamService.removeByIds(Arrays.asList(var1.split(",")));
|
||||||
return Result.OK("批量删除成功!");
|
return Result.OK("批量删除成功!");
|
||||||
}
|
}
|
||||||
|
|||||||
+7
@@ -18,6 +18,7 @@ import io.swagger.annotations.Api;
|
|||||||
import io.swagger.annotations.ApiOperation;
|
import io.swagger.annotations.ApiOperation;
|
||||||
import io.swagger.annotations.ApiParam;
|
import io.swagger.annotations.ApiParam;
|
||||||
import lombok.extern.slf4j.Slf4j;
|
import lombok.extern.slf4j.Slf4j;
|
||||||
|
import org.apache.commons.lang.StringUtils;
|
||||||
import org.apache.poi.ss.formula.functions.T;
|
import org.apache.poi.ss.formula.functions.T;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
import org.springframework.web.bind.annotation.*;
|
import org.springframework.web.bind.annotation.*;
|
||||||
@@ -108,6 +109,9 @@ public class JeroDemoController extends JeroController<JeroDemo, IJeroDemoServic
|
|||||||
@ApiOperation(value = "通过ID删除DEMO", notes = "通过ID删除DEMO")
|
@ApiOperation(value = "通过ID删除DEMO", notes = "通过ID删除DEMO")
|
||||||
public Result<T> delete(@RequestBody Map<String, String> map) {
|
public Result<T> delete(@RequestBody Map<String, String> map) {
|
||||||
String id = map.get("id");
|
String id = map.get("id");
|
||||||
|
if(StringUtils.isBlank(id)){
|
||||||
|
return Result.error("参数不识别!");
|
||||||
|
}
|
||||||
JeroDemoService.removeById(id);
|
JeroDemoService.removeById(id);
|
||||||
return Result.OK("删除成功!");
|
return Result.OK("删除成功!");
|
||||||
}
|
}
|
||||||
@@ -122,6 +126,9 @@ public class JeroDemoController extends JeroController<JeroDemo, IJeroDemoServic
|
|||||||
@ApiOperation(value = "批量删除DEMO", notes = "批量删除DEMO")
|
@ApiOperation(value = "批量删除DEMO", notes = "批量删除DEMO")
|
||||||
public Result<T> deleteBatch(@RequestBody Map<String, String> map) {
|
public Result<T> deleteBatch(@RequestBody Map<String, String> map) {
|
||||||
String ids = map.get("ids");
|
String ids = map.get("ids");
|
||||||
|
if(StringUtils.isBlank(ids)){
|
||||||
|
return Result.error("参数不识别!");
|
||||||
|
}
|
||||||
this.JeroDemoService.removeByIds(Arrays.asList(ids.split(",")));
|
this.JeroDemoService.removeByIds(Arrays.asList(ids.split(",")));
|
||||||
return Result.OK("批量删除成功!");
|
return Result.OK("批量删除成功!");
|
||||||
}
|
}
|
||||||
|
|||||||
+7
@@ -15,6 +15,7 @@ import com.jero.modules.demo.test.service.IJeroOrderMainService;
|
|||||||
import com.jero.modules.demo.test.service.IJeroOrderTicketService;
|
import com.jero.modules.demo.test.service.IJeroOrderTicketService;
|
||||||
import com.jero.modules.demo.test.vo.JeroOrderMainPage;
|
import com.jero.modules.demo.test.vo.JeroOrderMainPage;
|
||||||
import lombok.extern.slf4j.Slf4j;
|
import lombok.extern.slf4j.Slf4j;
|
||||||
|
import org.apache.commons.lang.StringUtils;
|
||||||
import org.apache.poi.ss.formula.functions.T;
|
import org.apache.poi.ss.formula.functions.T;
|
||||||
import org.apache.shiro.SecurityUtils;
|
import org.apache.shiro.SecurityUtils;
|
||||||
import org.jeecgframework.poi.excel.ExcelImportUtil;
|
import org.jeecgframework.poi.excel.ExcelImportUtil;
|
||||||
@@ -108,6 +109,9 @@ public class JeroOrderMainController extends JeroController<JeroOrderMain, IJero
|
|||||||
@PostMapping(value = "/delete")
|
@PostMapping(value = "/delete")
|
||||||
public Result<T> delete(@RequestBody Map<String, String> map) {
|
public Result<T> delete(@RequestBody Map<String, String> map) {
|
||||||
String id = map.get("id");
|
String id = map.get("id");
|
||||||
|
if(StringUtils.isBlank(id)){
|
||||||
|
return Result.error("参数不识别!");
|
||||||
|
}
|
||||||
jeroOrderMainService.delMain(id);
|
jeroOrderMainService.delMain(id);
|
||||||
return Result.OK("删除成功!");
|
return Result.OK("删除成功!");
|
||||||
}
|
}
|
||||||
@@ -121,6 +125,9 @@ public class JeroOrderMainController extends JeroController<JeroOrderMain, IJero
|
|||||||
@PostMapping(value = "/deleteBatch")
|
@PostMapping(value = "/deleteBatch")
|
||||||
public Result<T> deleteBatch(@RequestBody Map<String, String> map) {
|
public Result<T> deleteBatch(@RequestBody Map<String, String> map) {
|
||||||
String ids = map.get("ids");
|
String ids = map.get("ids");
|
||||||
|
if(StringUtils.isBlank(ids)){
|
||||||
|
return Result.error("参数不识别!");
|
||||||
|
}
|
||||||
this.jeroOrderMainService.delBatchMain(Arrays.asList(ids.split(",")));
|
this.jeroOrderMainService.delBatchMain(Arrays.asList(ids.split(",")));
|
||||||
return Result.OK("批量删除成功!");
|
return Result.OK("批量删除成功!");
|
||||||
}
|
}
|
||||||
|
|||||||
+19
@@ -15,6 +15,7 @@ import com.jero.modules.demo.test.service.IJeroOrderCustomerService;
|
|||||||
import com.jero.modules.demo.test.service.IJeroOrderMainService;
|
import com.jero.modules.demo.test.service.IJeroOrderMainService;
|
||||||
import com.jero.modules.demo.test.service.IJeroOrderTicketService;
|
import com.jero.modules.demo.test.service.IJeroOrderTicketService;
|
||||||
import com.jero.modules.demo.test.vo.JeroOrderMainPage;
|
import com.jero.modules.demo.test.vo.JeroOrderMainPage;
|
||||||
|
import org.apache.commons.lang.StringUtils;
|
||||||
import org.apache.poi.ss.formula.functions.T;
|
import org.apache.poi.ss.formula.functions.T;
|
||||||
import org.springframework.beans.BeanUtils;
|
import org.springframework.beans.BeanUtils;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
@@ -108,6 +109,9 @@ public class JeroOrderTabMainController {
|
|||||||
@PostMapping(value = "/delete")
|
@PostMapping(value = "/delete")
|
||||||
public Result<T> delete(@RequestBody Map<String, String> map) {
|
public Result<T> delete(@RequestBody Map<String, String> map) {
|
||||||
String id = map.get("id");
|
String id = map.get("id");
|
||||||
|
if(StringUtils.isBlank(id)){
|
||||||
|
return Result.error("参数不识别!");
|
||||||
|
}
|
||||||
jeroOrderMainService.delMain(id);
|
jeroOrderMainService.delMain(id);
|
||||||
return Result.OK(ResultConstant.DEL_OK);
|
return Result.OK(ResultConstant.DEL_OK);
|
||||||
}
|
}
|
||||||
@@ -121,6 +125,9 @@ public class JeroOrderTabMainController {
|
|||||||
@PostMapping(value = "/deleteBatch")
|
@PostMapping(value = "/deleteBatch")
|
||||||
public Result<T> deleteBatch(@RequestBody Map<String, String> map) {
|
public Result<T> deleteBatch(@RequestBody Map<String, String> map) {
|
||||||
String ids = map.get("ids");
|
String ids = map.get("ids");
|
||||||
|
if(StringUtils.isBlank(ids)){
|
||||||
|
return Result.error("参数不识别!");
|
||||||
|
}
|
||||||
this.jeroOrderMainService.removeByIds(Arrays.asList(ids.split(",")));
|
this.jeroOrderMainService.removeByIds(Arrays.asList(ids.split(",")));
|
||||||
return Result.OK(ResultConstant.BATCH_DEL_OK);
|
return Result.OK(ResultConstant.BATCH_DEL_OK);
|
||||||
}
|
}
|
||||||
@@ -205,6 +212,9 @@ public class JeroOrderTabMainController {
|
|||||||
@PostMapping(value = "/deleteCustomer")
|
@PostMapping(value = "/deleteCustomer")
|
||||||
public Result<T> deleteCustomer(@RequestBody Map<String, String> map) {
|
public Result<T> deleteCustomer(@RequestBody Map<String, String> map) {
|
||||||
String id = map.get("id");
|
String id = map.get("id");
|
||||||
|
if(StringUtils.isBlank(id)){
|
||||||
|
return Result.error("参数不识别!");
|
||||||
|
}
|
||||||
jeroOrderCustomerService.removeById(id);
|
jeroOrderCustomerService.removeById(id);
|
||||||
return Result.OK(ResultConstant.DEL_OK);
|
return Result.OK(ResultConstant.DEL_OK);
|
||||||
}
|
}
|
||||||
@@ -218,6 +228,9 @@ public class JeroOrderTabMainController {
|
|||||||
@PostMapping(value = "/deleteBatchCustomer")
|
@PostMapping(value = "/deleteBatchCustomer")
|
||||||
public Result<T> deleteBatchCustomer(@RequestBody Map<String, String> map) {
|
public Result<T> deleteBatchCustomer(@RequestBody Map<String, String> map) {
|
||||||
String ids = map.get("ids");
|
String ids = map.get("ids");
|
||||||
|
if(StringUtils.isBlank(ids)){
|
||||||
|
return Result.error("参数不识别!");
|
||||||
|
}
|
||||||
this.jeroOrderCustomerService.removeByIds(Arrays.asList(ids.split(",")));
|
this.jeroOrderCustomerService.removeByIds(Arrays.asList(ids.split(",")));
|
||||||
return Result.OK(ResultConstant.BATCH_DEL_OK);
|
return Result.OK(ResultConstant.BATCH_DEL_OK);
|
||||||
}
|
}
|
||||||
@@ -255,6 +268,9 @@ public class JeroOrderTabMainController {
|
|||||||
@PostMapping(value = "/deleteTicket")
|
@PostMapping(value = "/deleteTicket")
|
||||||
public Result<T> deleteTicket(@RequestBody Map<String, String> map) {
|
public Result<T> deleteTicket(@RequestBody Map<String, String> map) {
|
||||||
String id = map.get("id");
|
String id = map.get("id");
|
||||||
|
if(StringUtils.isBlank(id)){
|
||||||
|
return Result.error("参数不识别!");
|
||||||
|
}
|
||||||
jeroOrderTicketService.removeById(id);
|
jeroOrderTicketService.removeById(id);
|
||||||
return Result.OK(ResultConstant.DEL_OK);
|
return Result.OK(ResultConstant.DEL_OK);
|
||||||
}
|
}
|
||||||
@@ -268,6 +284,9 @@ public class JeroOrderTabMainController {
|
|||||||
@PostMapping(value = "/deleteBatchTicket")
|
@PostMapping(value = "/deleteBatchTicket")
|
||||||
public Result<T> deleteBatchTicket(@RequestBody Map<String, String> map) {
|
public Result<T> deleteBatchTicket(@RequestBody Map<String, String> map) {
|
||||||
String ids = map.get("ids");
|
String ids = map.get("ids");
|
||||||
|
if(StringUtils.isBlank(ids)){
|
||||||
|
return Result.error("参数不识别!");
|
||||||
|
}
|
||||||
this.jeroOrderTicketService.removeByIds(Arrays.asList(ids.split(",")));
|
this.jeroOrderTicketService.removeByIds(Arrays.asList(ids.split(",")));
|
||||||
return Result.OK(ResultConstant.BATCH_DEL_OK);
|
return Result.OK(ResultConstant.BATCH_DEL_OK);
|
||||||
}
|
}
|
||||||
|
|||||||
+4
@@ -11,6 +11,7 @@ import com.jero.common.system.query.QueryGenerator;
|
|||||||
import com.jero.common.util.oConvertUtils;
|
import com.jero.common.util.oConvertUtils;
|
||||||
import com.jero.modules.demo.test.entity.JoaDemo;
|
import com.jero.modules.demo.test.entity.JoaDemo;
|
||||||
import com.jero.modules.demo.test.service.IJoaDemoService;
|
import com.jero.modules.demo.test.service.IJoaDemoService;
|
||||||
|
import org.apache.commons.lang.StringUtils;
|
||||||
import lombok.extern.slf4j.Slf4j;
|
import lombok.extern.slf4j.Slf4j;
|
||||||
import org.apache.poi.ss.formula.functions.T;
|
import org.apache.poi.ss.formula.functions.T;
|
||||||
import org.jeecgframework.poi.excel.ExcelImportUtil;
|
import org.jeecgframework.poi.excel.ExcelImportUtil;
|
||||||
@@ -112,6 +113,9 @@ public class JoaDemoController {
|
|||||||
@PostMapping(value = "/delete")
|
@PostMapping(value = "/delete")
|
||||||
public Result<Object> delete(@RequestBody Map<String, String> map) {
|
public Result<Object> delete(@RequestBody Map<String, String> map) {
|
||||||
String id = map.get("id");
|
String id = map.get("id");
|
||||||
|
if(StringUtils.isBlank(id)){
|
||||||
|
return Result.error("参数不识别!");
|
||||||
|
}
|
||||||
JoaDemo joaDemo = joaDemoService.getById(id);
|
JoaDemo joaDemo = joaDemoService.getById(id);
|
||||||
if(joaDemo==null) {
|
if(joaDemo==null) {
|
||||||
return Result.error(ResultConstant.EN_WAS_NOT_FOUND);
|
return Result.error(ResultConstant.EN_WAS_NOT_FOUND);
|
||||||
|
|||||||
+7
@@ -9,6 +9,7 @@ import com.jero.common.system.query.QueryGenerator;
|
|||||||
import com.jero.modules.message.entity.SysMessage;
|
import com.jero.modules.message.entity.SysMessage;
|
||||||
import com.jero.modules.message.service.ISysMessageService;
|
import com.jero.modules.message.service.ISysMessageService;
|
||||||
import lombok.extern.slf4j.Slf4j;
|
import lombok.extern.slf4j.Slf4j;
|
||||||
|
import org.apache.commons.lang.StringUtils;
|
||||||
import org.apache.poi.ss.formula.functions.T;
|
import org.apache.poi.ss.formula.functions.T;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
import org.springframework.web.bind.annotation.*;
|
import org.springframework.web.bind.annotation.*;
|
||||||
@@ -84,6 +85,9 @@ public class SysMessageController extends JeroController<SysMessage, ISysMessage
|
|||||||
@PostMapping(value = "/delete")
|
@PostMapping(value = "/delete")
|
||||||
public Result<T> delete(@RequestBody Map<String, String> map) {
|
public Result<T> delete(@RequestBody Map<String, String> map) {
|
||||||
String id = map.get("id");
|
String id = map.get("id");
|
||||||
|
if(StringUtils.isBlank(id)){
|
||||||
|
return Result.error("参数不识别!");
|
||||||
|
}
|
||||||
sysMessageService.removeById(id);
|
sysMessageService.removeById(id);
|
||||||
return Result.OK("删除成功!");
|
return Result.OK("删除成功!");
|
||||||
}
|
}
|
||||||
@@ -97,6 +101,9 @@ public class SysMessageController extends JeroController<SysMessage, ISysMessage
|
|||||||
@PostMapping(value = "/deleteBatch")
|
@PostMapping(value = "/deleteBatch")
|
||||||
public Result<T> deleteBatch(@RequestBody Map<String, String> map) {
|
public Result<T> deleteBatch(@RequestBody Map<String, String> map) {
|
||||||
String ids = map.get("ids");
|
String ids = map.get("ids");
|
||||||
|
if(StringUtils.isBlank(ids)){
|
||||||
|
return Result.error("参数不识别!");
|
||||||
|
}
|
||||||
this.sysMessageService.removeByIds(Arrays.asList(ids.split(",")));
|
this.sysMessageService.removeByIds(Arrays.asList(ids.split(",")));
|
||||||
return Result.OK("批量删除成功!");
|
return Result.OK("批量删除成功!");
|
||||||
}
|
}
|
||||||
|
|||||||
+7
@@ -12,6 +12,7 @@ import com.jero.modules.message.entity.SysMessageTemplate;
|
|||||||
import com.jero.modules.message.service.ISysMessageTemplateService;
|
import com.jero.modules.message.service.ISysMessageTemplateService;
|
||||||
import com.jero.modules.message.util.PushMsgUtil;
|
import com.jero.modules.message.util.PushMsgUtil;
|
||||||
import lombok.extern.slf4j.Slf4j;
|
import lombok.extern.slf4j.Slf4j;
|
||||||
|
import org.apache.commons.lang.StringUtils;
|
||||||
import org.apache.poi.ss.formula.functions.T;
|
import org.apache.poi.ss.formula.functions.T;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
import org.springframework.web.bind.annotation.*;
|
import org.springframework.web.bind.annotation.*;
|
||||||
@@ -88,6 +89,9 @@ public class SysMessageTemplateController extends JeroController<SysMessageTempl
|
|||||||
@PostMapping(value = "/delete")
|
@PostMapping(value = "/delete")
|
||||||
public Result<T> delete(@RequestBody Map<String, String> map) {
|
public Result<T> delete(@RequestBody Map<String, String> map) {
|
||||||
String id = map.get("id");
|
String id = map.get("id");
|
||||||
|
if(StringUtils.isBlank(id)){
|
||||||
|
return Result.error("参数不识别!");
|
||||||
|
}
|
||||||
sysMessageTemplateService.removeById(id);
|
sysMessageTemplateService.removeById(id);
|
||||||
return Result.OK("删除成功!");
|
return Result.OK("删除成功!");
|
||||||
}
|
}
|
||||||
@@ -101,6 +105,9 @@ public class SysMessageTemplateController extends JeroController<SysMessageTempl
|
|||||||
@PostMapping(value = "/deleteBatch")
|
@PostMapping(value = "/deleteBatch")
|
||||||
public Result<T> deleteBatch(@RequestBody Map<String, String> map) {
|
public Result<T> deleteBatch(@RequestBody Map<String, String> map) {
|
||||||
String ids = map.get("ids");
|
String ids = map.get("ids");
|
||||||
|
if(StringUtils.isBlank(ids)){
|
||||||
|
return Result.error("参数不识别!");
|
||||||
|
}
|
||||||
this.sysMessageTemplateService.removeByIds(Arrays.asList(ids.split(",")));
|
this.sysMessageTemplateService.removeByIds(Arrays.asList(ids.split(",")));
|
||||||
return Result.OK("批量删除成功!");
|
return Result.OK("批量删除成功!");
|
||||||
}
|
}
|
||||||
|
|||||||
+4
@@ -8,6 +8,7 @@ import com.jero.common.system.query.QueryGenerator;
|
|||||||
import com.jero.modules.oss.entity.OSSFile;
|
import com.jero.modules.oss.entity.OSSFile;
|
||||||
import com.jero.modules.oss.service.IOSSFileService;
|
import com.jero.modules.oss.service.IOSSFileService;
|
||||||
import lombok.extern.slf4j.Slf4j;
|
import lombok.extern.slf4j.Slf4j;
|
||||||
|
import org.apache.commons.lang.StringUtils;
|
||||||
import org.apache.poi.ss.formula.functions.T;
|
import org.apache.poi.ss.formula.functions.T;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
import org.springframework.stereotype.Controller;
|
import org.springframework.stereotype.Controller;
|
||||||
@@ -57,6 +58,9 @@ public class OSSFileController {
|
|||||||
@PostMapping("/delete")
|
@PostMapping("/delete")
|
||||||
public Result<T> delete(@RequestBody Map<String,String> map) {
|
public Result<T> delete(@RequestBody Map<String,String> map) {
|
||||||
String id = map.get("id");
|
String id = map.get("id");
|
||||||
|
if(StringUtils.isBlank(id)){
|
||||||
|
return Result.error("参数不识别!");
|
||||||
|
}
|
||||||
OSSFile file = ossFileService.getById(id);
|
OSSFile file = ossFileService.getById(id);
|
||||||
if (file == null) {
|
if (file == null) {
|
||||||
return Result.error("未找到对应实体");
|
return Result.error("未找到对应实体");
|
||||||
|
|||||||
+4
@@ -14,6 +14,7 @@ import com.jero.modules.quartz.service.IQuartzJobService;
|
|||||||
import io.swagger.annotations.Api;
|
import io.swagger.annotations.Api;
|
||||||
import io.swagger.annotations.ApiOperation;
|
import io.swagger.annotations.ApiOperation;
|
||||||
import lombok.extern.slf4j.Slf4j;
|
import lombok.extern.slf4j.Slf4j;
|
||||||
|
import org.apache.commons.lang.StringUtils;
|
||||||
import org.apache.poi.ss.formula.functions.T;
|
import org.apache.poi.ss.formula.functions.T;
|
||||||
import org.jeecgframework.poi.excel.ExcelImportUtil;
|
import org.jeecgframework.poi.excel.ExcelImportUtil;
|
||||||
import org.jeecgframework.poi.excel.def.NormalExcelConstants;
|
import org.jeecgframework.poi.excel.def.NormalExcelConstants;
|
||||||
@@ -114,6 +115,9 @@ public class QuartzJobController {
|
|||||||
@PostMapping("/delete")
|
@PostMapping("/delete")
|
||||||
public Result<T> delete(@RequestBody Map<String,String> map) {
|
public Result<T> delete(@RequestBody Map<String,String> map) {
|
||||||
String id = map.get("id");
|
String id = map.get("id");
|
||||||
|
if(StringUtils.isBlank(id)){
|
||||||
|
return Result.error("参数不识别!");
|
||||||
|
}
|
||||||
QuartzJob quartzJob = quartzJobService.getById(id);
|
QuartzJob quartzJob = quartzJobService.getById(id);
|
||||||
if (quartzJob == null) {
|
if (quartzJob == null) {
|
||||||
return Result.error("未找到对应实体");
|
return Result.error("未找到对应实体");
|
||||||
|
|||||||
+1
-1
@@ -71,7 +71,7 @@ public class LoginController {
|
|||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
// @RequestMapping(value = "/selectDepart", method = RequestMethod.PUT)
|
// @RequestMapping(value = "/selectDepart", method = RequestMethod.PUT)
|
||||||
@PutMapping("/selectDepart")
|
@PostMapping("/selectDepart")
|
||||||
public Result<JSONObject> selectDepart(@RequestBody SysUser user) {
|
public Result<JSONObject> selectDepart(@RequestBody SysUser user) {
|
||||||
return loginService.selectDepart(user);
|
return loginService.selectDepart(user);
|
||||||
}
|
}
|
||||||
|
|||||||
+3
@@ -166,6 +166,9 @@ public class SysAnnouncementController {
|
|||||||
@PostMapping("/delete")
|
@PostMapping("/delete")
|
||||||
public Result<Object> delete(@RequestBody Map<String, String> map) {
|
public Result<Object> delete(@RequestBody Map<String, String> map) {
|
||||||
String id = map.get("id");
|
String id = map.get("id");
|
||||||
|
if(StringUtils.isBlank(id)){
|
||||||
|
return Result.error("参数不识别!");
|
||||||
|
}
|
||||||
SysAnnouncement sysAnnouncement = sysAnnouncementService.getById(id);
|
SysAnnouncement sysAnnouncement = sysAnnouncementService.getById(id);
|
||||||
if(sysAnnouncement==null) {
|
if(sysAnnouncement==null) {
|
||||||
return Result.error(ERROR_TEXT);
|
return Result.error(ERROR_TEXT);
|
||||||
|
|||||||
+4
@@ -13,6 +13,7 @@ import com.jero.modules.system.entity.SysAnnouncementSend;
|
|||||||
import com.jero.modules.system.model.AnnouncementSendModel;
|
import com.jero.modules.system.model.AnnouncementSendModel;
|
||||||
import com.jero.modules.system.service.ISysAnnouncementSendService;
|
import com.jero.modules.system.service.ISysAnnouncementSendService;
|
||||||
import lombok.extern.slf4j.Slf4j;
|
import lombok.extern.slf4j.Slf4j;
|
||||||
|
import org.apache.commons.lang.StringUtils;
|
||||||
import org.apache.poi.ss.formula.functions.T;
|
import org.apache.poi.ss.formula.functions.T;
|
||||||
import org.apache.shiro.SecurityUtils;
|
import org.apache.shiro.SecurityUtils;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
@@ -114,6 +115,9 @@ public class SysAnnouncementSendController {
|
|||||||
@PostMapping(value = "/delete")
|
@PostMapping(value = "/delete")
|
||||||
public Result<Object> delete(@RequestBody Map<String, String> map) {
|
public Result<Object> delete(@RequestBody Map<String, String> map) {
|
||||||
String id = map.get("id");
|
String id = map.get("id");
|
||||||
|
if(StringUtils.isBlank(id)){
|
||||||
|
return Result.error("参数不识别!");
|
||||||
|
}
|
||||||
SysAnnouncementSend sysAnnouncementSend = sysAnnouncementSendService.getById(id);
|
SysAnnouncementSend sysAnnouncementSend = sysAnnouncementSendService.getById(id);
|
||||||
if(sysAnnouncementSend==null) {
|
if(sysAnnouncementSend==null) {
|
||||||
return Result.error(ERROE_MSG);
|
return Result.error(ERROE_MSG);
|
||||||
|
|||||||
+3
@@ -134,6 +134,9 @@ public class SysCategoryController {
|
|||||||
@PostMapping(value = "/delete")
|
@PostMapping(value = "/delete")
|
||||||
public Result<Object> delete(@RequestBody Map<String, String> map) {
|
public Result<Object> delete(@RequestBody Map<String, String> map) {
|
||||||
String id = map.get("id");
|
String id = map.get("id");
|
||||||
|
if(StringUtils.isBlank(id)){
|
||||||
|
return Result.error("参数不识别!");
|
||||||
|
}
|
||||||
SysCategory sysCategory = sysCategoryService.getById(id);
|
SysCategory sysCategory = sysCategoryService.getById(id);
|
||||||
if(sysCategory==null) {
|
if(sysCategory==null) {
|
||||||
return Result.error(ERROE_MSG);
|
return Result.error(ERROE_MSG);
|
||||||
|
|||||||
+7
@@ -13,6 +13,7 @@ import com.jero.modules.system.service.ISysCheckRuleService;
|
|||||||
import io.swagger.annotations.Api;
|
import io.swagger.annotations.Api;
|
||||||
import io.swagger.annotations.ApiOperation;
|
import io.swagger.annotations.ApiOperation;
|
||||||
import lombok.extern.slf4j.Slf4j;
|
import lombok.extern.slf4j.Slf4j;
|
||||||
|
import org.apache.commons.lang.StringUtils;
|
||||||
import org.apache.poi.ss.formula.functions.T;
|
import org.apache.poi.ss.formula.functions.T;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
import org.springframework.web.bind.annotation.*;
|
import org.springframework.web.bind.annotation.*;
|
||||||
@@ -131,6 +132,9 @@ public class SysCheckRuleController extends JeroController<SysCheckRule, ISysChe
|
|||||||
@PostMapping(value = "/delete")
|
@PostMapping(value = "/delete")
|
||||||
public Result<T> delete(@RequestBody Map<String, String> map) {
|
public Result<T> delete(@RequestBody Map<String, String> map) {
|
||||||
String id = map.get("id");
|
String id = map.get("id");
|
||||||
|
if(StringUtils.isBlank(id)){
|
||||||
|
return Result.error("参数不识别!");
|
||||||
|
}
|
||||||
sysCheckRuleService.removeById(id);
|
sysCheckRuleService.removeById(id);
|
||||||
return Result.OK("删除成功!");
|
return Result.OK("删除成功!");
|
||||||
}
|
}
|
||||||
@@ -146,6 +150,9 @@ public class SysCheckRuleController extends JeroController<SysCheckRule, ISysChe
|
|||||||
@PostMapping(value = "/deleteBatch")
|
@PostMapping(value = "/deleteBatch")
|
||||||
public Result<T> deleteBatch(@RequestBody Map<String, String> map) {
|
public Result<T> deleteBatch(@RequestBody Map<String, String> map) {
|
||||||
String ids = map.get("ids");
|
String ids = map.get("ids");
|
||||||
|
if(StringUtils.isBlank(ids)){
|
||||||
|
return Result.error("参数不识别!");
|
||||||
|
}
|
||||||
this.sysCheckRuleService.removeByIds(Arrays.asList(ids.split(",")));
|
this.sysCheckRuleService.removeByIds(Arrays.asList(ids.split(",")));
|
||||||
return Result.OK("批量删除成功!");
|
return Result.OK("批量删除成功!");
|
||||||
}
|
}
|
||||||
|
|||||||
+6
@@ -154,6 +154,9 @@ public class SysDataSourceController extends JeroController<SysDataSource, ISysD
|
|||||||
@PostMapping(value = "/delete")
|
@PostMapping(value = "/delete")
|
||||||
public Result<T> delete(@RequestBody Map<String, String> map) {
|
public Result<T> delete(@RequestBody Map<String, String> map) {
|
||||||
String id = map.get("id");
|
String id = map.get("id");
|
||||||
|
if(StringUtils.isBlank(id)){
|
||||||
|
return Result.error("参数不识别!");
|
||||||
|
}
|
||||||
SysDataSource sysDataSource = sysDataSourceService.getById(id);
|
SysDataSource sysDataSource = sysDataSourceService.getById(id);
|
||||||
DataSourceCachePool.removeCache(sysDataSource.getCode());
|
DataSourceCachePool.removeCache(sysDataSource.getCode());
|
||||||
sysDataSourceService.removeById(id);
|
sysDataSourceService.removeById(id);
|
||||||
@@ -171,6 +174,9 @@ public class SysDataSourceController extends JeroController<SysDataSource, ISysD
|
|||||||
@PostMapping(value = "/deleteBatch")
|
@PostMapping(value = "/deleteBatch")
|
||||||
public Result<T> deleteBatch(@RequestBody Map<String, String> map) {
|
public Result<T> deleteBatch(@RequestBody Map<String, String> map) {
|
||||||
String ids = map.get("ids");
|
String ids = map.get("ids");
|
||||||
|
if(StringUtils.isBlank(ids)){
|
||||||
|
return Result.error("参数不识别!");
|
||||||
|
}
|
||||||
List<String> idList = Arrays.asList(ids.split(","));
|
List<String> idList = Arrays.asList(ids.split(","));
|
||||||
idList.forEach(item->{
|
idList.forEach(item->{
|
||||||
SysDataSource sysDataSource = sysDataSourceService.getById(item);
|
SysDataSource sysDataSource = sysDataSourceService.getById(item);
|
||||||
|
|||||||
+3
-1
@@ -224,6 +224,9 @@ public class SysDepartController {
|
|||||||
@CacheEvict(value= {CacheConstant.SYS_DEPARTS_CACHE,CacheConstant.SYS_DEPART_IDS_CACHE}, allEntries=true)
|
@CacheEvict(value= {CacheConstant.SYS_DEPARTS_CACHE,CacheConstant.SYS_DEPART_IDS_CACHE}, allEntries=true)
|
||||||
public Result<Object> delete(@RequestBody Map<String,String> map) {
|
public Result<Object> delete(@RequestBody Map<String,String> map) {
|
||||||
String id = map.get("id");
|
String id = map.get("id");
|
||||||
|
if(org.apache.commons.lang.StringUtils.isBlank(id)){
|
||||||
|
return Result.error("参数不识别!");
|
||||||
|
}
|
||||||
SysDepart sysDepart = sysDepartService.getById(id);
|
SysDepart sysDepart = sysDepartService.getById(id);
|
||||||
if(sysDepart==null) {
|
if(sysDepart==null) {
|
||||||
return Result.error("未找到对应实体");
|
return Result.error("未找到对应实体");
|
||||||
@@ -245,7 +248,6 @@ public class SysDepartController {
|
|||||||
*/
|
*/
|
||||||
//@RequiresRoles({"admin"})
|
//@RequiresRoles({"admin"})
|
||||||
@RequiresPermissions("sys:depart:del")
|
@RequiresPermissions("sys:depart:del")
|
||||||
// @RequestMapping(value = "/deleteBatch", method = RequestMethod.DELETE)
|
|
||||||
@PostMapping("/deleteBatch")
|
@PostMapping("/deleteBatch")
|
||||||
@CacheEvict(value= {CacheConstant.SYS_DEPARTS_CACHE,CacheConstant.SYS_DEPART_IDS_CACHE}, allEntries=true)
|
@CacheEvict(value= {CacheConstant.SYS_DEPARTS_CACHE,CacheConstant.SYS_DEPART_IDS_CACHE}, allEntries=true)
|
||||||
public Result<Object> deleteBatch(@RequestBody Map<String,String> map) {
|
public Result<Object> deleteBatch(@RequestBody Map<String,String> map) {
|
||||||
|
|||||||
+7
@@ -24,6 +24,7 @@ import lombok.extern.slf4j.Slf4j;
|
|||||||
import com.jero.modules.system.service.ISysPermissionDataRuleService;
|
import com.jero.modules.system.service.ISysPermissionDataRuleService;
|
||||||
import com.jero.modules.system.service.ISysPermissionService;
|
import com.jero.modules.system.service.ISysPermissionService;
|
||||||
|
|
||||||
|
import org.apache.commons.lang.StringUtils;
|
||||||
import org.apache.poi.ss.formula.functions.T;
|
import org.apache.poi.ss.formula.functions.T;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
import org.springframework.web.bind.annotation.*;
|
import org.springframework.web.bind.annotation.*;
|
||||||
@@ -108,6 +109,9 @@ public class SysDepartPermissionController extends JeroController<SysDepartPermi
|
|||||||
@PostMapping(value = "/delete")
|
@PostMapping(value = "/delete")
|
||||||
public Result<T> delete(@RequestBody Map<String, String> map) {
|
public Result<T> delete(@RequestBody Map<String, String> map) {
|
||||||
String id = map.get("id");
|
String id = map.get("id");
|
||||||
|
if(StringUtils.isBlank(id)){
|
||||||
|
return Result.error("参数不识别!");
|
||||||
|
}
|
||||||
sysDepartPermissionService.removeById(id);
|
sysDepartPermissionService.removeById(id);
|
||||||
return Result.OK("删除成功!");
|
return Result.OK("删除成功!");
|
||||||
}
|
}
|
||||||
@@ -122,6 +126,9 @@ public class SysDepartPermissionController extends JeroController<SysDepartPermi
|
|||||||
@PostMapping(value = "/deleteBatch")
|
@PostMapping(value = "/deleteBatch")
|
||||||
public Result<T> deleteBatch(@RequestBody Map<String, String> map) {
|
public Result<T> deleteBatch(@RequestBody Map<String, String> map) {
|
||||||
String ids = map.get("ids");
|
String ids = map.get("ids");
|
||||||
|
if(StringUtils.isBlank(ids)){
|
||||||
|
return Result.error("参数不识别!");
|
||||||
|
}
|
||||||
this.sysDepartPermissionService.removeByIds(Arrays.asList(ids.split(",")));
|
this.sysDepartPermissionService.removeByIds(Arrays.asList(ids.split(",")));
|
||||||
return Result.OK("批量删除成功!");
|
return Result.OK("批量删除成功!");
|
||||||
}
|
}
|
||||||
|
|||||||
+4
@@ -27,6 +27,7 @@ import com.jero.modules.system.vo.SysDictPage;
|
|||||||
import io.swagger.annotations.Api;
|
import io.swagger.annotations.Api;
|
||||||
import io.swagger.annotations.ApiOperation;
|
import io.swagger.annotations.ApiOperation;
|
||||||
import lombok.extern.slf4j.Slf4j;
|
import lombok.extern.slf4j.Slf4j;
|
||||||
|
import org.apache.commons.lang.StringUtils;
|
||||||
import org.apache.poi.ss.formula.functions.T;
|
import org.apache.poi.ss.formula.functions.T;
|
||||||
import org.apache.shiro.SecurityUtils;
|
import org.apache.shiro.SecurityUtils;
|
||||||
import org.jeecgframework.poi.excel.ExcelImportCheckUtil;
|
import org.jeecgframework.poi.excel.ExcelImportCheckUtil;
|
||||||
@@ -394,6 +395,9 @@ public class SysDictController {
|
|||||||
@CacheEvict(value={CacheConstant.SYS_DICT_CACHE, CacheConstant.SYS_ENABLE_DICT_CACHE}, allEntries=true)
|
@CacheEvict(value={CacheConstant.SYS_DICT_CACHE, CacheConstant.SYS_ENABLE_DICT_CACHE}, allEntries=true)
|
||||||
public Result<Object> delete(@RequestBody Map<String,String> map) {
|
public Result<Object> delete(@RequestBody Map<String,String> map) {
|
||||||
String id = map.get("id");
|
String id = map.get("id");
|
||||||
|
if(StringUtils.isBlank(id)){
|
||||||
|
return Result.error("参数不识别!");
|
||||||
|
}
|
||||||
boolean ok = sysDictService.removeById(id);
|
boolean ok = sysDictService.removeById(id);
|
||||||
if(ok) {
|
if(ok) {
|
||||||
return Result.OK(DEL_SUCCESS);
|
return Result.OK(DEL_SUCCESS);
|
||||||
|
|||||||
+3
@@ -124,6 +124,9 @@ public class SysDictItemController {
|
|||||||
@CacheEvict(value={CacheConstant.SYS_DICT_CACHE, CacheConstant.SYS_ENABLE_DICT_CACHE}, allEntries=true)
|
@CacheEvict(value={CacheConstant.SYS_DICT_CACHE, CacheConstant.SYS_ENABLE_DICT_CACHE}, allEntries=true)
|
||||||
public Result<T> delete(@RequestBody Map<String, String> map) {
|
public Result<T> delete(@RequestBody Map<String, String> map) {
|
||||||
String id = map.get("id");
|
String id = map.get("id");
|
||||||
|
if(StringUtils.isBlank(id)){
|
||||||
|
return Result.error("参数不识别!");
|
||||||
|
}
|
||||||
SysDictItem joinSystem = sysDictItemService.getById(id);
|
SysDictItem joinSystem = sysDictItemService.getById(id);
|
||||||
if(joinSystem==null) {
|
if(joinSystem==null) {
|
||||||
return Result.error("未找到对应实体");
|
return Result.error("未找到对应实体");
|
||||||
|
|||||||
+7
@@ -15,6 +15,7 @@ import com.jero.modules.system.service.ISysFillRuleService;
|
|||||||
import io.swagger.annotations.Api;
|
import io.swagger.annotations.Api;
|
||||||
import io.swagger.annotations.ApiOperation;
|
import io.swagger.annotations.ApiOperation;
|
||||||
import lombok.extern.slf4j.Slf4j;
|
import lombok.extern.slf4j.Slf4j;
|
||||||
|
import org.apache.commons.lang.StringUtils;
|
||||||
import org.apache.poi.ss.formula.functions.T;
|
import org.apache.poi.ss.formula.functions.T;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
import org.springframework.web.bind.annotation.*;
|
import org.springframework.web.bind.annotation.*;
|
||||||
@@ -112,6 +113,9 @@ public class SysFillRuleController extends JeroController<SysFillRule, ISysFillR
|
|||||||
@PostMapping(value = "/delete")
|
@PostMapping(value = "/delete")
|
||||||
public Result<T> delete(@RequestBody Map<String, String> map) {
|
public Result<T> delete(@RequestBody Map<String, String> map) {
|
||||||
String id = map.get("id");
|
String id = map.get("id");
|
||||||
|
if(StringUtils.isBlank(id)){
|
||||||
|
return Result.error("参数不识别!");
|
||||||
|
}
|
||||||
sysFillRuleService.removeById(id);
|
sysFillRuleService.removeById(id);
|
||||||
return Result.OK("删除成功!");
|
return Result.OK("删除成功!");
|
||||||
}
|
}
|
||||||
@@ -127,6 +131,9 @@ public class SysFillRuleController extends JeroController<SysFillRule, ISysFillR
|
|||||||
@PostMapping(value = "/deleteBatch")
|
@PostMapping(value = "/deleteBatch")
|
||||||
public Result<T> deleteBatch(@RequestBody Map<String, String> map) {
|
public Result<T> deleteBatch(@RequestBody Map<String, String> map) {
|
||||||
String ids = map.get("ids");
|
String ids = map.get("ids");
|
||||||
|
if(StringUtils.isBlank(ids)){
|
||||||
|
return Result.error("参数不识别!");
|
||||||
|
}
|
||||||
this.sysFillRuleService.removeByIds(Arrays.asList(ids.split(",")));
|
this.sysFillRuleService.removeByIds(Arrays.asList(ids.split(",")));
|
||||||
return Result.OK("批量删除成功!");
|
return Result.OK("批量删除成功!");
|
||||||
}
|
}
|
||||||
|
|||||||
+4
@@ -11,6 +11,7 @@ import com.jero.modules.system.entity.SysGatewayRoute;
|
|||||||
import com.jero.modules.system.service.ISysGatewayRouteService;
|
import com.jero.modules.system.service.ISysGatewayRouteService;
|
||||||
import io.swagger.annotations.Api;
|
import io.swagger.annotations.Api;
|
||||||
import lombok.extern.slf4j.Slf4j;
|
import lombok.extern.slf4j.Slf4j;
|
||||||
|
import org.apache.commons.lang.StringUtils;
|
||||||
import org.apache.poi.ss.formula.functions.T;
|
import org.apache.poi.ss.formula.functions.T;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
import org.springframework.web.bind.annotation.*;
|
import org.springframework.web.bind.annotation.*;
|
||||||
@@ -74,6 +75,9 @@ public class SysGatewayRouteController extends JeroController<SysGatewayRoute, I
|
|||||||
@PostMapping("/delete")
|
@PostMapping("/delete")
|
||||||
public Result<T> delete(@RequestBody Map<String, String> map) {
|
public Result<T> delete(@RequestBody Map<String, String> map) {
|
||||||
String id = map.get("id");
|
String id = map.get("id");
|
||||||
|
if(StringUtils.isBlank(id)){
|
||||||
|
return Result.error("参数不识别!");
|
||||||
|
}
|
||||||
sysGatewayRouteService.deleteById(id);
|
sysGatewayRouteService.deleteById(id);
|
||||||
return Result.OK("删除路由成功");
|
return Result.OK("删除路由成功");
|
||||||
}
|
}
|
||||||
|
|||||||
+4
@@ -10,6 +10,7 @@ import com.jero.common.util.oConvertUtils;
|
|||||||
import com.jero.modules.system.entity.SysLog;
|
import com.jero.modules.system.entity.SysLog;
|
||||||
import com.jero.modules.system.service.ISysLogService;
|
import com.jero.modules.system.service.ISysLogService;
|
||||||
import lombok.extern.slf4j.Slf4j;
|
import lombok.extern.slf4j.Slf4j;
|
||||||
|
import org.apache.commons.lang.StringUtils;
|
||||||
import org.apache.poi.ss.formula.functions.T;
|
import org.apache.poi.ss.formula.functions.T;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
import org.springframework.web.bind.annotation.*;
|
import org.springframework.web.bind.annotation.*;
|
||||||
@@ -74,6 +75,9 @@ public class SysLogController {
|
|||||||
@PostMapping("/delete")
|
@PostMapping("/delete")
|
||||||
public Result<T> delete(@RequestBody Map<String, String> map) {
|
public Result<T> delete(@RequestBody Map<String, String> map) {
|
||||||
String id = map.get("id");
|
String id = map.get("id");
|
||||||
|
if(StringUtils.isBlank(id)){
|
||||||
|
return Result.error("参数不识别!");
|
||||||
|
}
|
||||||
SysLog sysLog = sysLogService.getById(id);
|
SysLog sysLog = sysLogService.getById(id);
|
||||||
if(sysLog==null) {
|
if(sysLog==null) {
|
||||||
return Result.error("未找到对应实体");
|
return Result.error("未找到对应实体");
|
||||||
|
|||||||
+7
@@ -21,6 +21,7 @@ import com.jero.modules.system.service.ISysPermissionService;
|
|||||||
import com.jero.modules.system.service.ISysRolePermissionService;
|
import com.jero.modules.system.service.ISysRolePermissionService;
|
||||||
import com.jero.modules.system.util.PermissionDataUtil;
|
import com.jero.modules.system.util.PermissionDataUtil;
|
||||||
import lombok.extern.slf4j.Slf4j;
|
import lombok.extern.slf4j.Slf4j;
|
||||||
|
import org.apache.commons.lang.StringUtils;
|
||||||
import org.apache.poi.ss.formula.functions.T;
|
import org.apache.poi.ss.formula.functions.T;
|
||||||
import org.apache.shiro.SecurityUtils;
|
import org.apache.shiro.SecurityUtils;
|
||||||
import org.jetbrains.annotations.NotNull;
|
import org.jetbrains.annotations.NotNull;
|
||||||
@@ -273,6 +274,9 @@ public class SysPermissionController {
|
|||||||
@PostMapping("/delete")
|
@PostMapping("/delete")
|
||||||
public Result<T> delete(@RequestBody Map<String, String> map) {
|
public Result<T> delete(@RequestBody Map<String, String> map) {
|
||||||
String id = map.get("id");
|
String id = map.get("id");
|
||||||
|
if(StringUtils.isBlank(id)){
|
||||||
|
return Result.error("参数不识别!");
|
||||||
|
}
|
||||||
try {
|
try {
|
||||||
sysPermissionService.deletePermission(id);
|
sysPermissionService.deletePermission(id);
|
||||||
return Result.OK(DEL_SUCCESS);
|
return Result.OK(DEL_SUCCESS);
|
||||||
@@ -292,6 +296,9 @@ public class SysPermissionController {
|
|||||||
@PostMapping("/deleteBatch")
|
@PostMapping("/deleteBatch")
|
||||||
public Result<T> deleteBatch(@RequestBody Map<String, String> map) {
|
public Result<T> deleteBatch(@RequestBody Map<String, String> map) {
|
||||||
String ids = map.get("ids");
|
String ids = map.get("ids");
|
||||||
|
if(StringUtils.isBlank(ids)){
|
||||||
|
return Result.error("参数不识别!");
|
||||||
|
}
|
||||||
try {
|
try {
|
||||||
String[] arr = ids.split(",");
|
String[] arr = ids.split(",");
|
||||||
for (String id : arr) {
|
for (String id : arr) {
|
||||||
|
|||||||
+7
@@ -14,6 +14,7 @@ import javax.servlet.http.HttpServletRequest;
|
|||||||
import javax.servlet.http.HttpServletResponse;
|
import javax.servlet.http.HttpServletResponse;
|
||||||
|
|
||||||
import com.jero.common.system.base.controller.JeroController;
|
import com.jero.common.system.base.controller.JeroController;
|
||||||
|
import org.apache.commons.lang.StringUtils;
|
||||||
import org.apache.poi.ss.formula.functions.T;
|
import org.apache.poi.ss.formula.functions.T;
|
||||||
import org.apache.shiro.authz.annotation.RequiresPermissions;
|
import org.apache.shiro.authz.annotation.RequiresPermissions;
|
||||||
import org.apache.shiro.authz.annotation.RequiresRoles;
|
import org.apache.shiro.authz.annotation.RequiresRoles;
|
||||||
@@ -158,6 +159,9 @@ public class SysRoleController {
|
|||||||
@PostMapping("/delete")
|
@PostMapping("/delete")
|
||||||
public Result<T> delete(@RequestBody Map<String, String> map) {
|
public Result<T> delete(@RequestBody Map<String, String> map) {
|
||||||
String id = map.get("id");
|
String id = map.get("id");
|
||||||
|
if(StringUtils.isBlank(id)){
|
||||||
|
return Result.error("参数不识别!");
|
||||||
|
}
|
||||||
sysRoleService.deleteRole(id);
|
sysRoleService.deleteRole(id);
|
||||||
return Result.OK("删除角色成功");
|
return Result.OK("删除角色成功");
|
||||||
}
|
}
|
||||||
@@ -173,6 +177,9 @@ public class SysRoleController {
|
|||||||
@PostMapping("/deleteBatch")
|
@PostMapping("/deleteBatch")
|
||||||
public Result<T> deleteBatch(@RequestBody Map<String, String> map) {
|
public Result<T> deleteBatch(@RequestBody Map<String, String> map) {
|
||||||
String ids = map.get("ids");
|
String ids = map.get("ids");
|
||||||
|
if(StringUtils.isBlank(ids)){
|
||||||
|
return Result.error("参数不识别!");
|
||||||
|
}
|
||||||
if(oConvertUtils.isEmpty(ids)) {
|
if(oConvertUtils.isEmpty(ids)) {
|
||||||
return Result.error("未选中角色!");
|
return Result.error("未选中角色!");
|
||||||
}else {
|
}else {
|
||||||
|
|||||||
+4
@@ -12,6 +12,7 @@ import com.jero.common.util.oConvertUtils;
|
|||||||
import com.jero.modules.system.entity.SysTenant;
|
import com.jero.modules.system.entity.SysTenant;
|
||||||
import com.jero.modules.system.service.ISysTenantService;
|
import com.jero.modules.system.service.ISysTenantService;
|
||||||
import lombok.extern.slf4j.Slf4j;
|
import lombok.extern.slf4j.Slf4j;
|
||||||
|
import org.apache.commons.lang.StringUtils;
|
||||||
import org.apache.poi.ss.formula.functions.T;
|
import org.apache.poi.ss.formula.functions.T;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
import org.springframework.web.bind.annotation.*;
|
import org.springframework.web.bind.annotation.*;
|
||||||
@@ -104,6 +105,9 @@ public class SysTenantController {
|
|||||||
@PostMapping("/delete")
|
@PostMapping("/delete")
|
||||||
public Result<T> delete(@RequestBody Map<String,String> map) {
|
public Result<T> delete(@RequestBody Map<String,String> map) {
|
||||||
String id = map.get("id");
|
String id = map.get("id");
|
||||||
|
if(StringUtils.isBlank(id)){
|
||||||
|
return Result.error("参数不识别!");
|
||||||
|
}
|
||||||
sysTenantService.removeTenantById(id);
|
sysTenantService.removeTenantById(id);
|
||||||
return Result.OK("删除成功");
|
return Result.OK("删除成功");
|
||||||
}
|
}
|
||||||
|
|||||||
+6
@@ -263,6 +263,9 @@ public class SysUserController {
|
|||||||
@PostMapping("/delete")
|
@PostMapping("/delete")
|
||||||
public Result<T> delete(@RequestBody Map<String,String> map) {
|
public Result<T> delete(@RequestBody Map<String,String> map) {
|
||||||
String id = map.get("id");
|
String id = map.get("id");
|
||||||
|
if(StringUtils.isBlank(id)){
|
||||||
|
return Result.error("参数不识别!");
|
||||||
|
}
|
||||||
baseCommonService.addLog("删除用户,id: " +id ,CommonConstant.LOG_TYPE_2, 3);
|
baseCommonService.addLog("删除用户,id: " +id ,CommonConstant.LOG_TYPE_2, 3);
|
||||||
this.sysUserService.deleteUser(id);
|
this.sysUserService.deleteUser(id);
|
||||||
return Result.OK("删除用户成功");
|
return Result.OK("删除用户成功");
|
||||||
@@ -272,6 +275,9 @@ public class SysUserController {
|
|||||||
@PostMapping("/deleteBatch")
|
@PostMapping("/deleteBatch")
|
||||||
public Result<T> deleteBatch(@RequestBody Map<String, String> map) {
|
public Result<T> deleteBatch(@RequestBody Map<String, String> map) {
|
||||||
String ids = map.get("ids");
|
String ids = map.get("ids");
|
||||||
|
if(StringUtils.isBlank(ids)){
|
||||||
|
return Result.error("参数不识别!");
|
||||||
|
}
|
||||||
baseCommonService.addLog("批量删除用户, ids: " +ids ,CommonConstant.LOG_TYPE_2, 3);
|
baseCommonService.addLog("批量删除用户, ids: " +ids ,CommonConstant.LOG_TYPE_2, 3);
|
||||||
this.sysUserService.deleteBatchUsers(ids);
|
this.sysUserService.deleteBatchUsers(ids);
|
||||||
return Result.OK("批量删除用户成功");
|
return Result.OK("批量删除用户成功");
|
||||||
|
|||||||
Reference in New Issue
Block a user