using System.Threading.Tasks; using GxPress.Common.WechatPay; using GxPress.Repository.Interface.Order; using GxPress.Service.Interface.Order; namespace GxPress.Service.Implement.Order { public class OrderService : IOrderService { private readonly IOrderRepository orderRepository; public OrderService(IOrderRepository orderRepository) { this.orderRepository = orderRepository; } /// /// 创建微信订单 /// /// /// public async Task InsertWxOrderAsync(WxPayData data) { var order = new Entity.Order.Order(); var attach = data.GetValue("attach").ToString(); return await orderRepository.InsertAsync(order) > 0; } } }