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


import com.iotechn.unimall.data.domain.shop.ShopAccount;
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.model.Page;

import java.util.Date;
import java.util.List;
import java.util.Map;

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

    @HttpMethod(description = "列表", permission = "admin:shop:shopAccount:list", permissionParentName = "账户管理", permissionName = "电商账户表管理")
    public Page<ShopAccount> list(
            @HttpParam(name = "dangAccount", type = HttpParamType.COMMON, description = "当当账号") String dangAccount,
            @HttpParam(name = "dangPassword", type = HttpParamType.COMMON, description = "当当密码") String dangPassword,
            @HttpParam(name = "fuziAccount", type = HttpParamType.COMMON, description = "夫子账号") String fuziAccount,
            @HttpParam(name = "fuziPassword", type = HttpParamType.COMMON, description = "夫子密码") String fuziPassword,
            @HttpParam(name = "fuziCookie", type = HttpParamType.COMMON, description = "夫子cookie") String fuziCookie,
            @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.ADMIN_ID, description = "") Long adminId,
            @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:shopAccount:delete", permissionParentName = "账户管理", permissionName = "电商账户表管理")
    public Boolean delete(@NotNull @HttpParam(name = "id", type = HttpParamType.COMMON, description = "") Long id) throws ServiceException;

    @HttpMethod(description = "修改", permission = "admin:shop:shopAccount:update", permissionParentName = "账户管理", permissionName = "电商账户表管理")
    public Boolean update(@NotNull @HttpParam(name = "shopAccount", type = HttpParamType.COMMON, description = "电商账户表") ShopAccount shopAccount,
                          @HttpParam(name = "adminId", type = HttpParamType.ADMIN_ID, description = "adminId") Long adminId) throws ServiceException;
    @HttpMethod(description = "修改", permission = "admin:shop:shopAccount:edit", permissionParentName = "账户管理", permissionName = "电商账户表管理")
    public Boolean edit(@NotNull @HttpParam(name = "shopAccount", type = HttpParamType.COMMON, description = "电商账户表") ShopAccount shopAccount,
                          @HttpParam(name = "adminId", type = HttpParamType.ADMIN_ID, description = "adminId") Long adminId) throws ServiceException;

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

    @HttpMethod(description = "导出excl表", permission = "admin:shop:shopAccount:export", permissionParentName = "账户管理", permissionName = "电商账户表管理")
    public String export(
            @HttpParam(name = "dangAccount", type = HttpParamType.COMMON, description = "当当账号") String dangAccount,
            @HttpParam(name = "dangPassword", type = HttpParamType.COMMON, description = "当当密码") String dangPassword,
            @HttpParam(name = "fuziAccount", type = HttpParamType.COMMON, description = "夫子账号") String fuziAccount,
            @HttpParam(name = "fuziPassword", type = HttpParamType.COMMON, description = "夫子密码") String fuziPassword,
            @HttpParam(name = "fuziCookie", type = HttpParamType.COMMON, description = "夫子cookie") String fuziCookie,
            @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 List<Map<String,Object>> options(
            @HttpParam(name = "adminId", type = HttpParamType.ADMIN_ID, description = "管理员ID") Long adminId) throws ServiceException;

}
