瀏覽代碼

组织机构新增非空判断

liangpeile 1 年之前
父節點
當前提交
bf8b1d22c9
共有 1 個文件被更改,包括 8 次插入0 次删除
  1. 8 0
      crmeb-admin/src/main/java/com/zbkj/admin/controller/platform/NewPlatformApi.java

+ 8 - 0
crmeb-admin/src/main/java/com/zbkj/admin/controller/platform/NewPlatformApi.java

@@ -567,6 +567,14 @@ public class NewPlatformApi {
     @ApiOperation(value = "平台端组织机构新增-企业")
     @RequestMapping(value = "/organizationSave", method = RequestMethod.POST)
     public CommonResult<String> organizationSave(@RequestBody Organization request) {
+        String phone = request.getPhone();
+        String name = request.getName();
+        if (StringUtils.isBlank(phone)){
+            return CommonResult.failed("联系方式不能为空");
+        }
+        if (StringUtils.isBlank(name)){
+            return CommonResult.failed("企业名称不能为空");
+        }
         SystemAdmin systemAdmin = SecurityUtil.getLoginUserVo().getUser();
         organizationService.saveOrganization(request, systemAdmin);
         return CommonResult.success("操作成功");