private async Task <JsonResult> SendCustomerTobeConfirmMsg(Order order, OrderAttachment designImage, bool isLog = false) { var accountBindingManager = new AccountBindingManager(); var accountbing = await accountBindingManager.GetAccountBindingByCustomerId(order.CustomerId); if (accountbing == null) { return(Json(InvokedResult.Fail("404", "客户未绑定微信"))); } SendMesHelp.SendNews(new NewsMes() { OpenId = accountbing.WxAccount, Articles = new List <Article>() { new Article() { Title = "设计稿确认", Description = string.Format("订单{0}已上传设计稿,请确认!", order.Id), Url = "http://www.18k.hk/customer/order/list?OrderId=" + order.Id, PicUrl = string.Format("http://www.18k.hk/orderimage/{0}.jpg", designImage.FileInfoId) } } }); if (isLog) { var operationLogManager = new OrderOperationLogManager(User); await operationLogManager.AddLogAsync(OperationLogStatus.CuiQueRen, order.Id); } return(Json(InvokedResult.SucceededResult)); }
private async Task <JsonResult> SendWaitMainStoneMsg(Order order) { var accountBindingManager = new AccountBindingManager(); var accountbing = await accountBindingManager.GetAccountBindingByCustomerId(order.CustomerId); if (accountbing == null) { return(Json(InvokedResult.Fail("404", "客户未绑定微信"))); } SendMesHelp.SendNews(new NewsMes() { OpenId = accountbing.WxAccount, Articles = new List <Article>() { new Article() { Title = "等待主石", Description = string.Format("订单{0}进入等石阶段,请及时邮件主石!", order.Id), Url = "http://www.18k.hk/customer/order/list?OrderId=" + order.Id, PicUrl = "http://www.18k.hk/static/images/ddzs.jpg" } } }); var operationLogManager = new OrderOperationLogManager(User); await operationLogManager.AddLogAsync(OperationLogStatus.CuiShi, order.Id); return(Json(InvokedResult.SucceededResult)); }
private async Task <JsonResult> SendShipmentOrderMsg(ShipmentOrder shipmentOrder) { if (shipmentOrder.ShipmentOrderInfos.Any()) { var accountBindingManager = new AccountBindingManager(); var accountbing = await accountBindingManager.GetAccountBindingByCustomerId(shipmentOrder.CustomerId); if (accountbing == null) { return(Json(InvokedResult.Fail("404", "客户未绑定微信"))); } SendMesHelp.SendNews(new NewsMes() { OpenId = accountbing.WxAccount, Articles = new List <Article>() { new Article() { Title = "订单已发货", Description = string.Format("订单{0}已于{1}出货!", string.Join(",", shipmentOrder.ShipmentOrderInfos.Select(r => r.Id)), DateTime.Now.ToShortDateString()), Url = "https://www.18k.hk/customer/order/list?status=2", PicUrl = "https://www.18k.hk/static/images/ddzs.jpg" } } }); } return(Json(InvokedResult.SucceededResult)); }