| | |
| | | import com.whyc.mapper.CommonMapper; |
| | | import com.whyc.mapper.PageParamUserMapper; |
| | | import com.whyc.pojo.UserInf; |
| | | import com.whyc.service.BaoJiGroupBattGroupService; |
| | | import com.whyc.service.InterfaceService; |
| | | import com.whyc.service.ProcessSurveyService; |
| | | import com.whyc.service.UserService; |
| | |
| | | @Autowired |
| | | private UserService userService; |
| | | |
| | | @Autowired |
| | | private BaoJiGroupBattGroupService baoJiGroupBattGroupService; |
| | | |
| | | @Override |
| | | public void contextInitialized(ServletContextEvent servletContextEvent) { |
| | | ServletContext application = servletContextEvent.getServletContext(); |
| | | //记录系统的运行初始时间 |
| | | application.setAttribute("system_start_time", System.currentTimeMillis()); |
| | | //清除错误的包机组机房关系 |
| | | baoJiGroupBattGroupService.clearErrorRelationship(); |
| | | |
| | | //应用启动时,检查是否存在表,不存在则新建 |
| | | //告警语音设置表 |
| | |
| | | //视频token获取存入,从萤石云获取 |
| | | String resultJson = HttpUtil.doPost(HttpUtil.VIDEO_URL, HttpUtil.VIDEO_REQUEST_BODY); |
| | | ServiceModel model = ActionUtil.getGson().fromJson(resultJson, ServiceModel.class); |
| | | ServletContext application = servletContextEvent.getServletContext(); |
| | | |
| | | application.setAttribute("videoToken",model); |
| | | |
| | | //版本迭代需要打补丁,PageParamUser追加字段type,扩展表的使用范围,原来表记录的type字段统一追加为1 |
| | |
| | | UserInf userInf = all.get(i); |
| | | String pwdOldEncrypt = userInf.getUSnId(); |
| | | String pwd = RSAUtil.decrypt(pwdOldEncrypt, RSAUtil.getPrivateKeyOld()); |
| | | String pwdNewEncrypt = RSAUtil.encrypt(pwd, RSAUtil.getPublicKey()); |
| | | userInf.setUSnId(pwdNewEncrypt); |
| | | userListWithNewPwd.add(userInf); |
| | | if(pwd != null) { |
| | | String pwdNewEncrypt = RSAUtil.encrypt(pwd, RSAUtil.getPublicKey()); |
| | | userInf.setUSnId(pwdNewEncrypt); |
| | | userListWithNewPwd.add(userInf); |
| | | } |
| | | } |
| | | userService.updatePasswordsTo3072(userListWithNewPwd); |
| | | System.out.println("password system renewed"); |
| | | if(userListWithNewPwd.size()>0) { |
| | | userService.updatePasswordsTo3072(userListWithNewPwd); |
| | | System.out.println("password system renewed"); |
| | | } |
| | | } |
| | | |
| | | } |