Commit d691fc03 authored by 赵啸非's avatar 赵啸非

修改驼峰命名法

parent 082fdbba
......@@ -13,6 +13,7 @@ import com.alibaba.fastjson.JSONObject;
import com.alibaba.fastjson.parser.DefaultJSONParser;
import com.alibaba.fastjson.parser.JSONToken;
import com.alibaba.fastjson.parser.deserializer.ObjectDeserializer;
import org.springframework.util.ObjectUtils;
/**
* ${functionName}前端映射树结构实体类
*
......
......@@ -58,6 +58,34 @@ public class ${ClassName}Controller extends BaseCRUDJsonBodyMappingController<${
<#if table.tplCategory=="tree">
@PostMapping("list/exclude")
public String excludeList(@RequestBody ${ClassName}Entity ${className}Entity) {
Map<String, Object> model = new HashMap<>();
JSONObject ret = new JSONObject();
String busiDesc = "查询" + this.getModuleDesc();
// Long id = form.getId()[0];
int code = VALUE_RESULT_SUCCESS;
try {
List<${ClassName}Entity> collect = this.service.find(new ${ClassName}Query()).stream().map(item -> {
if (item.getId().intValue() == ${className}Entity.getId() || ArrayUtils.contains(StringUtils.split(item.getAncestors(), ","), ${className}Entity.getId() + "")) {
return null;
}
return item;
}).filter(f -> f != null).collect(Collectors.toList());
model.put("result", collect);
recordSysLog(request, busiDesc + " 【成功】");
} catch (Exception e) {
code = VALUE_RESULT_FAILURE;
this.doException(request, busiDesc, model, e);
}
ret.put(KEY_RESULT_DATA, model);
ret.put(KEY_RESULT_CODE, code);
return ret.toJSONString();
}
/**
* 获取站点下拉树列表
*/
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment