zoukankan      html  css  js  c++  java
  • mybatis SQL 根据in条件语句排序

    SELECT A.WBXSDDH,A.XSDDLX,B.XSFDH,B.XSZZDM,C.SKUID
          FROM GMXSDD A,GMXSDDFD B,GMXSDDSP C
          WHERE A.XSDDH=B.XSDDH
          AND B.XSFDH=C.XSFDH
          AND B.XSFDLX=0
          AND B.STATUS!=-10
          AND A.XQFDM='PDD'
          AND A.WBXSDDH IN
        <foreach collection="outerOrders" item="item" open="(" close=")" separator=",">
          #{item}
        </foreach>
        UNION
        SELECT B.WBXSDDH,A.XSDDLX,B.XSFDH,B.XSZZDM,C.SKUID
          FROM GMXSDD A,GMXSDDFD B,GMXSDDSP C
          WHERE A.XSDDH=B.XSDDH
          AND B.XSFDH=C.XSFDH
          AND B.XSFDLX=0
          AND B.STATUS!=-10
          AND A.XQFDM !='PDD'
          AND B.WBXSDDH IN
        <foreach collection="outerOrders" item="item" open="(" close=")" separator=",">
          #{item}
        </foreach>
        ORDER BY field (WBXSDDH,
        <foreach collection="outerOrders" item="item" separator=",">
          #{item}
        </foreach>
        );
    
  • 相关阅读:
    Promise、Async、await
    Generator
    模块化
    继承
    原型
    == vs ===
    深浅拷贝
    this
    nodejs中搭建服务器
    sql中constraint主要是增加约束
  • 原文地址:https://www.cnblogs.com/stubborn-dude/p/14931408.html
Copyright © 2011-2022 走看看