Quellcode durchsuchen

1、活跃用户列表排除内部员工;

Lawsun vor 1 Jahr
Ursprung
Commit
c38aad7825

+ 15 - 15
.idea/workspace.xml

@@ -1,10 +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、热卖-新品-销量-库存 排序;">
-      <change beforePath="$PROJECT_DIR$/app/models/mysql/user_login_logs.js" beforeDir="false" afterPath="$PROJECT_DIR$/app/models/mysql/user_login_logs.js" afterDir="false" />
-      <change beforePath="$PROJECT_DIR$/app/models/mysql/users.js" beforeDir="false" afterPath="$PROJECT_DIR$/app/models/mysql/users.js" afterDir="false" />
-      <change beforePath="$PROJECT_DIR$/app/schedule/dayUsers.js" beforeDir="false" afterPath="$PROJECT_DIR$/app/schedule/dayUsers.js" afterDir="false" />
+    <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" />
@@ -274,14 +274,7 @@
       <workItem from="1693448014632" duration="596000" />
       <workItem from="1693618204645" duration="54000" />
       <workItem from="1693965606793" duration="9192000" />
-      <workItem from="1694742935995" duration="10004000" />
-    </task>
-    <task id="LOCAL-00030" summary="1.rearrange code;">
-      <created>1673053043473</created>
-      <option name="number" value="00030" />
-      <option name="presentableId" value="LOCAL-00030" />
-      <option name="project" value="LOCAL" />
-      <updated>1673053043473</updated>
+      <workItem from="1694742935995" duration="13550000" />
     </task>
     <task id="LOCAL-00031" summary="1.订单打印补充商品信息;">
       <created>1673075312104</created>
@@ -619,7 +612,14 @@
       <option name="project" value="LOCAL" />
       <updated>1694762212337</updated>
     </task>
-    <option name="localTasksCounter" value="79" />
+    <task id="LOCAL-00079" summary="1、补充员工字段;">
+      <created>1694764819840</created>
+      <option name="number" value="00079" />
+      <option name="presentableId" value="LOCAL-00079" />
+      <option name="project" value="LOCAL" />
+      <updated>1694764819840</updated>
+    </task>
+    <option name="localTasksCounter" value="80" />
     <servers />
   </component>
   <component name="TypeScriptGeneratedFilesManager">
@@ -665,7 +665,6 @@
     </option>
   </component>
   <component name="VcsManagerConfiguration">
-    <MESSAGE value="1.查询所有餐店;" />
     <MESSAGE value="1.补充限制付款订单才能分发电子餐费;" />
     <MESSAGE value="1.调整限制兑酒红包的使用;" />
     <MESSAGE value="1.调整餐店分佣比例;" />
@@ -690,7 +689,8 @@
     <MESSAGE value="1、分类商品列表查询全部;" />
     <MESSAGE value="1、关联查询排序问题;" />
     <MESSAGE value="1、热卖-新品-销量-库存 排序;" />
-    <option name="LAST_COMMIT_MESSAGE" value="1、热卖-新品-销量-库存 排序;" />
+    <MESSAGE value="1、补充员工字段;" />
+    <option name="LAST_COMMIT_MESSAGE" value="1、补充员工字段;" />
   </component>
   <component name="XDebuggerManager">
     <breakpoint-manager>

+ 4 - 1
app/controller/home/statistic.js

@@ -140,11 +140,14 @@ module.exports = class StatisticController extends Base {
     try {
       // const dataParse = await that.ctx.validate(that.loginValidate, await that.ctx.anyParse());
       // const dataParse = await that.ctx.anyParse();
+      const currentDateTime = that.app.szjcomo.date('Y-m-d H:i:s');
+      const endTimeStamp = Date.parse(currentDateTime) - 15 * 24 * 60 * 60 * 1000;
+      const endDateTime = that.app.szjcomo.date('Y-m-d H:i:s', endTimeStamp / 1000);
       // 2023/7/26 查询
       const users = await that.app.model.Users.findAll({
         // attributes: [ 'user_id', 'nickname', 'intergral', 'money', 'commission', 'headimgurl' ],
         order: [[ 'update_ttime', 'desc' ], [ 'intergral', 'desc' ]],
-        where: { intergral: { [seq.Op.gte]: 1 } },
+        where: { intergral: { [seq.Op.gte]: 1 }, is_employee: false, update_ttime: { [seq.Op.gte]: endDateTime } },
       });
       return that.ctx.appJson(that.app.szjcomo.appResult('SUCCESS', { users }, false));
     } catch (err) {

Datei-Diff unterdrückt, da er zu groß ist
+ 0 - 0
node_modules/egg-ts-helper/.tmp/eggInfo.json


Einige Dateien werden nicht angezeigt, da zu viele Dateien in diesem Diff geändert wurden.