|
|
@@ -453,7 +453,7 @@
|
|
|
<bind name="e" value="b.endTime +'-31'"/>
|
|
|
and o.sign_time between #{a,jdbcType=VARCHAR} and #{e,jdbcType=VARCHAR}
|
|
|
</if>
|
|
|
- order by b.grant_status , b.create_time
|
|
|
+ order by b.grant_status , b.create_time desc
|
|
|
<if test="page_sql != null">
|
|
|
${page_sql}
|
|
|
</if>
|
|
|
@@ -550,7 +550,7 @@
|
|
|
<bind name="e" value="endTime +'-31'"/>
|
|
|
and o.sign_time between #{a,jdbcType=VARCHAR} and #{e,jdbcType=VARCHAR}
|
|
|
</if>
|
|
|
- order by b.grant_status ,b.create_time
|
|
|
+ order by b.grant_status ,b.create_time desc
|
|
|
</select>
|
|
|
<!-- 查看营销员的奖金数据 -->
|
|
|
<select id="getSaleBounsList" parameterType="com.goafanti.order.bo.TOrderBonusBo" resultType="com.goafanti.order.bo.TOrderBonusBo">
|
|
|
@@ -588,4 +588,12 @@
|
|
|
<select id="checkByOnoAndSub" parameterType="com.goafanti.common.model.TOrderBonus" resultType="java.lang.Integer">
|
|
|
select count(*) from t_order_bonus where order_no = #{orderNo,jdbcType=VARCHAR} and bonus_subject = #{bonusSubject,jdbcType=INTEGER}
|
|
|
</select>
|
|
|
+ <!-- 判断当前订单中有没有未发放的数据 -->
|
|
|
+ <select id="checkNoPay" parameterType="com.goafanti.order.bo.TOrderBonusBo" resultType="java.lang.Integer">
|
|
|
+ select bonus_subject from t_order_bonus
|
|
|
+ where id = #{id,jdbcType=VARCHAR} and bonus_subject > (
|
|
|
+ select min(bonus_subject) from t_order_bonus
|
|
|
+ where order_no = #{orderNo,jdbcType=VARCHAR} and grant_status = 0 and grant_type = 0)
|
|
|
+ </select>
|
|
|
+
|
|
|
</mapper>
|