Commit 69f10b0b authored by hongguangwu's avatar hongguangwu

优化查询条件

parent 915ebcc3
......@@ -322,25 +322,8 @@
<include refid="Base_Column_List"/>
FROM t_salary_standard a
<where>
1=1
AND a.DELETE_FLAG = 0
<if test="tSalaryStandard != null">
<if test="tSalaryStandard.deptName != null and tSalaryStandard.deptName.trim() != ''">
AND a.DEPT_NAME = #{tSalaryStandard.deptName}
</if>
<if test="tSalaryStandard.deptNo != null and tSalaryStandard.deptNo.trim() != ''">
AND a.DEPT_NO = #{tSalaryStandard.deptNo}
</if>
<if test="tSalaryStandard.salaryMonth != null and tSalaryStandard.salaryMonth.trim() != ''">
AND a.SALARY_MONTH = #{tSalaryStandard.salaryMonth}
</if>
<if test="tSalaryStandard.status == null">
AND (a.STATUS = 1 OR a.STATUS = 2 or a.STATUS = 5)
</if>
<if test="tSalaryStandard.status != null">
AND a.STATUS = #{tSalaryStandard.status}
</if>
</if>
a.STATUS in (1,2,5) AND a.DELETE_FLAG = 0
<include refid="tSalaryStandard_where"/>
ORDER BY CREATE_TIME DESC
</where>
</select>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment