扫描数据回传接口

master
nodyang@aliyun.com 4 months ago
parent 7f2857b992
commit 88977f8c0f

@ -2,6 +2,7 @@
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Microsoft.Extensions.Logging;
using SlnMesnac.Model.domain;
using SlnMesnac.Repository.service;
using SlnMesnac.Repository.service.LogImpl;
@ -18,17 +19,20 @@ namespace SlnMesnac.TouchSocket
private readonly IBaseCodeService _baseCodeService;
IBaseLogService _baseLogService;
readonly IBaseLogService _baseLogService;
public Action<ScanLogModel>? ScanLogSocketAction;
public Action<ScanStatusSocket>? ScanStatusSocketAction;
private ILogger<ApiServer> _logger;
public ApiServer(IScanLogService scanService, IBaseCodeService baseCodeService, IBaseLogService baseLogService)
public ApiServer(IScanLogService scanService, IBaseCodeService baseCodeService, IBaseLogService baseLogService, ILogger<ApiServer> logger)
{
_scanService = scanService;
_baseCodeService = baseCodeService;
_baseLogService = baseLogService;
_logger=logger;
}
/// <summary>
@ -40,6 +44,8 @@ namespace SlnMesnac.TouchSocket
[WebApi(HttpMethodType.POST)]
public Back ScanStatus(ScanStatusSocket scanStatus)
{
_logger.LogInformation("扫描的状态接口");
_logger.LogInformation("{Data}",scanStatus.ToJsonString());
BaseLog log = new BaseLog
{
LogLevel = "Info",
@ -88,6 +94,10 @@ namespace SlnMesnac.TouchSocket
[WebApi(HttpMethodType.POST)]
public Back ScanBack(ScanLogSocket scanLog)
{
_logger.LogInformation("扫描数据回传接口");
_logger.LogInformation("{Data}", scanLog.ToJsonString());
BaseLog log = new BaseLog();
log.LogLevel = "Info";
log.ErrMsg = "";

Loading…
Cancel
Save