|
@@ -126,6 +126,24 @@ public class FieldTemplateController {
|
|
|
return Result.success("ok", resJson);
|
|
|
}
|
|
|
|
|
|
+ /**
|
|
|
+ * 字段模板启用/停用
|
|
|
+ *
|
|
|
+ */
|
|
|
+ @PostMapping("status")
|
|
|
+ public Result status(@RequestBody String json) {
|
|
|
+ JSONObject req = JSON.parseObject(json);
|
|
|
+ long id = req.getLong("id");
|
|
|
+ String status = req.getString("status");
|
|
|
+ Result result = new Result();
|
|
|
+
|
|
|
+ FieldTemplateEntity fieldTemplate = fieldTemplateService.findByID(id);
|
|
|
+ fieldTemplate.setStatus(status);
|
|
|
+ fieldTemplateService.saveOrUpdate(fieldTemplate);
|
|
|
+ return result;
|
|
|
+
|
|
|
+ }
|
|
|
+
|
|
|
@GetMapping("getTemplateById")
|
|
|
public Result getTemplateById(@RequestParam Long id) {
|
|
|
JSONObject result = new JSONObject();
|
|
@@ -183,6 +201,7 @@ public class FieldTemplateController {
|
|
|
}
|
|
|
|
|
|
|
|
|
+
|
|
|
/**
|
|
|
* 基础字段启用/停用
|
|
|
*
|