| | |
| | | import cn.lili.modules.connect.entity.Connect; |
| | | import cn.lili.modules.connect.entity.dto.ConnectAuthUser; |
| | | import cn.lili.modules.connect.service.ConnectService; |
| | | import cn.lili.modules.lmk.domain.entity.VideoAccount; |
| | | import cn.lili.modules.lmk.service.VideoAccountService; |
| | | import cn.lili.modules.member.aop.annotation.PointLogPoint; |
| | | import cn.lili.modules.member.entity.dos.Member; |
| | | import cn.lili.modules.member.entity.dto.*; |
| | |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import com.baomidou.mybatisplus.core.toolkit.Wrappers; |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import lombok.RequiredArgsConstructor; |
| | | import org.apache.rocketmq.spring.core.RocketMQTemplate; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.context.ApplicationEventPublisher; |
| | |
| | | */ |
| | | @Autowired |
| | | private Cache cache; |
| | | |
| | | @Autowired |
| | | private VideoAccountService videoAccountService; |
| | | |
| | | @Override |
| | | public Member findByUsername(String userName) { |
| | |
| | | member.setId(SnowFlake.getIdStr()); |
| | | //保存会员 |
| | | this.save(member); |
| | | // 同时新增一个视频账号 |
| | | VideoAccount videoAccount = new VideoAccount(); |
| | | videoAccount.setUserId(member.getId()); |
| | | videoAccountService.save(videoAccount); |
| | | |
| | | UserContext.settingInviter(member.getId(), cache); |
| | | // 发送会员注册信息 |
| | | applicationEventPublisher.publishEvent(new TransactionCommitSendMQEvent("new member register", rocketmqCustomProperties.getMemberTopic(), |
| | |
| | | Member member = this.getById(managerMemberEditDTO.getId()); |
| | | //传递修改会员信息 |
| | | BeanUtil.copyProperties(managerMemberEditDTO, member); |
| | | this.updateById(member); |
| | | return member; |
| | | } |
| | | |
| | | |
| | | @Override |
| | | public Member updateMemberPartProperties(String id,String password,String mobile) { |
| | | //查询会员信息 |
| | | Member member = this.getById(id); |
| | | //如果密码不为空则加密密码 |
| | | if (CharSequenceUtil.isNotBlank(password)) { |
| | | member.setPassword(new BCryptPasswordEncoder().encode(password)); |
| | | } |
| | | member.setMobile(mobile); |
| | | member.setUsername(mobile); |
| | | this.updateById(member); |
| | | return member; |
| | | } |
| | |
| | | } |
| | | } |
| | | |
| | | } |
| | | } |