| @@ -69,6 +69,12 @@ | |||||
| <if test=" null != startdate and null!=enddate"> | <if test=" null != startdate and null!=enddate"> | ||||
| and `create_date` between #{startdate} and #{enddate} | and `create_date` between #{startdate} and #{enddate} | ||||
| </if> | </if> | ||||
| <if test=" null != statusS "> | |||||
| and `status` in | |||||
| <foreach collection="statusS" index="index" item="sItem" open="(" separator="," close=")"> | |||||
| #{sItem} | |||||
| </foreach> | |||||
| </if> | |||||
| <if test=" null != ids "> | <if test=" null != ids "> | ||||
| and id in | and id in | ||||
| <foreach collection="ids" index="index" item="idItem" open="(" separator="," close=")"> | <foreach collection="ids" index="index" item="idItem" open="(" separator="," close=")"> | ||||
| @@ -169,8 +175,14 @@ | |||||
| <if test=" null != startdate and null!=enddate"> | <if test=" null != startdate and null!=enddate"> | ||||
| and ms.`create_date` between #{startdate} and #{enddate} | and ms.`create_date` between #{startdate} and #{enddate} | ||||
| </if> | </if> | ||||
| <if test=" null != statusS "> | |||||
| and ms.`status` in | |||||
| <foreach collection="statusS" index="index" item="sItem" open="(" separator="," close=")"> | |||||
| #{sItem} | |||||
| </foreach> | |||||
| </if> | |||||
| <if test=" null != ids "> | <if test=" null != ids "> | ||||
| and id in | |||||
| and ms.`id` in | |||||
| <foreach collection="ids" index="index" item="idItem" open="(" separator="," close=")"> | <foreach collection="ids" index="index" item="idItem" open="(" separator="," close=")"> | ||||
| #{idItem} | #{idItem} | ||||
| </foreach> | </foreach> | ||||
| @@ -188,7 +200,7 @@ | |||||
| </select> | </select> | ||||
| <select id="sumVoList" parameterType="com.iformall.domain.po.WxMerchantSubsidy" resultType="hashmap"> | <select id="sumVoList" parameterType="com.iformall.domain.po.WxMerchantSubsidy" resultType="hashmap"> | ||||
| select ms.merchant_id, m.name as merchant_name, | |||||
| select ms.`merchant_id`, m.`name` as merchant_name, | |||||
| IFNULL(sum(ms.`order_payment`),0) as sum_order_payment, | IFNULL(sum(ms.`order_payment`),0) as sum_order_payment, | ||||
| IFNULL(sum(ms.`receiver_payment`),0) as sum_receiver_payment, | IFNULL(sum(ms.`receiver_payment`),0) as sum_receiver_payment, | ||||
| IFNULL(sum(ms.`subsidy`),0) as sum_subsidy, | IFNULL(sum(ms.`subsidy`),0) as sum_subsidy, | ||||
| @@ -201,10 +213,20 @@ | |||||
| <if test=" null != status "> | <if test=" null != status "> | ||||
| and ms.`status` = #{status} | and ms.`status` = #{status} | ||||
| </if> | </if> | ||||
| <if test=" null != merchantId "> | |||||
| and ms.`merchant_id` = #{merchantId} | |||||
| </if> | |||||
| <if test=" null != statusS "> | |||||
| and ms.`status` in | |||||
| <foreach collection="statusS" index="index" item="sItem" open="(" separator="," close=")"> | |||||
| #{sItem} | |||||
| </foreach> | |||||
| </if> | |||||
| <if test=" null != startdate and null!=enddate"> | <if test=" null != startdate and null!=enddate"> | ||||
| and ms.`create_date` between #{startdate} and #{enddate} | and ms.`create_date` between #{startdate} and #{enddate} | ||||
| </if> | </if> | ||||
| </where> | </where> | ||||
| group by ms.`merchant_id` | |||||
| </select> | </select> | ||||