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 {
"WHERE " +
" 1 = 1 " +
" AND `ImportType` = #{importType} AND `Period` = #{period} " +
" ORDER BY `Period`,`Group`,`VID`,`ItemID`" +
" LIMIT #{start},#{size}" +
"</script>")
List<Voucher> pageQuery(@Param("importType") int code, @Param("period") int periodId, @Param("start") int start ,
......@@ -61,14 +60,13 @@ public interface JournalEntryImportMapper extends MyVatMapper {
Integer pageQueryCount(@Param("importType") int code, @Param("period") int periodId);
@Select("<script>" +
"SELECT " +
" COUNT(1) " +
" SELECT " +
" count(1) " +
"FROM " +
" Voucher " +
"WHERE " +
" 1 = 1" +
" AND `ImportType` = #{importType} AND `Period` = #{period}" +
" GROUP BY `VID` ,`Group`,`Period`" +
" (SELECT DISTINCT " +
" VID , `Group`, Period " +
" FROM " +
" Voucher WHERE AND `ImportType` = #{importType} AND `Period` = #{period}) as temp" +
"</script>")
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