wks 2 жил өмнө
parent
commit
241d114321

+ 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>