| | |
| | | import cn.hutool.core.date.DateUtil; |
| | | import cn.hutool.core.util.IdcardUtil; |
| | | import cn.hutool.core.util.PhoneUtil; |
| | | import com.alibaba.fastjson.JSONObject; |
| | | import com.doumee.biz.system.SystemDictDataBiz; |
| | | import com.doumee.config.Jwt.JwtPayLoad; |
| | | import com.doumee.config.Jwt.JwtTokenUtil; |
| | | import com.doumee.core.annotation.excel.ExcelImporter; |
| | | import com.doumee.core.constants.ResponseStatus; |
| | | import com.doumee.core.exception.BusinessException; |
| | |
| | | import com.doumee.core.model.PageData; |
| | | import com.doumee.core.model.PageWrap; |
| | | import com.doumee.core.utils.Constants; |
| | | import com.doumee.core.utils.HttpsUtil; |
| | | import com.doumee.core.utils.Utils; |
| | | import com.doumee.core.wx.WXConstant; |
| | | import com.doumee.dao.admin.request.LaborEmpowerDTO; |
| | | import com.doumee.dao.admin.request.LaborMemberDTO; |
| | | import com.doumee.dao.admin.response.MemberInfoDTO; |
| | |
| | | import com.doumee.dao.business.model.Empower; |
| | | import com.doumee.dao.business.model.Member; |
| | | import com.doumee.dao.business.model.TrainTime; |
| | | import com.doumee.dao.web.response.WxAuthorizeVO; |
| | | import com.doumee.service.business.MemberService; |
| | | import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
| | | import com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper; |
| | |
| | | |
| | | @Autowired |
| | | private TrainTimeMapper trainTimeMapper; |
| | | |
| | | |
| | | @Autowired |
| | | private SystemDictDataBiz systemDictDataBiz; |
| | | |
| | | @Override |
| | | public Integer create(Member member) { |
| | |
| | | // |
| | | |
| | | } |
| | | |
| | | |
| | | |
| | | |
| | | /********************************************公众号接口***********************************************************************/ |
| | | |
| | | |
| | | |
| | | /** |
| | | * 微信授权接口 |
| | | * @param code |
| | | * @return |
| | | */ |
| | | @Override |
| | | public WxAuthorizeVO wxAuthorize(String code){ |
| | | String appId = systemDictDataBiz.queryByCode(Constants.WX_PLATFORM,Constants.WX_PLATFORM_APPID).getCode(); |
| | | String appSecret = systemDictDataBiz.queryByCode(Constants.WX_PLATFORM,Constants.WX_PLATFORM_SECRET).getCode(); |
| | | String getTokenUrl = WXConstant.GET_USER_INFO_URL.replace("CODE", code) |
| | | .replace("APPID", appId).replace("SECRET", appSecret); |
| | | JSONObject tokenJson = JSONObject.parseObject(HttpsUtil.get(getTokenUrl,true)); |
| | | String openId = null; |
| | | if(!Objects.isNull(tokenJson.get("access_token"))){ |
| | | openId = tokenJson.getString("openid"); |
| | | } |
| | | WxAuthorizeVO wxAuthorizeVO = new WxAuthorizeVO(); |
| | | wxAuthorizeVO.setOpenid(openId); |
| | | return wxAuthorizeVO; |
| | | } |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | } |