From 1b4c59f5f3a0e332ad1cc27c836d98c6d2bdf22c Mon Sep 17 00:00:00 2001 From: wang-hao-jie <1550036656@qq.com> Date: 星期三, 08 十二月 2021 14:49:16 +0800 Subject: [PATCH] 违章记录 --- xboot-modules/xboot-your/src/main/java/cn/exrick/xboot/your/mapper/OrderTaskMapper.java | 22 ++++++++++++++++++---- 1 files changed, 18 insertions(+), 4 deletions(-) diff --git a/xboot-modules/xboot-your/src/main/java/cn/exrick/xboot/your/mapper/OrderTaskMapper.java b/xboot-modules/xboot-your/src/main/java/cn/exrick/xboot/your/mapper/OrderTaskMapper.java index e8906e3..003b828 100644 --- a/xboot-modules/xboot-your/src/main/java/cn/exrick/xboot/your/mapper/OrderTaskMapper.java +++ b/xboot-modules/xboot-your/src/main/java/cn/exrick/xboot/your/mapper/OrderTaskMapper.java @@ -7,10 +7,7 @@ import com.baomidou.mybatisplus.core.metadata.IPage; import com.baomidou.mybatisplus.core.toolkit.Constants; import com.baomidou.mybatisplus.extension.plugins.pagination.Page; -import org.apache.ibatis.annotations.Param; -import org.apache.ibatis.annotations.Result; -import org.apache.ibatis.annotations.Results; -import org.apache.ibatis.annotations.Select; +import org.apache.ibatis.annotations.*; import org.apache.ibatis.type.JdbcType; import java.util.List; @@ -27,4 +24,21 @@ @Select("SELECT a.*,b.name as temp FROM t_order_task a LEFT JOIN t_customer b ON a.customer_id=b.id ${ew.customSqlSegment} ") @Results({@Result(column="temp", property="customerName", jdbcType = JdbcType.VARCHAR)}) List<OrderTask> list2(@Param(Constants.WRAPPER) QueryWrapper<OrderTask> wrapper2); + + @Select("SELECT sum(num) FROM t_order_task") + int sumNum(); + + @Select("SELECT count(id) FROM t_order_task where status=#{arg0}") + int sumStatus(int type); + + @Select("SELECT count(id) FROM t_order_task where likes=1") + int countLike(); + + @Select("select b.car_no as carNo1,c.name as name1,d.name as name2,count(a.area_section_id) as num1,sum(case when a.status=0 then 1 else 0 end) as num2 from t_order_task a LEFT JOIN t_car b on a.car_id=b.id LEFT JOIN t_area c on a.area_id=c.id LEFT JOIN t_area_ection d on a.area_section_id=d.id where DATE_FORMAT(a.send_date,'%Y-%m-%d')=#{date} GROUP BY a.area_section_id,b.car_no,c.name,d.name") + @Results({@Result(column="carNo1", property="carNo", jdbcType = JdbcType.VARCHAR), + @Result(column="name1", property="areaName", jdbcType = JdbcType.VARCHAR), + @Result(column="name2", property="areaSectionName", jdbcType = JdbcType.VARCHAR), + @Result(column="num1", property="num", jdbcType = JdbcType.INTEGER), + @Result(column="num2", property="level", jdbcType = JdbcType.INTEGER)}) + List<OrderTask> list3(String date); } \ No newline at end of file -- Gitblit v1.9.1