xiaoyong931011
2023-08-29 eac9127fec0c66863b54a3801e093335d69a55b1
src/main/java/cc/mrbird/febs/dapp/mapper/DappFundFlowDao.java
@@ -1,21 +1,67 @@
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<DappFundFlowEntity> {
    IPage<DappFundFlowEntity> selectInPage(Page<DappFundFlowEntity> page, @Param("record") DappFundFlowEntity dappFundFlowEntity);
    IPage<DappFundFlowVo> selectVoInPage(Page<DappFundFlowVo> page, @Param("record") DappFundFlowEntity dappFundFlowEntity);
    List<DappFundFlowEntity> selectListForMemberAndDay(@Param("memberId") Long memberId, @Param("type") int type);
    DappFundFlowEntity selectMineFundFlowByMemberIdAndTime(@Param("time") Long memberId, @Param("time") Date time);
    DappFundFlowEntity selectByFromHash(@Param("txHash") String txHash, @Param("status") Integer status);
    List<DappFundFlowEntity> selectFundFlowListByAddress(@Param("address") String address, @Param("status") Integer status);
    Map<String, BigDecimal> 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<DappFundFlowEntity> selectListByState(@Param("status")int status);
    BigDecimal selectSumAmountByType(@Param("type")int code);
    BigDecimal selectSumAmountByTypeAndDate(@Param("type")int code, @Param("dateStr") DateTime now);
    IPage<AdminMallMoneyFlowVo> selectOrderMoneyFlowInPage(Page<AdminMallMoneyFlowVo> page, @Param("record")MallOrderInfo mallOrder);
    List<DappFundFlowEntity> selectListByMemberIdAndTypeAndDate(@Param("memberId")Long memberId, @Param("type")int code, @Param("dateStr") DateTime now);
    List<DappFundFlowEntity> selectListByTypeAndDate(@Param("type")int code, @Param("dateStr") DateTime now);
    BigDecimal selectSumAmountByMemberIdAndType(@Param("memberId") Long memberId,@Param("type")int type);
}