diff --git a/stdiet-custom/src/main/resources/mapper/custom/SysRecipesPlanMapper.xml b/stdiet-custom/src/main/resources/mapper/custom/SysRecipesPlanMapper.xml index c7fea0a00..a59dcdafe 100644 --- a/stdiet-custom/src/main/resources/mapper/custom/SysRecipesPlanMapper.xml +++ b/stdiet-custom/src/main/resources/mapper/custom/SysRecipesPlanMapper.xml @@ -73,7 +73,7 @@ select srp.* from sys_recipes_plan srp left join sys_order so on so.order_id = srp.order_id and so.del_flag = 0 - where srp.cus_id = #{customerId} and srp.del_flag = 0 and #{orderTime} > so.order_time order by srp.end_num_day DESC limit 1 + where srp.cus_id = #{customerId} and srp.del_flag = 0 and #{orderTime} > so.order_time order by so.order_time DESC,srp.end_num_day DESC limit 1