api-目前只支持健身馆强校验

This commit is contained in:
limqhz
2020-07-23 16:06:24 +08:00
parent 4fcd4b4d40
commit ade7baaa6b
3 changed files with 15 additions and 5 deletions

View File

@@ -1,13 +1,16 @@
package com.sv.netty.controller;
import com.enums.DeviceType;
import com.enums.VenueTypeEnum;
import com.sv.entity.Venue;
import com.sv.entity.VenueType;
import com.sv.netty.config.ClientChannelCache;
import com.sv.netty.config.Constant;
import com.sv.netty.netty.service.MessageService;
import com.sv.service.api.QRCodeService;
import com.ydd.framework.core.common.dto.ResponseDTO;
import com.ydd.framework.core.controller.BaseApiController;
import com.ydd.framework.core.exception.ServiceException;
import io.netty.channel.Channel;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
@@ -60,10 +63,8 @@ public class QREnterController extends BaseApiController {
String deviceName = getDeviceName(deviceId);
DeviceType enterOrOut = getEnterOrOut(deviceId);
Venue venue = qrCodeService.initEnter(venueId, deviceName);
if (venue!=null){
Channel channel = ClientChannelCache.getCurrentChannel(deviceName,venueId ,enterOrOut);
messageService.sendLoading(channel,memberId);
}
Channel channel = ClientChannelCache.getCurrentChannel(deviceName,venueId ,enterOrOut);
messageService.sendLoading(channel,memberId);
return ResponseDTO.ok().addAttribute("venueInit", venue);
}