| | |
| | | if(BigDecimal.ZERO.compareTo(amount)>0){ |
| | | return new FebsResponse().fail().message("请输入正确的充值金额"); |
| | | } |
| | | Integer type = apiRechargeWalletDto.getType(); |
| | | if(2 == type){ |
| | | //成为合伙人的充值金额 |
| | | DataDictionaryCustom agentPriceDic = dataDictionaryCustomMapper.selectDicDataByTypeAndCode(DataDictionaryEnum.PRICE_AMOUNT.getType(), |
| | | DataDictionaryEnum.PRICE_AMOUNT.getCode()); |
| | | String agentPrice = agentPriceDic.getValue(); |
| | | BigDecimal price = new BigDecimal(agentPrice); |
| | | if(price.compareTo(amount) != 0){ |
| | | return new FebsResponse().fail().message("成为合伙人的金额为"+agentPrice); |
| | | } |
| | | } |
| | | |
| | | apiRechargeWalletDto.setMemberId(memberId); |
| | | BrandWCPayRequestData brandWCPayRequestData = null; |
| | | try { |
| | |
| | | return new FebsResponse().success().data(map).message("充值即将到账"); |
| | | } |
| | | |
| | | @Override |
| | | public void updateMemberAgent(Long memberId) { |
| | | mallAgentRecordMapper.updateStateByMemberId(memberId); |
| | | |
| | | //更新用户表中的LEVEL |
| | | MallMember mallMember = this.baseMapper.selectById(memberId); |
| | | mallMember.setLevel(AgentLevelEnum.FIRST_LEVEL.name()); |
| | | this.baseMapper.updateById(mallMember); |
| | | } |
| | | |
| | | private String getXcxLoginUrl(String code) { |
| | | String wechatLoginUrl =xcxProperties.getWecharLoginUrl(); |
| | | return String.format(wechatLoginUrl, xcxProperties.getXcxAppid(), xcxProperties.getXcxSecret(), code); |