lrf 2 년 전
부모
커밋
77075b34ac
2개의 변경된 파일2개의 추가작업 그리고 2개의 파일을 삭제
  1. 1 1
      app/model/race/payOrder.js
  2. 1 1
      app/service/user.js

+ 1 - 1
app/model/race/payOrder.js

@@ -14,7 +14,7 @@ const payOrder = {
   order_no: { type: String, required: false, zh: '订单号' }, //
   time: { type: String, required: false, zh: '时间' }, //
   desc: { type: String, required: false, zh: '支付说明' }, //
-  status: { type: String, required: false, zh: '支付状态' }, // 0:未支付;1:已支付;-1:支付失败;-3:已退款
+  status: { type: String, required: false, zh: '支付状态', default: '0' }, // 0:未支付;1:已支付;-1:支付失败;-3:已退款
   config: { type: String, required: false, zh: '设置' }, //
 };
 const schema = new Schema(payOrder, { toJSON: { getters: true, virtuals: true } });

+ 1 - 1
app/service/user.js

@@ -59,7 +59,7 @@ class UserService extends CrudService {
   async userToBeJudge({ user_id, parent_id }) {
     assert(user_id, '缺少裁判用户信息');
     assert(parent_id, '缺少赛事创建方信息');
-    const user = await this.baseUserModel.findById(user_id);
+    const user = await this.model.findById(user_id);
     if (!user) throw new BusinessError(ErrorCode.USER_NOT_EXIST, '未找到比赛模块用户信息');
     const { openid } = user;
     const obj = { user_id, parent_id, type: '2', openid };