|
|
@@ -15,8 +15,6 @@ import org.springframework.beans.factory.annotation.Autowired;
|
|
|
import org.springframework.ui.ModelMap;
|
|
|
import org.springframework.web.bind.annotation.*;
|
|
|
|
|
|
-import java.util.Date;
|
|
|
-
|
|
|
/**
|
|
|
* @author wangmh
|
|
|
* @create 2018-01-13 19:39
|
|
|
@@ -38,24 +36,38 @@ public class YunCenterController extends BaseController {
|
|
|
@Autowired
|
|
|
private UserAccountService userAccountService;
|
|
|
|
|
|
+ /**
|
|
|
+ * 获取登录用户信息
|
|
|
+ * @return
|
|
|
+ */
|
|
|
@RequestMapping(value = "/user/info", method = RequestMethod.GET)
|
|
|
public ModelMap findUserInfo() {
|
|
|
+ // 获得登录用户
|
|
|
UserAccount userAccount = SystemSession.getUserAccount();
|
|
|
if (userAccount == null) {
|
|
|
return error("未登录");
|
|
|
}
|
|
|
|
|
|
+ // 设置返回数据
|
|
|
ModelMap data = new ModelMap();
|
|
|
data.put("user", userAccount);
|
|
|
if (userAccount.getSpaceUU() != null) {
|
|
|
Userspace userspace = userspaceService.findOne(userAccount.getSpaceUU());
|
|
|
data.put("userspace", userspace);
|
|
|
+ // 删除管理员的密码盐值,不返回给前端
|
|
|
+ userspace.getAdmin().setSalt(null);
|
|
|
+ userspace.getAdmin().setPassword(null);
|
|
|
}
|
|
|
+
|
|
|
+ // 删除用户密码和盐值,不返回给前端
|
|
|
+ userAccount.setPassword(null);
|
|
|
+ userAccount.setSalt(null);
|
|
|
+
|
|
|
return success(data);
|
|
|
}
|
|
|
|
|
|
/**
|
|
|
- * 根据营业执照号分页查询申请信息
|
|
|
+ * 分页查询申请信息
|
|
|
* @param page 页数
|
|
|
* @param size 每页个数
|
|
|
* @return
|
|
|
@@ -79,13 +91,13 @@ public class YunCenterController extends BaseController {
|
|
|
*/
|
|
|
@RequestMapping(value = "/member/info", method = RequestMethod.GET)
|
|
|
@ResponseBody
|
|
|
- public ModelMap findMemberAll(@RequestParam(defaultValue = "0") int pageNumber, @RequestParam(defaultValue = "20") int pageSize) {
|
|
|
+ public ModelMap findMemberAll(@RequestParam(defaultValue = "0") int page, @RequestParam(defaultValue = "20") int size) {
|
|
|
UserAccount userAccount = getLoginUser();
|
|
|
if (userAccount.getSpaceUU() == null) {
|
|
|
return error(Const.SPACEUU_PERSONAL+"", "个人账号");
|
|
|
}
|
|
|
|
|
|
- Page<User> pUser = userService.findMemberBySpaceUU(pageNumber, pageSize, userAccount.getSpaceUU());
|
|
|
+ Page<User> pUser = userService.findMemberBySpaceUU(page, size, userAccount.getSpaceUU());
|
|
|
return success(pUser);
|
|
|
}
|
|
|
|
|
|
@@ -94,7 +106,7 @@ public class YunCenterController extends BaseController {
|
|
|
* @param userUU 用户uu号
|
|
|
* @return
|
|
|
*/
|
|
|
- @RequestMapping(value = "/agree/apply", method = RequestMethod.GET)
|
|
|
+ @RequestMapping(value = "/agree/apply", method = RequestMethod.POST)
|
|
|
@ResponseBody
|
|
|
public ModelMap agreeApply(Long userUU, Long id) {
|
|
|
// 获取登录用户
|
|
|
@@ -124,6 +136,10 @@ public class YunCenterController extends BaseController {
|
|
|
return success();
|
|
|
}
|
|
|
|
|
|
+ /**
|
|
|
+ * 获取登录账号
|
|
|
+ * @return
|
|
|
+ */
|
|
|
private UserAccount getLoginUser() {
|
|
|
UserAccount userAccount = SystemSession.getUserAccount();
|
|
|
if (userAccount == null) {
|