...
|
...
|
@@ -8,6 +8,7 @@ import com.sunyo.wlpt.message.bus.service.mapper.UserInfoMapper; |
|
|
import com.sunyo.wlpt.message.bus.service.rabbit.utils.RabbitUtils;
|
|
|
import com.sunyo.wlpt.message.bus.service.response.ResultJson;
|
|
|
import com.sunyo.wlpt.message.bus.service.service.BusQueueService;
|
|
|
import com.sunyo.wlpt.message.bus.service.utils.IdUtils;
|
|
|
import io.netty.util.internal.StringUtil;
|
|
|
import org.springframework.context.annotation.Lazy;
|
|
|
import org.springframework.stereotype.Service;
|
...
|
...
|
@@ -113,6 +114,11 @@ public class BusQueueServiceImpl implements BusQueueService { |
|
|
if (userInfoMapper.selectUserExist(record.getUsername()).size() == 0) {
|
|
|
return new ResultJson<>("400", "该用户信息,不存在");
|
|
|
}
|
|
|
if (userInfoMapper.selectByBusQueue(record).size() == 0) {
|
|
|
return new ResultJson<>("400", "该用户关系,不存在");
|
|
|
}
|
|
|
// 设置id
|
|
|
record.setId(IdUtils.generateId());
|
|
|
rabbitUtils.toCreateQueue(record);
|
|
|
return busQueueMapper.insertSelective(record) > 0
|
|
|
? new ResultJson<>("200", "添加消息队列,成功")
|
...
|
...
|
|