|
@@ -1,4 +1,43 @@
|
|
|
package com.sky.ioc.mapper;
|
|
|
|
|
|
+import com.sky.ioc.entity.params.IocParam;
|
|
|
+import org.apache.ibatis.annotations.Mapper;
|
|
|
+import org.apache.ibatis.annotations.Param;
|
|
|
+import org.apache.ibatis.annotations.Select;
|
|
|
+
|
|
|
+@Mapper
|
|
|
public interface CuisineMapper {
|
|
|
+
|
|
|
+ @Select("<script> " +
|
|
|
+ "SELECT count(DISTINCT user_id) FROM cuisine_order where 1=1 " +
|
|
|
+ "<if test='iocParam!=null and iocParam.deptId != null '>" +
|
|
|
+ " and department_id=#{iocParam.deptId} " +
|
|
|
+ "</if>"+
|
|
|
+ "<if test='iocParam!=null and iocParam.timeRange != null '>" +
|
|
|
+ " and order_time BETWEEN #{iocParam.timeRange.startDate} AND #{iocParam.timeRange.endDate} " +
|
|
|
+ "</if>" +
|
|
|
+ "</script>")
|
|
|
+ Integer getTotalPersonByCompanyIdAndDeptId(@Param("iocParam") IocParam iocParam);
|
|
|
+
|
|
|
+ @Select("<script>" +
|
|
|
+ "SELECT sum(order_price) FROM cuisine_order where 1=1 " +
|
|
|
+ "<if test='iocParam!=null and iocParam.deptId != null '>" +
|
|
|
+ " and department_id=#{iocParam.deptId} " +
|
|
|
+ "</if>"+
|
|
|
+ "<if test='iocParam!=null and iocParam.timeRange != null '>" +
|
|
|
+ " and order_time BETWEEN #{iocParam.timeRange.startDate} AND #{iocParam.timeRange.endDate} " +
|
|
|
+ "</if>"+
|
|
|
+ "</script>")
|
|
|
+ Double getTotalPriceByCompanyIdAndDeptId(@Param("iocParam") IocParam iocParam);
|
|
|
+
|
|
|
+ @Select("<script>" +
|
|
|
+ "SELECT count(1) FROM cuisine_order where 1=1 " +
|
|
|
+ "<if test='iocParam!=null and iocParam.deptId != null '>" +
|
|
|
+ " and department_id=#{iocParam.deptId} " +
|
|
|
+ "</if>"+
|
|
|
+ "<if test='iocParam!=null and iocParam.timeRange != null '>" +
|
|
|
+ " and order_time BETWEEN #{iocParam.timeRange.startDate} AND #{iocParam.timeRange.endDate} " +
|
|
|
+ "</if>"+
|
|
|
+ "</script>")
|
|
|
+ Integer getTotalOrderByCompanyIdAndDeptId(@Param("iocParam") IocParam iocParam);
|
|
|
}
|