完成挂账管理相关需求

This commit is contained in:
谭凯凯 2024-11-25 16:56:52 +08:00 committed by Tankaikai
parent 2d2f35083e
commit 1be72037da
1 changed files with 18 additions and 0 deletions

View File

@ -0,0 +1,18 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="cn.ysk.cashier.mybatis.mapper.TbShopTableBookingMapper">
<select id="summaryByPhoneNos" resultType="java.util.Map">
select
x.phone_number as phoneNumber,
count( case when x.`status` = 10 then 1 end) AS consumeOrders,
count( case when x.`status` = -1 or x.`status` = 999 then 1 end) AS cancelOrders
from tb_shop_table_booking x
where x.phone_number in
<foreach item="phoneNumber" collection="phoneNoList" open="(" separator="," close=")">
#{phoneNumber, jdbcType=VARCHAR}
</foreach>
GROUP BY x.phone_number
</select>
</mapper>