|
|
@@ -14,7 +14,7 @@ import org.springframework.web.bind.annotation.*;
|
|
|
|
|
|
import java.io.*;
|
|
|
import java.text.SimpleDateFormat;
|
|
|
-import java.util.Calendar;
|
|
|
+import java.util.Arrays;
|
|
|
import java.util.Date;
|
|
|
import java.util.Set;
|
|
|
|
|
|
@@ -323,7 +323,7 @@ public class UserManagerController extends BaseController {
|
|
|
* @return
|
|
|
*/
|
|
|
@RequestMapping(value = "/sysUserdata/uuzc", method = RequestMethod.POST)
|
|
|
- public ModelMap uuzcRegister(User user) {
|
|
|
+ public ModelMap uuzcRegister(User user, @RequestParam String appId) {
|
|
|
// 校验手机号
|
|
|
checkMobile(user.getMobile(), null);
|
|
|
|
|
|
@@ -342,7 +342,7 @@ public class UserManagerController extends BaseController {
|
|
|
|
|
|
// 传来的值可能带有uu号,去除uu号
|
|
|
user.setUserUU(null);
|
|
|
- user = userService.register(user, "uuzc");
|
|
|
+ user = userService.register(user, appId);
|
|
|
return success(user.getUserUU());
|
|
|
}
|
|
|
|
|
|
@@ -429,8 +429,8 @@ public class UserManagerController extends BaseController {
|
|
|
* 优软云个人用户注册总数
|
|
|
*/
|
|
|
@RequestMapping(value = "/count", method = RequestMethod.GET)
|
|
|
- public ModelMap getUserCount() {
|
|
|
- return new ModelMap("count", userService.getCount());
|
|
|
+ public ModelMap count() {
|
|
|
+ return new ModelMap("count", userService.count());
|
|
|
}
|
|
|
|
|
|
/**
|
|
|
@@ -438,13 +438,8 @@ public class UserManagerController extends BaseController {
|
|
|
* @return
|
|
|
*/
|
|
|
@RequestMapping(value = "/currentMonth/count", method = RequestMethod.GET)
|
|
|
- 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();
|
|
|
- end.set(start.get(Calendar.YEAR), start.get(Calendar.MONTH) + 1, 1, 0, 0, 0);
|
|
|
- return new ModelMap("count", userService.getCountByRegisterDate(start, end));
|
|
|
+ public ModelMap countInCurrentMonth() {
|
|
|
+ return new ModelMap("count", userService.countInCurrentMonth());
|
|
|
}
|
|
|
|
|
|
/**
|
|
|
@@ -452,12 +447,49 @@ public class UserManagerController extends BaseController {
|
|
|
* @return
|
|
|
*/
|
|
|
@RequestMapping(value = "/lastMonth/count", method = RequestMethod.GET)
|
|
|
- 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();
|
|
|
- end.set(start.get(Calendar.YEAR), start.get(Calendar.MONTH) + 1, 1, 0, 0, 0);
|
|
|
- return new ModelMap("count", userService.getCountByRegisterDate(start, end));
|
|
|
+ public ModelMap countInLastMonth() {
|
|
|
+ return new ModelMap("count", userService.countInLastMonth());
|
|
|
+ }
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 获取本周用户注册数量
|
|
|
+ * @return
|
|
|
+ */
|
|
|
+ @RequestMapping(value = "/currentWeek/count", method = RequestMethod.GET)
|
|
|
+ public ModelMap countInCurrentWeek() {
|
|
|
+ return new ModelMap("count", userService.countInCurrentWeek());
|
|
|
+ }
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 获取指定应用注册数量
|
|
|
+ * @param fromApps 应用id,逗号分隔
|
|
|
+ * @return
|
|
|
+ */
|
|
|
+ @RequestMapping(value = "/count/app", method = RequestMethod.GET)
|
|
|
+ public ModelMap count(String fromApps) {
|
|
|
+ String[] apps = fromApps.split(",");
|
|
|
+ return success(userService.count(Arrays.asList(apps)));
|
|
|
+ }
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 获取指定应用本月注册数量
|
|
|
+ * @param fromApps 应用id,逗号分隔
|
|
|
+ * @return
|
|
|
+ */
|
|
|
+ @RequestMapping(value = "/currentMonth/count/app", method = RequestMethod.GET)
|
|
|
+ public ModelMap countInCurrentMonth(String fromApps) {
|
|
|
+ String[] apps = fromApps.split(",");
|
|
|
+ return success(userService.countInCurrentMonth(Arrays.asList(apps)));
|
|
|
+ }
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 获取指定应用本周注册数量
|
|
|
+ * @param fromApps 应用id,逗号分隔
|
|
|
+ * @return
|
|
|
+ */
|
|
|
+ @RequestMapping(value = "/currentWeek/count/app", method = RequestMethod.GET)
|
|
|
+ public ModelMap countInCurrentWeek(String fromApps) {
|
|
|
+ String[] apps = fromApps.split(",");
|
|
|
+ return success(userService.countInCurrentWeek(Arrays.asList(apps)));
|
|
|
}
|
|
|
}
|