package com.cyksj.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.cyksj.model.entity.UpgradePackage;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

/**
 * @author zwhui
 * @date 2024/4/24 15:03
 */
public interface UpgradePackageMapper extends BaseMapper<UpgradePackage> {
    @Select("select ifnull(sum(num),0) from upgrade_order_don where user_id=#{userId} and relation_id=#{relationId} and status = 'complete'")
    Integer countUpgradenum(@Param("userId") Long userId,@Param("relationId") Long relationId);
}
