Browse Source

1、时间倒序;

Lawsun 1 year ago
parent
commit
4d0119e3fc

+ 5 - 1
.idea/workspace.xml

@@ -1,8 +1,10 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <project version="4">
   <component name="ChangeListManager">
-    <list default="true" id="08cfebb0-a4a4-47ee-a307-566aa06f29bb" name="Default Changelist" comment="1、我邀请的用户活跃列表;">
+    <list default="true" id="08cfebb0-a4a4-47ee-a307-566aa06f29bb" name="Default Changelist" comment="1、...;">
       <change beforePath="$PROJECT_DIR$/.idea/workspace.xml" beforeDir="false" afterPath="$PROJECT_DIR$/.idea/workspace.xml" afterDir="false" />
+      <change beforePath="$PROJECT_DIR$/app/controller/home/statistic.js" beforeDir="false" afterPath="$PROJECT_DIR$/app/controller/home/statistic.js" afterDir="false" />
+      <change beforePath="$PROJECT_DIR$/node_modules/egg-ts-helper/.tmp/eggInfo.json" beforeDir="false" afterPath="$PROJECT_DIR$/node_modules/egg-ts-helper/.tmp/eggInfo.json" afterDir="false" />
     </list>
     <option name="SHOW_DIALOG" value="false" />
     <option name="HIGHLIGHT_CONFLICTS" value="true" />
@@ -256,6 +258,8 @@
       <workItem from="1691058586577" duration="6589000" />
       <workItem from="1691547091961" duration="8363000" />
       <workItem from="1691635063702" duration="14800000" />
+      <workItem from="1692081432949" duration="2142000" />
+      <workItem from="1692151512704" duration="2134000" />
     </task>
     <task id="LOCAL-00024" summary="1.rearrange code;">
       <created>1671158424385</created>

+ 2 - 2
app/controller/home/statistic.js

@@ -143,7 +143,7 @@ module.exports = class StatisticController extends Base {
       // 2023/7/26 查询
       const users = await that.app.model.Users.findAll({
         // attributes: [ 'user_id', 'nickname', 'intergral', 'money', 'commission', 'headimgurl' ],
-        order: [[ 'intergral', 'desc' ]],
+        order: [[ 'update_ttime', 'desc' ], [ 'intergral', 'desc' ]],
         where: { intergral: { [seq.Op.gte]: 1 } },
       });
       return that.ctx.appJson(that.app.szjcomo.appResult('SUCCESS', { users }, false));
@@ -181,7 +181,7 @@ module.exports = class StatisticController extends Base {
           user_id: { [seq.Op.in]: userIds },
           intergral: { [seq.Op.gte]: 1 },
         },
-        order: [[ 'intergral', 'desc' ]],
+        order: [[ 'update_ttime', 'desc' ], [ 'intergral', 'desc' ]],
       });
       return that.ctx.appJson(that.app.szjcomo.appResult('SUCCESS', { users }, false));
     } catch (err) {

File diff suppressed because it is too large
+ 0 - 0
node_modules/egg-ts-helper/.tmp/eggInfo.json


Some files were not shown because too many files changed in this diff