完成挂账管理相关需求
This commit is contained in:
@@ -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>
|
||||||
Reference in New Issue
Block a user