** 当然提前声明是在一个表里面的几个字段,前台选择哪个字段就出哪个字段的结果**
mybatis映射文件 这种情况t1表的所选字段都出来了
SELECT
t1.name,t1.content,t1.xiyichufang,t1.zhongyichufang,t1.zhongchengyao,t1.other
from dt_ear_disease as t1
LEFT JOIN
dt_ear_system as t2 ON
t2.id=t1.system_id
where t1.system_id IN
<foreach item="item" index="index" collection="num" open="("
separator="," close=")">
#{item}
</foreach>
我想就是红线的部分可以多选 select什么字段就出什么字段 在前段点什么字段出什么字段 比如点zhongyichufang(中医处方)就出对应的信息 其他的不出 ,点zhongyichufang(中医处方)和zhongchengyao(中成药)就出中成药的信息