package com.goafanti.common.dao;

import com.goafanti.common.model.TChangeTask;
import com.goafanti.common.model.TChangeTaskExample;
import com.goafanti.order.bo.TChangeTaskOut;

import java.util.List;
import org.apache.ibatis.annotations.Param;

public interface TChangeTaskMapper {

	/**
	 * This method was generated by MyBatis Generator. This method corresponds to the database table t_change_task
	 * @mbg.generated  Fri Oct 16 15:53:59 CST 2020
	 */
	long countByExample(TChangeTaskExample example);

	/**
	 * This method was generated by MyBatis Generator. This method corresponds to the database table t_change_task
	 * @mbg.generated  Fri Oct 16 15:53:59 CST 2020
	 */
	int deleteByExample(TChangeTaskExample example);

	/**
	 * This method was generated by MyBatis Generator. This method corresponds to the database table t_change_task
	 * @mbg.generated  Fri Oct 16 15:53:59 CST 2020
	 */
	int deleteByPrimaryKey(Integer id);

	/**
	 * This method was generated by MyBatis Generator. This method corresponds to the database table t_change_task
	 * @mbg.generated  Fri Oct 16 15:53:59 CST 2020
	 */
	int insert(TChangeTask record);

	/**
	 * This method was generated by MyBatis Generator. This method corresponds to the database table t_change_task
	 * @mbg.generated  Fri Oct 16 15:53:59 CST 2020
	 */
	int insertSelective(TChangeTask record);

	/**
	 * This method was generated by MyBatis Generator. This method corresponds to the database table t_change_task
	 * @mbg.generated  Fri Oct 16 15:53:59 CST 2020
	 */
	List<TChangeTask> selectByExample(TChangeTaskExample example);

	/**
	 * This method was generated by MyBatis Generator. This method corresponds to the database table t_change_task
	 * @mbg.generated  Fri Oct 16 15:53:59 CST 2020
	 */
	TChangeTask selectByPrimaryKey(Integer id);

	/**
	 * This method was generated by MyBatis Generator. This method corresponds to the database table t_change_task
	 * @mbg.generated  Fri Oct 16 15:53:59 CST 2020
	 */
	int updateByExampleSelective(@Param("record") TChangeTask record, @Param("example") TChangeTaskExample example);

	/**
	 * This method was generated by MyBatis Generator. This method corresponds to the database table t_change_task
	 * @mbg.generated  Fri Oct 16 15:53:59 CST 2020
	 */
	int updateByExample(@Param("record") TChangeTask record, @Param("example") TChangeTaskExample example);

	/**
	 * This method was generated by MyBatis Generator. This method corresponds to the database table t_change_task
	 * @mbg.generated  Fri Oct 16 15:53:59 CST 2020
	 */
	int updateByPrimaryKeySelective(TChangeTask record);

	/**
	 * This method was generated by MyBatis Generator. This method corresponds to the database table t_change_task
	 * @mbg.generated  Fri Oct 16 15:53:59 CST 2020
	 */
	int updateByPrimaryKey(TChangeTask record);

	void insertSelectiveList(@Param("list")List<TChangeTask> list);

	List<TChangeTaskOut> selectByCid(@Param("id")Integer id, @Param("splitStatus")Integer splitStatus);
	
	/**
	 * 
	 * @param tid 变更项目id
	 * @param sid 变更拆分父项目id
	 * @param type 处理类型
	 * @param i 
	 * @return
	 */
	int updateByTid(@Param("tid")Integer tid,@Param("sid")Integer sid,@Param("cid")Integer cid,@Param("type")Integer type);
	
	int deleteByTid(Integer tid);

	/**
	 *   获取变更子项�???
	 * @param splitSuper
	 * @param cid 
	 * @return
	 */
	List<TChangeTask> selectBySuper(@Param("splitSuper")Integer splitSuper, @Param("cid")Integer cid);

}