|  |  |  | 
|---|
|  |  |  | userInfo.put("email", userBo.getEmail()); | 
|---|
|  |  |  | userInfo.put("mobile", userBo.getMobile()); | 
|---|
|  |  |  | userInfo.put("unitId",userBo.getUnitId()); | 
|---|
|  |  |  | userInfo.put("unName",responsibilityUnit.getAreaName()); | 
|---|
|  |  |  | userInfo.put("unName",Objects.nonNull(responsibilityUnit)&&Objects.nonNull(responsibilityUnit.getAreaName())?responsibilityUnit.getAreaName():"未选择责任单位"); | 
|---|
|  |  |  | userInfo.put("wechat", userBo.getWechat()); | 
|---|
|  |  |  | userInfo.put("expireTime", DateUtils.dateToDateString(userBo.getExpireTime())); | 
|---|
|  |  |  | userInfo.put("isAdmin", userBo.getIsAdmin()); | 
|---|
|  |  |  | 
|---|
|  |  |  | result.put("unitId",userBo.getUnitId()); | 
|---|
|  |  |  | result.put("userId", userBo.getId()); | 
|---|
|  |  |  | result.put("account", userBo.getAccount()); | 
|---|
|  |  |  | result.put("unName",Objects.nonNull(responsibilityUnit.getAreaName())?responsibilityUnit.getAreaName():"未选择责任单位"); | 
|---|
|  |  |  | result.put("unName",Objects.nonNull(responsibilityUnit)&&Objects.nonNull(responsibilityUnit.getAreaName())?responsibilityUnit.getAreaName():"未选择责任单位"); | 
|---|
|  |  |  | } catch (Exception e) { | 
|---|
|  |  |  | log.error("token生成异常:" + e.getMessage()); | 
|---|
|  |  |  | result.put("code", ResponseCodeEnum.TOKEN_CREATE_ERROR.getCode()); | 
|---|
|  |  |  | 
|---|
|  |  |  | //生成token,并存入redis | 
|---|
|  |  |  | String token = TokenUtils.getTokenApp(new StringBuffer("00").append(user.getId().toString()).toString(),userInfo); | 
|---|
|  |  |  | result.put("token", token); | 
|---|
|  |  |  | result.put("token", token); | 
|---|
|  |  |  | result.put("userName", user.getUserName()); | 
|---|
|  |  |  | result.put("unitId",user.getUnitId()); | 
|---|
|  |  |  | result.put("userId", user.getId()); | 
|---|
|  |  |  | result.put("account", user.getAccount()); | 
|---|
|  |  |  | result.put("unName",Objects.nonNull(responsibilityUnit.getAreaName())?responsibilityUnit.getAreaName():"未选择责任单位"); | 
|---|
|  |  |  | result.put("unName",Objects.nonNull(responsibilityUnit)&&Objects.nonNull(responsibilityUnit.getAreaName())?responsibilityUnit.getAreaName():"未选择责任单位"); | 
|---|
|  |  |  | } catch (Exception e) { | 
|---|
|  |  |  | log.error("token生成异常:" + e.getMessage()); | 
|---|
|  |  |  | result.put("code", ResponseCodeEnum.TOKEN_CREATE_ERROR.getCode()); | 
|---|