Commit acfcda6c authored by licc's avatar licc

获取订单列表sql fix

parent a7b52619
...@@ -148,9 +148,13 @@ ...@@ -148,9 +148,13 @@
from from
<include refid="table"/> <include refid="table"/>
<where> <where>
pay_type != 0
and user_id != null
and user_id !=''
<if test="created != null "> <if test="created != null ">
YEAR(created) = YEAR(#{created}) and (YEAR(created) = YEAR(#{created})
AND MONTH(created) = MONTH(#{created}) AND MONTH(created) = MONTH(#{created})
)
</if> </if>
</where> </where>
</select> </select>
......
...@@ -78,8 +78,9 @@ ...@@ -78,8 +78,9 @@
from from
<include refid="table"/> <include refid="table"/>
<where> <where>
1=1
<if test="userId != null"> <if test="userId != null">
user_id = #{userId} and user_id = #{userId}
</if> </if>
<if test="yearMonth != null"> <if test="yearMonth != null">
and `year_month`=#{yearMonth} and `year_month`=#{yearMonth}
......
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