Commit c002d98b by 墨竹

fix:收费bug修改

parent 11fa4598
...@@ -133,7 +133,7 @@ ...@@ -133,7 +133,7 @@
DATE_FORMAT( expire_time, '%Y-%m-%d' ) interceptTime DATE_FORMAT( expire_time, '%Y-%m-%d' ) interceptTime
from tab_haoban_qywx_fee_account_staff from tab_haoban_qywx_fee_account_staff
where wx_enterprise_id = #{wxEnterpriseId} where wx_enterprise_id = #{wxEnterpriseId}
and DATE_SUB(CURDATE(), INTERVAL 30 DAY) <![CDATA[ <= ]]> date(expire_time) and expire_time between DATE(CURDATE()) and DATE_add(CURDATE(), INTERVAL 30 DAY)
group by DATE_FORMAT( expire_time, '%Y-%m-%d' ) group by DATE_FORMAT( expire_time, '%Y-%m-%d' )
</select> </select>
...@@ -143,7 +143,7 @@ ...@@ -143,7 +143,7 @@
expire_time expireTime expire_time expireTime
from tab_haoban_qywx_fee_account_staff from tab_haoban_qywx_fee_account_staff
where wx_enterprise_id = #{wxEnterpriseId} where wx_enterprise_id = #{wxEnterpriseId}
and DATE_SUB(CURDATE(), INTERVAL 30 DAY) <![CDATA[ <= ]]> date(expire_time) and expire_time between DATE(CURDATE()) and DATE_add(CURDATE(), INTERVAL 30 DAY)
order by expire_time desc limit 1 order by expire_time desc limit 1
</select> </select>
...@@ -152,7 +152,7 @@ ...@@ -152,7 +152,7 @@
count(distinct staff_id) count(distinct staff_id)
from tab_haoban_qywx_fee_account_staff from tab_haoban_qywx_fee_account_staff
where wx_enterprise_id = #{wxEnterpriseId} where wx_enterprise_id = #{wxEnterpriseId}
and DATE_SUB(CURDATE(), INTERVAL 30 DAY) <![CDATA[ <= ]]> date(expire_time) and expire_time between DATE(CURDATE()) and DATE_add(CURDATE(), INTERVAL 30 DAY)
</select> </select>
</mapper> </mapper>
...@@ -46,11 +46,11 @@ ...@@ -46,11 +46,11 @@
and intercept_time <![CDATA[ >= ]]> #{startDate} and intercept_time <![CDATA[ >= ]]> #{startDate}
</if> </if>
<if test="endDate != null and endDate != ''"> <if test="endDate != null and endDate != ''">
and intercept_time <![CDATA[ >= ]]> #{endDate} and intercept_time <![CDATA[ <= ]]> #{endDate}
</if> </if>
<choose> <choose>
<when test="interceptFlag != null and interceptFlag == 0"> <when test="interceptFlag != null and interceptFlag == 0">
and DATE_SUB(CURDATE(), INTERVAL 30 DAY) <![CDATA[ <= ]]> date(intercept_time) and intercept_time between DATE(CURDATE()) and DATE_add(CURDATE(), INTERVAL 30 DAY)
GROUP BY wx_enterprise_id GROUP BY wx_enterprise_id
order by intercept_time asc order by intercept_time asc
</when> </when>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment