package com.ruixuan.jinniu.mapper;


import com.alibaba.fastjson.JSONObject;
import com.ruixuan.jinniu.entity.KuaishouAccount;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * 账户Mapper接口
 *
 * @author ruoyi
 * @date 2023-03-15
 */
public interface KuaishouAccountMapper {

    List<JSONObject> selectUnboundAccountList(@Param("accountId") Long accountId, @Param("ksId") Long ksId, @Param("accountName") String accountName, @Param("status") Long status);

    /**
     * 查询账户
     *
     * @param id 账户主键
     * @return 账户
     */
    public KuaishouAccount selectKuaishouAccountById(Long id);

    /**
     * 查询账户
     *
     * @param id 账户主键
     * @return 账户
     */
    public KuaishouAccount selectKuaishouAccountByAccountId(Long accountId);

    /**
     * 新增账户
     *
     * @param kuaishouAccount 账户
     * @return 结果
     */
    public int insertKuaishouAccount(KuaishouAccount kuaishouAccount);

    /**
     * 修改账户
     *
     * @param kuaishouAccount 账户
     * @return 结果
     */
    public int updateKuaishouAccount(KuaishouAccount kuaishouAccount);

    /**
     * 修改账户
     *
     * @param kuaishouAccount 账户
     * @return 结果
     */
    public int updateKuaishouAccountByAccountId(KuaishouAccount kuaishouAccount);

    /**
     * 删除账户
     *
     * @param id 账户主键
     * @return 结果
     */
    public int deleteKuaishouAccountById(Long id);

    List<KuaishouAccount> selectKuaishouAccountList(KuaishouAccount kuaishouAccount);

    List<KuaishouAccount> getAccountByProjectId(@Param("projectId") Long projectId);

    void insertRecord(JSONObject o);

    List<JSONObject> getAccountNameByProjectId(@Param("projectId") Long projectId);

    int deleteKuaishouAccountByProjectId(@Param("projectId") Long projectId);
}
