| | |
| | | |
| | | import cc.mrbird.febs.common.entity.FebsResponse; |
| | | import cc.mrbird.febs.common.entity.QueryRequest; |
| | | import cc.mrbird.febs.common.enumerates.AgentLevelEnum; |
| | | import cc.mrbird.febs.common.enumerates.MoneyFlowTypeEnum; |
| | | import cc.mrbird.febs.common.enumerates.StateUpDownEnum; |
| | | import cc.mrbird.febs.common.enumerates.*; |
| | | import cc.mrbird.febs.common.exception.FebsException; |
| | | import cc.mrbird.febs.common.utils.AppContants; |
| | | import cc.mrbird.febs.common.utils.LoginUserUtil; |
| | | import cc.mrbird.febs.common.utils.MallUtils; |
| | | import cc.mrbird.febs.common.utils.RedisUtils; |
| | | import cc.mrbird.febs.mall.dto.*; |
| | | import cc.mrbird.febs.mall.entity.*; |
| | |
| | | } |
| | | mallMember.setAccountStatus(MallMember.ACCOUNT_STATUS_DISABLED); |
| | | mallMemberMapper.updateById(mallMember); |
| | | |
| | | String redisKey = AppContants.XCX_LOGIN_PREFIX + id; |
| | | String existToken = redisUtils.getString(redisKey); |
| | | if (StrUtil.isNotBlank(existToken)) { |
| | | Object o = redisUtils.get(existToken); |
| | | if (ObjectUtil.isNotEmpty(o)) { |
| | | redisUtils.del(existToken); |
| | | } |
| | | } |
| | | redisUtils.del(AppContants.XCX_LOGIN_PREFIX + id); |
| | | redisUtils.del(AppContants.XCX_LOGIN_PHONE_PREFIX + id); |
| | | return new FebsResponse().success(); |
| | | } |
| | | |
| | |
| | | |
| | | Integer type = mallSystemPayDto.getType(); |
| | | String filedType = ""; |
| | | Integer flowType = 0; |
| | | if (type == 1) { |
| | | filedType = "balance"; |
| | | flowType = FlowTypeEnum.BALANCE.getValue(); |
| | | } else if (type == 2) { |
| | | filedType = "score"; |
| | | } else if (type == 3) { |
| | | filedType = "prizeScore"; |
| | | flowType = FlowTypeEnum.PRIZE_SCORE.getValue(); |
| | | } else if (type == 3) { |
| | | filedType = "commission"; |
| | | flowType = FlowTypeEnum.COMMISSION.getValue(); |
| | | } else { |
| | | throw new FebsException("参数错误"); |
| | | } |
| | |
| | | } else { |
| | | iApiMallMemberWalletService.add(mallSystemPayDto.getAddBalance(), mallSystemPayDto.getId(), filedType); |
| | | } |
| | | mallMoneyFlowService.addMoneyFlow(memberId, bigDecimal, MoneyFlowTypeEnum.SYSTEM.getValue(), null, type); |
| | | mallMoneyFlowService.addMoneyFlow( |
| | | memberId, |
| | | bigDecimal, |
| | | ScoreFlowTypeEnum.SYSTEM.getValue(), |
| | | MallUtils.getOrderNum(), |
| | | flowType, |
| | | StrUtil.format(ScoreFlowTypeEnum.SYSTEM.getDesc(),bigDecimal), |
| | | 2 |
| | | ); |
| | | return new FebsResponse().success(); |
| | | } |
| | | |
| | |
| | | public FebsResponse checkOrder(Long id) { |
| | | |
| | | MallMember mallMember = this.baseMapper.selectById(id); |
| | | mallMember.setCheckOrder(StateUpDownEnum.DOWN.getCode() == mallMember.getCheckOrder() ? StateUpDownEnum.UP.getCode() : StateUpDownEnum.DOWN.getCode()); |
| | | this.baseMapper.updateById(mallMember); |
| | | |
| | | if(ObjectUtil.isNotEmpty(mallMember)){ |
| | | mallMember.setCheckOrder(StateUpDownEnum.DOWN.getCode() == mallMember.getCheckOrder() ? StateUpDownEnum.UP.getCode() : StateUpDownEnum.DOWN.getCode()); |
| | | this.baseMapper.updateById(mallMember); |
| | | } |
| | | |
| | | return new FebsResponse().success().message("操作成功"); |
| | | } |
| | | |
| | | @Override |
| | | public FebsResponse checkLeader(Long id) { |
| | | |
| | | MallMember mallMember = this.baseMapper.selectById(id); |
| | | if(ObjectUtil.isNotEmpty(mallMember)){ |
| | | mallMember.setCheckLeader(StateUpDownEnum.DOWN.getCode() == mallMember.getCheckLeader() ? StateUpDownEnum.UP.getCode() : StateUpDownEnum.DOWN.getCode()); |
| | | this.baseMapper.updateById(mallMember); |
| | | } |
| | | |
| | | return new FebsResponse().success().message("操作成功"); |
| | | } |