소스 검색

订单查询修改

wks 2 년 전
부모
커밋
241d114321
1개의 변경된 파일2개의 추가작업 그리고 1개의 파일을 삭제
  1. 2 1
      src/main/resources/mapper/modules/order/InsOrdersMapper.xml

+ 2 - 1
src/main/resources/mapper/modules/order/InsOrdersMapper.xml

@@ -235,7 +235,7 @@
         <if test="deptId != null and deptId != ''">
             and o.deptid like CONCAT(#{deptId, jdbcType=VARCHAR}, '%')
         </if>
-        <if test="deptId == null and deptId == '' and userId != null and userId != ''">
+        <if test="(deptId == null or deptId == '') and userId != null and userId != ''">
             and o.userid = #{userId, jdbcType=VARCHAR}
         </if>
         <if test="orderStatus != null and orderStatus != ''">
@@ -257,6 +257,7 @@
         <if test="companyId != null and companyId != ''">
             and iac.company_id = #{companyId, jdbcType=VARCHAR}
         </if>
+        order by createtime desc
 
     </select>
 </mapper>