| | |
| | | import cc.mrbird.febs.mall.mapper.DataDictionaryMapper; |
| | | import cc.mrbird.febs.mall.service.IAdminChatService; |
| | | import cc.mrbird.febs.mall.vo.*; |
| | | import cc.mrbird.febs.rabbit.producter.AgentProducer; |
| | | import cn.hutool.core.date.DateUtil; |
| | | import cn.hutool.core.util.ObjectUtil; |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | |
| | | private final ChatAmountFlowMapper chatAmountFlowMapper; |
| | | private final DataDictionaryMapper dataDictionaryMapper; |
| | | private final ChatGroupMapper chatGroupMapper; |
| | | private final AgentProducer agentProducer; |
| | | private final RedisUtils redisUtils; |
| | | |
| | | @Override |
| | |
| | | chatGroupMapper.updateById(chatGroup); |
| | | return new FebsResponse().success(); |
| | | } |
| | | |
| | | @Override |
| | | public FebsResponse registerMember() { |
| | | agentProducer.sendAddRobotMsg("20845477"); |
| | | return new FebsResponse().success(); |
| | | } |
| | | |
| | | @Override |
| | | public FebsResponse openModelType(String userId) { |
| | | ChatUser chatUser = this.baseMapper.selectByUserId(userId); |
| | | if(ObjectUtil.isEmpty(chatUser)) { |
| | | return new FebsResponse().fail().message("会员信息不存在"); |
| | | } |
| | | this.baseMapper.updateModelTypeByUserId(userId,1); |
| | | return new FebsResponse().success(); |
| | | } |
| | | |
| | | @Override |
| | | public FebsResponse closeModelType(String userId) { |
| | | ChatUser chatUser = this.baseMapper.selectByUserId(userId); |
| | | if(ObjectUtil.isEmpty(chatUser)) { |
| | | return new FebsResponse().fail().message("会员信息不存在"); |
| | | } |
| | | this.baseMapper.updateModelTypeByUserId(userId,2); |
| | | return new FebsResponse().success(); |
| | | } |
| | | |
| | | @Override |
| | | public FebsResponse updateRegisterMember(AdminRegisterMemberVo adminRegisterMemberVo) { |
| | | agentProducer.sendAddRobotMsg(adminRegisterMemberVo.getInviteId()); |
| | | return new FebsResponse().success(); |
| | | } |
| | | |
| | | @Override |
| | | public FebsResponse openSwitchAutoSend(String id) { |
| | | this.baseMapper.updateAutoSendByGroupId(id,1); |
| | | return new FebsResponse().success(); |
| | | } |
| | | |
| | | @Override |
| | | public FebsResponse closeSwitchAutoSend(String id) { |
| | | this.baseMapper.updateAutoSendByGroupId(id,0); |
| | | return new FebsResponse().success(); |
| | | } |
| | | } |