Prechádzať zdrojové kódy

Merge branch 'bly_store'

yfh 1 týždeň pred
rodič
commit
9d153f67d1

+ 36 - 0
fs-service/src/main/resources/mapper/his/FsStoreOrderMapper.xml

@@ -1599,4 +1599,40 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
 
 
     </select>
+
+
+    <select id="selectOrderByCustomerIds" resultType="com.fs.statis.domain.Report">
+        SELECT
+        order_code AS orderSn,
+        real_name AS userName,
+        pay_price AS money,
+        pay_time AS payTime,
+        status AS orderStatus,
+        customer_id AS customerId
+        FROM
+        fs_store_order
+        WHERE
+        <choose>
+            <when test="map.orderStatus != null and map.orderStatus != ''">
+                status = #{map.orderStatus}
+            </when>
+            <otherwise>
+                status &gt;= 2
+            </otherwise>
+        </choose>
+        <if test="map.companyId != null and map.companyId!=''">
+            AND company_id = #{map.companyId}
+        </if>
+        <if test="map.customerIds!=null and map.customerIds.size() > 0">
+            AND customer_id IN
+            <foreach collection="map.customerIds" item="id" open="(" separator="," close=")">
+                #{id}
+            </foreach>
+        </if>
+        <if test="map.payTime!=null">
+            AND pay_time &gt;= STR_TO_DATE(#{map.payTime}, '%Y-%m-%d')
+            AND pay_time &lt; DATE_ADD(STR_TO_DATE(#{map.payTime}, '%Y-%m-%d'), INTERVAL 1 DAY)
+        </if>
+    </select>
+
 </mapper>