Kaynağa Gözat

多用户同时查询

周睿 1 yıl önce
ebeveyn
işleme
d0a3313b0a

+ 159 - 0
app_business/lib/generated/base.pb.dart

@@ -339,6 +339,56 @@ class SignInReply extends $pb.GeneratedMessage {
   void clearToken() => clearField(1);
 }
 
+class GetQiNiuUpTokenReply extends $pb.GeneratedMessage {
+  factory GetQiNiuUpTokenReply({
+    $core.String? upToken,
+  }) {
+    final $result = create();
+    if (upToken != null) {
+      $result.upToken = upToken;
+    }
+    return $result;
+  }
+  GetQiNiuUpTokenReply._() : super();
+  factory GetQiNiuUpTokenReply.fromBuffer($core.List<$core.int> i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromBuffer(i, r);
+  factory GetQiNiuUpTokenReply.fromJson($core.String i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromJson(i, r);
+
+  static final $pb.BuilderInfo _i = $pb.BuilderInfo(_omitMessageNames ? '' : 'GetQiNiuUpTokenReply', package: const $pb.PackageName(_omitMessageNames ? '' : 'base.v1'), createEmptyInstance: create)
+    ..aOS(1, _omitFieldNames ? '' : 'upToken', protoName: 'upToken')
+    ..hasRequiredFields = false
+  ;
+
+  @$core.Deprecated(
+  'Using this can add significant overhead to your binary. '
+  'Use [GeneratedMessageGenericExtensions.deepCopy] instead. '
+  'Will be removed in next major version')
+  GetQiNiuUpTokenReply clone() => GetQiNiuUpTokenReply()..mergeFromMessage(this);
+  @$core.Deprecated(
+  'Using this can add significant overhead to your binary. '
+  'Use [GeneratedMessageGenericExtensions.rebuild] instead. '
+  'Will be removed in next major version')
+  GetQiNiuUpTokenReply copyWith(void Function(GetQiNiuUpTokenReply) updates) => super.copyWith((message) => updates(message as GetQiNiuUpTokenReply)) as GetQiNiuUpTokenReply;
+
+  $pb.BuilderInfo get info_ => _i;
+
+  @$core.pragma('dart2js:noInline')
+  static GetQiNiuUpTokenReply create() => GetQiNiuUpTokenReply._();
+  GetQiNiuUpTokenReply createEmptyInstance() => create();
+  static $pb.PbList<GetQiNiuUpTokenReply> createRepeated() => $pb.PbList<GetQiNiuUpTokenReply>();
+  @$core.pragma('dart2js:noInline')
+  static GetQiNiuUpTokenReply getDefault() => _defaultInstance ??= $pb.GeneratedMessage.$_defaultFor<GetQiNiuUpTokenReply>(create);
+  static GetQiNiuUpTokenReply? _defaultInstance;
+
+  @$pb.TagNumber(1)
+  $core.String get upToken => $_getSZ(0);
+  @$pb.TagNumber(1)
+  set upToken($core.String v) { $_setString(0, v); }
+  @$pb.TagNumber(1)
+  $core.bool hasUpToken() => $_has(0);
+  @$pb.TagNumber(1)
+  void clearUpToken() => clearField(1);
+}
+
 class GameArriveControlPoint extends $pb.GeneratedMessage {
   factory GameArriveControlPoint({
     $fixnum.Int64? id,
@@ -1873,6 +1923,57 @@ class ControlPointDisplayCapture extends $pb.GeneratedMessage {
   void clearPrompt() => clearField(1);
 }
 
+/// 文字上传类型
+class ControlPointDisplayString extends $pb.GeneratedMessage {
+  factory ControlPointDisplayString({
+    $core.String? prompt,
+  }) {
+    final $result = create();
+    if (prompt != null) {
+      $result.prompt = prompt;
+    }
+    return $result;
+  }
+  ControlPointDisplayString._() : super();
+  factory ControlPointDisplayString.fromBuffer($core.List<$core.int> i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromBuffer(i, r);
+  factory ControlPointDisplayString.fromJson($core.String i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromJson(i, r);
+
+  static final $pb.BuilderInfo _i = $pb.BuilderInfo(_omitMessageNames ? '' : 'ControlPointDisplayString', package: const $pb.PackageName(_omitMessageNames ? '' : 'base.v1'), createEmptyInstance: create)
+    ..aOS(1, _omitFieldNames ? '' : 'prompt')
+    ..hasRequiredFields = false
+  ;
+
+  @$core.Deprecated(
+  'Using this can add significant overhead to your binary. '
+  'Use [GeneratedMessageGenericExtensions.deepCopy] instead. '
+  'Will be removed in next major version')
+  ControlPointDisplayString clone() => ControlPointDisplayString()..mergeFromMessage(this);
+  @$core.Deprecated(
+  'Using this can add significant overhead to your binary. '
+  'Use [GeneratedMessageGenericExtensions.rebuild] instead. '
+  'Will be removed in next major version')
+  ControlPointDisplayString copyWith(void Function(ControlPointDisplayString) updates) => super.copyWith((message) => updates(message as ControlPointDisplayString)) as ControlPointDisplayString;
+
+  $pb.BuilderInfo get info_ => _i;
+
+  @$core.pragma('dart2js:noInline')
+  static ControlPointDisplayString create() => ControlPointDisplayString._();
+  ControlPointDisplayString createEmptyInstance() => create();
+  static $pb.PbList<ControlPointDisplayString> createRepeated() => $pb.PbList<ControlPointDisplayString>();
+  @$core.pragma('dart2js:noInline')
+  static ControlPointDisplayString getDefault() => _defaultInstance ??= $pb.GeneratedMessage.$_defaultFor<ControlPointDisplayString>(create);
+  static ControlPointDisplayString? _defaultInstance;
+
+  @$pb.TagNumber(1)
+  $core.String get prompt => $_getSZ(0);
+  @$pb.TagNumber(1)
+  set prompt($core.String v) { $_setString(0, v); }
+  @$pb.TagNumber(1)
+  $core.bool hasPrompt() => $_has(0);
+  @$pb.TagNumber(1)
+  void clearPrompt() => clearField(1);
+}
+
 class ControlPoint extends $pb.GeneratedMessage {
   factory ControlPoint({
     $fixnum.Int64? id,
@@ -4593,6 +4694,64 @@ class ToUserInActionBasicQueryRequest extends $pb.GeneratedMessage {
   void clearUserId() => clearField(2);
 }
 
+class ToUserInActionBasicQueryV2Request extends $pb.GeneratedMessage {
+  factory ToUserInActionBasicQueryV2Request({
+    $core.int? actId,
+    $core.Iterable<$core.int>? userIdList,
+  }) {
+    final $result = create();
+    if (actId != null) {
+      $result.actId = actId;
+    }
+    if (userIdList != null) {
+      $result.userIdList.addAll(userIdList);
+    }
+    return $result;
+  }
+  ToUserInActionBasicQueryV2Request._() : super();
+  factory ToUserInActionBasicQueryV2Request.fromBuffer($core.List<$core.int> i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromBuffer(i, r);
+  factory ToUserInActionBasicQueryV2Request.fromJson($core.String i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromJson(i, r);
+
+  static final $pb.BuilderInfo _i = $pb.BuilderInfo(_omitMessageNames ? '' : 'ToUserInActionBasicQueryV2Request', package: const $pb.PackageName(_omitMessageNames ? '' : 'base.v1'), createEmptyInstance: create)
+    ..a<$core.int>(1, _omitFieldNames ? '' : 'ActId', $pb.PbFieldType.O3, protoName: 'ActId')
+    ..p<$core.int>(2, _omitFieldNames ? '' : 'UserIdList', $pb.PbFieldType.K3, protoName: 'UserIdList')
+    ..hasRequiredFields = false
+  ;
+
+  @$core.Deprecated(
+  'Using this can add significant overhead to your binary. '
+  'Use [GeneratedMessageGenericExtensions.deepCopy] instead. '
+  'Will be removed in next major version')
+  ToUserInActionBasicQueryV2Request clone() => ToUserInActionBasicQueryV2Request()..mergeFromMessage(this);
+  @$core.Deprecated(
+  'Using this can add significant overhead to your binary. '
+  'Use [GeneratedMessageGenericExtensions.rebuild] instead. '
+  'Will be removed in next major version')
+  ToUserInActionBasicQueryV2Request copyWith(void Function(ToUserInActionBasicQueryV2Request) updates) => super.copyWith((message) => updates(message as ToUserInActionBasicQueryV2Request)) as ToUserInActionBasicQueryV2Request;
+
+  $pb.BuilderInfo get info_ => _i;
+
+  @$core.pragma('dart2js:noInline')
+  static ToUserInActionBasicQueryV2Request create() => ToUserInActionBasicQueryV2Request._();
+  ToUserInActionBasicQueryV2Request createEmptyInstance() => create();
+  static $pb.PbList<ToUserInActionBasicQueryV2Request> createRepeated() => $pb.PbList<ToUserInActionBasicQueryV2Request>();
+  @$core.pragma('dart2js:noInline')
+  static ToUserInActionBasicQueryV2Request getDefault() => _defaultInstance ??= $pb.GeneratedMessage.$_defaultFor<ToUserInActionBasicQueryV2Request>(create);
+  static ToUserInActionBasicQueryV2Request? _defaultInstance;
+
+  @$pb.TagNumber(1)
+  $core.int get actId => $_getIZ(0);
+  @$pb.TagNumber(1)
+  set actId($core.int v) { $_setSignedInt32(0, v); }
+  @$pb.TagNumber(1)
+  $core.bool hasActId() => $_has(0);
+  @$pb.TagNumber(1)
+  void clearActId() => clearField(1);
+
+  @$pb.TagNumber(2)
+  $core.List<$core.int> get userIdList => $_getList(1);
+}
+
 class ToGetBinaryByMd5Request extends $pb.GeneratedMessage {
   factory ToGetBinaryByMd5Request({
     $core.List<$core.int>? md5,

+ 38 - 0
app_business/lib/generated/base.pbjson.dart

@@ -324,6 +324,18 @@ const SignInReply$json = {
 final $typed_data.Uint8List signInReplyDescriptor = $convert.base64Decode(
     'CgtTaWduSW5SZXBseRIUCgV0b2tlbhgBIAEoCVIFdG9rZW4=');
 
+@$core.Deprecated('Use getQiNiuUpTokenReplyDescriptor instead')
+const GetQiNiuUpTokenReply$json = {
+  '1': 'GetQiNiuUpTokenReply',
+  '2': [
+    {'1': 'upToken', '3': 1, '4': 1, '5': 9, '10': 'upToken'},
+  ],
+};
+
+/// Descriptor for `GetQiNiuUpTokenReply`. Decode as a `google.protobuf.DescriptorProto`.
+final $typed_data.Uint8List getQiNiuUpTokenReplyDescriptor = $convert.base64Decode(
+    'ChRHZXRRaU5pdVVwVG9rZW5SZXBseRIYCgd1cFRva2VuGAEgASgJUgd1cFRva2Vu');
+
 @$core.Deprecated('Use gameArriveControlPointDescriptor instead')
 const GameArriveControlPoint$json = {
   '1': 'GameArriveControlPoint',
@@ -641,6 +653,18 @@ const ControlPointDisplayCapture$json = {
 final $typed_data.Uint8List controlPointDisplayCaptureDescriptor = $convert.base64Decode(
     'ChpDb250cm9sUG9pbnREaXNwbGF5Q2FwdHVyZRIWCgZwcm9tcHQYASABKAlSBnByb21wdA==');
 
+@$core.Deprecated('Use controlPointDisplayStringDescriptor instead')
+const ControlPointDisplayString$json = {
+  '1': 'ControlPointDisplayString',
+  '2': [
+    {'1': 'prompt', '3': 1, '4': 1, '5': 9, '10': 'prompt'},
+  ],
+};
+
+/// Descriptor for `ControlPointDisplayString`. Decode as a `google.protobuf.DescriptorProto`.
+final $typed_data.Uint8List controlPointDisplayStringDescriptor = $convert.base64Decode(
+    'ChlDb250cm9sUG9pbnREaXNwbGF5U3RyaW5nEhYKBnByb21wdBgBIAEoCVIGcHJvbXB0');
+
 @$core.Deprecated('Use controlPointDescriptor instead')
 const ControlPoint$json = {
   '1': 'ControlPoint',
@@ -1110,6 +1134,20 @@ final $typed_data.Uint8List toUserInActionBasicQueryRequestDescriptor = $convert
     'Ch9Ub1VzZXJJbkFjdGlvbkJhc2ljUXVlcnlSZXF1ZXN0EhQKBUFjdElkGAEgASgFUgVBY3RJZB'
     'IWCgZVc2VySWQYAiABKAVSBlVzZXJJZA==');
 
+@$core.Deprecated('Use toUserInActionBasicQueryV2RequestDescriptor instead')
+const ToUserInActionBasicQueryV2Request$json = {
+  '1': 'ToUserInActionBasicQueryV2Request',
+  '2': [
+    {'1': 'ActId', '3': 1, '4': 1, '5': 5, '10': 'ActId'},
+    {'1': 'UserIdList', '3': 2, '4': 3, '5': 5, '10': 'UserIdList'},
+  ],
+};
+
+/// Descriptor for `ToUserInActionBasicQueryV2Request`. Decode as a `google.protobuf.DescriptorProto`.
+final $typed_data.Uint8List toUserInActionBasicQueryV2RequestDescriptor = $convert.base64Decode(
+    'CiFUb1VzZXJJbkFjdGlvbkJhc2ljUXVlcnlWMlJlcXVlc3QSFAoFQWN0SWQYASABKAVSBUFjdE'
+    'lkEh4KClVzZXJJZExpc3QYAiADKAVSClVzZXJJZExpc3Q=');
+
 @$core.Deprecated('Use toGetBinaryByMd5RequestDescriptor instead')
 const ToGetBinaryByMd5Request$json = {
   '1': 'ToGetBinaryByMd5Request',

+ 44 - 0
app_business/lib/generated/track_offical.pb.dart

@@ -18,6 +18,50 @@ import 'base.pb.dart' as $0;
 import 'base.pbenum.dart' as $0;
 import 'google/protobuf/timestamp.pb.dart' as $2;
 
+class ToUserInActionBasicQueryV2Relly extends $pb.GeneratedMessage {
+  factory ToUserInActionBasicQueryV2Relly({
+    $core.Iterable<$0.ToUserInActionBasicInfo>? list,
+  }) {
+    final $result = create();
+    if (list != null) {
+      $result.list.addAll(list);
+    }
+    return $result;
+  }
+  ToUserInActionBasicQueryV2Relly._() : super();
+  factory ToUserInActionBasicQueryV2Relly.fromBuffer($core.List<$core.int> i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromBuffer(i, r);
+  factory ToUserInActionBasicQueryV2Relly.fromJson($core.String i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromJson(i, r);
+
+  static final $pb.BuilderInfo _i = $pb.BuilderInfo(_omitMessageNames ? '' : 'ToUserInActionBasicQueryV2Relly', package: const $pb.PackageName(_omitMessageNames ? '' : 'to.v1'), createEmptyInstance: create)
+    ..pc<$0.ToUserInActionBasicInfo>(1, _omitFieldNames ? '' : 'list', $pb.PbFieldType.PM, subBuilder: $0.ToUserInActionBasicInfo.create)
+    ..hasRequiredFields = false
+  ;
+
+  @$core.Deprecated(
+  'Using this can add significant overhead to your binary. '
+  'Use [GeneratedMessageGenericExtensions.deepCopy] instead. '
+  'Will be removed in next major version')
+  ToUserInActionBasicQueryV2Relly clone() => ToUserInActionBasicQueryV2Relly()..mergeFromMessage(this);
+  @$core.Deprecated(
+  'Using this can add significant overhead to your binary. '
+  'Use [GeneratedMessageGenericExtensions.rebuild] instead. '
+  'Will be removed in next major version')
+  ToUserInActionBasicQueryV2Relly copyWith(void Function(ToUserInActionBasicQueryV2Relly) updates) => super.copyWith((message) => updates(message as ToUserInActionBasicQueryV2Relly)) as ToUserInActionBasicQueryV2Relly;
+
+  $pb.BuilderInfo get info_ => _i;
+
+  @$core.pragma('dart2js:noInline')
+  static ToUserInActionBasicQueryV2Relly create() => ToUserInActionBasicQueryV2Relly._();
+  ToUserInActionBasicQueryV2Relly createEmptyInstance() => create();
+  static $pb.PbList<ToUserInActionBasicQueryV2Relly> createRepeated() => $pb.PbList<ToUserInActionBasicQueryV2Relly>();
+  @$core.pragma('dart2js:noInline')
+  static ToUserInActionBasicQueryV2Relly getDefault() => _defaultInstance ??= $pb.GeneratedMessage.$_defaultFor<ToUserInActionBasicQueryV2Relly>(create);
+  static ToUserInActionBasicQueryV2Relly? _defaultInstance;
+
+  @$pb.TagNumber(1)
+  $core.List<$0.ToUserInActionBasicInfo> get list => $_getList(0);
+}
+
 class ToMatchRegusterIsAllowChackEditRequest extends $pb.GeneratedMessage {
   factory ToMatchRegusterIsAllowChackEditRequest({
     $core.int? id,

+ 20 - 0
app_business/lib/generated/track_offical.pbgrpc.dart

@@ -82,6 +82,10 @@ class ApiToClient extends $grpc.Client {
       '/to.v1.ApiTo/ToUserInActionBasicQuery',
       ($0.ToUserInActionBasicQueryRequest value) => value.writeToBuffer(),
       ($core.List<$core.int> value) => $0.ToUserInActionBasicInfo.fromBuffer(value));
+  static final _$toUserInActionBasicQueryV2 = $grpc.ClientMethod<$0.ToUserInActionBasicQueryV2Request, $1.ToUserInActionBasicQueryV2Relly>(
+      '/to.v1.ApiTo/ToUserInActionBasicQueryV2',
+      ($0.ToUserInActionBasicQueryV2Request value) => value.writeToBuffer(),
+      ($core.List<$core.int> value) => $1.ToUserInActionBasicQueryV2Relly.fromBuffer(value));
   static final _$toHistoryUserListQuery = $grpc.ClientMethod<$0.IdRequest, $0.ToHisUserListQueryReply>(
       '/to.v1.ApiTo/ToHistoryUserListQuery',
       ($0.IdRequest value) => value.writeToBuffer(),
@@ -237,6 +241,10 @@ class ApiToClient extends $grpc.Client {
     return $createUnaryCall(_$toUserInActionBasicQuery, request, options: options);
   }
 
+  $grpc.ResponseFuture<$1.ToUserInActionBasicQueryV2Relly> toUserInActionBasicQueryV2($0.ToUserInActionBasicQueryV2Request request, {$grpc.CallOptions? options}) {
+    return $createUnaryCall(_$toUserInActionBasicQueryV2, request, options: options);
+  }
+
   $grpc.ResponseFuture<$0.ToHisUserListQueryReply> toHistoryUserListQuery($0.IdRequest request, {$grpc.CallOptions? options}) {
     return $createUnaryCall(_$toHistoryUserListQuery, request, options: options);
   }
@@ -436,6 +444,13 @@ abstract class ApiToServiceBase extends $grpc.Service {
         false,
         ($core.List<$core.int> value) => $0.ToUserInActionBasicQueryRequest.fromBuffer(value),
         ($0.ToUserInActionBasicInfo value) => value.writeToBuffer()));
+    $addMethod($grpc.ServiceMethod<$0.ToUserInActionBasicQueryV2Request, $1.ToUserInActionBasicQueryV2Relly>(
+        'ToUserInActionBasicQueryV2',
+        toUserInActionBasicQueryV2_Pre,
+        false,
+        false,
+        ($core.List<$core.int> value) => $0.ToUserInActionBasicQueryV2Request.fromBuffer(value),
+        ($1.ToUserInActionBasicQueryV2Relly value) => value.writeToBuffer()));
     $addMethod($grpc.ServiceMethod<$0.IdRequest, $0.ToHisUserListQueryReply>(
         'ToHistoryUserListQuery',
         toHistoryUserListQuery_Pre,
@@ -652,6 +667,10 @@ abstract class ApiToServiceBase extends $grpc.Service {
     return toUserInActionBasicQuery(call, await request);
   }
 
+  $async.Future<$1.ToUserInActionBasicQueryV2Relly> toUserInActionBasicQueryV2_Pre($grpc.ServiceCall call, $async.Future<$0.ToUserInActionBasicQueryV2Request> request) async {
+    return toUserInActionBasicQueryV2(call, await request);
+  }
+
   $async.Future<$0.ToHisUserListQueryReply> toHistoryUserListQuery_Pre($grpc.ServiceCall call, $async.Future<$0.IdRequest> request) async {
     return toHistoryUserListQuery(call, await request);
   }
@@ -755,6 +774,7 @@ abstract class ApiToServiceBase extends $grpc.Service {
   $async.Future<$0.ToUserDetailQueryReplyV2> toUserDetailQueryV2($grpc.ServiceCall call, $0.ToUserDetailQueryRequestV2 request);
   $async.Future<$0.ToActionBasicInfo> toActionBasicQuery($grpc.ServiceCall call, $0.IdRequest request);
   $async.Future<$0.ToUserInActionBasicInfo> toUserInActionBasicQuery($grpc.ServiceCall call, $0.ToUserInActionBasicQueryRequest request);
+  $async.Future<$1.ToUserInActionBasicQueryV2Relly> toUserInActionBasicQueryV2($grpc.ServiceCall call, $0.ToUserInActionBasicQueryV2Request request);
   $async.Future<$0.ToHisUserListQueryReply> toHistoryUserListQuery($grpc.ServiceCall call, $0.IdRequest request);
   $async.Future<$0.GameDetailV2Reply> toHistoryGameDetail($grpc.ServiceCall call, $0.IdRequest request);
   $async.Future<$0.ToGameRankingReply> toGameRanking($grpc.ServiceCall call, $0.ToGameRankingRequest request);

+ 13 - 0
app_business/lib/generated/track_offical.pbjson.dart

@@ -13,6 +13,19 @@ import 'dart:convert' as $convert;
 import 'dart:core' as $core;
 import 'dart:typed_data' as $typed_data;
 
+@$core.Deprecated('Use toUserInActionBasicQueryV2RellyDescriptor instead')
+const ToUserInActionBasicQueryV2Relly$json = {
+  '1': 'ToUserInActionBasicQueryV2Relly',
+  '2': [
+    {'1': 'list', '3': 1, '4': 3, '5': 11, '6': '.base.v1.ToUserInActionBasicInfo', '10': 'list'},
+  ],
+};
+
+/// Descriptor for `ToUserInActionBasicQueryV2Relly`. Decode as a `google.protobuf.DescriptorProto`.
+final $typed_data.Uint8List toUserInActionBasicQueryV2RellyDescriptor = $convert.base64Decode(
+    'Ch9Ub1VzZXJJbkFjdGlvbkJhc2ljUXVlcnlWMlJlbGx5EjQKBGxpc3QYASADKAsyIC5iYXNlLn'
+    'YxLlRvVXNlckluQWN0aW9uQmFzaWNJbmZvUgRsaXN0');
+
 @$core.Deprecated('Use toMatchRegusterIsAllowChackEditRequestDescriptor instead')
 const ToMatchRegusterIsAllowChackEditRequest$json = {
   '1': 'ToMatchRegusterIsAllowChackEditRequest',

+ 19 - 17
app_business/lib/service/map_watch.dart

@@ -78,24 +78,26 @@ class MapWatchImpl extends MapWatch {
   }
 
   @override
-  Future<PlayerInfoExt> getPlayerInfoExt(int eventId, int userId) async {
-    final r = await _api.stub
-        .toUserInActionBasicQuery(pb.ToUserInActionBasicQueryRequest()
+  Future<Iterable<PlayerInfoExt>> getPlayerInfoExt(
+      int eventId, Iterable<int> userIdList) async {
+    final res = await _api.stub
+        .toUserInActionBasicQueryV2(pb.ToUserInActionBasicQueryV2Request()
           ..actId = eventId
-          ..userId = userId);
-
-    final player = PlayerInfoExt()
-      ..name = r.baseInfo.name
-      ..routeName = r.courseBaseInfo.courseName
-      ..cpListWant = r.courseBaseInfo.controlPointSortedList
-          .map((e) => e.toModel())
-          .toList();
-
-    for (var (i, cp) in player.cpListWant.indexed) {
-      cp.sn = i.toString();
-    }
-
-    return player;
+          ..userIdList.addAll(userIdList.toList()));
+
+    return res.list.map((r) {
+      final player = PlayerInfoExt()
+        ..name = r.baseInfo.name
+        ..routeName = r.courseBaseInfo.courseName
+        ..cpListWant = r.courseBaseInfo.controlPointSortedList
+            .map((e) => e.toModel())
+            .toList();
+
+      for (var (i, cp) in player.cpListWant.indexed) {
+        cp.sn = i.toString();
+      }
+      return player;
+    });
   }
 }
 

+ 1 - 1
app_business/pubspec.yaml

@@ -16,7 +16,7 @@ publish_to: 'none' # Remove this line if you wish to publish to pub.dev
 # https://developer.apple.com/library/archive/documentation/General/Reference/InfoPlistKeyReference/Articles/CoreFoundationKeys.html
 # In Windows, build-name is used as the major, minor, and patch parts
 # of the product and file versions while build-number is used as the build suffix.
-version: 1.2.1+2
+version: 1.2.2+2
 
 environment:
   sdk: '>=3.1.5 <4.0.0'

+ 39 - 7
libs/track_common/lib/service/map_watch.dart

@@ -1,3 +1,5 @@
+import 'dart:collection';
+
 import 'package:common_pub/logger.dart';
 import 'package:common_pub/service/controller.dart';
 import 'package:common_pub/ui/map_view/map_view.dart';
@@ -36,6 +38,7 @@ class PlayerInfo extends AppGameState {
 }
 
 class PlayerInfoExt {
+  int id = 0;
   var name = '';
   var routeName = '';
   var cpListWant = <ControlPoint>[];
@@ -188,36 +191,64 @@ abstract class MapWatch extends PlugController {
     eventList.value = newList;
   }
 
+  Future<HashMap<int, PlayerInfoExt>> getPlayerInfoExtMap(
+      int eventId, Iterable<int> userIdList) async {
+    final playerExtList = await getPlayerInfoExt(eventId, userIdList);
+    final playerExtMap = HashMap<int, PlayerInfoExt>();
+    for (final one in playerExtList) {
+      playerExtMap[one.id] = one;
+    }
+    return playerExtMap;
+  }
+
   Future<EventOnMap> initEvent(EventInfo info) async {
     final ext = await getEventInfoExt(info.id);
     final one = EventOnMap()
       ..info = info
       ..ext = ext;
+    final playerIdList = info.players.map((e) => e.id);
+    final playerExtMap = await getPlayerInfoExtMap(info.id, playerIdList);
+
     for (var p in info.players) {
-      one.userList.add(await initPlayer(info, p));
+      one.userList.add(await initPlayer(info, p, playerExtMap));
     }
     return one;
   }
 
-  Future<PlayerOnMap> initPlayer(EventInfo event, PlayerInfo playerInfo) async {
+  Future<PlayerOnMap> initPlayer(EventInfo event, PlayerInfo playerInfo,
+      HashMap<int, PlayerInfoExt> playerExtMap) async {
     final userId = playerInfo.id;
-    final ext = await getPlayerInfoExt(event.id, userId);
+
     final player = PlayerOnMap()..info = playerInfo;
-    player.ext = ext;
+    if (playerExtMap != null) {
+      player.ext = playerExtMap[userId]!;
+    } else {
+      player.ext = (await getPlayerInfoExt(event.id, [userId])).first;
+    }
     return player;
   }
 
   Future<void> updateEvent(EventOnMap old, EventInfo newOne) async {
     final newUserList = <PlayerOnMap>[];
-
     final ext = await getEventInfoExt(old.id);
+    final needUserIdList = <int>[];
+
+    for (final nUser in newOne.players) {
+      final oUser = old.getUserById(nUser.id);
+      if (oUser == null) {
+        needUserIdList.add(nUser.id);
+      }
+    }
+
+    final playerExtMap = await getPlayerInfoExtMap(old.id, needUserIdList);
+
     for (final nUser in newOne.players) {
       late PlayerOnMap user;
       final oUser = old.getUserById(nUser.id);
       if (oUser != null) {
         user = await updatePlayer(oUser, nUser);
       } else {
-        user = await initPlayer(old.info, nUser);
+        user = await initPlayer(old.info, nUser, playerExtMap);
       }
       await playerUpdateMap(user);
       newUserList.add(user);
@@ -279,5 +310,6 @@ abstract class MapWatch extends PlugController {
   Future<EventInfoExt> getEventInfoExt(int id);
 
   @protected
-  Future<PlayerInfoExt> getPlayerInfoExt(int eventId, int userId);
+  Future<Iterable<PlayerInfoExt>> getPlayerInfoExt(
+      int eventId, Iterable<int> userIdList);
 }

+ 1 - 1
protos/app_api

@@ -1 +1 @@
-Subproject commit 1da9b48c3dcae0e0ff861dd641708a2d55c950e8
+Subproject commit e4c60d29b58e5cd4ee0b978025c2e056b263431f