Commit 87d5af83 authored by qinhaitao's avatar qinhaitao

fix: 🐛 bug

parent 200a5129
......@@ -30,8 +30,8 @@ export default class AwardsController {
* 领取实物
*/
@checkParams(['activityId', 'id', 'name', 'phone', 'province', 'city', 'area', 'addressDetail', 'streetName'])
@preCheck([checkPrizeExpired, checkValidObjectPrize])
@services([CommonAwardsService])
@preCheck([checkPrizeExpired, checkValidObjectPrize])
async receiveObjectPrize(
context: IContext<IParams>,
{ activityInfo, userInfo }: IControllerInfos,
......@@ -48,8 +48,8 @@ export default class AwardsController {
*/
@checkParams(['activityId', 'id'])
@registeInfos(['session'])
@preCheck([checkPrizeExpired, checkValidEnamePrize])
@services([CommonAwardsService])
@preCheck([checkPrizeExpired, checkValidEnamePrize])
async receiveEnamePrize(
context: IContext<IParams>,
{ activityInfo, userInfo, session }: IControllerInfos,
......@@ -70,8 +70,8 @@ export default class AwardsController {
*/
@checkParams(['activityId', 'prizeDataType'])
@registeInfos(['session'])
@preCheck([checkActivityTime])
@services([CommonAwardsService])
@preCheck([checkActivityTime])
async drawLotteryPrize(
context: IContext<IParams>,
{ activityInfo, userInfo, session }: IControllerInfos,
......
......@@ -30,8 +30,8 @@ export default class ShareController {
*/
@checkParams(['activityId', 'inviteId'])
@registeInfos(['vipInfo'])
@preCheck([checkActivityTime, checkInviteId, checkNewVip, checkHelpRecord])
@services([CommonTaskService, CommonStatService])
@preCheck([checkActivityTime, checkInviteId, checkNewVip, checkHelpRecord])
async doHelp(
context: IContext<IParams>,
{ activityInfo, userInfo, vipInfo }: IControllerInfos,
......
/** @format */
import { services, checkParams, registeInfos, preCheck, preUpdate } from '../../decorator/common'
import { checkActivityTime, checkTaskLimit, checkExchangeCreditsTask, checkRemainTimes } from '../../utils/common/check'
import {
checkActivityTime,
checkTaskLimit,
checkExchangeCreditsTask,
checkUserInfo,
checkRemainTimes
} from '../../utils/common/check'
import { updateVip, updateSignTask, updateOrderGoods } from '../../utils/common/update'
import customUtil from '../../utils/custom'
import { resultsModel } from '../../sdk'
......@@ -12,9 +18,9 @@ export default class TaskController {
*/
@checkParams(['activityId'])
@registeInfos(['vipInfo'])
@services([CommonTaskService])
@preCheck([checkActivityTime])
@preUpdate([updateVip, updateSignTask, updateOrderGoods])
@services([CommonTaskService])
async getTaskList(
context: IContext<IParams>,
{ activityInfo, userInfo, vipInfo }: IControllerInfos,
......@@ -30,8 +36,8 @@ export default class TaskController {
*/
@checkParams(['activityId', 'taskType'])
@registeInfos(['session'])
@preCheck([checkActivityTime, checkTaskLimit, checkExchangeCreditsTask])
@services([CommonTaskService])
@preCheck([checkActivityTime, checkTaskLimit, checkExchangeCreditsTask, checkUserInfo()])
async doCompleteTask(
context: IContext<IParams>,
{ activityInfo, userInfo, session }: IControllerInfos,
......@@ -50,8 +56,8 @@ export default class TaskController {
* 领取任务奖励
*/
@checkParams(['activityId', 'taskType', 'rewardsKey'])
@preCheck([checkActivityTime, checkRemainTimes])
@services([CommonTaskService])
@preCheck([checkActivityTime, checkRemainTimes])
async receiveTaskRewards(
context: IContext<IParams>,
{ activityInfo, userInfo }: IControllerInfos,
......
......@@ -25,8 +25,8 @@ export default class Test2Controller {
* 统计数据
*/
@checkParams(['activityId', 'startDay', 'endDay'])
@preUpdate([updateVip, updateSignTask, updateOrderGoods])
@services([CommonStatService])
@preUpdate([updateVip(1, 2), updateSignTask, updateOrderGoods])
async test2getStats(
context: IContext<IParams>,
{ activityInfo, userInfo }: IControllerInfos,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment