package com.chinacreator.video.restful.dao;

import com.chinacreator.video.bean.OrderInfo;
import com.chinacreator.video.restful.bean.BackBusiOrderRec;
import com.chinacreator.video.restful.bean.BackOrderLog;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.HashMap;
import java.util.List;
import java.util.Map;

@Mapper
public interface BackBusiOrderDao {
    List<HashMap> getBackBusiConf(@Param("cpid") String cpid, @Param("spid") String spid);

    String generateID();

    List<BackBusiOrderRec> findOrderRecByOrderid(@Param("orderid") String orderid);

    List<OrderInfo> findByUser(@Param("userid") String userid);

    String endtimeTheMonthLastDay();

    String endtimeNextMonthLastDay(@Param("currEndtime") String currEndtime);

    String endtimeParamDay(@Param("netdays") String netdays, @Param("currEndtime") String currEndtime);

    String currParamDay(@Param("netdays") String netdays);

    String getKsStartTime();

    String getStartTime(@Param("endtime") String endtime, @Param("netdays") String netdays);

    String getCurrentTime();

    Map findByUserAndSpid(@Param("userid") String userid, @Param("cpid") String cpid, @Param("spid") String spid);

    void addOrderRec(BackBusiOrderRec bean);

    void addOrderLog(BackOrderLog orderLog);

    void order(OrderInfo orderInfo);

    void addShareOrderLog(BackOrderLog bso);

    Integer getBusiCount(@Param("spid") String spid);
}
