package com.xxfc.platform.vehicle.mapper;


import com.xxfc.platform.vehicle.entity.BranchCompanyStockRight;
import com.xxfc.platform.vehicle.pojo.BranchCompanyStockSearchVo;
import com.xxfc.platform.vehicle.pojo.dto.BranchCompanyStockRightDTO;
import com.xxfc.platform.vehicle.pojo.vo.BranchCompanyStockInfoRightVo;
import org.apache.ibatis.annotations.Param;
import tk.mybatis.mapper.common.Mapper;

import java.math.BigDecimal;
import java.util.List;


public interface BranchCompanyStockRightMapper extends Mapper<BranchCompanyStockRight> {
    //获取股权列表
    List<BranchCompanyStockInfoRightVo> search(BranchCompanyStockSearchVo searchVo);
    //获取股价列表
    List<Integer> selectAllPrice();
    //获取一条记录
    BranchCompanyStockInfoRightVo selectInfoById(@Param("id")Integer id);

     //修改股权
    int updateBalance(@Param("companyId") Integer companyId, @Param("balance") Integer balance, @Param("lastBalance") Integer lastBalance);

     //批量添加
    int addCompamyList(@Param("list") List<BranchCompanyStockRight> list);

    Integer getCompanyInfo(@Param("name")String name);

    List<BranchCompanyStockRightDTO> findWithPageByPriceOrCode(@Param("price") BigDecimal price, @Param("provinceCode") Integer provinceCode, @Param("cityCode") Integer cityCode);
}