pengjing 5 mesiacov pred
rodič
commit
da713d16b5

+ 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">