| package com.matrix.system.common.actions; | 
|   | 
| import com.matrix.core.anotations.RemoveRequestToken; | 
| import com.matrix.core.anotations.SaveRequestToken; | 
| import com.matrix.core.constance.MatrixConstance; | 
| import com.matrix.core.constance.SystemErrorCode; | 
| import com.matrix.core.constance.SystemMessageCode; | 
| import com.matrix.core.exception.GlobleException; | 
| import com.matrix.core.pojo.AjaxResult; | 
| import com.matrix.core.pojo.PaginationVO; | 
| import com.matrix.core.tools.DateUtil; | 
| import com.matrix.core.tools.LogUtil; | 
| import com.matrix.core.tools.PropertiesUtil; | 
| import com.matrix.core.tools.WebUtil; | 
| import com.matrix.core.tools.excl.ExcelSheetPO; | 
| import com.matrix.core.tools.excl.ExcelUtil; | 
| import com.matrix.core.tools.excl.ExcelVersion; | 
| import com.matrix.core.web.BaseAction; | 
| import com.matrix.system.common.bean.SysUserLoginRecord; | 
| import com.matrix.system.common.bean.SysUsers; | 
| import com.matrix.system.common.constance.AppConstance; | 
| import com.matrix.system.common.constance.AppMessageCode; | 
| import com.matrix.system.common.constance.AppVocabularyCode; | 
| import com.matrix.system.common.dao.SysUsersDao; | 
| import com.matrix.system.common.service.SysUsersService; | 
| import com.matrix.system.common.tools.PasswordUtil; | 
| import com.matrix.system.common.tools.ResponseHeadUtil; | 
| import com.matrix.system.constance.SystemConstance; | 
| import com.matrix.system.hive.action.util.QueryUtil; | 
| import com.matrix.system.hive.bean.SysVipInfo; | 
| import org.apache.commons.lang.StringUtils; | 
| import org.springframework.beans.factory.annotation.Autowired; | 
| import org.springframework.stereotype.Controller; | 
| import org.springframework.ui.ModelMap; | 
| import org.springframework.web.bind.annotation.PathVariable; | 
| import org.springframework.web.bind.annotation.PostMapping; | 
| import org.springframework.web.bind.annotation.RequestMapping; | 
| import org.springframework.web.bind.annotation.ResponseBody; | 
| import org.springframework.web.servlet.ModelAndView; | 
|   | 
| import javax.servlet.http.HttpServletRequest; | 
| import javax.servlet.http.HttpServletResponse; | 
| import java.io.OutputStream; | 
| import java.io.UnsupportedEncodingException; | 
| import java.net.URLEncoder; | 
| import java.security.NoSuchAlgorithmException; | 
| import java.util.ArrayList; | 
| import java.util.LinkedList; | 
| import java.util.List; | 
| import java.util.Objects; | 
|   | 
| import static com.matrix.system.common.constance.AppConstance.SAFEPATH; | 
|   | 
| /** | 
|  * @author 姜ø友瑶 | 
|  * @description 公司管理员管理 | 
|  * @email 935090232@qq.com | 
|  * @date 2016-06-26 | 
|  */ | 
| @Controller | 
| @RequestMapping(value = "admin") | 
| public class AdminAction extends BaseAction { | 
|   | 
|     @Autowired | 
|     private SysUsersService sysUsersService; | 
|   | 
|     @Autowired | 
|     private SysUsersDao usersDao; | 
|   | 
|     public static final String BEV = "SYSUSERS_BEV"; | 
|   | 
|     /** | 
|      * @param page1 | 
|      * @param page2 | 
|      * @return 返回类型 String | 
|      * 页面定向方法,每个权限模块公用一个,每个模块共享一个一级路径,已便于进行权限过滤 | 
|      * @author:姜友瑶 | 
|      * @date 2016年8月31日 | 
|      */ | 
|     @RequestMapping(value = "/redirect/{page1}/{page2}") | 
|     public String redirect(@PathVariable("page1") String page1, @PathVariable("page2") String page2) { | 
|         return "admin/" + page1 + "/" + page2; | 
|     } | 
|   | 
|   | 
|     @RequestMapping(value = "/redirect/{page1}/{page2}/{page3}") | 
|     public String redirect(@PathVariable("page1") String page1, @PathVariable("page2") String page2, @PathVariable("page3") String page3) { | 
|         return "admin/" + page1 + "/" + page2 + "/" + page3; | 
|     } | 
|   | 
|   | 
|     /** | 
|      * @param page1 | 
|      * @return 返回类型 String | 
|      * 页面定向方法,每个权限模块公用一个,每个模块共享一个一级路径,已便于进行权限过滤 | 
|      * @author:姜友瑶 | 
|      * @date 2016年8月31日 | 
|      */ | 
|     @RequestMapping(value = "/redirect/{page1}") | 
|     public String redirect(@PathVariable("page1") String page1) { | 
|         return "admin/" + page1; | 
|     } | 
|   | 
|     /** | 
|      * 列表显示 | 
|      */ | 
|     @RequestMapping(value = "/showList") | 
|     public @ResponseBody | 
|     AjaxResult showList(SysUsers sysUsers, PaginationVO pageVo) { | 
|         // 默认按创建时间排序 | 
|         if (StringUtils.isBlank(pageVo.getSort())) { | 
|             pageVo.setSort("createTime"); | 
|             pageVo.setOrder("desc"); | 
|         } | 
|         SysUsers user = WebUtil.getSessionAttribute(MatrixConstance.LOGIN_KEY); | 
|         sysUsers.setCompanyId(user.getCompanyId()); | 
|         sysUsers.setSuUserType(AppConstance.USER_TYPE_EMPLOYEE); | 
|         sysUsers.setSuValid(SysUsers.VALID_Y); | 
|         sysUsers.setShopId(user.getShopId()); | 
|         List<SysUsers> dataList = sysUsersService.findInPage(sysUsers, pageVo); | 
|         AjaxResult result = new AjaxResult(AjaxResult.STATUS_SUCCESS, dataList, sysUsersService.findTotal(sysUsers)); | 
|         return result; | 
|     } | 
|   | 
|     /** | 
|      * 新增管理员 | 
|      * | 
|      * @param sysUsers | 
|      * @return | 
|      * @author JIANGYOUYAO | 
|      * @email 935090232@qq.com | 
|      * @date Dec 10, 2017 | 
|      */ | 
|     @RemoveRequestToken | 
|     @PostMapping(value = "/addAdmin") | 
|     public @ResponseBody | 
|     AjaxResult addAdmin(SysUsers sysUsers) { | 
|   | 
|         SysUsers loginUser = WebUtil.getSessionAttribute(MatrixConstance.LOGIN_KEY); | 
|         loginUser.setCreateBy(loginUser.getSuName()); | 
|         sysUsers.setCompanyId(loginUser.getCompanyId()); | 
|         int i = sysUsersService.addAdmin(sysUsers); | 
|         if (i > 0) { | 
|             return new AjaxResult(AjaxResult.STATUS_SUCCESS, SystemMessageCode.ADD_SUCCES, AppVocabularyCode.ADMIN); | 
|         } else { | 
|             throw new GlobleException(SystemErrorCode.DATA_ADD_FAIL); | 
|         } | 
|     } | 
|   | 
|     /** | 
|      * 新增门店管理员 | 
|      */ | 
|     @RemoveRequestToken | 
|     @PostMapping(value = "/addShopAdmin") | 
|     public @ResponseBody | 
|     AjaxResult addShopAdmin(SysUsers sysUsers) { | 
|   | 
|         SysUsers loginUser = WebUtil.getSessionAttribute(MatrixConstance.LOGIN_KEY); | 
|         loginUser.setCreateBy(loginUser.getSuName()); | 
|         sysUsers.setCompanyId(loginUser.getCompanyId()); | 
|         sysUsers.setShopId(loginUser.getShopId()); | 
|         int i = sysUsersService.addAdmin(sysUsers); | 
|         if (i > 0) { | 
|             return new AjaxResult(AjaxResult.STATUS_SUCCESS, SystemMessageCode.ADD_SUCCES, AppVocabularyCode.ADMIN); | 
|         } else { | 
|             throw new GlobleException(SystemErrorCode.DATA_ADD_FAIL); | 
|         } | 
|     } | 
|   | 
|   | 
|     /** | 
|      * 修改公司管理员 | 
|      * 不含密码 | 
|      * | 
|      * @param sysUsers | 
|      * @return | 
|      * @author JIANGYOUYAO | 
|      * @email 935090232@qq.com | 
|      * @date Dec 10, 2017 | 
|      */ | 
|     @RemoveRequestToken | 
|     @PostMapping(value = "/modifyAdmin") | 
|     public @ResponseBody | 
|     AjaxResult modifyAdmin(SysUsers sysUsers) { | 
|         sysUsers.setSuPassword(null); | 
|   | 
|         //上级不能为自己 | 
|         if (Objects.equals(sysUsers.getSuId(), sysUsers.getParentUserId())) { | 
|             return new AjaxResult(AjaxResult.STATUS_FAIL, "不能设置自己为自己的上级"); | 
|         } | 
|         int i = sysUsersService.modifyByMap(WebUtil.getSessionAttribute(BEV), sysUsers); | 
|         if (i > 0) { | 
|             WebUtil.removeSessionAttribute(BEV); | 
|             return new AjaxResult(AjaxResult.STATUS_SUCCESS, SystemMessageCode.UPDATE_SUCCES, "员工"); | 
|         } else { | 
|             throw new GlobleException(SystemErrorCode.DATA_UPDATE_FAIL); | 
|         } | 
|     } | 
|   | 
|   | 
|   | 
|   | 
|     @RequestMapping(value = "/goStaffEditForm") | 
|     public String goStaffEditForm() { | 
|         SysUsers loginUser = WebUtil.getSessionAttribute(MatrixConstance.LOGIN_KEY); | 
|         WebUtil.getRequest().setAttribute("obj", loginUser); | 
|         return "admin/hive/mobile/personal-msg"; | 
|     } | 
|   | 
|   | 
|     /** | 
|      * 修改员工个人信息 | 
|      */ | 
|     @RequestMapping(value = "/updateStaffInfo") | 
|     public @ResponseBody | 
|     AjaxResult updateStaffInfo(SysUsers shopstaffInfo) { | 
|         SysUsers loginUser = WebUtil.getSessionAttribute(MatrixConstance.LOGIN_KEY); | 
|         shopstaffInfo.setSuId(loginUser.getSuId()); | 
|         int i = sysUsersService.modifyByModel(shopstaffInfo); | 
|         if (i > 0) { | 
|             return new AjaxResult(AjaxResult.STATUS_SUCCESS, "资料修改成功"); | 
|         } else { | 
|             return new AjaxResult(AjaxResult.STATUS_FAIL, "资料修改失败"); | 
|         } | 
|     } | 
|   | 
|   | 
|     /** | 
|      * 修改头像 | 
|      * | 
|      * @param suPhoto | 
|      * @return | 
|      */ | 
|     @PostMapping(value = "/modifyPhoto") | 
|     public @ResponseBody | 
|     AjaxResult modifyPhoto(String suPhoto) { | 
|         SysUsers user = new SysUsers(); | 
|         Long suId = ((SysUsers) getSessionUser()).getSuId(); | 
|         user.setSuId(suId); | 
|         user.setSuPhoto(suPhoto); | 
|         sysUsersService.modifyByModel(user); | 
|         WebUtil.setSessionAttribute(MatrixConstance.LOGIN_KEY, sysUsersService.findById(suId)); | 
|         return new AjaxResult(AjaxResult.STATUS_SUCCESS, "头像更新成功"); | 
|     } | 
|   | 
|   | 
|     /** | 
|      * 进入修改界面 | 
|      * | 
|      * @param id | 
|      * @return | 
|      * @author JIANGYOUYAO | 
|      * @email 935090232@qq.com | 
|      * @date Dec 10, 2017 | 
|      */ | 
|     @SaveRequestToken | 
|     @RequestMapping(value = "/editForm") | 
|     public ModelAndView editForm(Long id) { | 
|         ModelAndView mv = new ModelAndView("admin/sys/admin-form"); | 
|         SysUsers sysUsers = new SysUsers(); | 
|         mv.addObject("obj", sysUsers); | 
|         if (id != null) { | 
|             sysUsers = sysUsersService.findById(id); | 
|             mv.addObject("obj", sysUsers); | 
|             //WebUtil.getRequest().setAttribute("obj", sysUsers); | 
|             WebUtil.setSessionAttribute(BEV, sysUsers); | 
|         } | 
|         List<SysUsers> staffs = sysUsersService.findByModel(null); | 
|         mv.addObject("staffs", staffs); | 
|         return mv; | 
|     } | 
|   | 
|     /** | 
|      * 删除 | 
|      * | 
|      * @param keys | 
|      * @return | 
|      * @author JIANGYOUYAO | 
|      * @email 935090232@qq.com | 
|      * @date Dec 10, 2017 | 
|      */ | 
|     @RequestMapping(value = "/del") | 
|     public @ResponseBody | 
|     AjaxResult del(String keys) { | 
|         List<String> ids = com.matrix.core.tools.StringUtils.strToCollToString(keys, ","); | 
|         int i = sysUsersService.remove(ids); | 
|         if (i > 0) { | 
|             return new AjaxResult(AjaxResult.STATUS_SUCCESS, SystemMessageCode.DELETE_SUCCES, i); | 
|         } else { | 
|             throw new GlobleException(SystemErrorCode.DATA_DELETE_FAIL); | 
|         } | 
|     } | 
|   | 
|     /** | 
|      * 重置密码 | 
|      * | 
|      * @param id | 
|      * @return | 
|      * @author JIANGYOUYAO | 
|      * @email 935090232@qq.com | 
|      * @date 2017年12月12日 | 
|      */ | 
|     @RequestMapping(value = "/resetPassword") | 
|     public @ResponseBody | 
|     AjaxResult resetPassword(Long id) { | 
|   | 
|         SysUsers loginUser = getSessionUser(); | 
|   | 
|         SysUsers user = sysUsersService.findById(id); | 
|         if (user != null) { | 
|   | 
|             LogUtil.info("#{}进行重置{}的密码操作#", loginUser.getSuAccount(), user.getSuAccount()); | 
|   | 
|             user.setSuPassword(PropertiesUtil.getString(AppConstance.DEFAULT_PASSWORD)); | 
|             try { | 
|                 // 设置加密后的密码 | 
|                 user.setSuPassword(PasswordUtil.getEncrypUserPwd(user)); | 
|             } catch (UnsupportedEncodingException | NoSuchAlgorithmException e) { | 
|                 LogUtil.error("重置用户密码加密失败", e); | 
|                 throw new GlobleException(SystemErrorCode.SYSTEM_UNKNOW_ERROR); | 
|             } | 
|             //sysUsersService.modifyByModel(user); | 
|             // 更新密码 | 
|             sysUsersService.updateUserPassword(user.getSuId(), user.getSuPassword()); | 
|         } else { | 
|             return new AjaxResult(AjaxResult.STATUS_FAIL, SystemErrorCode.INVALID_DATA, id); | 
|         } | 
|         return new AjaxResult(AjaxResult.STATUS_SUCCESS, AppMessageCode.Common.OPERATION_SUCCESS); | 
|     } | 
|   | 
|     /** | 
|      * 账号锁定和解锁 | 
|      * | 
|      * @param status | 
|      * @param id | 
|      * @return | 
|      * @author JIANGYOUYAO | 
|      * @email 935090232@qq.com | 
|      * @date 2017年12月12日 | 
|      */ | 
|     @RequestMapping(value = "/accountLock/{status}") | 
|     public @ResponseBody | 
|     AjaxResult lock(@PathVariable("status") String status, Long id) { | 
|         SysUsers user = sysUsersService.findById(id); | 
|         switch (status) { | 
|             case "unlock": | 
|                 sysUsersService.unlockUser(user.getSuAccount()); | 
|                 break; | 
|             case "lock": | 
|                 sysUsersService.lockUser(user.getSuAccount()); | 
|                 break; | 
|             default: | 
|                 return new AjaxResult(AjaxResult.STATUS_FAIL, SystemErrorCode.INVALID_DATA, status); | 
|         } | 
|         return new AjaxResult(AjaxResult.STATUS_SUCCESS, AppMessageCode.Common.OPERATION_SUCCESS); | 
|     } | 
|   | 
|     /** | 
|      * 查询登录历史 | 
|      * | 
|      * @param loginRecord | 
|      * @param pageVo | 
|      * @return | 
|      * @author JIANGYOUYAO | 
|      * @email 935090232@qq.com | 
|      * @date 2018年6月14日 | 
|      */ | 
|     @RequestMapping(value = "/showLoginRecordList") | 
|     public @ResponseBody | 
|     AjaxResult showLoginRecordList(SysUserLoginRecord loginRecord, PaginationVO pageVo) { | 
|   | 
|         SysUsers user = getSessionUser(); | 
|         // 非管理员只查询自己的登录记录 | 
|         if (!AppConstance.USER_TYPE_ADMIN.equals(user.getSuUserType())) { | 
|             loginRecord.setUserAccount(user.getSuAccount()); | 
|         } | 
|         List<SysUserLoginRecord> dataList = usersDao.selectLoginRecordList(loginRecord, pageVo); | 
|         AjaxResult result = new AjaxResult(AjaxResult.STATUS_SUCCESS, dataList, | 
|                 usersDao.selectLoginRecordTotal(loginRecord)); | 
|         return result; | 
|     } | 
|   | 
|     /** | 
|      * 进入修改界面 | 
|      * | 
|      * @return | 
|      * @author JIANGYOUYAO | 
|      * @email 935090232@qq.com | 
|      * @date 2018年3月6日 | 
|      */ | 
|     @RequestMapping(value = "/updatePassword") | 
|     public @ResponseBody | 
|     AjaxResult toUpdatePassword(String oldPassword, String newPassword) { | 
|   | 
|         SysUsers loginUser = getSessionUser(); | 
|   | 
|         SysUsers user = sysUsersService.findById(loginUser.getSuId()); | 
|   | 
|         SysUsers oldUser = new SysUsers(); | 
|         oldUser.setSuPassword(oldPassword); | 
|         oldUser.setSuRegisterTime(user.getSuRegisterTime()); | 
|         try { | 
|             oldUser.setSuPassword(PasswordUtil.getEncrypUserPwd(oldUser)); | 
|             // 旧密码比较 | 
|             if (oldUser.getSuPassword().equals(user.getSuPassword())) { | 
|                 LogUtil.info("#{}进行修改{}的密码操作#", loginUser.getSuAccount(), user.getSuAccount()); | 
|                 user.setSuPassword(newPassword); | 
|   | 
|                 // 设置加密后的密码 | 
|                 user.setSuPassword(PasswordUtil.getEncrypUserPwd(user)); | 
|   | 
|                 sysUsersService.modifyByModel(user); | 
|   | 
|             } else { | 
|                 return new AjaxResult(AjaxResult.STATUS_FAIL, "旧密码不对"); | 
|             } | 
|   | 
|         } catch (UnsupportedEncodingException | NoSuchAlgorithmException e) { | 
|             LogUtil.error("用户密码加密失败", e); | 
|             throw new GlobleException(SystemErrorCode.SYSTEM_UNKNOW_ERROR); | 
|         } | 
|   | 
|         return new AjaxResult(AjaxResult.STATUS_SUCCESS, "密码修改成功"); | 
|     } | 
|   | 
|     /** | 
|      * 查询当前登录人 | 
|      */ | 
|     @RequestMapping(value = "/getLoginUser") | 
|     public @ResponseBody | 
|     AjaxResult getLoginUser() { | 
|         AjaxResult result = AjaxResult.buildSuccessInstance(""); | 
|         SysUsers user = WebUtil.getSessionAttribute(MatrixConstance.LOGIN_KEY); | 
|         result.putInMap("user", user); | 
|         return result; | 
|     } | 
|   | 
|     @RequestMapping(value = "/getUserById") | 
|     public @ResponseBody | 
|     AjaxResult getUserById(Long id) { | 
|         AjaxResult result = AjaxResult.buildSuccessInstance(""); | 
|         SysUsers user = sysUsersService.findById(id); | 
|         result.putInMap("user", user); | 
|         return result; | 
|     } | 
|   | 
|   | 
|     /** | 
|      * 条件查询所有员工,不分页 | 
|      * | 
|      * @return | 
|      */ | 
|     @RequestMapping(value = "/all") | 
|     public @ResponseBody | 
|     AjaxResult all() { | 
|         SysUsers sysUsers = new SysUsers(); | 
|         QueryUtil.setQueryLimit(sysUsers); | 
|         return new AjaxResult(AjaxResult.STATUS_SUCCESS, sysUsersService.findInPage(sysUsers, null)); | 
|     } | 
|   | 
|     @RequestMapping(value = "/allForZd") | 
|     public @ResponseBody | 
|     AjaxResult allForZd() { | 
|         SysUsers sysUsers = new SysUsers(); | 
|         QueryUtil.setQueryLimitCom(sysUsers); | 
|         return new AjaxResult(AjaxResult.STATUS_SUCCESS, sysUsersService.findInPage(sysUsers, null)); | 
|     } | 
|   | 
|     /** | 
|      * 查询门店所有员工 | 
|      */ | 
|     @RequestMapping(value = "/shopAll") | 
|     public @ResponseBody | 
|     AjaxResult shopAll() { | 
|         return new AjaxResult(AjaxResult.STATUS_SUCCESS, sysUsersService.findByRoleName(true, null)); | 
|     } | 
|   | 
|   | 
|     /** | 
|      * 根据角色名称查询店铺的员工 | 
|      */ | 
|     @RequestMapping(value = "/getShopStaffByRoleName") | 
|     public @ResponseBody | 
|     AjaxResult getStaffByRoleName(String roleName) { | 
|         return new AjaxResult(AjaxResult.STATUS_SUCCESS, sysUsersService.findByRoleName(true, roleName)); | 
|     } | 
|   | 
|   | 
|     /** | 
|      * 查询历史搜索人数 | 
|      * | 
|      * @return | 
|      * @author luoyuanhong | 
|      */ | 
|     @SuppressWarnings("unchecked") | 
|     @RequestMapping(value = "/showHistoryUser") | 
|     public @ResponseBody | 
|     AjaxResult showHistoryUser() { | 
|         if (WebUtil.getSession().getAttribute(SystemConstance.HISTORY_CUSTOMER) != null) { | 
|             return new AjaxResult(AjaxResult.STATUS_SUCCESS, | 
|                     (LinkedList<SysVipInfo>) WebUtil.getSession().getAttribute(SystemConstance.HISTORY_CUSTOMER), 0); | 
|         } else { | 
|             return new AjaxResult(AjaxResult.STATUS_SUCCESS, null, 0); | 
|         } | 
|     } | 
|   | 
|   | 
|     /** | 
|      * 员工列表导出 | 
|      */ | 
|     @RequestMapping(value = "/exportExcel") | 
|     public void report(ModelMap model, HttpServletRequest request, HttpServletResponse response, | 
|                        SysUsers shopStaffInfo) throws Exception { | 
|   | 
|         List<ExcelSheetPO> res = new ArrayList<>(); | 
|         ExcelSheetPO orderSheet = new ExcelSheetPO(); | 
|         String title = "员工列表"; | 
|         orderSheet.setSheetName(title); | 
|         orderSheet.setTitle(title); | 
|         String[] header = {"员工姓名", "员工编号", "性别", "联系方式", "上级名称", "所属岗位", "所属部门", "所属门店"}; | 
|         orderSheet.setHeaders(header); | 
|         SysUsers loginUser = getSessionUser(); | 
|         shopStaffInfo.setShopId(loginUser.getShopId()); | 
|         List<SysUsers> dataList = sysUsersService.findInPage(shopStaffInfo, null); | 
|         List<List<Object>> list = new ArrayList<>(); | 
|         if (dataList.size() > 0) { | 
|             for (SysUsers item : dataList) { | 
|                 List<Object> temp = new ArrayList<>(); | 
|                 temp.add(item.getSuName()); | 
|                 temp.add(item.getSuJobNo()); | 
|                 temp.add(item.getSuSex()); | 
|                 temp.add(item.getSuTel()); | 
|                 temp.add(item.getParDirectName()); | 
|                 temp.add(item.getRoleName()); | 
|                 temp.add(item.getDepartName()); | 
|                 temp.add(item.getShopName()); | 
|                 list.add(temp); | 
|             } | 
|         } | 
|         orderSheet.setDataList(list); | 
|         res.add(orderSheet); | 
|         response = ResponseHeadUtil.setExcelHead(response); | 
|         response.setHeader("Content-Disposition", | 
|                 "attachment;filename=" + URLEncoder.encode(title + DateUtil.getTimeMark() + ".xlsx".trim(), "UTF-8")); | 
|         OutputStream os = response.getOutputStream(); | 
|         ExcelUtil.createWorkbookAtOutStream(ExcelVersion.V2007, res, os, true); | 
|     } | 
| } |