package com.goafanti.common.dao;

import com.goafanti.common.model.FinanceCount;
import com.goafanti.common.model.TOrderPayment;
import com.goafanti.organization.bo.outOrderPayment;
import org.apache.ibatis.annotations.Param;

import java.util.List;

public interface TOrderPaymentMapper {

	/**
	 * This method was generated by MyBatis Generator. This method corresponds to the database table t_order_payment
	 * @mbg.generated  Tue Jul 20 09:16:18 CST 2021
	 */
	int deleteByPrimaryKey(Integer id);

	/**
	 * This method was generated by MyBatis Generator. This method corresponds to the database table t_order_payment
	 * @mbg.generated  Tue Jul 20 09:16:18 CST 2021
	 */
	int insert(TOrderPayment record);

	/**
	 * This method was generated by MyBatis Generator. This method corresponds to the database table t_order_payment
	 * @mbg.generated  Tue Jul 20 09:16:18 CST 2021
	 */
	int insertSelective(TOrderPayment record);

	/**
	 * This method was generated by MyBatis Generator. This method corresponds to the database table t_order_payment
	 * @mbg.generated  Tue Jul 20 09:16:18 CST 2021
	 */
	TOrderPayment selectByPrimaryKey(Integer id);

	/**
	 * This method was generated by MyBatis Generator. This method corresponds to the database table t_order_payment
	 * @mbg.generated  Tue Jul 20 09:16:18 CST 2021
	 */
	int updateByPrimaryKeySelective(TOrderPayment record);

	/**
	 * This method was generated by MyBatis Generator. This method corresponds to the database table t_order_payment
	 * @mbg.generated  Tue Jul 20 09:16:18 CST 2021
	 */
	int updateByPrimaryKey(TOrderPayment record);

	outOrderPayment selectByidGetDetails(@Param("id")Integer id);

	int insertSelectiveGetId(TOrderPayment p);

	/**
	 * 
	 * @param tid	项目编号
	 * @param chooseType 支付种类 0第三方 1催款 2官费
	 * @param type 0所有 1不含取消
	 * @return
	 */
	List<outOrderPayment> selectByTid(@Param("tid")Integer tid, @Param("chooseType")Integer chooseType, @Param("type")Integer type);

	List<outOrderPayment> selectList(@Param("tpcId")Integer tpcId, @Param("nodeId")Integer nodeId, @Param("chooseType")Integer chooseType);


	void updateByids(@Param("list")List<String> list,@Param("processStatus")Integer processStatus);

	int selectByCid(Integer tpcId);


	void deleteByParam(@Param("tid")Integer tid, @Param("chooseType")Integer chooseType);

    List<FinanceCount> selectCountByFinance(String id);
}
