queryByCondition === select @pageTag(){ t.*,b.`NAME` as typename @} from budgt_base t LEFT JOIN budgt_type b on t.TYPE_ID=b.ID where 1=1 @//数据权限,该sql语句功能点 @if(!isEmpty(id)){ and t.TYPE_ID= #id# @} @if(!isEmpty(name)){ and t.NAME like #'%'+name+'%'# @} ORDER BY t.SORT ASC gethanzi === *汉字查找 SELECT t.`NAME`,b.TYPE as typename,b.id as code FROM `budgt_base` t LEFT JOIN budgt_type b on t.TYPE_ID=b.ID WHERE t.`NAME` LIKE #'%'+name+'%'# GROUP BY t.`NAME` getpinyin === *拼音查找 SELECT t.`NAME`,b.TYPE as typename,b.id as code FROM `budgt_base` t LEFT JOIN budgt_type b on t.TYPE_ID=b.ID WHERE `PINYIN` LIKE #'%'+name+'%'# GROUP BY t.`NAME` batchDelBudgtBaseByIds === * 批量逻辑删除 update budgt_base set del_flag = 1 where ID in( #join(ids)#)