wangmh 7 лет назад
Родитель
Сommit
68b363d232

+ 6 - 6
sso-server/src/main/java/com/uas/sso/controller/UserManagerController.java

@@ -429,8 +429,8 @@ public class UserManagerController extends BaseController {
      * 优软云个人用户注册总数
      */
     @RequestMapping(value = "/count", method = RequestMethod.GET)
-    public long getUserCount() {
-        return userService.getPersonalUserCount();
+    public ModelMap getUserCount() {
+        return success(new ModelMap("count", userService.getCount()));
     }
 
     /**
@@ -438,13 +438,13 @@ public class UserManagerController extends BaseController {
      * @return
      */
     @RequestMapping(value = "/currentMonth/user/count", method = RequestMethod.GET)
-    public long getCurrentMonthUserCount() {
+    public ModelMap getCurrentMonthUserCount() {
         Calendar start = Calendar.getInstance();
         start.setTime(new Date());
         start.set(start.get(Calendar.YEAR), start.get(Calendar.MONTH), 1, 0, 0, 0);
         Calendar end = Calendar.getInstance();
         start.set(start.get(Calendar.YEAR), start.get(Calendar.MONTH) + 1, 1, 0, 0, 0);
-        return userService.getCountByRegisterDate(start, end);
+        return success(new ModelMap("count", userService.getCountByRegisterDate(start, end)));
     }
 
     /**
@@ -452,12 +452,12 @@ public class UserManagerController extends BaseController {
      * @return
      */
     @RequestMapping(value = "/lastMonth/user/count", method = RequestMethod.GET)
-    public long getLastMonthUserCount() {
+    public ModelMap getLastMonthUserCount() {
         Calendar start = Calendar.getInstance();
         start.setTime(new Date());
         start.set(start.get(Calendar.YEAR), start.get(Calendar.MONTH) - 1, 1, 0, 0, 0);
         Calendar end = Calendar.getInstance();
         start.set(start.get(Calendar.YEAR), start.get(Calendar.MONTH), 1, 0, 0, 0);
-        return userService.getCountByRegisterDate(start, end);
+        return success(new ModelMap("count", userService.getCountByRegisterDate(start, end)));
     }
 }

+ 6 - 6
sso-server/src/main/java/com/uas/sso/controller/UserspaceManagerController.java

@@ -402,8 +402,8 @@ public class UserspaceManagerController extends BaseController {
      * 企业信息库总数
      */
     @RequestMapping(value = "/count", method = RequestMethod.GET)
-    public long getEnterpriseCount() {
-        return userspaceService.getCount();
+    public ModelMap getEnterpriseCount() {
+        return success(new ModelMap("count", userspaceService.getCount()));
     }
 
     /**
@@ -411,13 +411,13 @@ public class UserspaceManagerController extends BaseController {
      * @return
      */
     @RequestMapping(value = "/currentMonth/count", method = RequestMethod.GET)
-    public long getCurrentMonthCount() {
+    public ModelMap getCurrentMonthCount() {
         Calendar start = Calendar.getInstance();
         start.setTime(new Date());
         start.set(start.get(Calendar.YEAR), start.get(Calendar.MONTH), 1, 0, 0, 0);
         Calendar end = Calendar.getInstance();
         start.set(start.get(Calendar.YEAR), start.get(Calendar.MONTH) + 1, 1, 0, 0, 0);
-        return userspaceService.getCountByRegisterDate(start, end);
+        return success(new ModelMap("count", userspaceService.getCountByRegisterDate(start, end)));
     }
 
     /**
@@ -425,13 +425,13 @@ public class UserspaceManagerController extends BaseController {
      * @return
      */
     @RequestMapping(value = "/lastMonth/enterprise/count", method = RequestMethod.GET)
-    public long getLastMonthEnterpriseCount() {
+    public ModelMap getLastMonthEnterpriseCount() {
         Calendar start = Calendar.getInstance();
         start.setTime(new Date());
         start.set(start.get(Calendar.YEAR), start.get(Calendar.MONTH) - 1, 1, 0, 0, 0);
         Calendar end = Calendar.getInstance();
         start.set(start.get(Calendar.YEAR), start.get(Calendar.MONTH), 1, 0, 0, 0);
-        return userspaceService.getCountByRegisterDate(start, end);
+        return success(new ModelMap("count", userspaceService.getCountByRegisterDate(start, end)));
     }
 
 }

+ 1 - 1
sso-server/src/main/java/com/uas/sso/service/UserService.java

@@ -258,7 +258,7 @@ public interface UserService {
      * 获取用户数量
      * @return
      */
-    long getPersonalUserCount();
+    long getCount();
 
     /**
      * 统计某个时间段注册数量

+ 1 - 1
sso-server/src/main/java/com/uas/sso/service/impl/UserServiceImpl.java

@@ -598,7 +598,7 @@ public class UserServiceImpl implements UserService {
     }
 
     @Override
-    public long getPersonalUserCount() {
+    public long getCount() {
         return userDao.count();
     }