update 查询充电桩的方法换成效率更高的

This commit is contained in:
2023-12-07 16:23:47 +08:00
parent e9fa001da9
commit b04fa01e03

View File

@@ -12,12 +12,12 @@ import com.jsowell.common.util.BytesUtil;
import com.jsowell.common.util.StringUtils;
import com.jsowell.common.util.YKCUtils;
import com.jsowell.netty.factory.YKCOperateFactory;
import com.jsowell.pile.domain.PileBasicInfo;
import com.jsowell.pile.domain.ykcCommond.IssueQRCodeCommand;
import com.jsowell.pile.domain.ykcCommond.ProofreadTimeCommand;
import com.jsowell.pile.service.IPileBasicInfoService;
import com.jsowell.pile.service.IPileMsgRecordService;
import com.jsowell.pile.service.YKCPushCommandService;
import com.jsowell.pile.vo.base.PileInfoVO;
import io.netty.channel.Channel;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
@@ -185,14 +185,14 @@ public class LoginRequestHandler extends AbstractHandler {
byte[] flag = Constants.oneByteArray;
// 通过桩编码SN查询数据库如果有数据则登录成功否则登录失败
PileInfoVO pileInfoVO = null;
PileBasicInfo pileBasicInfo = null;
try {
pileInfoVO = pileBasicInfoService.selectPileInfoBySn(pileSn);
pileBasicInfo = pileBasicInfoService.selectPileBasicInfoBySN(pileSn);
} catch (Exception e) {
log.error("selectPileInfoBySn发生异常", e);
log.error("selectPileBasicInfoBySN发生异常", e);
}
if (pileInfoVO != null) {
if (pileBasicInfo != null) {
flag = Constants.zeroByteArray;
CompletableFuture.runAsync(() -> {