不睡觉的月亮 a7e38bdb3c feat:fw->zp
2025-12-09 16:24:08 +08:00

18 lines
881 B
XML

<?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="com.yzt.service.mapper.StoreOrderInfoMapper">
<select id="getSalesNumByDateAndProductId" resultType="java.lang.Integer">
select IFNULL(sum(pay_num), 0) as pay_num from zp_store_order_info
where order_id in (SELECT id FROM `zp_store_order` where paid = 1 and date_format(create_time, '%Y-%m-%d') = #{date})
and product_id = #{proId}
</select>
<select id="getSalesByDateAndProductId" resultType="java.math.BigDecimal">
select IFNULL(sum(vip_price), 0) as price from zp_store_order_info
where order_id in (SELECT id FROM `zp_store_order` where paid = 1 and date_format(create_time, '%Y-%m-%d') = #{date})
and product_id = #{proId}
</select>
</mapper>