package com.iotechn.unimall.admin.api.shop;


import com.iotechn.unimall.data.domain.shop.ShopOrder;
import com.iotechn.unimall.core.annotation.HttpMethod;
import com.iotechn.unimall.core.annotation.HttpOpenApi;
import com.iotechn.unimall.core.annotation.HttpParam;
import com.iotechn.unimall.core.annotation.HttpParamType;
import com.iotechn.unimall.core.annotation.param.NotNull;
import com.iotechn.unimall.core.exception.ServiceException;
import com.iotechn.unimall.data.dto.shop.ShopDTO;
import com.iotechn.unimall.data.model.Page;

import java.util.Date;

/**
 * 电商订单表Service接口
 *
 * @author jlb
 * @date 2022-05-28
 */
@HttpOpenApi(group = "admin.shop.shopOrder", description = "电商订单表")
public interface IShopOrderService {
    @HttpMethod(description = "新增", permission = "admin:shop:shopOrder:add", permissionParentName = "电商管理", permissionName = "电商订单表管理")
    public Boolean add(@NotNull @HttpParam(name = "shopOrder", type = HttpParamType.COMMON, description = "电商订单表") ShopOrder shopOrder,
                       @HttpParam(name = "adminId", type = HttpParamType.ADMIN_ID, description = "adminId") Long adminId) throws ServiceException;

    @HttpMethod(description = "列表", permission = "admin:shop:shopOrder:list", permissionParentName = "电商管理", permissionName = "电商订单表管理")
    public Page<ShopOrder> list(
            @HttpParam(name = "accountId", type = HttpParamType.COMMON, description = "账户表id") Long accountId,
            @HttpParam(name = "orderId", type = HttpParamType.COMMON, description = "当当订单号") String orderId,
            @HttpParam(name = "dangOrder", type = HttpParamType.COMMON, description = "夫子订单号") String dangOrder,
            @HttpParam(name = "dangOrderStatus", type = HttpParamType.COMMON, description = "当当发货状态") String dangOrderStatus,
            @HttpParam(name = "address", type = HttpParamType.COMMON, description = "详细地址") String address,
            @HttpParam(name = "provName", type = HttpParamType.COMMON, description = "省") String provName,
            @HttpParam(name = "cityName", type = HttpParamType.COMMON, description = "市") String cityName,
            @HttpParam(name = "areaName", type = HttpParamType.COMMON, description = "区") String areaName,
            @HttpParam(name = "orderStatus", type = HttpParamType.COMMON, description = "订单状态") String orderStatus,
            @HttpParam(name = "orderStatusName", type = HttpParamType.COMMON, description = "订单状态") String orderStatusName,
            @HttpParam(name = "payStatus", type = HttpParamType.COMMON, description = "付款状态") String payStatus,
            @HttpParam(name = "payName", type = HttpParamType.COMMON, description = "付款状态") String payName,
            @HttpParam(name = "receiverName", type = HttpParamType.COMMON, description = "收件人") String receiverName,
            @HttpParam(name = "mobile", type = HttpParamType.COMMON, description = "收件人电话") String mobile,
            @HttpParam(name = "receiver", type = HttpParamType.COMMON, description = "收件人详细信息") String receiver,
            @HttpParam(name = "deleteFlag", type = HttpParamType.COMMON, description = "删除标识") Integer deleteFlag,
            @HttpParam(name = "gmtCreate", type = HttpParamType.COMMON, description = "") Date gmtCreate,
            @HttpParam(name = "gmtUpdate", type = HttpParamType.COMMON, description = "") Date gmtUpdate,
            @HttpParam(name = "userId", type = HttpParamType.COMMON, description = "") Long userId,
            @HttpParam(name = "adminId", type = HttpParamType.COMMON, description = "") Long adminId,
            @HttpParam(name = "shopName", type = HttpParamType.COMMON, description = "店铺名称") String shopName,
            @HttpParam(name = "pageNum", type = HttpParamType.COMMON, description = "页码", valueDef = "1") Integer page,
            @HttpParam(name = "pageSize", type = HttpParamType.COMMON, description = "页码长度", valueDef = "20") Integer limit)
            throws ServiceException;

    @HttpMethod(description = "删除", permission = "admin:shop:shopOrder:delete", permissionParentName = "电商管理", permissionName = "电商订单表管理")
    public Boolean delete(@NotNull @HttpParam(name = "id", type = HttpParamType.COMMON, description = "") String id) throws ServiceException;

