2 Commits aba1933934 ... f776243882

Author SHA1 Message Date
  pengjing f776243882 Merge branch 'master' of http://39.98.153.250:9080/bowintek/EmploymentSite 5 months ago
  pengjing da713d16b5 签到人员排序 5 months ago
1 changed files with 2 additions and 1 deletions
  1. 2 1
      src/main/resources/mapping/cquery/SiteUserCQuery.xml

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

@@ -144,6 +144,7 @@
         FROM
         FROM
             pc_site_user siteUser
             pc_site_user siteUser
                 LEFT JOIN pc_site site ON siteUser.SiteID = site.SiteID
                 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
         WHERE
             1=1
             1=1
             <if test="siteUserName!='' and siteUserName!=null">
             <if test="siteUserName!='' and siteUserName!=null">
@@ -156,7 +157,7 @@
                 and site.regionCode = #{regionCode}
                 and site.regionCode = #{regionCode}
             </if>
             </if>
         ORDER BY
         ORDER BY
-            siteUser.CreateTime DESC
+            psgn.maxSigninTime desc,siteUser.CreateTime DESC
     </select>
     </select>
 
 
     <select id="getSiteUserSigninList" resultType="com.hz.employmentsite.vo.signin.SigninVo">
     <select id="getSiteUserSigninList" resultType="com.hz.employmentsite.vo.signin.SigninVo">