From a830a73fd10a21e3793c79a35be4e532de124c6f Mon Sep 17 00:00:00 2001
From: nickchange <126672920+nickchange@users.noreply.github.com>
Date: 星期二, 17 十月 2023 17:25:16 +0800
Subject: [PATCH] 10.17.1

---
 cloud-server-management/src/main/java/com/dsh/guns/modular/system/controller/system/UserMgrController.java |   24 ++++++++++++++++++++++--
 1 files changed, 22 insertions(+), 2 deletions(-)

diff --git a/cloud-server-management/src/main/java/com/dsh/guns/modular/system/controller/system/UserMgrController.java b/cloud-server-management/src/main/java/com/dsh/guns/modular/system/controller/system/UserMgrController.java
index ee71eca..e097d63 100644
--- a/cloud-server-management/src/main/java/com/dsh/guns/modular/system/controller/system/UserMgrController.java
+++ b/cloud-server-management/src/main/java/com/dsh/guns/modular/system/controller/system/UserMgrController.java
@@ -206,7 +206,8 @@
         // 判断账号是否重复
         //Check if the account is duplicated
         User theUser = userService.getByAccount(user.getAccount());
-        if (theUser != null) {
+        System.out.println("=====theUser======="+theUser);
+        if (theUser != null&&user.getAccount()!="") {
             throw new GunsException(BizExceptionEnum.USER_ALREADY_REG);
         }
 
@@ -379,7 +380,25 @@
      */
     @RequestMapping(method = RequestMethod.POST, path = "/uploadImg")
     @ResponseBody
-    public ResultUtil uploadImg(@RequestPart("file") MultipartFile picture, HttpServletResponse response) {
+    public String uploadImg(@RequestPart("file") MultipartFile picture) {
+        String pictureName = "";
+        try {
+            pictureName = OssUploadUtil.ossUpload("img/", picture);
+        }catch (Exception e){
+            e.printStackTrace();
+        }
+        return pictureName;
+    }
+
+    /**
+     * 上传图片
+     */
+    /**
+     * 上传图片Amis
+     */
+    @RequestMapping(method = RequestMethod.POST, path = "/uploadImgAmis")
+    @ResponseBody
+    public ResultUtil uploadImgAmis(@RequestPart("file") MultipartFile picture, HttpServletResponse response) {
         String value = "";
         try {
             value = OssUploadUtil.ossUpload("img/", picture);
@@ -395,6 +414,7 @@
 
 
 
+
     @RequestMapping(method = RequestMethod.POST, path = "/uploadFile")
     @ResponseBody
     public String uploadFile(@RequestPart("file") MultipartFile picture) {

--
Gitblit v1.7.1