ソースを参照

签到人员排序

pengjing 5 ヶ月 前
コミット
da713d16b5
1 ファイル変更2 行追加1 行削除
  1. 2 1
      src/main/resources/mapping/cquery/SiteUserCQuery.xml

+ 2 - 1
src/main/resources/mapping/cquery/SiteUserCQuery.xml

@@ -144,6 +144,7 @@
         FROM
             pc_site_user siteUser
                 LEFT JOIN pc_site site ON siteUser.SiteID = site.SiteID
+                left join (select CreateUserID,max(SigninTime) maxSigninTime from pc_signin sign group by CreateUserID) psgn on psgn.CreateUserID = siteUser.UserID
         WHERE
             1=1
             <if test="siteUserName!='' and siteUserName!=null">
@@ -156,7 +157,7 @@
                 and site.regionCode = #{regionCode}
             </if>
         ORDER BY
-            siteUser.CreateTime DESC
+            psgn.maxSigninTime desc,siteUser.CreateTime DESC
     </select>
 
     <select id="getSiteUserSigninList" resultType="com.hz.employmentsite.vo.signin.SigninVo">