|
@@ -11,6 +11,7 @@ import { PatentWarning } from '../entity/patentWarning.entity';
|
|
|
import { HttpServiceFactory, HttpService } from '@midwayjs/axios';
|
|
|
import { Config, InjectClient } from '@midwayjs/core';
|
|
|
import { RabbitmqService } from './util/rabbitmq';
|
|
|
+import { RedisService } from '@midwayjs/redis';
|
|
|
const assert = require('assert');
|
|
|
const Excel = require('exceljs');
|
|
|
import _ = require('lodash');
|
|
@@ -46,6 +47,9 @@ export class PatentService extends BaseService<modelType> {
|
|
|
@Inject()
|
|
|
rabbitmqService: RabbitmqService;
|
|
|
|
|
|
+ @Inject()
|
|
|
+ redisService: RedisService;
|
|
|
+
|
|
|
async beforeQuery(query) {
|
|
|
const _id = _.get(this.ctx.user, '_id');
|
|
|
const type = _.get(this.ctx.user, 'type');
|
|
@@ -387,6 +391,7 @@ export class PatentService extends BaseService<modelType> {
|
|
|
uri: downloadPath,
|
|
|
remark: '打包成功',
|
|
|
};
|
|
|
+ this.redisService.set('file', data.uri);
|
|
|
this.sendToMQ(data);
|
|
|
} catch (error) {
|
|
|
const data = {
|