2f252ffd
王彪总
feat(pay): 实现支付宝支...
|
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
|
<?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.zteits.urbanops.module.erp.dal.mysql.statistics.ErpPurchaseStatisticsMapper">
<select id="getPurchasePrice" resultType="java.math.BigDecimal">
SELECT
(SELECT IFNULL(SUM(total_price), 0)
FROM erp_purchase_in
WHERE in_time >= #{beginTime}
<if test="endTime != null">
AND in_time < #{endTime}
</if>
<if test="@com.zteits.urbanops.framework.tenant.core.context.TenantContextHolder@getTenantId() != null">
AND tenant_id = ${@com.zteits.urbanops.framework.tenant.core.context.TenantContextHolder@getTenantId()}
</if>
AND deleted = 0) -
(SELECT IFNULL(SUM(total_price), 0)
FROM erp_purchase_return
WHERE return_time >= #{beginTime}
<if test="endTime != null">
AND return_time < #{endTime}
</if>
<if test="@com.zteits.urbanops.framework.tenant.core.context.TenantContextHolder@getTenantId() != null">
AND tenant_id = ${@com.zteits.urbanops.framework.tenant.core.context.TenantContextHolder@getTenantId()}
</if>
AND deleted = 0)
</select>
</mapper>
|