package com.ruoyi.tc.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.ruoyi.tc.entity.po.AssetBusinessFormCpPo;
import com.ruoyi.tc.entity.po.AssetBusinessFormJyPo;
import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.Select;

import java.util.List;

/**
 * 资产新监管业务形态复制表(asset_business_form_cp)表数据库访问层
 *
 * @author makejava
 * @since 2024-11-15 10:03:56
 */
public interface AssetBusinessFormJyMapper extends BaseMapper<AssetBusinessFormJyPo> {


    /**
     * 根据资产id查询业务主表原有id
     *
     * @param assetId 资产id
     * @return
     */
    @Select("select * from asset_business_form where asset_id =#{assetId}")
    List<AssetBusinessFormCpPo> findByassetId(Long assetId);


    /**
     * 根据资产id和任务id删除数据
     *
     * @param assetId 资产id
     * @param taskId  任务id
     */
    @Delete("delete from asset_business_form_cp where asset_id=#{assetId} and task_id ={taskId}  ")
    void deletByAssetIdandTaskId(Long assetId, int taskId);

}

