| | |
| | | public void changeSex(AcceptData acceptData, Integer sex, PrintWriter out) {
|
| | | try {
|
| | | // 获取设备定义性别
|
| | | int deviceSex = deviceSexService.changeDeviceSex(sex, acceptData.getDevice());
|
| | | deviceSexService.save(acceptData.getDevice(), sex);
|
| | | JSONObject data = new JSONObject();
|
| | | data.put("sex", deviceSex);
|
| | | data.put("sex", sex);
|
| | | out.print(JsonUtil.loadTrueResult(data));
|
| | | } catch (Exception e) {
|
| | | out.print(JsonUtil.loadFalseResult("切换失败"));
|
| | |
| | | List<HomeNavbar> listItems = new ArrayList<HomeNavbar>();
|
| | |
|
| | | // 系统默认导航栏
|
| | | List<HomeNavbar> listNavbar = homeNavbarService.listQueryEffectiveNavbar();
|
| | | List<HomeNavbar> listNavbar = homeNavbarService.listQueryEffectiveNavbar(acceptData.getSystem());
|
| | | if (listNavbar != null && listNavbar.size() > 0) {
|
| | | listItems.addAll(listNavbar);
|
| | | }
|
| | |
| | | out.print(JsonUtil.loadTrueResult("保存成功"));
|
| | |
|
| | | // 设置为通用
|
| | | deviceSexService.changeDeviceSex(0, acceptData.getDevice());
|
| | | deviceSexService.save(acceptData.getDevice(), 0);
|
| | |
|
| | | } catch (HomeNavbarUserException e) {
|
| | | out.print(JsonUtil.loadFalseResult(1, e.getMsg()));
|
| | |
| | | List<HomeNavbar> listItems = new ArrayList<HomeNavbar>();
|
| | |
|
| | |
|
| | | List<HomeNavbar> listNavbar = homeNavbarUserService.restoreSystemDefault(uid, acceptData.getDevice());
|
| | | List<HomeNavbar> listNavbar = homeNavbarUserService.restoreSystemDefault(uid, acceptData.getDevice(),acceptData.getSystem());
|
| | | if (listNavbar != null && listNavbar.size() > 0) {
|
| | | listItems.addAll(listNavbar);
|
| | | }
|
| | |
| | | out.print(JsonUtil.loadTrueResult(data));
|
| | |
|
| | | // 设置为通用
|
| | | deviceSexService.changeDeviceSex(0, acceptData.getDevice());
|
| | | deviceSexService.save(acceptData.getDevice(), 0);
|
| | |
|
| | | } catch (HomeNavbarUserException e) {
|
| | | out.print(JsonUtil.loadFalseResult(1, e.getMsg()));
|