| package com.xzx.gc.role.controller;  | 
|   | 
|   | 
| import cn.hutool.core.collection.CollUtil;  | 
| import cn.hutool.core.util.RandomUtil;  | 
| import com.fasterxml.jackson.databind.DeserializationFeature;  | 
| import com.fasterxml.jackson.databind.ObjectMapper;  | 
| import com.github.pagehelper.PageInfo;  | 
| import com.xzx.gc.common.HttpRequestLocal;  | 
| import com.xzx.gc.common.annotations.PassToken;  | 
| import com.xzx.gc.common.constant.CommonEnum;  | 
| import com.xzx.gc.common.constant.Constants;  | 
| import com.xzx.gc.common.constant.RedisKeyConstant;  | 
| import com.xzx.gc.common.dto.log.OperationAppLog;  | 
| import com.xzx.gc.common.request.BaseController;  | 
| import com.xzx.gc.common.utils.MqUtil;  | 
| import com.xzx.gc.common.utils.RedisUtil;  | 
| import com.xzx.gc.common.utils.SecurityUtil;  | 
| import com.xzx.gc.common.utils.SpringUtil;  | 
| import com.xzx.gc.entity.*;  | 
| import com.xzx.gc.model.JsonResult;  | 
| import com.xzx.gc.model.admin.AppRoleModel;  | 
| import com.xzx.gc.model.dto.FunctionNodeView;  | 
| import com.xzx.gc.model.dto.MenuNodeView;  | 
| import com.xzx.gc.model.dto.SystemMenuView;  | 
| import com.xzx.gc.model.query.OrgQuery;  | 
| import com.xzx.gc.model.query.RoleQuery;  | 
| import com.xzx.gc.role.model.CoreDictQueryModel;  | 
| import com.xzx.gc.role.model.CoreRoleModel;  | 
| import com.xzx.gc.role.model.CoreUserModel;  | 
| import com.xzx.gc.role.rbac.UserLoginInfoAdmin;  | 
| import com.xzx.gc.role.rbac.tree.FunctionItem;  | 
| import com.xzx.gc.role.rbac.tree.MenuItem;  | 
| import com.xzx.gc.role.rbac.tree.OrgItem;  | 
| import com.xzx.gc.role.service.*;  | 
| import com.xzx.gc.role.util.TokenUtils;  | 
| import com.xzx.gc.util.ConvertUtil;  | 
| import io.swagger.annotations.ApiImplicitParam;  | 
| import io.swagger.annotations.ApiImplicitParams;  | 
| import io.swagger.annotations.ApiOperation;  | 
| import org.apache.commons.lang3.StringUtils;  | 
| import org.springframework.beans.factory.annotation.Autowired;  | 
| import org.springframework.stereotype.Controller;  | 
| import org.springframework.web.bind.annotation.PostMapping;  | 
| import org.springframework.web.bind.annotation.RequestBody;  | 
| import org.springframework.web.bind.annotation.ResponseBody;  | 
| import org.springframework.web.bind.annotation.RestController;  | 
|   | 
| import javax.servlet.http.Cookie;  | 
| import javax.servlet.http.HttpServletRequest;  | 
| import javax.servlet.http.HttpServletResponse;  | 
| import javax.servlet.http.HttpSession;  | 
| import java.text.SimpleDateFormat;  | 
| import java.util.*;  | 
|   | 
| @RestController  | 
| public class CoreUserController extends BaseController {  | 
|     static SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");  | 
|   | 
|     @Autowired  | 
|     CorePlatformService platformService;  | 
|   | 
|     @Autowired  | 
|     private MqUtil mqUtil;  | 
|   | 
|     @Autowired  | 
|     CoreUserService userService;  | 
|   | 
|     @Autowired  | 
|     HttpRequestLocal httpRequestLocal;  | 
|   | 
|     @Autowired  | 
|     CuserConsoleService userConsoleService;  | 
|     @Autowired  | 
|     CoreRoleService coreRoleService;  | 
|     @Autowired  | 
|     private OrgConsoleService orgConsoleService;  | 
|     @Autowired  | 
|     CoreDictService coreDictService;  | 
|     @Autowired  | 
|     CityPartnerService cityPartnerService;  | 
|     @Autowired  | 
|     RoleConsoleService roleConsoleService;  | 
|     @Autowired  | 
|     RedisUtil redisService;  | 
|   | 
|     @Autowired  | 
|     private CoreUserService coreUserService;  | 
|   | 
|     @PostMapping(Constants.ADMIN_VIEW_PREFIX + "/login.json")  | 
|     public JsonResult<UserLoginInfoAdmin> login(String code, String password) {  | 
|         UserLoginInfoAdmin info = userService.login(code, password);  | 
|         if (info == null) {  | 
|             return JsonResult.failMessage("用户名密码错");  | 
|         }  | 
|         CoreUser user = info.getUser();  | 
|         CoreOrg currentOrg = info.getOrgs().get(0);  | 
|         for (CoreOrg org : info.getOrgs()) {  | 
|             if (org.getId() == user.getOrgId()) {  | 
|                 currentOrg = org;  | 
|                 break;  | 
|             }  | 
|         }  | 
|         info.setCurrentOrg(currentOrg);  | 
|         // 记录登录信息到session  | 
|         this.platformService.setLoginUser(info.getUser(), info.getCurrentOrg(), info.getOrgs());  | 
|         return JsonResult.success(info);  | 
|     }  | 
|     /**  | 
|      * 用户所在部门  | 
|      *   | 
|      * @return  | 
|      */  | 
|     @PostMapping(Constants.ADMIN_VIEW_PREFIX + "/org/myOrgs.json")  | 
|     public JsonResult<List<CoreOrg>> myOrgs() {  | 
|         List<CoreOrg> orgs = (List<CoreOrg>) httpRequestLocal.getSessionValue(CorePlatformService.ACCESS_USER_ORGS);  | 
|         return JsonResult.success(orgs);  | 
|     }  | 
|   | 
|     /**  | 
|      * 切换部门  | 
|      *   | 
|      * @param orgId  | 
|      * @return  | 
|      */  | 
|     @PostMapping(Constants.ADMIN_VIEW_PREFIX + "/org/setOrg.json")  | 
|     public JsonResult login(Long orgId) {  | 
|   | 
|         CoreUser user = platformService.getCurrentUser();  | 
|         // 检查是否存在orgId  | 
|         List<CoreOrg> orgs = platformService.getCurrentOrgs();  | 
|         CoreOrg currentOrg = null;  | 
|         for (CoreOrg org : orgs) {  | 
|             if (orgId == org.getId()) {  | 
|                 currentOrg = org;  | 
|                 break;  | 
|             }  | 
|         }  | 
|         if (currentOrg == null) {  | 
|             // 非法切换  | 
|             return JsonResult.failMessage("切换到不存在的部门");  | 
|         }  | 
|   | 
|         httpRequestLocal.setSessionValue(CorePlatformService.ACCESS_CURRENT_ORG, currentOrg);  | 
|   | 
|         return JsonResult.success();  | 
|     }  | 
|   | 
|     @PostMapping(Constants.ADMIN_VIEW_PREFIX + "/changePassword.json")  | 
|     public JsonResult chnagePassword(String password, String newPassword) {  | 
|         CoreUser temp = platformService.getCurrentUser();  | 
|         CoreUser realUser = userService.getUserById(temp.getId());  | 
|         String pwd =password;  | 
|         if (realUser.getPassword().equals(pwd)) {  | 
|             realUser.setPassword(newPassword);  | 
|             userService.update(realUser);  | 
|             return JsonResult.success();  | 
|         } else {  | 
|             return JsonResult.failMessage("密码错误");  | 
|         }  | 
|   | 
|     }  | 
|   | 
|     /**  | 
|      * 用户能查看的菜单  | 
|      *   | 
|      * @return  | 
|      */  | 
|     @PostMapping(Constants.ADMIN_VIEW_PREFIX + "/menu/menuTree.json")  | 
|     public JsonResult<List<MenuNodeView>> menus() {  | 
|         CoreUser currentUser = platformService.getCurrentUser();  | 
|         Long orgId = platformService.getCurrentOrgId();  | 
|         MenuItem item = platformService.getMenuItem(currentUser.getId(), orgId);  | 
|         List<MenuNodeView> view = this.build(item);  | 
|         return JsonResult.success(view);  | 
|     }  | 
|   | 
|     /**  | 
|      * 获取系统  | 
|      *   | 
|      * @return  | 
|      */  | 
|     @PostMapping(Constants.ADMIN_VIEW_PREFIX + "/menu/system.json")  | 
|     public JsonResult<List<SystemMenuView>> getSystem() {  | 
|         CoreUser currentUser = platformService.getCurrentUser();  | 
|         Long orgId = platformService.getCurrentOrgId();  | 
|         MenuItem menuItem = platformService.getMenuItem(currentUser.getId(), orgId);  | 
|         List<MenuItem> list = menuItem.getChildren();  | 
|         List<SystemMenuView> systems = new ArrayList<SystemMenuView>();  | 
|         for (MenuItem item : list) {  | 
|             systems.add(new SystemMenuView(item.getId(), item.getData().getCode(), item.getData().getName()));  | 
|         }  | 
|         return     JsonResult.success(systems);  | 
|     }  | 
|   | 
|     /**  | 
|      * 获取系统对应的菜单树  | 
|      *   | 
|      * @return  | 
|      */  | 
|     @PostMapping(Constants.ADMIN_VIEW_PREFIX + "/menu/systemMenu.json")  | 
|     public JsonResult<List<MenuNodeView>> getMenuBySystem(long systemId) {  | 
|         CoreUser currentUser = platformService.getCurrentUser();  | 
|         Long orgId = platformService.getCurrentOrgId();  | 
|         MenuItem menuItem = platformService.getMenuItem(currentUser.getId(), orgId);  | 
|         MenuItem item = menuItem.findChild(systemId);  | 
|         List<MenuNodeView> view = this.build(item);  | 
|         return JsonResult.success(view);  | 
|     }  | 
|   | 
|     /**  | 
|      * 用户所在公司的组织机构树  | 
|      *   | 
|      * @return  | 
|      */  | 
|     @PostMapping(Constants.ADMIN_VIEW_PREFIX + "/org/org.json")  | 
|     public JsonResult<OrgItem> getUserCompany() {  | 
|         OrgItem orgItem = platformService.getUserOrgTree();  | 
|         return JsonResult.success(orgItem);  | 
|     }  | 
|   | 
|     /**  | 
|      * 获取系统的菜单树  | 
|      *   | 
|      * @return  | 
|      */  | 
|     @PostMapping(Constants.ADMIN_VIEW_PREFIX + "/menu/tree.json")  | 
|     public JsonResult<List<MenuNodeView>> getMenuTree() {  | 
|         MenuItem menuItem = platformService.buildMenu();  | 
|         List<MenuNodeView> view = this.build(menuItem);  | 
|         return JsonResult.success(view);  | 
|     }  | 
|     /**  | 
|      * 获取功能点树  | 
|      * @return  | 
|      */  | 
|     @PostMapping(Constants.ADMIN_VIEW_PREFIX + "/function/tree.json")  | 
|     public JsonResult<List<FunctionNodeView> > getFunctionTree() {  | 
|             FunctionItem root = this.platformService.buildFunction();  | 
|             List<FunctionNodeView> tree = buildFunctionTree(root);  | 
|             return JsonResult.success(tree);  | 
|          | 
|     }  | 
|   | 
|       | 
|     private List<MenuNodeView> build(MenuItem node) {  | 
|         List<MenuItem> list = node.getChildren();  | 
|         if (list.size() == 0) {  | 
|             return Collections.EMPTY_LIST;  | 
|         }  | 
|   | 
|         List<MenuNodeView> views = new ArrayList<MenuNodeView>(list.size());  | 
|   | 
|         for (MenuItem item : list) {  | 
|             MenuNodeView view = new MenuNodeView();  | 
|             view.setCode(item.getData().getCode());  | 
|             view.setName(item.getData().getName());  | 
|             view.setIcon(item.getData().getIcon());  | 
|             view.setId(item.getData().getId());  | 
|             //view.setPath((String) item.getData().get("accessUrl"));  | 
|             view.setPath("");  | 
|             List<MenuNodeView> children = this.build(item);  | 
|             view.setChildren(children);  | 
|             views.add(view);  | 
|         }  | 
|         return views;  | 
|     }  | 
|       | 
|     private List<FunctionNodeView> buildFunctionTree(FunctionItem node){  | 
|           List<FunctionItem> list = node.getChildren();  | 
|           if(list.size()==0){  | 
|               return Collections.EMPTY_LIST;  | 
|           }  | 
|           List<FunctionNodeView> views = new ArrayList<FunctionNodeView>(list.size());  | 
|           for(FunctionItem item :list){  | 
|               FunctionNodeView view = new FunctionNodeView();  | 
|               view.setCode(item.getData().getCode());  | 
|               view.setName(item.getData().getName());  | 
|               view.setId(item.getData().getId());  | 
|               view.setAccessUrl(item.getData().getAccessUrl());  | 
|               List<FunctionNodeView> children = this.buildFunctionTree(item);  | 
|               view.setChildren(children);  | 
|               views.add(view);  | 
|           }  | 
|           return views;  | 
|      }  | 
|   | 
|     /**  | 
|      //     * 登陆接口  | 
|      //     * @param request  | 
|      //     * @param response  | 
|      //     * @return  | 
|      //     */  | 
|     @PassToken  | 
|     @PostMapping(Constants.ADMIN_VIEW_PREFIX+"/loginData.do")  | 
|     @ApiOperation(value="用户登陆", notes="test: 仅0有正确返回")  | 
|     @ApiImplicitParams({  | 
|             @ApiImplicitParam(paramType="query", name = "code", value = "用户ID", required = true, dataType = "String"),  | 
|             @ApiImplicitParam(paramType="query", name = "password", value = "密码", required = true, dataType = "String"),  | 
|             @ApiImplicitParam(paramType="query", name = "verify", value = "验证码", required = true, dataType = "String")  | 
|     })  | 
|     public JsonResult<Map<String,Object>> loginData(HttpServletRequest request, HttpServletResponse response, @RequestBody AppRoleModel model){  | 
|         //String ipAddr = request.getRequestURL().toString();  | 
|        String userType="1";  | 
|        List<Map<String,Object>> list = new ArrayList<>();  | 
|         Map<String,Object> resultMap = new HashMap<>();  | 
|         if(!SpringUtil.isDev()) {  | 
|             //验证码  | 
|             Object cap = request.getSession().getAttribute("cap");  | 
|             if (cap == null || !cap.toString().equalsIgnoreCase(model.getVerify())) {  | 
|                 resultMap.put("code", -1);  | 
|                 resultMap.put("msg", "验证码错误");  | 
|                 return JsonResult.failMessage("验证码错误");  | 
|             }  | 
|         }  | 
|   | 
|   | 
|         String jsessionid = request.getSession().getId();  | 
|         Cookie cookie =new Cookie("JSESSIONID",jsessionid);  | 
|         cookie.setMaxAge(60*60*24*7);  | 
|         response.addCookie(cookie);  | 
|         String code = model.getCode();  | 
|         String password = model.getPassword();  | 
|         Map<String,Object> map = userService.loginApi(code, password,userType);  | 
|         if(null!=map.get("msg")){  | 
|             return JsonResult.failMessage(map.get("msg").toString());  | 
|   | 
|         }  | 
|         Object obj = map.get("userLoginInfo");  | 
|         ObjectMapper objectMapper = new ObjectMapper();  | 
|         objectMapper.configure(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES, false);  | 
|         UserLoginInfoAdmin info = objectMapper.convertValue(obj, UserLoginInfoAdmin.class);  | 
|   | 
|         if (map.get("msg") != null) {  | 
|             return JsonResult.failMessage(map.get("msg").toString());  | 
|         }  | 
|         CoreUser user = info.getUser();  | 
|         redisService.remove("xzx:user:token:"+user.getId());  | 
|         //redisService.remove("xzx:user:verify:"+model.getCode());  | 
|         CoreOrg currentOrg = info.getOrgs().get(0);  | 
|         for (CoreOrg org : info.getOrgs()) {  | 
|             if (org.getId() == user.getOrgId()) {  | 
|                 currentOrg = org;  | 
|                 break;  | 
|             }  | 
|         }  | 
|         info.setCurrentOrg(currentOrg);  | 
|         // 记录登录信息到session  | 
|         this.platformService.setLoginUser(info.getUser(), info.getCurrentOrg(), info.getOrgs());  | 
|         String token = TokenUtils.createToken();  | 
|         redisService.set("xzx:user:loginToken:"+info.getUser().getId(), token);  | 
|         //Gson gson = new Gson();  | 
|         Map<String,Object> pMap = new HashMap<>();  | 
|         pMap.put("userId",info.getUser().getId());  | 
|         pMap.put("token",token);  | 
|         pMap.put("userType",map.get("userType"));  | 
|         pMap.put("jsessionid",jsessionid);  | 
|         pMap.put("cityTown",map.get("cityTown"));  | 
|         list.add(pMap);  | 
|         resultMap.put("code",0);  | 
|         resultMap.put("data",list);  | 
|         //list.add(resultMap);  | 
|         //redisService.remove("xzx:user:verify:code");  | 
|         //放入用户ID及sessionId对应关系  | 
|         redisService.set(RedisKeyConstant.USER_SESSION_KEY +info.getUser().getId(),request.getSession().getId());  | 
|         return JsonResult.success(resultMap);  | 
|     }  | 
|   | 
|   | 
|     @PostMapping(Constants.ADMIN_VIEW_PREFIX+"/logoutApi.do")  | 
|     @ApiOperation(value="退出登录", notes="test: 仅0有正确返回")  | 
|     @ApiImplicitParams({  | 
|             @ApiImplicitParam(paramType="query", name = "session", value = "需要把sessionId放入请求头", required = true, dataType = "String")  | 
|     })  | 
|     @PassToken  | 
|     public JsonResult<String> logout(HttpServletRequest request) {  | 
|         HttpSession session = request.getSession();  | 
|         Enumeration eum = session.getAttributeNames();  | 
|         while(eum.hasMoreElements()) {  | 
|             String key = (String)eum.nextElement();  | 
|             session.removeAttribute(key);  | 
|         }  | 
|         return JsonResult.success("登出成功!");  | 
|   | 
|     }  | 
|   | 
|     @PostMapping(Constants.ADMIN_VIEW_PREFIX+"/updatePassword.do")  | 
|     @ApiOperation(value="修改用户密码", notes="test: 仅0有正确返回")  | 
|     @ApiImplicitParams({  | 
|             @ApiImplicitParam(paramType="query", name = "oldPassword", value = "旧密码", required = true, dataType = "String"),  | 
|             @ApiImplicitParam(paramType="query", name = "password", value = "新密码", required = true, dataType = "String")  | 
|     })  | 
|     public JsonResult<String> updatePassword(HttpServletRequest request,@RequestBody AppRoleModel model) {  | 
|         CoreUser user =platformService.getCurrentUser();  | 
|         CityPartner partner = cityPartnerService.queryById(user.getId());  | 
|         if(null!=partner){  | 
|             //验证老密码  | 
|             if(partner.getPassword().equals(model.getOldPassword())){  | 
|                 String salt1 =  RandomUtil.randomString(16);  | 
|                 String newPassword =SecurityUtil.encrypt(salt1,model.getPassword());  | 
|                 partner.setPassword(newPassword);  | 
|                 partner.setSalt(salt1);  | 
|                 cityPartnerService.updatePartner(partner);  | 
|             }else{  | 
|                 if(null!=partner.getSalt()&&!"".equals(partner.getSalt())){  | 
|                     String oldPassword = SecurityUtil.decrypt(partner.getSalt(),partner.getPassword());  | 
|                    if(oldPassword.equals(model.getOldPassword())){  | 
|                        String salt1 =  RandomUtil.randomString(16);  | 
|                        String newPassword =SecurityUtil.encrypt(salt1,model.getPassword());  | 
|                        partner.setPassword(newPassword);  | 
|                        partner.setSalt(salt1);  | 
|                        cityPartnerService.updatePartner(partner);  | 
|                    }else{  | 
|                        return JsonResult.failMessage("老密码不正确!");  | 
|                    }  | 
|                 }else{  | 
|                     return JsonResult.failMessage("老密码不正确!");  | 
|                 }  | 
|             }  | 
|         }else{  | 
|              user = userService.getCoreUserById(user.getId());  | 
|             //验证老密码  | 
|             if(user.getPassword().equals(model.getOldPassword())){  | 
|                 String salt1 =  RandomUtil.randomString(16);  | 
|                 String newPassword =SecurityUtil.encrypt(salt1,model.getPassword());  | 
|                 user.setSalt(salt1);  | 
|                 user.setPassword(newPassword);  | 
|                 userService.update(user);  | 
|             }else{  | 
|                 if(null!=user.getSalt()&&!"".equals(user.getSalt())){  | 
|                     String oldPassword = SecurityUtil.decrypt(user.getSalt(),user.getPassword());  | 
|                     if(oldPassword.equals(model.getOldPassword())){  | 
|                         String salt1 =  RandomUtil.randomString(16);  | 
|                         String newPassword =SecurityUtil.encrypt(salt1,model.getPassword());  | 
|                         user.setPassword(newPassword);  | 
|                         user.setSalt(salt1);  | 
|                         userService.update(user);  | 
|                     }else{  | 
|                         return JsonResult.failMessage("老密码不正确!");  | 
|   | 
|                     }  | 
|                 }else{  | 
|                     return JsonResult.failMessage("老密码不正确!");  | 
|   | 
|                 }  | 
|             }  | 
|   | 
|         }  | 
|   | 
|         OperationAppLog build = OperationAppLog.builder().appPrograme(CommonEnum.后台.getValue()).opreateName(getAdminName(request))  | 
|                 .methodName(Constants.ROLE_MODUL_NAME).operateAction("修改用户密码-"+user.getId()).build();  | 
|         mqUtil.sendApp(build);  | 
|   | 
|            return JsonResult.success("修改密码成功!");  | 
|     }  | 
|     /**  | 
|      * 菜单接口  | 
|      * @return  | 
|      */  | 
|     @PostMapping(Constants.ADMIN_VIEW_PREFIX+"/menu/userMenu.do")  | 
|     @ApiOperation(value="用户获取菜单", notes="用户跨域获取权限菜单")  | 
|     public JsonResult<Map<String, Object>> userMenu(){  | 
|         CoreUser user =platformService.getCurrentUser();  | 
|         //查询角色  | 
|         //CoreUserRole coreRole =coreRoleService.getRoleByUserId(user.getId(),user.getOrgId());  | 
|         //List<Long> dbs = functionConsoleService.getFunctionByRole(coreRole.getRoleId());  | 
|         //List<Long> dbs = functionConsoleService.getFunctionByRole(user.getRoleId());  | 
|         Map<String,Object> resultMap = new HashMap<>();  | 
|         List<MenuNodeView> allView= new ArrayList<>();  | 
|         List<MenuNodeView> view=new ArrayList<>();  | 
|         MenuItem allItem = platformService.getAllMenuItem();  | 
|         //判断是否是合伙人  | 
|         CityPartner partner = cityPartnerService.queryById(user.getId());  | 
|   | 
|         if(null!=partner){  | 
|            /* String pUid = partner.getUserId();  | 
|             pUid =  pUid.substring(pUid.length()-6,pUid.length());  | 
|             CityPartner pn = xzxCityPartnerService.queryEntityByUserIds(pUid);  | 
|             String userId = pn.getUserId().substring(pn.getUserId().length()-6,pn.getUserId().length());*/  | 
|             MenuItem menuItem = platformService.getPartnerMenuItem(partner.getId(), user.getOrgId());  | 
|             view = this.build1(menuItem);  | 
|           }else{  | 
|               MenuItem menuItem = platformService.getMenuItem(user.getId(), user.getOrgId());  | 
|             view = this.build1(menuItem);  | 
|           }  | 
|                   allView = this.build1(allItem);  | 
|                   resultMap.put("user",user);  | 
|                   resultMap.put("menu",view);  | 
|                   resultMap.put("allView",allView);  | 
|         return JsonResult.success(resultMap);  | 
|     }  | 
|   | 
|   | 
|     private List<MenuNodeView> build1(MenuItem node) {  | 
|         List<MenuItem> list = node.getChildren();  | 
|         if (list.size() == 0) {  | 
|             return Collections.EMPTY_LIST;  | 
|         }  | 
|   | 
|         List<MenuNodeView> views = new ArrayList<MenuNodeView>(list.size());  | 
|   | 
|         for (MenuItem item : list) {  | 
|             MenuNodeView view = new MenuNodeView();  | 
|             view.setCode(item.getData().getCode());  | 
|             view.setName(item.getData().getName());  | 
|             view.setIcon(item.getData().getIcon());  | 
|             view.setId(item.getData().getId());  | 
|             if(null!=item.getCreateTime()&&!"".equals(item.getCreateTime())){  | 
|                 view.setCreateTime(item.getCreateTime());  | 
|   | 
|             }  | 
|             //view.setPath((String) item.getData().get("accessUrl"));  | 
|             List<MenuNodeView> children = this.build1(item);  | 
|             view.setChildren(children);  | 
|             views.add(view);  | 
|         }  | 
|         return views;  | 
|     }  | 
|   | 
|     /**  | 
|      * 用户管理列表接口  | 
|      * @param  | 
|      * @return  | 
|      */  | 
|     @PostMapping( "/admin/front/user/userList.do")  | 
|     @ApiOperation(value="用户管理列表接口", notes="test: 仅0有正确返回")  | 
|     @ApiImplicitParams({  | 
|             @ApiImplicitParam(paramType="query", name = "code", value = "用户名", required = true, dataType = "String"),  | 
|             @ApiImplicitParam(paramType="query", name = "name", value = "姓名", required = true, dataType = "String"),  | 
|             @ApiImplicitParam(paramType="query", name = "orgId", value = "部门", required = true, dataType = "String"),  | 
|             @ApiImplicitParam(paramType="query", name = "state", value = "状态", required = true, dataType = "String"),  | 
|             @ApiImplicitParam(paramType="query", name = "jobType0", value = "职务", required = true, dataType = "String"),  | 
|             @ApiImplicitParam(paramType="query", name = "jobType1", value = "职务明细", required = true, dataType = "String"),  | 
|             @ApiImplicitParam(paramType="query", name = "startTime", value = "创建日期开始时间", required = true, dataType = "String"),  | 
|             @ApiImplicitParam(paramType="query", name = "endTime", value = "创建日期结束时间", required = true, dataType = "String"),  | 
|             @ApiImplicitParam(paramType="query", name = "limit", value = "每页数据个数", required = true, dataType = "int"),  | 
|             @ApiImplicitParam(paramType="query", name = "page", value = "页码", required = true, dataType = "int")  | 
|     })  | 
|     public JsonResult<List<CoreUserModel>> userList(@RequestBody CoreUserModel query) {  | 
|         //userConsoleService.queryByCondtion(query);  | 
|         PageInfo<CoreUserModel> pageInfo = userConsoleService.queryByCondtion(query);  | 
|         List<CoreUserModel> list = pageInfo.getList();  | 
|         if(CollUtil.isNotEmpty(list)) {  | 
|             for (CoreUserModel model : list) {  | 
|                 if(null!=model.getCreateTime()){  | 
|                     model.setCreateTimeStr(sdf.format(model.getCreateTime()));  | 
|   | 
|                 }  | 
|                 //查询角色Id  | 
|                 CoreUserRole coreRole = coreRoleService.getRoleByUserId(model.getId(), model.getOrgId());  | 
|                 if (null != coreRole) {  | 
|                     model.setRoleId(coreRole.getRoleId());  | 
|                     model.setOrgName(orgConsoleService.queryById(model.getOrgId()).getName());  | 
|                     model.setJobType0Text(coreDictService.findNameByType(model.getJobType0()));  | 
|                     model.setJobType1Text(coreDictService.findNameByType(model.getJobType1()));  | 
|                     model.setStateText(coreDictService.findNameByType(model.getState()));  | 
|                 }  | 
|             }  | 
|         }  | 
|         return JsonResult.successx(pageInfo.getList(),pageInfo.getTotal()+"");  | 
|     }  | 
|   | 
|     /**  | 
|      * 用户管理删除操作  | 
|      * @param user  | 
|      * @return  | 
|      */  | 
|     @PostMapping("/admin/front/user/userDelete.do")  | 
|     @ApiOperation(value="用户管理(删除))", notes="test: 仅0有正确返回")  | 
|     @ApiImplicitParams({  | 
|             @ApiImplicitParam(paramType="query", name = "id", value = "用户Id", required = true, dataType = "Long")  | 
|     })  | 
|     public JsonResult userDelete(@RequestBody CoreUser user,HttpServletRequest request) {  | 
|         List<Long> dels = new ArrayList<>();  | 
|         dels.add(user.getId());  | 
|         userConsoleService.batchDelSysUser(dels);  | 
|   | 
|         OperationAppLog build = OperationAppLog.builder().appPrograme(CommonEnum.后台.getValue()).opreateName(getAdminName(request))  | 
|                 .methodName(Constants.ROLE_MODUL_NAME).operateAction("用户管理(删除)-"+user.getId()).build();  | 
|         mqUtil.sendApp(build);  | 
|   | 
|   | 
|         return JsonResult.success();  | 
|     }  | 
|   | 
|     /**  | 
|      * 用户修改  | 
|      * @param  | 
|      * @return  | 
|      */  | 
|     @PostMapping( "/admin/front/user/userUpdate.json")  | 
|     @ApiOperation(value="用户管理(修改))", notes="test: 仅0有正确返回")  | 
|     @ApiImplicitParams({  | 
|             @ApiImplicitParam(paramType="query", name = "id", value = "用户Id", required = true, dataType = "Long"),  | 
|             @ApiImplicitParam(paramType="query", name = "code", value = "用户编号不能为空", required = true, dataType = "String"),  | 
|             @ApiImplicitParam(paramType="query", name = "name", value = "用户名不能为空", required = true, dataType = "String"),  | 
|             @ApiImplicitParam(paramType="query", name = "orgId", value = "组织机构id", required = true, dataType = "Long"),  | 
|             @ApiImplicitParam(paramType="query", name = "password", value = "登陆密码", required = true, dataType = "String"),  | 
|             @ApiImplicitParam(paramType="query", name = "state", value = "状态(1:启用,2:禁用)", required = true, dataType = "String"),  | 
|             @ApiImplicitParam(paramType="query", name = "jobType0", value = "扩展例子", required = true, dataType = "String"),  | 
|             @ApiImplicitParam(paramType="query", name = "jobType1", value = "扩展例子1", required = true, dataType = "String"),  | 
|             @ApiImplicitParam(paramType="query", name = "attachmentId", value = "用户的个人资料附件,保存到Core_File 表里", required = true, dataType = "String"),  | 
|             @ApiImplicitParam(paramType="query", name = "roleId", value = "角色Id", required = true, dataType = "Long")  | 
|     })  | 
|     public JsonResult update(@RequestBody CoreUserModel model,HttpServletRequest request) {  | 
|         coreUserService.update(model);  | 
|         OperationAppLog build = OperationAppLog.builder().appPrograme(CommonEnum.后台.getValue()).opreateName(getAdminName(request))  | 
|                 .methodName(Constants.ROLE_MODUL_NAME).operateAction("用户管理(修改)-"+model.getId()).build();  | 
|         mqUtil.sendApp(build);  | 
|         return JsonResult.success();  | 
|     }  | 
|   | 
|     /**  | 
|      * 用户添加  | 
|      * @param user  | 
|      * @return  | 
|      */  | 
|     @PostMapping(Constants.ADMIN_VIEW_PREFIX + "/user/userAdd.json")  | 
|     @ApiOperation(value="用户管理(添加))", notes="test: 仅0有正确返回")  | 
|     @ApiImplicitParams({  | 
|             @ApiImplicitParam(paramType="query", name = "code", value = "用户编号不能为空", required = true, dataType = "String"),  | 
|             @ApiImplicitParam(paramType="query", name = "name", value = "用户名不能为空", required = true, dataType = "String"),  | 
|             @ApiImplicitParam(paramType="query", name = "orgId", value = "组织机构id", required = true, dataType = "Long"),  | 
|             @ApiImplicitParam(paramType="query", name = "password", value = "登陆密码", required = true, dataType = "String"),  | 
|             @ApiImplicitParam(paramType="query", name = "state", value = "状态(1:启用,2:禁用)", required = true, dataType = "String"),  | 
|             @ApiImplicitParam(paramType="query", name = "jobType0", value = "扩展例子", required = true, dataType = "String"),  | 
|             @ApiImplicitParam(paramType="query", name = "jobType1", value = "扩展例子1", required = true, dataType = "String"),  | 
|             @ApiImplicitParam(paramType="query", name = "attachmentId", value = "用户的个人资料附件,保存到Core_File 表里", required = true, dataType = "String"),  | 
|             @ApiImplicitParam(paramType="query", name = "roleId", value = "角色Id", required = true, dataType = "Long")  | 
|   | 
|     })  | 
|     public JsonResult<Long> userAdd(@RequestBody CoreUserModel user,HttpServletRequest request) {  | 
|         if (!platformService.isAllowUserName(user.getCode())) {  | 
|             return JsonResult.failMessage("不允许的注册名字 " + user.getCode());  | 
|         }  | 
|         user.setCreateTime(new Date());  | 
|         ObjectMapper objectMapper = new ObjectMapper();  | 
|         objectMapper.configure(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES, false);  | 
|         CoreUser coreUser = objectMapper.convertValue(user, CoreUser.class);  | 
|   | 
|         coreUser.setPassword("123456");  | 
|         String salt1 =  RandomUtil.randomString(16);  | 
|         String newPassword =SecurityUtil.encrypt(salt1,"123456");  | 
|         coreUser.setPassword(newPassword);  | 
|         coreUser.setSalt(salt1);  | 
|         userConsoleService.saveUser(coreUser,user.getRoleId());  | 
|         OperationAppLog build = OperationAppLog.builder().appPrograme(CommonEnum.后台.getValue()).opreateName(getAdminName(request))  | 
|                 .methodName(Constants.ROLE_MODUL_NAME).operateAction("用户管理(添加)-"+user.getId()).build();  | 
|         mqUtil.sendApp(build);  | 
|   | 
|         return JsonResult.success(user.getId());  | 
|     }  | 
|   | 
|     /**  | 
|      * 用户所在公司的组织机构树  | 
|      *  | 
|      * @return  | 
|      */  | 
|     @PostMapping(Constants.ADMIN_VIEW_PREFIX + "/org/userOrg.do")  | 
|     @ApiOperation(value="用户所在公司的组织机构树", notes="test: 仅0有正确返回")  | 
|     public JsonResult<List<OrgItem>> getUserCompany(HttpServletRequest request) {  | 
|         List<OrgItem> list = new ArrayList<>();  | 
|         OrgItem orgItem = platformService.getUserOrgTree();  | 
|         list.add(orgItem);  | 
|         return JsonResult.success(list);  | 
|     }  | 
|   | 
|     /**  | 
|      * 组织机构列表  分页  | 
|      * @param condtion 查询条件  | 
|      * @return  | 
|      */  | 
|     @PostMapping(Constants.ADMIN_VIEW_PREFIX + "/org/organizationList.do")  | 
|     @ApiOperation(value="组织机构列表  分页", notes="test: 仅0有正确返回")  | 
|     @ApiImplicitParams({  | 
|             @ApiImplicitParam(paramType="query", name = "code", value = "用户编号", required = true, dataType = "String"),  | 
|             @ApiImplicitParam(paramType="query", name = "name", value = "用户名", required = true, dataType = "String"),  | 
|             @ApiImplicitParam(paramType="query", name = "type", value = "机构类型(1 集团 2 公司,3 部门,4 小组)", required = true, dataType = "String"),  | 
|             @ApiImplicitParam(paramType="query", name = "page", value = "页码", required = true, dataType = "int"),  | 
|             @ApiImplicitParam(paramType="query", name = "limit", value = "每页条数", required = true, dataType = "int"),  | 
|             @ApiImplicitParam(paramType="query", name = "parentOrgId", value = "上一级机构", required = true, dataType = "String")  | 
|     })  | 
|     public JsonResult<List<CoreOrg>> organizationList(@RequestBody OrgQuery condtion) {  | 
|         PageInfo<CoreOrg> pageInfo = orgConsoleService.queryByCondtion(condtion);  | 
|         return JsonResult.successx(pageInfo.getList(),pageInfo.getTotal()+"");  | 
|     }  | 
|   | 
|     /**  | 
|      * 保存组织机构数据  | 
|      * @param org  | 
|      * @return  | 
|      */  | 
|     @PostMapping(Constants.ADMIN_VIEW_PREFIX + "/org/orgSave.json")  | 
|     @ApiOperation(value="保存组织机构数据", notes="test: 仅0有正确返回")  | 
|     @ApiImplicitParams({  | 
|             @ApiImplicitParam(paramType="query", name = "code", value = "用户编号不能为空", required = true, dataType = "String"),  | 
|             @ApiImplicitParam(paramType="query", name = "name", value = "用户名不能为空", required = true, dataType = "String"),  | 
|             @ApiImplicitParam(paramType="query", name = "type", value = "机构类型(1 集团 2 公司,3 部门,4 小组)", required = true, dataType = "Long"),  | 
|             @ApiImplicitParam(paramType="query", name = "parentOrgId", value = "上一级机构", required = true, dataType = "String")  | 
|     })  | 
|     public JsonResult<Long> orgSave(@RequestBody CoreOrg org,HttpServletRequest request) {  | 
|         org.setCode(org.getName());  | 
|         org.setCreateTime(new Date());  | 
|         org.setDelFlag(0);  | 
|         orgConsoleService.save(org);  | 
|         platformService.clearOrgCache();  | 
|   | 
|         OperationAppLog build = OperationAppLog.builder().appPrograme(CommonEnum.后台.getValue()).opreateName(getAdminName(request))  | 
|                 .methodName(Constants.ROLE_MODUL_NAME).operateAction("保存组织机构数据-"+org.getId()).build();  | 
|         mqUtil.sendApp(build);  | 
|   | 
|   | 
|         return JsonResult.success(org.getId());  | 
|     }  | 
|   | 
|     /**  | 
|      * 更新数据  | 
|      * @param org  | 
|      * @return  | 
|      */  | 
|     @PostMapping(Constants.ADMIN_VIEW_PREFIX + "/org/orgUpdate.json")  | 
|     @ApiOperation(value="更新组织机构数据", notes="test: 仅0有正确返回")  | 
|     @ApiImplicitParams({  | 
|             @ApiImplicitParam(paramType="query", name = "id", value = "用户编号不能为空", required = true, dataType = "Long"),  | 
|             @ApiImplicitParam(paramType="query", name = "code", value = "用户编号不能为空", required = true, dataType = "String"),  | 
|             @ApiImplicitParam(paramType="query", name = "name", value = "用户名不能为空", required = true, dataType = "String"),  | 
|             @ApiImplicitParam(paramType="query", name = "type", value = "机构类型(1 集团 2 公司,3 部门,4 小组)", required = true, dataType = "Long"),  | 
|             @ApiImplicitParam(paramType="query", name = "parentOrgId", value = "上一级机构", required = true, dataType = "String")  | 
|     })  | 
|     public JsonResult<String> orgUpdate(@RequestBody CoreOrg org,HttpServletRequest request){  | 
|         //判断是否为总公司,总公司不能选择他自己作为他的父类  | 
|         String orgId = org.getId()+"";  | 
|         CoreOrg  co  = orgConsoleService.queryById(org.getId());  | 
|   | 
|         if(co.getParentOrgId()==null){  | 
|             if(org.getParentOrgId()!=null){  | 
|                 if(org.getParentOrgId().equals(org.getId())){  | 
|                     return JsonResult.failMessage("保存失败,不能选择他自己作为父类");  | 
|                 }  | 
|             }  | 
|         }else{  | 
|             if(co.getId().equals(org.getParentOrgId())){  | 
|                 return JsonResult.failMessage("保存失败,不能选择他自己作为父类");  | 
|             }  | 
|         }  | 
|   | 
|         boolean success = orgConsoleService.updateTemplate(org);  | 
|         if (success) {  | 
|             platformService.clearOrgCache();  | 
|             OperationAppLog build = OperationAppLog.builder().appPrograme(CommonEnum.后台.getValue()).opreateName(getAdminName(request))  | 
|                     .methodName(Constants.ROLE_MODUL_NAME).operateAction("更新组织机构数据-"+org.getId()).build();  | 
|             mqUtil.sendApp(build);  | 
|   | 
|             return JsonResult.successMessage("保存成功");  | 
|         } else {  | 
|             return JsonResult.failMessage("保存失败");  | 
|         }  | 
|     }  | 
|   | 
|   | 
|     /**  | 
|      *字典列表  | 
|      * @param  | 
|      * @return  | 
|      */  | 
|     @PostMapping(Constants.ADMIN_VIEW_PREFIX + "/typeValue.do")  | 
|     @ApiOperation(value="字典列表", notes="test: 仅0有正确返回")  | 
|     public JsonResult<List<Map<String,Object>>> typeValue(@RequestBody CoreDict dict) {  | 
|         List<CoreDict> list =coreDictService.findAllByType(dict.getType());  | 
|         List<Map<String,Object>> result = new ArrayList<>();  | 
|         for (CoreDict d:list) {  | 
|             List<Map<String,Object>> children = new ArrayList<>();  | 
|             List<CoreDict> childlist = coreDictService.findChildByParent(d.getId());  | 
|             for (CoreDict cmap:childlist) {  | 
|                 Map<String,Object> m = new HashMap<>();  | 
|                 m.put("id",cmap.getValue());  | 
|                 m.put("name",cmap.getName());  | 
|                 children.add(m);  | 
|             }  | 
|             Map<String,Object> map = new HashMap<>();  | 
|             map.put("id",d.getValue());  | 
|             map.put("name",d.getName());  | 
|             if(null!=children&&children.size()>0){  | 
|                 map.put("childen",children);  | 
|             }  | 
|             result.add(map);  | 
|         }  | 
|         return JsonResult.success(result);  | 
|     }  | 
|   | 
|     /**  | 
|      * 列表页、 分页数据  | 
|      *  | 
|      * @param condtion  | 
|      * @return  | 
|      */  | 
|     @PostMapping(Constants.ADMIN_VIEW_PREFIX + "/role/userRoleList.do")  | 
|     @ApiOperation(value="角色管理 列表页、 分页数据", notes="test: 仅0有正确返回")  | 
|     @ApiImplicitParams({  | 
|             @ApiImplicitParam(paramType="query", name = "page", value = "页码", required = true, dataType = "int"),  | 
|             @ApiImplicitParam(paramType="query", name = "limit", value = "每页条数", required = true, dataType = "int"),  | 
|             @ApiImplicitParam(paramType="query", name = "code", value = "编码", required = true, dataType = "String"),  | 
|             @ApiImplicitParam(paramType="query", name = "name", value = "名称", required = true, dataType = "String"),  | 
|             @ApiImplicitParam(paramType="query", name = "type", value = "业务角色类型(1:操作角色,2:工作流角色)", required = true, dataType = "String")  | 
|     })  | 
|     public JsonResult<List<CoreRole>> userRoleList(@RequestBody RoleQuery condtion) {  | 
|         PageInfo<CoreRole> pageInfo = roleConsoleService.queryByCondtion(condtion);  | 
|         return JsonResult.successx(pageInfo.getList(),pageInfo.getTotal()+"");  | 
|     }  | 
|     /**  | 
|      * 管理员重置用户密码  | 
|      *  | 
|      * @return  | 
|      */  | 
|     @PostMapping(Constants.ADMIN_VIEW_PREFIX + "/changeUserPassword.json")  | 
|     @ApiOperation(value="管理员重置用户密码", notes="test: 仅0有正确返回")  | 
|     @ApiImplicitParams({  | 
|             @ApiImplicitParam(paramType="query", name = "id", value = "用户ID", required = true, dataType = "Long"),  | 
|             @ApiImplicitParam(paramType="query", name = "password", value = "密码", required = true, dataType = "String")  | 
|     })  | 
|     public JsonResult changeUserPassword(@RequestBody CoreUser user,HttpServletRequest request) {  | 
|         userConsoleService.resetPassword(user.getId(), user.getPassword());  | 
|   | 
|         OperationAppLog build = OperationAppLog.builder().appPrograme(CommonEnum.后台.getValue()).opreateName(getAdminName(request))  | 
|                 .methodName(Constants.ROLE_MODUL_NAME).operateAction("管理员重置用户密码-"+user.getId()).build();  | 
|         mqUtil.sendApp(build);  | 
|   | 
|         return new JsonResult().success();  | 
|     }  | 
|   | 
|     /**  | 
|      * 保存添加角色  | 
|      *  | 
|      * @return  | 
|      */  | 
|     @PostMapping(Constants.ADMIN_VIEW_PREFIX + "/role/addRole.json")  | 
|     @ApiOperation(value="角色管理添加角色", notes="test: 仅0有正确返回")  | 
|     @ApiImplicitParams({  | 
|             @ApiImplicitParam(paramType="query", name = "code", value = "角色编码", required = true, dataType = "String"),  | 
|             @ApiImplicitParam(paramType="query", name = "name", value = "角色名称", required = true, dataType = "String"),  | 
|             @ApiImplicitParam(paramType="query", name = "type", value = "角色类型,系统的角色,工作流角色(R0,R1...)", required = true, dataType = "String"),  | 
|             @ApiImplicitParam(paramType="query", name = "ids", value = "角色Id,多个用逗号隔开", required = true, dataType = "String")  | 
|     })  | 
|     public JsonResult addRole(@RequestBody CoreRole role,HttpServletRequest request) {  | 
|         CoreRole role1 = roleConsoleService.queryByCode(role.getCode());  | 
|         if (role1 != null) {  | 
|             return JsonResult.failMessage("用户编号已存在");  | 
|         }  | 
|         JsonResult result = new JsonResult();  | 
|         role.setCreateTime(new Date());  | 
|         role.setDelFlag("0");  | 
|         roleConsoleService.save(role);  | 
|         platformService.clearFunctionCache();  | 
|   | 
|         OperationAppLog build = OperationAppLog.builder().appPrograme(CommonEnum.后台.getValue()).opreateName(getAdminName(request))  | 
|                 .methodName(Constants.ROLE_MODUL_NAME).operateAction("角色管理添加角色-"+role.getId()).build();  | 
|         mqUtil.sendApp(build);  | 
|   | 
|   | 
|         return result.success();  | 
|     }  | 
|   | 
|     /**  | 
|      * 更新角色  | 
|      *  | 
|      * @param role  | 
|      * @return  | 
|      */  | 
|     @PostMapping(Constants.ADMIN_VIEW_PREFIX + "/role/updateRole.json")  | 
|     @ApiOperation(value="角色管理更新角色", notes="test: 仅0有正确返回")  | 
|     public JsonResult<String> updateRole(@RequestBody CoreRole role,HttpServletRequest request) {  | 
|         role.setDelFlag("0");  | 
|         boolean success = roleConsoleService.update(role);  | 
|         if (success) {  | 
|             platformService.clearFunctionCache();  | 
|   | 
|             OperationAppLog build = OperationAppLog.builder().appPrograme(CommonEnum.后台.getValue()).opreateName(getAdminName(request))  | 
|                     .methodName(Constants.ROLE_MODUL_NAME).operateAction("角色管理更新角色-"+role.getId()).build();  | 
|             mqUtil.sendApp(build);  | 
|   | 
|             return new JsonResult().success();  | 
|         } else {  | 
|             return JsonResult.failMessage("保存失败");  | 
|         }  | 
|     }  | 
|     @PostMapping(Constants.ADMIN_VIEW_PREFIX + "/role/deleteRole.json")  | 
|     @ApiOperation(value="角色管理删除角色", notes="test: 仅0有正确返回")  | 
|     @ApiImplicitParams({  | 
|             @ApiImplicitParam(paramType="query", name = "ids", value = "角色Id", required = true, dataType = "String")  | 
|     })  | 
|     public JsonResult deleteRole(@RequestBody CoreRoleModel model,HttpServletRequest request) {  | 
|         String ids = model.getIds();  | 
|         if (ids.endsWith(",")) {  | 
|             ids = StringUtils.substringBeforeLast(ids, ",");  | 
|         }  | 
|   | 
|         List<Long> idList = ConvertUtil.str2longs(ids);  | 
|         Long id = idList.get(0);  | 
|         CoreRole cr = roleConsoleService.queryById(id);  | 
|         cr.setDelFlag("1");  | 
|         roleConsoleService.update(cr);  | 
|   | 
|         OperationAppLog build = OperationAppLog.builder().appPrograme(CommonEnum.后台.getValue()).opreateName(getAdminName(request))  | 
|                 .methodName(Constants.ROLE_MODUL_NAME).operateAction("角色管理删除角色-"+model.getIds()).build();  | 
|         mqUtil.sendApp(build);  | 
|   | 
|         return new JsonResult().success();  | 
|     }  | 
|   | 
|     @PostMapping(Constants.ADMIN_VIEW_PREFIX + "/dictList.json")  | 
|     @ApiOperation(value="组织机构列表", notes="test: 仅0有正确返回")  | 
|     @ApiImplicitParams({  | 
|             @ApiImplicitParam(paramType="query", name = "type", value = "类型(org_type:组织机构)", required = true, dataType = "String")  | 
|     })  | 
|     public JsonResult<List<Map<String,Object>>> dictList(@RequestBody CoreDictQueryModel condtion)  | 
|     {  | 
|         condtion.setPage(Integer.parseInt("1"));  | 
|         condtion.setLimit(Integer.parseInt("100"));  | 
|         //PageQuery page = condtion.getPageQuery();  | 
|         PageInfo info=coreDictService.queryByCondition(condtion);  | 
|         return JsonResult.successx(info.getList(),info.getTotal()+"");  | 
|     }  | 
|   | 
|   | 
|   | 
| }  |