@nger/fk-upload 1.0.186 → 1.0.189

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,6 +11,7 @@ export declare class FkDownloadTaskEntity {
11
11
  loginId: number;
12
12
  fileMd5: string;
13
13
  topicId: number;
14
+ topicName: string;
14
15
  createDate: Date;
15
16
  updateDate: Date;
16
17
  isBigFile: boolean;
@@ -16,6 +16,7 @@ let FkDownloadTaskEntity = class FkDownloadTaskEntity {
16
16
  loginId;
17
17
  fileMd5;
18
18
  topicId;
19
+ topicName;
19
20
  createDate;
20
21
  updateDate;
21
22
  isBigFile;
@@ -91,6 +92,13 @@ tslib_1.__decorate([
91
92
  }),
92
93
  tslib_1.__metadata("design:type", Number)
93
94
  ], FkDownloadTaskEntity.prototype, "topicId", void 0);
95
+ tslib_1.__decorate([
96
+ (0, typeorm_1.Column)({
97
+ name: 'topic_name',
98
+ default: ``
99
+ }),
100
+ tslib_1.__metadata("design:type", String)
101
+ ], FkDownloadTaskEntity.prototype, "topicName", void 0);
94
102
  tslib_1.__decorate([
95
103
  (0, typeorm_1.CreateDateColumn)({
96
104
  name: 'create_date'
@@ -103,9 +103,11 @@ let TaskManageController = class TaskManageController {
103
103
  const skip = (page - 1) * psize;
104
104
  const tasks = await this.db.manager.find(entities_1.FkDownloadTaskEntity, { where, order: { createDate: "DESC" }, take, skip });
105
105
  await Promise.all(tasks.map(async (task) => {
106
- const topic = await this.w7.manager.findOne(w7_1.W7ChatTopicEntity, { where: { id: task.topicId } });
107
- if (topic) {
108
- Reflect.set(topic, 'topicName', topic.topicName);
106
+ if (!task.topicName) {
107
+ const topic = await this.w7.manager.findOne(w7_1.W7ChatTopicEntity, { where: { id: task.topicId } });
108
+ if (topic) {
109
+ task.topicName = topic.topicName;
110
+ }
109
111
  }
110
112
  }));
111
113
  const count = await this.db.manager.count(entities_1.FkDownloadTaskEntity, { where });
@@ -156,7 +158,7 @@ let TaskManageController = class TaskManageController {
156
158
  link: `/@nger/fk-upload/task-manage?${this.toUrl({ ...query, status: 3, page: 1 })}`,
157
159
  key: 3
158
160
  }];
159
- const finishUrl = (filename) => `/@nger/fk-upload/finish-task?ffilename=${filename}&callback=/@nger/fk-uplaod/task-manage?${this.toUrl({
161
+ const finishUrl = (filename) => `/@nger/fk-upload/finish-task?filename=${filename}&callback=/@nger/fk-uplaod/task-manage?${this.toUrl({
160
162
  ...query
161
163
  })}`;
162
164
  const logins = await this.db.manager.find(entities_1.FkLoginEntity, { where: {} });
@@ -219,8 +221,8 @@ let TaskManageController = class TaskManageController {
219
221
  react_1.default.createElement("td", null, login.username),
220
222
  react_1.default.createElement("td", null, login.pass),
221
223
  react_1.default.createElement("td", null, login.w7Username),
222
- react_1.default.createElement("td", null, `${task.createDate.getMonth() + 1}月${task.createDate.getDay()}日:${task.createDate.getMinutes()}分`),
223
- react_1.default.createElement("td", null, Reflect.get(task, 'topicName')),
224
+ react_1.default.createElement("td", null, `${task.createDate.getMonth() + 1}月${task.createDate.getDate()}日 ${task.createDate.getHours()}时:${task.createDate.getMinutes()}分`),
225
+ react_1.default.createElement("td", null, task.topicName),
224
226
  react_1.default.createElement("td", null,
225
227
  react_1.default.createElement("input", { type: "hidden", id: task.filename + '-copy', onChange: () => { }, value: task.uploadUrl }),
226
228
  react_1.default.createElement("a", { className: "btn", target: "_blank", href: url }, "\u4E0B\u8F7D"),
@@ -64,6 +64,7 @@ class ScheduleTask extends rabbitmq_1.Task {
64
64
  fkdownloadTask.path = download.path;
65
65
  fkdownloadTask.url = download.url;
66
66
  fkdownloadTask.topicId = download.topicId;
67
+ fkdownloadTask.topicName = topic.topicName;
67
68
  await db.manager.save(entities_1.FkDownloadTaskEntity, fkdownloadTask);
68
69
  await manager.send(task);
69
70
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nger/fk-upload",
3
- "version": "1.0.186",
3
+ "version": "1.0.189",
4
4
  "description": "nger fk upload",
5
5
  "main": "dist/electon.js",
6
6
  "types": "dist/core.d.ts",