package com.goafanti.common.dao;

import com.goafanti.common.model.NewOrderChange;
import com.goafanti.common.model.NewOrderChangeExample;
import com.goafanti.order.bo.NewOrderChangeBo;

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

import com.goafanti.order.bo.OutProcessName;
import org.apache.ibatis.annotations.Param;

public interface NewOrderChangeMapper {
    int deleteByPrimaryKey(Integer id);

    int insert(NewOrderChange record);

    int insertSelective(NewOrderChange record);

    NewOrderChange selectByPrimaryKey(Integer id);

    int updateByPrimaryKeySelective(NewOrderChange record);

    int updateByPrimaryKey(NewOrderChange record);


    List<NewOrderChangeBo> selectByorderNo(String orderNo);

    int checkOderNo(String orderNo);

    NewOrderChangeBo selectById(Integer id);

    void addRefundInvoice(@Param("orderNo")String orderNo, @Param("amount")BigDecimal amount);

    void subtractRefundInvoice(@Param("orderNo")String orderNo,@Param("amount")BigDecimal amount);


    List<Map<String, String>> getOrderChange(String orderNo);

    NewOrderChangeBo selectByChangeId(String changeId);

    NewOrderChangeBo selectByorderNoAndStatus(String orderNo);



    int updateTaskExamineName(@Param("aid") String aid, @Param("taskReceiverId") String taskReceiverId,@Param("type") Integer type);

    /**
     * 获取变更审核列表
     * @param id
     * @param orderNo
     * @return
     */
    OutProcessName getProcessName(@Param("id") Integer id, @Param("orderNo") String orderNo);

    /**
     *
     * @param type 3咨询师 4咨询师经理
     * @param aid
     * @return
     */
    List<Integer> selectProcess(@Param("type")Integer type, @Param("aid")String aid);

    void updateExamineById(@Param("id") String id,@Param("type")Integer type);
}