    @HttpMethod(description = "修改", permission = "admin:shopOrder:shopOrder:update", permissionParentName = "电商管理", permissionName = "电商订单表管理")
    public Boolean update(@NotNull @HttpParam(name = "shopOrder", type = HttpParamType.COMMON, description = "电商订单表") ShopOrder shopOrder,
                          @HttpParam(name = "adminId", type = HttpParamType.ADMIN_ID, description = "adminId") Long adminId) throws ServiceException;

    @HttpMethod(description = "查询", permission = "admin:shop:shopOrder:get", permissionParentName = "电商管理", permissionName = "电商订单表管理")
    public ShopOrder get(@NotNull @HttpParam(name = "id", type = HttpParamType.COMMON, description = "") Long id) throws ServiceException;

    @HttpMethod(description = "导出excl表", permission = "admin:shop:shopOrder:export", permissionParentName = "电商管理", permissionName = "电商订单表管理")
    public String export(
            @HttpParam(name = "accountId", type = HttpParamType.COMMON, description = "账户表id") Long accountId,
            @HttpParam(name = "orderId", type = HttpParamType.COMMON, description = "当当订单号") String orderId,
            @HttpParam(name = "dangOrder", type = HttpParamType.COMMON, description = "夫子订单号") String dangOrder,
            @HttpParam(name = "address", type = HttpParamType.COMMON, description = "详细地址") String address,
            @HttpParam(name = "provName", type = HttpParamType.COMMON, description = "省") String provName,
            @HttpParam(name = "cityName", type = HttpParamType.COMMON, description = "市") String cityName,
            @HttpParam(name = "areaName", type = HttpParamType.COMMON, description = "区") String areaName,
            @HttpParam(name = "orderStatus", type = HttpParamType.COMMON, description = "订单状态") String orderStatus,
            @HttpParam(name = "orderStatusName", type = HttpParamType.COMMON, description = "订单状态") String orderStatusName,
            @HttpParam(name = "payStatus", type = HttpParamType.COMMON, description = "付款状态") String payStatus,
            @HttpParam(name = "payName", type = HttpParamType.COMMON, description = "付款状态") String payName,
            @HttpParam(name = "receiverName", type = HttpParamType.COMMON, description = "收件人") String receiverName,
            @HttpParam(name = "mobile", type = HttpParamType.COMMON, description = "收件人电话") String mobile,
            @HttpParam(name = "receiver", type = HttpParamType.COMMON, description = "收件人详细信息") String receiver,
            @HttpParam(name = "deleteFlag", type = HttpParamType.COMMON, description = "删除标识") Integer deleteFlag,
            @HttpParam(name = "gmtCreate", type = HttpParamType.COMMON, description = "") Date gmtCreate,
            @HttpParam(name = "gmtUpdate", type = HttpParamType.COMMON, description = "") Date gmtUpdate,
            @HttpParam(name = "userId", type = HttpParamType.COMMON, description = "") Long userId,
            @HttpParam(name = "adminId", type = HttpParamType.COMMON, description = "") Long adminId,
            @HttpParam(name = "page", type = HttpParamType.COMMON, description = "页码", valueDef = "1") Integer page,
            @HttpParam(name = "limit", type = HttpParamType.COMMON, description = "页码长度", valueDef = "20") Integer limit) throws ServiceException;
    @HttpMethod(description = "同步订单信息")
    public String syncOrderInfoList(
            @NotNull @HttpParam(name = "shopDTO", type = HttpParamType.COMMON, description = "参数列表") ShopDTO shopDTO) throws Exception;
    @HttpMethod(description = "获取订单信息")
    public ShopOrder syncOrderInfo(
            @NotNull @HttpParam(name = "orderId", type = HttpParamType.COMMON, description = "夫子订单编号") String orderId,
            @NotNull @HttpParam(name = "dangId", type = HttpParamType.COMMON, description = "当当店铺id") String dangId,
            @NotNull @HttpParam(name = "dangOrder", type = HttpParamType.COMMON, description = "当当订单编号") String dangOrder) throws Exception;
    @HttpMethod(description = "百度智能外呼调用")
    public ShopOrder callPhone(@NotNull @HttpParam(name = "mobile", type = HttpParamType.COMMON, description = "电话") String mobile) throws Exception;

}
