update vipcard set month = DATE_FORMAT(create_time,'%y.%m')
update vipcard set week = WEEK(date_add(create_time,interval 6 day),2)
update vipcard v inner join
(select id,create_time,subdate(date_format(create_time,'%Y-%m-%d'),if(date_format(date_format(create_time,'%Y-%m-%d'),'%w')=0,7,date_format(date_format(create_time,'%Y-%m-%d'),'%w'))-1) as befor,
subdate(date_format(create_time,'%Y-%m-%d'),if(date_format(date_format(create_time,'%Y-%m-%d'),'%w')=0,7,date_format(date_format(create_time,'%Y-%m-%d'),'%w'))-7) dd from vipcard
) pp on v.id = pp.id
set v.week_desc = concat(date_format(pp.befor,'%m.%d'),'-',date_format(pp.dd,'%m.%d'))