//package com.ruoyi.dashboard.utils;
//
//import com.ruoyi.bst.area.domain.AreaQuery;
//import com.ruoyi.bst.areaJoin.domain.AreaJoinQuery;
//import com.ruoyi.bst.areaJoin.domain.enums.AreaJoinPermission;
//import com.ruoyi.bst.bonus.domain.BonusQuery;
//import com.ruoyi.bst.bonus.domain.enums.BonusArrivalType;
//import com.ruoyi.bst.bonusRefund.domain.BonusRefundQuery;
//import com.ruoyi.bst.device.domain.DeviceQuery;
//import com.ruoyi.bst.fault.domain.FaultQuery;
//import com.ruoyi.bst.mchApply.domain.MchApplyQuery;
//import com.ruoyi.bst.model.domain.ModelQuery;
//import com.ruoyi.bst.order.domain.OrderQuery;
//import com.ruoyi.bst.order.domain.query.RefundQuery;
//import com.ruoyi.bst.withdraw.domain.WithdrawQuery;
//import com.ruoyi.dashboard.domain.stat.StatQuery;
//import com.ruoyi.system.user.domain.UserQuery;
//
//public class DashboardUtil {
//
//    public static OrderQuery toOrderQuery(StatQuery params) {
//        OrderQuery query = new OrderQuery();
//        query.setCreateDateRange(params.getDateRange());
//        query.setStatusList(params.getOrderStatusList());
//        query.setBonusUserId(params.getUserId());
//        query.setAreaId(params.getAreaId());
//        query.setScope(params.getScope());
//        query.addAreaPermission(AreaJoinPermission.ORDER_VIEW.getCode());
//        return query;
//    }
//
//    public static RefundQuery toRefundQuery(StatQuery params) {
//        RefundQuery query = new RefundQuery();
//        query.setStatusList(params.getOrderStatusList());
//        query.setRefundCreateDateRange(params.getDateRange());
//        query.setRefundStatusList(params.getRefundStatusList());
//        query.setBonusUserId(params.getUserId());
//        query.setAreaId(params.getAreaId());
//        query.setScope(params.getScope());
//        query.addAreaPermission(AreaJoinPermission.ORDER_VIEW.getCode());
//        return query;
//    }
//
//    public static BonusQuery toBonusQuery(StatQuery params) {
//        BonusQuery query = new BonusQuery();
//        query.setCreateDateRange(params.getDateRange());
//        query.setStatusList(params.getBonusStatusList());
//        query.setArrivalId(params.getBonusUserId());
//        query.setArrivalTypes(BonusArrivalType.userList());
//        query.setAreaId(params.getAreaId());
//        query.setScope(params.getScope());
//        return query;
//    }
//
//    public static BonusRefundQuery toBonusRefundQuery(StatQuery params) {
//        BonusRefundQuery query = new BonusRefundQuery();
//        query.setCreateDateRange(params.getDateRange());
//        query.setBonusStatusList(params.getBonusStatusList());
//        query.setBonusArrivalId(params.getBonusUserId());
//        query.setBonusArrivalTypes(BonusArrivalType.userList());
//        query.setBonusAreaId(params.getAreaId());
//        query.setScope(params.getScope());
//        return query;
//    }
//
//    public static UserQuery toUserQuery(StatQuery query) {
//        UserQuery userQuery = new UserQuery();
//        userQuery.setScope(query.getScope());
//        userQuery.setCreateDateRange(query.getDateRange());
//        userQuery.setUserId(query.getUserId());
//        userQuery.setAreaId(query.getAreaId());
//        return userQuery;
//    }
//
//    public static UserQuery toUserAgentQuery(StatQuery query) {
//        UserQuery userQuery = new UserQuery();
//        userQuery.setScope(query.getScope());
//        userQuery.setCreateDateRange(query.getDateRange());
//        userQuery.setAgentId(query.getUserId());
//        return userQuery;
//    }
//
//    public static DeviceQuery toDeviceQuery(StatQuery query) {
//        DeviceQuery deviceQuery = new DeviceQuery();
//        deviceQuery.setScope(query.getScope());
//        deviceQuery.setMchId(query.getUserId());
//        deviceQuery.setAreaId(query.getAreaId());
//        deviceQuery.addAreaPermission(AreaJoinPermission.DEVICE_VIEW.getCode());
//        return deviceQuery;
//    }
//
//    public static AreaQuery toAreaQuery(StatQuery query) {
//        AreaQuery areaQuery = new AreaQuery();
//        areaQuery.setScope(query.getScope());
//        areaQuery.setUserId(query.getUserId());
//        areaQuery.setId(query.getAreaId());
//        areaQuery.addAreaPermission(AreaJoinPermission.AREA_VIEW.getCode());
//        return areaQuery;
//    }
//
//    public static ModelQuery toModelQuery(StatQuery query) {
//        ModelQuery modelQuery = new ModelQuery();
//        modelQuery.setScope(query.getScope());
//        modelQuery.setUserId(query.getUserId());
//        return modelQuery;
//    }
//
//    public static AreaJoinQuery toAreaJoinQuery(StatQuery query) {
//        AreaJoinQuery areaJoinQuery = new AreaJoinQuery();
//        areaJoinQuery.setScope(query.getScope());
//        areaJoinQuery.setMchId(query.getUserId());
//        areaJoinQuery.setAreaId(query.getAreaId());
//        return areaJoinQuery;
//    }
//
//    public static WithdrawQuery toWithdrawQuery(StatQuery query) {
//        WithdrawQuery withdrawQuery = new WithdrawQuery();
//        withdrawQuery.setCreateDateRange(query.getDateRange());
//        withdrawQuery.setUserId(query.getUserId());
//        withdrawQuery.setScope(query.getScope());
//        return withdrawQuery;
//    }
//
//    public static MchApplyQuery toMchApplyQuery(StatQuery query) {
//        MchApplyQuery mchApplyQuery = new MchApplyQuery();
//        mchApplyQuery.setCreateDateRange(query.getDateRange());
//        mchApplyQuery.setUserId(query.getUserId());
//        mchApplyQuery.setScope(query.getScope());
//        return mchApplyQuery;
//    }
//
//    public static FaultQuery toFaultQuery(StatQuery query) {
//        FaultQuery faultQuery = new FaultQuery();
//        faultQuery.setCreateDateRange(query.getDateRange());
//        faultQuery.setUserId(query.getUserId());
//        faultQuery.setScope(query.getScope());
//        return faultQuery;
//    }
//
//}
