init
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
|
||||
import { SurveyRecModel } from '@db/SurveyRec';
|
||||
import { SurveyModel } from '@db/Survery';
|
||||
import { checkWjxSign, getRedisSubChannel } from 'app/pubUtils/sdkUtil';
|
||||
import { checkWjxSign, getRedisSubChannel } from '@pubUtils/sdkUtil';
|
||||
import { Service } from 'egg';
|
||||
import { RedisClient } from 'redis';
|
||||
import { REDIS_KEY } from '@consts';
|
||||
@@ -33,7 +33,7 @@ export default class Sdk extends Service {
|
||||
rec = await SurveyRecModel.createSurveyRec(roleId, params.activity, params.index, JSON.stringify(params));
|
||||
|
||||
// 3. 发邮件
|
||||
let redisClient: RedisClient = this.app.context.redisClient;
|
||||
let redisClient: RedisClient = (this.app.context as any).redisClient;
|
||||
let name = getRedisSubChannel(REDIS_KEY.SURVEY_CHANNEL, this.app.config.env);
|
||||
let result = await redisClient.publishAsync(name, rec.code);
|
||||
if(result == 0) {
|
||||
|
||||
Reference in New Issue
Block a user