中扬CRM客户关系管理系统
Junjie
2023-09-07 8cbd2425dc7e21e9dfb56f3f68f13ec82142655b
src/main/java/com/zy/crm/manager/mapper/OrderMapper.java
@@ -1,12 +1,31 @@
package com.zy.crm.manager.mapper;
import com.zy.crm.manager.entity.Order;
import com.baomidou.mybatisplus.mapper.BaseMapper;
import com.baomidou.mybatisplus.plugins.Page;
import com.zy.crm.manager.entity.Order;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;
import java.util.HashMap;
import java.util.List;
@Mapper
@Repository
public interface OrderMapper extends BaseMapper<Order> {
    Order selectByUuid(@Param("hostId") Long hostId, @Param("uuid") String uuid);
    Order selectOrderByNewestUuid(@Param("hostId") Long hostId);
    List<Order> listByPage(Page<Order> page, @Param("hostId")Long hostId, @Param("deptId") String deptId, @Param("userId") Long userId , @Param("condition") String condition);
    Double selectMoneyByYearAndStatus(String year, Integer status);//获取指定年份和订单状态总交易金额
    Double selectMoneyByUserAndYearAndStatus(Long userId, String year, Integer status);//获取指定用户、年份和订单状态总交易金额
    List<Order> selectTopMoney();//查询交易额前7名员工
    List<HashMap<String, Object>> selectCurrentYearMonthSuccess();//获取当前年度12个月的交易成功金额数据
}