소스 검색

sql_mode问题

guarantee-lsq 9 달 전
부모
커밋
8054c1bb50

+ 1 - 1
platform-dao/src/main/resources/mapper/sb/SbTypeMapper.xml

@@ -101,7 +101,7 @@
 
     <select id="getSbNums" resultType="com.platform.dao.vo.report.SbInfoTypeReportVO2"
     parameterType="com.platform.dao.dto.sb.SbTypeDTO">
-    select count(1) as totalNum,type.name as typeName,type.id as id
+    select count(1) as totalNum,any_value(type.name) as typeName,any_value(type.id) as id
     from t_sb_type type inner join t_sb_info info
     on
     type.id = info.type_id

+ 3 - 3
platform-dao/src/main/resources/mapper/store/SpareStoreMapper.xml

@@ -139,9 +139,9 @@ sparestore.min_stock
         (
         SELECT
         sparestore.spare_id,
-        sparestore.min_stock maxStock,
-        sparestore.max_stock minStock,
-        SUM( num ) AS totalStock
+        any_value(sparestore.min_stock) maxStock,
+        any_value(sparestore.max_stock) minStock,
+        SUM( any_value(num) ) AS totalStock
         FROM
         t_spare_store sparestore
         <where>