mysql的语句如下
/*下拉框显示与实际值*/
select
concat('2022年第',help_topic_id,'周(',date_add(DATE_FORMAT(subdate('2022-01-01',date_format('2022-01-01','%w')-1),'%Y-%m-%d'), INTERVAL ((help_topic_id-1)*7) DAY )
,'至',date_add(DATE_FORMAT(subdate('2022-01-01',date_format('2022-01-01','%w')-7),'%Y-%m-%d'),INTERVAL ((help_topic_id-1)*7) DAY ),')') as 显示值,
concat(date_add(DATE_FORMAT(subdate('2022-01-01',date_format('2022-01-01','%w')-1),'%Y-%m-%d'), INTERVAL ((help_topic_id-1)*7) DAY ),'至',
date_add(DATE_FORMAT(subdate('2022-01-01',date_format('2022-01-01','%w')-7),'%Y-%m-%d'),INTERVAL ((help_topic_id-1)*7) DAY )) as 实际值
from mysql.help_topic where help_topic_id
-----------------------显示-------------------------
你的另外数据集中获取实际值就类似这样
where 1=1
and mytime >='${left(周次,10)}'
and mytime <='${mid(周次,12,10)}'