|
@@ -140,7 +140,7 @@
|
|
|
when cu.status = 'used' then 4
|
|
when cu.status = 'used' then 4
|
|
|
when cu.valid_end_time < now() then 2
|
|
when cu.valid_end_time < now() then 2
|
|
|
when ca.id is not null and ca.status = 0 then 3
|
|
when ca.id is not null and ca.status = 0 then 3
|
|
|
- when cu.valid_start_time < now() then 1
|
|
|
|
|
|
|
+ when cu.valid_start_time > now() then 1
|
|
|
when cu.status = 'unused' then 0
|
|
when cu.status = 'unused' then 0
|
|
|
end) as orderby
|
|
end) as orderby
|
|
|
from `coupon_user` cu
|
|
from `coupon_user` cu
|