| | |
| | | JSONObject data = new JSONObject();
|
| | | data.put("listGroup", list);
|
| | | JsonUtil.printMode(out, callback, JsonUtil.loadTrueResult(data));
|
| | | |
| | | } catch (UserCloudGroupException e) {
|
| | | JsonUtil.printMode(out, callback, JsonUtil.loadFalseResult(e.getMsg()));
|
| | | }
|
| | |
| | | * @param out
|
| | | */
|
| | | @RequestMapping(value = "switchState")
|
| | | public void switchState(String callback, AcceptData acceptData, Long uid, Integer type, Boolean state,
|
| | | public void switchState(String callback, AcceptData acceptData, Long uid, Integer type, Integer state,
|
| | | PrintWriter out) {
|
| | | if (uid == null) {
|
| | | JsonUtil.printMode(out, callback, JsonUtil.loadFalseResult(1, "用户未登录"));
|
| | | if (uid == null || type == null || state == null) {
|
| | | JsonUtil.printMode(out, callback, JsonUtil.loadFalseResult(1, "参数不完整"));
|
| | | return;
|
| | | }
|
| | | if (type == 1) {
|
| | | userCloudManageService.save(uid, state, null);
|
| | | } else {
|
| | | userCloudManageService.save(uid, null, state);
|
| | | |
| | | boolean reslut = false;
|
| | | if (state == 1) {
|
| | | reslut = true;
|
| | | }
|
| | | JsonUtil.printMode(out, callback, JsonUtil.loadTrueResult("操作成功"));
|
| | | |
| | | if (type == 1) {
|
| | | userCloudManageService.save(uid, reslut, null);
|
| | | } else {
|
| | | userCloudManageService.save(uid, null, reslut);
|
| | | }
|
| | | JSONObject data = new JSONObject();
|
| | | data.put("state", reslut);
|
| | | JsonUtil.printMode(out, callback, JsonUtil.loadTrueResult(data));
|
| | | }
|
| | |
|
| | | /**
|