Commit 295b2149 authored by yanghao's avatar yanghao

chore: 根据客户日志中的创建/接收/捞取的最后行为时间 来更新归属时间

parent 60557476
...@@ -48,3 +48,11 @@ update ecw_customer set roles = '3' where FIND_IN_SET(3, type) != 0; ...@@ -48,3 +48,11 @@ update ecw_customer set roles = '3' where FIND_IN_SET(3, type) != 0;
update ecw_customer set roles = '2,3' where FIND_IN_SET(2, type) != 0 and FIND_IN_SET(3, type) != 0; update ecw_customer set roles = '2,3' where FIND_IN_SET(2, type) != 0 and FIND_IN_SET(3, type) != 0;
-- 根据客户日志中的创建/接收/捞取的最后行为时间 来更新归属时间
update ecw_customer a
inner join (
select customer_id, max(create_time) as maxtime from ecw_customer_operate_log where (operate_type = 5 or operate_type = 1 or operate_type = 7) group by customer_id
) b on a.id = b.customer_id
set a.customer_service_confirmed_time = b.maxtime
where a.deleted = 0;
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