Browse Source

订单查询修改

wks 2 years ago
parent
commit
241d114321
1 changed files with 2 additions and 1 deletions
  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>