<select id="pageQueryAllShouLiDanRecordNew" resultType="java.util.Map"> SELECT ${param} ,B.FLOWID,B.YYWORKSEQ,B.KDWORKSEQ FROM WF_BASE_FORM_INFO B where B.STATUS_ID < 100 AND B.PRODUCTID='0' ${where} <if test="FGSCode != '' and FGSCode != null"> AND B.FGS_Code in (#{FGSCode}) </if> <if test="ZHWGID != '' and ZHWGID != null"> AND B.ZHWGID in (#{ZHWGID}) </if> <choose> <when test="KDCompany == 3"> AND B.KDCOMPANY = '3' </when> <otherwise> AND B.KDCOMPANY in ('1','4','99') </otherwise> </choose> <if test="orderBy !=null and orderBy != ''"> ${orderBy} </if> <if test="orderBy ==null or orderBy == ''"> ORDER BY B.RECEIVE_TIME DESC </if> </select>
时间: 2024-04-28 16:25:40 浏览: 93
java实现分页示例代码共6页.pdf.zip
这是一段 SQL 语句,用于查询 WF_BASE_FORM_INFO 表中符合条件的记录。其中 ${param}、${where}、#{FGSCode}、#{ZHWGID}、${orderBy} 等都是占位符,需要在使用时根据实际情况进行替换。该语句的逻辑是先根据条件筛选出符合要求的记录,然后根据 orderBy 字段进行排序,如果 orderBy 为空,则按照 RECEIVE_TIME 倒序排列。
阅读全文