数据集
人力资源表_P
- SELECT * FROM `t_humanres`
- where 1=1
- ${if(len(hid)==0,nofilter," and Id = '" + hid + "'")}
- ${if(len(login)==0,nofilter," and login = '" + login + "'")}
- ${if(len(pwd)==0,nofilter," and pwd = '" + pwd + "'")}
- ${if(len(empname)==0,nofilter," and empname = '" + empname + "'")}
- ${if(len(area)==0,nofilter," and area = '" + area + "'")}
- ${if(len(department)==0,nofilter," and department = '" + department + "'")}
- ${if(len(employment)==0,nofilter," and employment = '" + employment + "'")}
- ${if(len(professional)==0,nofilter," and professional = '" + professional + "'")}
- ${if(len(job)==0,nofilter," and job = '" + job + "'")}
- ${if(len(realjob)==0,nofilter," and realjob = '" + realjob + "'")}
- ${if(len(Jobseq)==0,nofilter," and Jobseq = '" + Jobseq + "'")}
- ${if(len(coefficient)==0,nofilter," and coefficient = '" + coefficient + "'")}
- order by ${if(len(t_inter_cname) == 0,"1=1"," "+ t_inter_cname +" ")}${if(len(orderby)==0,""," "+ orderby +" " )}
复制代码
比如这么一个可对每个字段查询,又可支持排序功能的数据集,要怎么才能快速生成呢?
一个个替换又累又容易出错。
方法就是:xls
数据集生成.rar
(3.52 KB, 下载次数: 104)
下载后解压,把表字段纵向粘贴在B\D\F列。(表字段纵向可以用excel的转置粘贴实现)
然后复制。粘贴到记事本中,替换tab符为空,即可生成中间红色的部分。
顶部和尾部的代码基本无变化的。
|