【WX】预算配置
This commit is contained in:
13
src/main/java/com/quinn/mapper/xml/AccBudgetMapper.xml
Normal file
13
src/main/java/com/quinn/mapper/xml/AccBudgetMapper.xml
Normal file
@@ -0,0 +1,13 @@
|
||||
<?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.quinn.mapper.AccBudgetMapper">
|
||||
<select id="getBudget" resultType="com.quinn.common.wx.BudgetDTO">
|
||||
select a.id,b.id "expendId",IFNULL(a.budget,0) "budget",b.user_id,a.gmt_create,
|
||||
IFNULL(
|
||||
(select sum(money) from qn_acc_bill c where c.money_type = a.expend_id and c.user_id = #{userId} and c.date <![CDATA[ >= ]]> #{startDate} and c.date <![CDATA[ <= ]]> #{endDate})
|
||||
,0) "used",
|
||||
b.icon "expendIcon"
|
||||
from qn_acc_budget a right join qn_acc_setting b on a.expend_id = b.id
|
||||
where b.user_id = #{userId}
|
||||
</select>
|
||||
</mapper>
|
||||
Reference in New Issue
Block a user