package cc.mrbird.febs.dapp.mapper; import cc.mrbird.febs.dapp.entity.DappFundFlowEntity; import cc.mrbird.febs.dapp.entity.MallOrderInfo; import cc.mrbird.febs.dapp.vo.AdminMallMoneyFlowVo; import cc.mrbird.febs.dapp.vo.DappFundFlowVo; import cn.hutool.core.date.DateTime; import com.baomidou.mybatisplus.core.mapper.BaseMapper; import com.baomidou.mybatisplus.core.metadata.IPage; import com.baomidou.mybatisplus.extension.plugins.pagination.Page; import org.apache.ibatis.annotations.Param; import java.math.BigDecimal; import java.util.Date; import java.util.List; import java.util.Map; public interface DappFundFlowDao extends BaseMapper { IPage selectInPage(Page page, @Param("record") DappFundFlowEntity dappFundFlowEntity); IPage selectVoInPage(Page page, @Param("record") DappFundFlowEntity dappFundFlowEntity); List selectListForMemberAndDay(@Param("memberId") Long memberId, @Param("type") int type); DappFundFlowEntity selectByFromHash(@Param("txHash") String txHash, @Param("status") Integer status); List selectFundFlowListByAddress(@Param("address") String address, @Param("status") Integer status); Map selectAmountTotalByType(@Param("memberId") Long memberId); BigDecimal selectProfitAmountByMemberId(@Param("memberId") Long memberId); DappFundFlowEntity selectNewestFundFlow(@Param("memberId") Long memberId, @Param("type") Integer type); BigDecimal selectSumAmountByMemberIdAndTypeAndStatus(@Param("memberId") Long memberId,@Param("type")int type, @Param("status")int status); DappFundFlowEntity selectInfoById(@Param("id")Long id); int updateStatusById(@Param("status")int status, @Param("id")Long id); DappFundFlowEntity selectByStateAndVersionAndFromHashLimitOne(@Param("status")int withdrawStatusAgree, @Param("version")int withdrawStatusAgree1); DappFundFlowEntity selectByStateAndVersionAndFromHashTwoLimitOne(@Param("status")int withdrawStatusAgree, @Param("version")int withdrawStatusAgree1); /** * 根据会员ID、类型、状态去查询资金流水记录 * @param id * @param type * @param status * @return */ DappFundFlowEntity selectBymemberIdAndType(@Param("memberId")Long id, @Param("type")int type, @Param("status")int status); List selectListByState(@Param("status")int status); BigDecimal selectSumAmountByType(@Param("type")int code); BigDecimal selectSumAmountByTypeAndDate(@Param("type")int code, @Param("dateStr") DateTime now); IPage selectOrderMoneyFlowInPage(Page page, @Param("record")MallOrderInfo mallOrder); List selectListByMemberIdAndTypeAndDate(@Param("memberId")Long memberId, @Param("type")int code, @Param("dateStr") DateTime now); List selectListByTypeAndDate(@Param("type")int code, @Param("dateStr") DateTime now); }