Quellcode durchsuchen

api接口换位置

njs vor 1 Jahr
Ursprung
Commit
9f58724de1

+ 0 - 28
suishenbang-admin/src/main/java/com/dgtly/web/controller/system/AlertConfigurationController.java

@@ -152,32 +152,4 @@ public class AlertConfigurationController extends BaseController
     }
 
 
-    @PostMapping("/searchOrg")
-    @ResponseBody
-    public Map searchProductParamByCustomerCode(@RequestBody OrderSalesParameter salesManager) {
-        if("".equals(salesManager.getParType()) || salesManager.getParType() ==null){
-            salesManager.setParType("div_level");
-        }
-        Map map = new HashMap();
-        List<Map<String,Object>> dataList = alertConfigurationService.searchProductParamByCustomerCode(
-                salesManager.getParType(),salesManager.getParValue());
-        if(dataList != null && dataList.size() > 0){
-            map.put("levelInfo",dataList.get(0));
-            if ("suboffice_level".equals(salesManager.getParType()) ||
-                    "customer_level".equals(salesManager.getParType()) ||
-                    "emp_level".equals(salesManager.getParType()) ||
-                    "saledept_level".equals(salesManager.getParType())
-            ){
-                map.put("dataList",new ArrayList());
-            }else{
-                map.put("dataList",dataList);
-            }
-            return map;
-        } else {
-            Map mapnull = new HashMap();
-            map.put("levelInfo",mapnull);
-            map.put("dataList",dataList);
-            return map;
-        }
-    }
 }

+ 2 - 0
suishenbang-admin/src/main/java/com/dgtly/web/controller/system/SysUserController.java

@@ -355,4 +355,6 @@ public class SysUserController extends BaseController
 
         return AjaxResult.success(sysUserExt);
     }
+
+
 }

+ 37 - 3
suishenbang-api/src/main/java/com/dgtly/api/controller/SysUserController.java

@@ -6,7 +6,9 @@ import com.dgtly.common.core.domain.AjaxResult;
 import com.dgtly.common.core.domain.ParameterObject;
 import com.dgtly.common.core.domain.ResultType;
 import com.dgtly.common.utils.security.EncryptPassWordClass;
+import com.dgtly.system.domain.OrderSalesParameter;
 import com.dgtly.system.domain.SysUser;
+import com.dgtly.system.service.IAlertConfigurationService;
 import com.dgtly.system.service.ISysUserExtService;
 import com.dgtly.wxportal.domain.WxQyUser;
 import com.dgtly.system.service.ISysUserService;
@@ -16,11 +18,12 @@ import io.swagger.annotations.ApiImplicitParam;
 import io.swagger.annotations.ApiImplicitParams;
 import io.swagger.annotations.ApiOperation;
 import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.web.bind.annotation.PostMapping;
-import org.springframework.web.bind.annotation.RequestMapping;
-import org.springframework.web.bind.annotation.RestController;
+import org.springframework.web.bind.annotation.*;
 
+import java.util.ArrayList;
+import java.util.HashMap;
 import java.util.List;
+import java.util.Map;
 import java.util.concurrent.TimeUnit;
 
 @Api(tags = "系统用户相关API")
@@ -34,6 +37,8 @@ public class SysUserController extends ApiBaseController {
     private ISysUserService sysUserService;
     @Autowired
     private ISysUserExtService userExtService;
+    @Autowired
+    private IAlertConfigurationService alertConfigurationService;
 
 
     @ApiOperation(value = "绑定微信用户和系统用户",
@@ -165,4 +170,33 @@ public class SysUserController extends ApiBaseController {
         return list.size()>0?AjaxResult.success().putKV("list",list):AjaxResult.error(ResultType.NUll);
     }
 
+    @PostMapping("/searchOrg")
+    @ResponseBody
+    public Map searchProductParamByCustomerCode(@RequestBody OrderSalesParameter salesManager) {
+        if("".equals(salesManager.getParType()) || salesManager.getParType() ==null){
+            salesManager.setParType("div_level");
+        }
+        Map map = new HashMap();
+        List<Map<String,Object>> dataList = alertConfigurationService.searchProductParamByCustomerCode(
+                salesManager.getParType(),salesManager.getParValue());
+        if(dataList != null && dataList.size() > 0){
+            map.put("levelInfo",dataList.get(0));
+            if ("suboffice_level".equals(salesManager.getParType()) ||
+                    "customer_level".equals(salesManager.getParType()) ||
+                    "emp_level".equals(salesManager.getParType()) ||
+                    "saledept_level".equals(salesManager.getParType())
+            ){
+                map.put("dataList",new ArrayList());
+            }else{
+                map.put("dataList",dataList);
+            }
+            return map;
+        } else {
+            Map mapnull = new HashMap();
+            map.put("levelInfo",mapnull);
+            map.put("dataList",dataList);
+            return map;
+        }
+    }
+
 }

+ 2 - 0
suishenbang-common/src/main/java/com/dgtly/common/core/controller/BaseController.java

@@ -116,6 +116,8 @@ public class BaseController
 
 
 
+
+
     /**
      * 响应返回结果
      *