| | |
| | | using CoreCms.Net.Caching.AutoMate.RedisCache; |
| | | using CoreCms.Net.Configuration; |
| | | using CoreCms.Net.IServices; |
| | | using CoreCms.Net.IServices.baifenbingfa; |
| | | using CoreCms.Net.Loging; |
| | | using CoreCms.Net.Model.Entities; |
| | | using CoreCms.Net.Model.Entities.Expression; |
| | |
| | | private readonly IWeChatApiHttpClientFactory _weChatApiHttpClientFactory; |
| | | private readonly WeChatOptions _weChatOptions; |
| | | private readonly IRedisOperationRepository _redisOperationRepository; |
| | | private readonly IDistributorDeliveryServices _distributorDeliveryServices; |
| | | |
| | | /// <summary> |
| | | /// 构造函数 |
| | |
| | | , ICoreCmsSettingServices settingServices |
| | | , ICoreCmsServicesServices servicesServices |
| | | , IOptions<WeChatOptions> weChatOptions |
| | | , ICoreCmsUserServicesOrderServices userServicesOrderServices, ICoreCmsUserServicesTicketServices userServicesTicketServices, ICoreCmsStoreServices storeServices, ICoreCmsCouponServices couponServices, ICoreCmsOrderServices orderServices, IWeChatApiHttpClientFactory weChatApiHttpClientFactory, IRedisOperationRepository redisOperationRepository) |
| | | , ICoreCmsUserServicesOrderServices userServicesOrderServices |
| | | , ICoreCmsUserServicesTicketServices userServicesTicketServices |
| | | , ICoreCmsStoreServices storeServices |
| | | , ICoreCmsCouponServices couponServices |
| | | , ICoreCmsOrderServices orderServices |
| | | , IWeChatApiHttpClientFactory weChatApiHttpClientFactory |
| | | , IRedisOperationRepository redisOperationRepository |
| | | , IDistributorDeliveryServices distributorDeliveryServices) |
| | | { |
| | | _user = user; |
| | | _userWeChatInfoServices = userWeChatInfoServices; |
| | |
| | | _weChatApiHttpClientFactory = weChatApiHttpClientFactory; |
| | | _redisOperationRepository = redisOperationRepository; |
| | | _weChatOptions = weChatOptions.Value; |
| | | _distributorDeliveryServices = distributorDeliveryServices; |
| | | |
| | | } |
| | | |
| | |
| | | /// <param name="request"></param> |
| | | /// <returns></returns> |
| | | [HttpGet] |
| | | public async Task<WebApiCallBack> GeiIp([FromServices] IHttpContextAccessor request) |
| | | public WebApiCallBack GeiIp([FromServices] IHttpContextAccessor request) |
| | | { |
| | | string clientIp = request.HttpContext.Connection.RemoteIpAddress.ToString(); |
| | | // 如果客户端通过代理访问,可能需要检查X-Forwarded-For头 |
| | |
| | | { |
| | | user.sex = (int)GlobalEnumVars.UserSexTypes.未知; |
| | | } |
| | | //未处理订单数量 |
| | | var DeliveryCount = await _distributorDeliveryServices.GetNoAcceptedDeliveryCount(); |
| | | |
| | | var ShowDelivery = await _distributorDeliveryServices.GetShowDelivery(); |
| | | jm.data = new |
| | | { |
| | | user.id, |
| | |
| | | userCouponCount, |
| | | orderCount, |
| | | footPrintCount, |
| | | collectionCount |
| | | collectionCount, |
| | | user.isplanorder, |
| | | DeliveryCount, |
| | | ShowDelivery |
| | | }; |
| | | return jm; |
| | | } |