${if(len(sxlx)==0,""," and sxlx = '"+ sxlx +"'")}
${if(len(create_time) == 0,"", " and date_format(CREATE_TIME,'%Y-%m-%d') = '"+ create_time +"'")}
${if(len(create_time) == 0 && len(end_time) == 0, " " , " and date_format(CREATE_TIME,'%Y-%m-%d') >= '"+ create_time +"' and date_format(end_TIME,'%Y-%m-%d') <= '"+ end_time +"'")}
${if(len(sxlx) == 0 ,"" , " and sxlx = '" + sxlx + "'")}
没搞懂,你想要怎么写?