Browse Source

上传下载边界修改

zishan-an 11 months ago
parent
commit
ce66288b17

+ 1 - 1
src/main/java/com/kexun/controller/CooperatorController.java

@@ -130,7 +130,7 @@ public class CooperatorController {
         CooperatorInfo cooperatorInfo = CooperatorService.findByID(cooperatorId);
 
         cooperatorInfo.setCooperatorName(req.getString("cooperator_name"));
-        cooperatorInfo.setCooperatorNum(req.getString("cooperatorNum"));
+        cooperatorInfo.setCorpCertificateNum(req.getString("corp_certificate_num"));
         cooperatorInfo.setCorpCertificateType(req.getString("corp_certificate_type"));
         String oldTemplateId = cooperatorInfo.getTemplateId();
         String oldCooperatorNum = cooperatorInfo.getCooperatorNum();

+ 19 - 0
src/main/java/com/kexun/controller/FieldTemplateController.java

@@ -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 {
     }
 
 
+
     /**
      * 基础字段启用/停用
      *