| | |
| | | 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(); |
| | |
| | | throw new BusinessException(ResponseStatus.DATA_EMPTY); |
| | | } |
| | | //TODO 调起 中台接口 |
| | | |
| | | usersMapper.update(new UpdateWrapper<Users>() |
| | | .lambda() |
| | | .set(Users::getCardImg,"-") //重置名片为 - |
| | | .set(StringUtils.isNotBlank(editUsersRequest.getImgurl()),Users::getImgurl,editUsersRequest.getImgurl()) |
| | | .set(StringUtils.isNotBlank(editUsersRequest.getName()),Users::getName,editUsersRequest.getName()) |
| | | .set(StringUtils.isNotBlank(editUsersRequest.getPhone()),Users::getPhone,editUsersRequest.getPhone()) |
| | |
| | | |
| | | |
| | | |
| | | @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); |
| | | } |
| | | |
| | | |
| | | } |
| | | |