|
@@ -8,6 +8,7 @@ import { BaseController } from '../../frame/BaseController';
|
|
|
import { MatchRegistrationService } from '../../service/match/matchRegistration.service';
|
|
|
import { UserService } from '../../service/system/user.service';
|
|
|
import * as bcrypt from 'bcryptjs';
|
|
|
+import dayjs = require('dayjs');
|
|
|
const namePrefix = '创新大赛-赛事报名';
|
|
|
@ApiTags(['创新大赛-赛事报名'])
|
|
|
@Controller('/matchReg', { tagName: namePrefix })
|
|
@@ -70,7 +71,7 @@ export class MatchRegistrationController implements BaseController {
|
|
|
// 制作项目编号
|
|
|
const { total: matchRegTotal = 0 } = await this.service.query({ match_id: get(data, 'match_id') })
|
|
|
const no = `${get(data, 'match_id')}-${get(regData, 'user_id')}-${matchRegTotal + 1}`
|
|
|
- regData = { ...regData, no }
|
|
|
+ regData = { ...regData, no, time: dayjs().format('YYYY-MM-DD HH:mm:ss') }
|
|
|
const result = await this.service.create(regData);
|
|
|
return result;
|
|
|
}
|