@nger/fk-upload 1.0.43 → 1.0.44

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -11,4 +11,5 @@ export declare class FkDownloadTaskEntity {
11
11
  loginId: number;
12
12
  fileMd5: string;
13
13
  topicId: number;
14
+ createDate: Date;
14
15
  }
@@ -16,6 +16,7 @@ let FkDownloadTaskEntity = class FkDownloadTaskEntity {
16
16
  loginId;
17
17
  fileMd5;
18
18
  topicId;
19
+ createDate;
19
20
  };
20
21
  tslib_1.__decorate([
21
22
  (0, typeorm_1.PrimaryColumn)(),
@@ -88,6 +89,12 @@ tslib_1.__decorate([
88
89
  }),
89
90
  tslib_1.__metadata("design:type", Number)
90
91
  ], FkDownloadTaskEntity.prototype, "topicId", void 0);
92
+ tslib_1.__decorate([
93
+ (0, typeorm_1.CreateDateColumn)({
94
+ name: 'create_date'
95
+ }),
96
+ tslib_1.__metadata("design:type", Date)
97
+ ], FkDownloadTaskEntity.prototype, "createDate", void 0);
91
98
  FkDownloadTaskEntity = tslib_1.__decorate([
92
99
  (0, typeorm_1.Entity)({
93
100
  name: 'nger_fk_download_task'
@@ -28,7 +28,7 @@ let TaskManageController = class TaskManageController {
28
28
  this.config = config;
29
29
  }
30
30
  async taskManage() {
31
- const tasks = await this.db.manager.find(entities_1.FkDownloadTaskEntity, { where: {}, order: { loginId: "DESC" } });
31
+ const tasks = await this.db.manager.find(entities_1.FkDownloadTaskEntity, { where: {}, order: { createDate: "DESC" }, take: 50 });
32
32
  return react_1.default.createElement(component_1.Nav, { active: 2 },
33
33
  react_1.default.createElement("script", { dangerouslySetInnerHTML: {
34
34
  __html: `
@@ -36,7 +36,14 @@ class ScheduleTask extends rabbitmq_1.Task {
36
36
  const ids = tasks.map(task => task.topicId);
37
37
  console.log(`topic ids`, ids);
38
38
  const date = new Date('2022-05-10');
39
- const topics = await w7.manager.find(w7_1.W7ChatTopicEntity, { where: { uniacid: (0, typeorm_2.In)(uniacids), id: (0, typeorm_2.Not)((0, typeorm_2.In)(ids)), createTime: Math.floor(date.getTime() / 1000) } });
39
+ const where = {
40
+ uniacid: (0, typeorm_2.In)(uniacids),
41
+ createTime: Math.floor(date.getTime() / 1000)
42
+ };
43
+ if (ids && ids.length > 0) {
44
+ where.id = (0, typeorm_2.Not)((0, typeorm_2.In)(ids));
45
+ }
46
+ const topics = await w7.manager.find(w7_1.W7ChatTopicEntity, { where });
40
47
  console.log(`topics`, topics);
41
48
  topics.map(async (topic) => {
42
49
  if (topic.thirdUrl) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nger/fk-upload",
3
- "version": "1.0.43",
3
+ "version": "1.0.44",
4
4
  "description": "",
5
5
  "main": "dist/core.js",
6
6
  "types": "dist/core.d.ts",