SELECT *
FROM `t_b_salvage_application` t , `t_b_custer_info` u where t.application_state = 7
and u.identity_card = t.identity_card
and date_format(t.create_time,'%y-%m-%d') between
date_sub(date_sub(date_format('${starttime}','%y-%m-%d'),interval extract(day from '${starttime}')-1 day),interval 1 month) and
last_day(DATE_SUB('${starttime}',INTERVAL 1 MONTH))