|
@@ -13,6 +13,7 @@ class MatchSignService extends CrudService {
|
|
|
this.matchGroupModel = this.ctx.model.Race.MatchGroup;
|
|
|
this.matchProjectModel = this.ctx.model.Race.MatchProject;
|
|
|
this.billModel = this.ctx.model.Race.Bill;
|
|
|
+ this.baseUserModel = this.ctx.model.Base.User;
|
|
|
}
|
|
|
/**
|
|
|
* 检查是否已经有该赛事,该组别,该项目的报名
|
|
@@ -27,6 +28,15 @@ class MatchSignService extends CrudService {
|
|
|
return { filter, update };
|
|
|
}
|
|
|
|
|
|
+ async afterQuery(filter, data) {
|
|
|
+ for (const i of data) {
|
|
|
+ const { user_id } = data;
|
|
|
+ const user = await this.baseUserModel.findById(user_id);
|
|
|
+ if (user) i.user_name = user.name;
|
|
|
+ }
|
|
|
+ return data;
|
|
|
+ }
|
|
|
+
|
|
|
// 退赛
|
|
|
async afterUpdate(filter, body, data) {
|
|
|
const { pay_status } = data;
|