package com.cyksj.mapper.manage.distribute;

import cn.hutool.core.date.DateTime;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.cyksj.model.entity.DistributeWaitingSendPoints;
import com.cyksj.model.views.BrokenLineCpsUserWMoneyView;
import com.cyksj.model.views.CpsUserWMoneyStatisticsDataView;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Update;

import java.util.List;

/*
 *项目名: netflix
 *文件名: DistributeWaitingSendPointsMapper
 *创建者: JavaZou
 *创建时间:2022/11/15 12:10
 */
public interface DistributeWaitingSendPointsMapper extends BaseMapper<DistributeWaitingSendPoints> {

	@Update("update distribute_waiting_send_points set send_status = #{status} where order_id = #{orderId} and send_status != 'success'")
	Integer updateOrderStatus(@Param("orderId") Long orderId, @Param("status") DistributeWaitingSendPoints.Status status);

	List<CpsUserWMoneyStatisticsDataView> getWMoneyStatisticsDataView(@Param("cpsUserId") Long cpsUserId, @Param("first") DateTime first, @Param("end") DateTime end, @Param("today") Boolean today);

	BrokenLineCpsUserWMoneyView getWMoneyStatisticsDate(@Param("cpsUserId") Long cpsUserId, @Param("first") DateTime first, @Param("end") DateTime end, @Param("today") Boolean today);
}
