| | |
| | | import com.doumee.dao.system.model.SystemDictData; |
| | | import com.doumee.dao.system.model.SystemUser; |
| | | import com.doumee.dao.web.reqeust.EditUsersRequest; |
| | | import com.doumee.dao.web.reqeust.ContentShareImgDto; |
| | | import com.doumee.dao.web.response.AccountResponse; |
| | | import com.doumee.service.business.UsersService; |
| | | import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
| | |
| | | } |
| | | |
| | | |
| | | @Override |
| | | public String getContentShareImg(Users loginUserInfo, ContentShareImgDto param){ |
| | | if(StringUtils.isBlank(param.getImgurl())){ |
| | | throw new BusinessException(ResponseStatus.BAD_REQUEST); |
| | | } |
| | | String url = null; |
| | | if(param.getType() == 1){ |
| | | //多图带二维码下载 |
| | | String path = systemDictDataBiz.queryByCode(Constants.OBJCET_STORAGE, Constants.RESOURCE_PATH).getCode(); |
| | | String folder = systemDictDataBiz.queryByCode(Constants.OBJCET_STORAGE, Constants.USERS_FILE).getCode(); |
| | | }else{ |
| | | //内容分享海报图片 |
| | | |
| | | |
| | | } |
| | | return url; |
| | | } |
| | | @Override |
| | | public String getUserCard(Users users){ |
| | | String path = systemDictDataBiz.queryByCode(Constants.OBJCET_STORAGE, Constants.RESOURCE_PATH).getCode(); |
| | |
| | | |
| | | |
| | | |
| | | @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); |
| | | } |
| | | |
| | | |
| | | } |
| | | |