Commit dbe66483 authored by neo's avatar neo

[bugfix] fix mapper multi result for select one

parent eae05de8
...@@ -43,7 +43,6 @@ public interface JournalEntryImportMapper extends MyVatMapper { ...@@ -43,7 +43,6 @@ public interface JournalEntryImportMapper extends MyVatMapper {
"WHERE " + "WHERE " +
" 1 = 1 " + " 1 = 1 " +
" AND `ImportType` = #{importType} AND `Period` = #{period} " + " AND `ImportType` = #{importType} AND `Period` = #{period} " +
" ORDER BY `Period`,`Group`,`VID`,`ItemID`" +
" LIMIT #{start},#{size}" + " LIMIT #{start},#{size}" +
"</script>") "</script>")
List<Voucher> pageQuery(@Param("importType") int code, @Param("period") int periodId, @Param("start") int start , List<Voucher> pageQuery(@Param("importType") int code, @Param("period") int periodId, @Param("start") int start ,
...@@ -61,14 +60,13 @@ public interface JournalEntryImportMapper extends MyVatMapper { ...@@ -61,14 +60,13 @@ public interface JournalEntryImportMapper extends MyVatMapper {
Integer pageQueryCount(@Param("importType") int code, @Param("period") int periodId); Integer pageQueryCount(@Param("importType") int code, @Param("period") int periodId);
@Select("<script>" + @Select("<script>" +
"SELECT " + " SELECT " +
" COUNT(1) " + " count(1) " +
"FROM " + "FROM " +
" Voucher " + " (SELECT DISTINCT " +
"WHERE " + " VID , `Group`, Period " +
" 1 = 1" + " FROM " +
" AND `ImportType` = #{importType} AND `Period` = #{period}" + " Voucher WHERE AND `ImportType` = #{importType} AND `Period` = #{period}) as temp" +
" GROUP BY `VID` ,`Group`,`Period`" +
"</script>") "</script>")
Integer pageVIDCount(@Param("importType") int code, @Param("period") int periodId); Integer pageVIDCount(@Param("importType") int code, @Param("period") int periodId);
} }
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment