コード例 #1
0
        /// <summary>
        /// 添加客服
        /// </summary>
        /// <param name="customerService">客服信息</param>
        public static long AddCustomerService(CustomerService model)
        {
            var cs = model.Map <CustomerServiceInfo>();

            _customerService.AddCustomerService(cs);
            model.Id = cs.Id;
            return(cs.Id);
        }
コード例 #2
0
        public JsonResult Add(CustomerServiceModel customerServiceModel)
        {
            ICustomerService    customerService     = ServiceHelper.Create <ICustomerService>();
            CustomerServiceInfo customerServiceInfo = new CustomerServiceInfo()
            {
                Id          = customerServiceModel.Id,
                Type        = customerServiceModel.Type.GetValueOrDefault(CustomerServiceInfo.ServiceType.PreSale),
                Tool        = customerServiceModel.Tool,
                Name        = customerServiceModel.Name,
                AccountCode = customerServiceModel.Account,
                ShopId      = base.CurrentSellerManager.ShopId
            };
            CustomerServiceInfo customerServiceInfo1 = customerServiceInfo;

            if (customerServiceInfo1.Id <= 0)
            {
                customerService.AddCustomerService(customerServiceInfo1);
            }
            else
            {
                customerService.UpdateCustomerService(customerServiceInfo1);
            }
            return(Json(new { success = true }));
        }