package com.wzj.soopin.transaction.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.wzj.soopin.transaction.domain.po.Divide;
import com.wzj.soopin.transaction.domain.vo.DivideVO;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;
import org.apache.ibatis.annotations.Update;

/**
 * 意见反馈Mapper接口
 *
 * @author zcc
 */
@Mapper
public interface DivideMapper extends BaseMapper<Divide> {

    DivideVO getVOById(Long divideId);

    @Select("select * from trans_divide where order_id = #{orderId} and order_id = #{orderItemId} and del_flag = '0'")
    Divide selectByOrderIdAndOrderItemId(@Param("orderId") Long orderId, @Param("orderItemId") Long orderItemId);

    @Update("update trans_divide set status = #{divideStatus} where id = #{divideId}")
    void updateStatus(@Param("divideId") Long divideId,  @Param("divideStatus") int divideStatus);
}
