| | |
| | | |
| | | |
| | | |
| | | @Override |
| | | public void updWxMiniToken(){ |
| | | DefaultWebSecurityManager manager = new DefaultWebSecurityManager(); |
| | | ThreadContext.bind(manager); |
| | | String appId = systemDictDataBiz.queryByCode(Constants.WX_MINI_CONFIG,Constants.WX_APPID_PERSONNEL).getCode(); |
| | | String appSecret = systemDictDataBiz.queryByCode(Constants.WX_MINI_CONFIG,Constants.WX_SECRET_PERSONNEL).getCode(); |
| | | //生成微信token |
| | | String url = "https://api.weixin.qq.com/cgi-bin/token?grant_type=client_credential&appid="+appId+"&secret="+appSecret; |
| | | String response = Constants.doGet(url,null); |
| | | JSONObject json = JSONObject.parseObject(response); |
| | | SystemDictData systemDictData = systemDictDataBiz.queryByCode(Constants.WX_MINI_CONFIG,Constants.WX_TOKEN_PERSONNEL); |
| | | systemDictData.setCode(json.getString("access_token")); |
| | | systemDictData.setUpdateTime(new Date()); |
| | | systemDictDataBiz.updateByIdNew(systemDictData); |
| | | } |
| | | |
| | | |
| | | } |
| | | |