|  |  |  | 
|---|
|  |  |  | import cc.mrbird.febs.mall.service.IApiMallMemberService; | 
|---|
|  |  |  | import cc.mrbird.febs.mall.service.IApiMallMemberWalletService; | 
|---|
|  |  |  | import cc.mrbird.febs.mall.service.ICommonService; | 
|---|
|  |  |  | import cc.mrbird.febs.mall.service.IMallMoneyFlowService; | 
|---|
|  |  |  | import cc.mrbird.febs.mall.vo.*; | 
|---|
|  |  |  | import cc.mrbird.febs.pay.model.BrandWCPayRequestData; | 
|---|
|  |  |  | import cc.mrbird.febs.pay.service.IXcxPayService; | 
|---|
|  |  |  | 
|---|
|  |  |  | private final MallTeamLeaderMapper mallTeamLeaderMapper; | 
|---|
|  |  |  | private final SpringContextHolder springContextHolder; | 
|---|
|  |  |  | private final MallAgentRecordMapper mallAgentRecordMapper; | 
|---|
|  |  |  | private final IMallMoneyFlowService mallMoneyFlowService; | 
|---|
|  |  |  |  | 
|---|
|  |  |  |  | 
|---|
|  |  |  | @Value("${spring.profiles.active}") | 
|---|
|  |  |  | 
|---|
|  |  |  | Long id = LoginUserUtil.getLoginUser().getId(); | 
|---|
|  |  |  | MallMember member = this.baseMapper.selectById(id); | 
|---|
|  |  |  |  | 
|---|
|  |  |  | member.setBindPhone(accountAndCodeDto.getAccount()); | 
|---|
|  |  |  | member.setPhone(accountAndCodeDto.getAccount()); | 
|---|
|  |  |  | this.baseMapper.updateById(member); | 
|---|
|  |  |  | } | 
|---|
|  |  |  |  | 
|---|
|  |  |  | 
|---|
|  |  |  | if(StrUtil.isNotEmpty(avatarUrl)){ | 
|---|
|  |  |  | mallMember.setAvatar(avatarUrl); | 
|---|
|  |  |  | } | 
|---|
|  |  |  | mallMember.setSex(apiXcxSaveInfoDto.getGender() == 1 ? "女" : "男"); | 
|---|
|  |  |  | //        mallMember.setSex(1 == apiXcxSaveInfoDto.getGender() ? "女" : "男"); | 
|---|
|  |  |  | this.baseMapper.updateById(mallMember); | 
|---|
|  |  |  | return new FebsResponse().success(); | 
|---|
|  |  |  | } | 
|---|
|  |  |  | 
|---|
|  |  |  | return new FebsResponse().fail().message("成为合伙人的金额为"+agentPrice); | 
|---|
|  |  |  | } | 
|---|
|  |  |  | } | 
|---|
|  |  |  |  | 
|---|
|  |  |  | String rechargeNo = "CZ_"+MallUtils.getOrderNum(); | 
|---|
|  |  |  | apiRechargeWalletDto.setRechargeNo(rechargeNo); | 
|---|
|  |  |  | apiRechargeWalletDto.setMemberId(memberId); | 
|---|
|  |  |  | BrandWCPayRequestData brandWCPayRequestData = null; | 
|---|
|  |  |  | try { | 
|---|
|  |  |  | 
|---|
|  |  |  | } catch (Exception e) { | 
|---|
|  |  |  | throw new FebsException("支付失败"); | 
|---|
|  |  |  | } | 
|---|
|  |  |  | mallMoneyFlowService.addMoneyFlow( | 
|---|
|  |  |  | memberId, | 
|---|
|  |  |  | amount, | 
|---|
|  |  |  | MoneyFlowTypeEnum.RECHARGE.getValue(), | 
|---|
|  |  |  | rechargeNo, | 
|---|
|  |  |  | FlowTypeEnum.BALANCE.getValue(), | 
|---|
|  |  |  | "余额充值",1); | 
|---|
|  |  |  |  | 
|---|
|  |  |  | String wxResultStr = JSONUtil.toJsonStr(brandWCPayRequestData); | 
|---|
|  |  |  | String payResultStr = brandWCPayRequestData.getPrepay_id(); | 
|---|
|  |  |  | Map<String, Object> map = new HashMap<>(); | 
|---|
|  |  |  | 
|---|
|  |  |  | this.baseMapper.updateById(mallMember); | 
|---|
|  |  |  | } | 
|---|
|  |  |  |  | 
|---|
|  |  |  | @Override | 
|---|
|  |  |  | public FebsResponse agentDetail() { | 
|---|
|  |  |  | DataDictionaryCustom dataDictionaryCustom = dataDictionaryCustomMapper.selectDicDataByTypeAndCode( | 
|---|
|  |  |  | DataDictionaryEnum.AGENT_DETAILS.getType(), DataDictionaryEnum.AGENT_DETAILS.getCode()); | 
|---|
|  |  |  | Map<String, Object> map = new HashMap<>(); | 
|---|
|  |  |  | if(ObjectUtil.isNotEmpty(dataDictionaryCustom)){ | 
|---|
|  |  |  | map.put("agentDetail", dataDictionaryCustom.getValue()); | 
|---|
|  |  |  | } | 
|---|
|  |  |  | return new FebsResponse().success().data(map); | 
|---|
|  |  |  | } | 
|---|
|  |  |  |  | 
|---|
|  |  |  | private  String getXcxLoginUrl(String code) { | 
|---|
|  |  |  | String wechatLoginUrl =xcxProperties.getWecharLoginUrl(); | 
|---|
|  |  |  | return String.format(wechatLoginUrl, xcxProperties.getXcxAppid(), xcxProperties.getXcxSecret(), code); | 
|---|