/***********************************************************************
* Project: baifenBinfa
* ProjectName: 百分兵法管理系统
* Web: http://chuanyin.com
* Author:
* Email:
* CreateTime: 202403/02
* Description: 暂无
***********************************************************************/
using System;
using System.Linq.Expressions;
using System.Threading.Tasks;
using CoreCms.Net.Model.Entities;
using CoreCms.Net.Model.ViewModels.Basics;
using CoreCms.Net.Model.ViewModels.UI;
using Newtonsoft.Json.Linq;
using SqlSugar;
namespace CoreCms.Net.IServices
{
///
/// 退货单表 服务工厂接口
///
public interface ICoreCmsBillAftersalesServices : IBaseServices
{
///
/// 根据订单号查询已经售后的内容
///
/// 订单编号
/// 取售后单的时候,售后单的等级,0:待审核的和审核通过的售后单,1未审核的,2审核通过的
///
WebApiCallBack OrderToAftersales(string orderId, int aftersaleLevel = 0);
///
/// 统计用户的售后数量
///
///
///
///
Task GetUserAfterSalesNum(Expression> whereExpression, bool noLock = false);
///
/// 创建售后单
///
///
/// 发起售后的订单
/// 是否收到退货,1未收到退货,不会创建退货单,2收到退货,会创建退货单,只有未发货的商品才能选择未收到货,只有已发货的才能选择已收到货
/// 如果是退款退货,退货的明细 以 [[order_item_id=>nums]]的二维数组形式传值
///
/// 售后理由
/// 退款金额,只在退款退货的时候用,如果是退款,直接就是订单金额
///
Task ToAdd(int userId, string orderId, int type, JArray items, string[] images, string reason,
decimal refund);
///
/// 根据条件查询分页数据
///
/// 判断集合
/// 排序方式
/// 当前页面索引
/// 分布大小
///
///
Task> QueryPageAsync(Expression> predicate,
Expression> orderByExpression, OrderByType orderByType,
int pageIndex = 1,
int pageSize = 20);
///
/// 获取单个数据
///
///
///
///
Task GetInfo(string aftersalesId, int userId);
///
/// 后端进行审核的时候,前置操作,1取出页面的数据,2在提交过来的表单的时候,进行校验
///
///
///
Task PreAudit(string aftersalesId);
///
/// Audit平台审核通过或者审核不通过
/// 如果审核通过了,是退款单的话,自动生成退款单,并做订单完成状态,如果是退货的话,自动生成退款单和退货单,如果
///
///
///
///
///
///
///
///
Task Audit(string aftersalesId, int status, int type, decimal refund, string mark,
JArray items);
}
}