1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40
| <select id="mngOperationRecordPageQuery" parameterType="map" resultType="com.husky.ssm.dto.MngOperationRecordDTO"> SELECT t.id, t.user_name, t.user_account, t.menu_name, t.method, t.url, t.operation_name, t.request_params, t.client_ip, t.create_time, t.modify_time FROM mng_operation_record t <where> <if test="userName != null and userName != ''"> and instr(t.user_name,#{userName})>0 </if> <if test="userAccount != null and userAccount != ''"> and instr(t.user_account,#{userAccount})>0 </if> <if test="menuName != null and menuName != ''"> and instr(t.menu_name,#{menuName})>0 </if> <if test="operationName != null and operationName != ''"> and instr(t.operation_name,#{operationName})>0 </if> <if test="requestParams != null and requestParams != ''"> and instr(t.request_params,#{requestParams})>0 </if> <if test="startTime != null and startTime != ''"> <![CDATA[and t.create_time >= #{startTime} ]]> </if> <if test="endTime != null and endTime != ''"> <![CDATA[and t.create_time < DATE_ADD(#{endTime},INTERVAL 1 DAY) ]]> </if> </where> ORDER BY create_time DESC </select>
|