周睿 1 рік тому
батько
коміт
072940fa6d

+ 168 - 2
app_business/lib/generated/track_offical.pb.dart

@@ -17,6 +17,144 @@ import 'package:protobuf/protobuf.dart' as $pb;
 import 'base.pb.dart' as $0;
 import 'google/protobuf/timestamp.pb.dart' as $2;
 
+class ToMatchRegusterEditRequest extends $pb.GeneratedMessage {
+  factory ToMatchRegusterEditRequest({
+    $core.int? id,
+    $core.String? regName,
+    $2.Timestamp? startAt,
+    $2.Timestamp? stopAt,
+    $core.int? actId,
+    $core.bool? isQueryPwd,
+    $core.String? queryPasswd,
+  }) {
+    final $result = create();
+    if (id != null) {
+      $result.id = id;
+    }
+    if (regName != null) {
+      $result.regName = regName;
+    }
+    if (startAt != null) {
+      $result.startAt = startAt;
+    }
+    if (stopAt != null) {
+      $result.stopAt = stopAt;
+    }
+    if (actId != null) {
+      $result.actId = actId;
+    }
+    if (isQueryPwd != null) {
+      $result.isQueryPwd = isQueryPwd;
+    }
+    if (queryPasswd != null) {
+      $result.queryPasswd = queryPasswd;
+    }
+    return $result;
+  }
+  ToMatchRegusterEditRequest._() : super();
+  factory ToMatchRegusterEditRequest.fromBuffer($core.List<$core.int> i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromBuffer(i, r);
+  factory ToMatchRegusterEditRequest.fromJson($core.String i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromJson(i, r);
+
+  static final $pb.BuilderInfo _i = $pb.BuilderInfo(_omitMessageNames ? '' : 'ToMatchRegusterEditRequest', package: const $pb.PackageName(_omitMessageNames ? '' : 'to.v1'), createEmptyInstance: create)
+    ..a<$core.int>(1, _omitFieldNames ? '' : 'id', $pb.PbFieldType.O3)
+    ..aOS(2, _omitFieldNames ? '' : 'regName', protoName: 'regName')
+    ..aOM<$2.Timestamp>(3, _omitFieldNames ? '' : 'startAt', subBuilder: $2.Timestamp.create)
+    ..aOM<$2.Timestamp>(4, _omitFieldNames ? '' : 'stopAt', subBuilder: $2.Timestamp.create)
+    ..a<$core.int>(5, _omitFieldNames ? '' : 'actId', $pb.PbFieldType.O3, protoName: 'actId')
+    ..aOB(6, _omitFieldNames ? '' : 'isQueryPwd', protoName: 'isQueryPwd')
+    ..aOS(7, _omitFieldNames ? '' : 'queryPasswd', protoName: 'queryPasswd')
+    ..hasRequiredFields = false
+  ;
+
+  @$core.Deprecated(
+  'Using this can add significant overhead to your binary. '
+  'Use [GeneratedMessageGenericExtensions.deepCopy] instead. '
+  'Will be removed in next major version')
+  ToMatchRegusterEditRequest clone() => ToMatchRegusterEditRequest()..mergeFromMessage(this);
+  @$core.Deprecated(
+  'Using this can add significant overhead to your binary. '
+  'Use [GeneratedMessageGenericExtensions.rebuild] instead. '
+  'Will be removed in next major version')
+  ToMatchRegusterEditRequest copyWith(void Function(ToMatchRegusterEditRequest) updates) => super.copyWith((message) => updates(message as ToMatchRegusterEditRequest)) as ToMatchRegusterEditRequest;
+
+  $pb.BuilderInfo get info_ => _i;
+
+  @$core.pragma('dart2js:noInline')
+  static ToMatchRegusterEditRequest create() => ToMatchRegusterEditRequest._();
+  ToMatchRegusterEditRequest createEmptyInstance() => create();
+  static $pb.PbList<ToMatchRegusterEditRequest> createRepeated() => $pb.PbList<ToMatchRegusterEditRequest>();
+  @$core.pragma('dart2js:noInline')
+  static ToMatchRegusterEditRequest getDefault() => _defaultInstance ??= $pb.GeneratedMessage.$_defaultFor<ToMatchRegusterEditRequest>(create);
+  static ToMatchRegusterEditRequest? _defaultInstance;
+
+  @$pb.TagNumber(1)
+  $core.int get id => $_getIZ(0);
+  @$pb.TagNumber(1)
+  set id($core.int v) { $_setSignedInt32(0, v); }
+  @$pb.TagNumber(1)
+  $core.bool hasId() => $_has(0);
+  @$pb.TagNumber(1)
+  void clearId() => clearField(1);
+
+  @$pb.TagNumber(2)
+  $core.String get regName => $_getSZ(1);
+  @$pb.TagNumber(2)
+  set regName($core.String v) { $_setString(1, v); }
+  @$pb.TagNumber(2)
+  $core.bool hasRegName() => $_has(1);
+  @$pb.TagNumber(2)
+  void clearRegName() => clearField(2);
+
+  @$pb.TagNumber(3)
+  $2.Timestamp get startAt => $_getN(2);
+  @$pb.TagNumber(3)
+  set startAt($2.Timestamp v) { setField(3, v); }
+  @$pb.TagNumber(3)
+  $core.bool hasStartAt() => $_has(2);
+  @$pb.TagNumber(3)
+  void clearStartAt() => clearField(3);
+  @$pb.TagNumber(3)
+  $2.Timestamp ensureStartAt() => $_ensure(2);
+
+  @$pb.TagNumber(4)
+  $2.Timestamp get stopAt => $_getN(3);
+  @$pb.TagNumber(4)
+  set stopAt($2.Timestamp v) { setField(4, v); }
+  @$pb.TagNumber(4)
+  $core.bool hasStopAt() => $_has(3);
+  @$pb.TagNumber(4)
+  void clearStopAt() => clearField(4);
+  @$pb.TagNumber(4)
+  $2.Timestamp ensureStopAt() => $_ensure(3);
+
+  @$pb.TagNumber(5)
+  $core.int get actId => $_getIZ(4);
+  @$pb.TagNumber(5)
+  set actId($core.int v) { $_setSignedInt32(4, v); }
+  @$pb.TagNumber(5)
+  $core.bool hasActId() => $_has(4);
+  @$pb.TagNumber(5)
+  void clearActId() => clearField(5);
+
+  @$pb.TagNumber(6)
+  $core.bool get isQueryPwd => $_getBF(5);
+  @$pb.TagNumber(6)
+  set isQueryPwd($core.bool v) { $_setBool(5, v); }
+  @$pb.TagNumber(6)
+  $core.bool hasIsQueryPwd() => $_has(5);
+  @$pb.TagNumber(6)
+  void clearIsQueryPwd() => clearField(6);
+
+  @$pb.TagNumber(7)
+  $core.String get queryPasswd => $_getSZ(6);
+  @$pb.TagNumber(7)
+  set queryPasswd($core.String v) { $_setString(6, v); }
+  @$pb.TagNumber(7)
+  $core.bool hasQueryPasswd() => $_has(6);
+  @$pb.TagNumber(7)
+  void clearQueryPasswd() => clearField(7);
+}
+
 class ToActivityListReply extends $pb.GeneratedMessage {
   factory ToActivityListReply({
     $core.Iterable<$0.ToActionBasicInfo>? list,
@@ -176,6 +314,7 @@ class MatchRegusterInfo extends $pb.GeneratedMessage {
     $core.int? totalUserNum,
     $core.String? qrCode,
     $core.bool? isAllowEdit,
+    $core.bool? isAllowDel,
     $core.Iterable<ToChackInsInfo>? userList,
   }) {
     final $result = create();
@@ -194,6 +333,9 @@ class MatchRegusterInfo extends $pb.GeneratedMessage {
     if (isAllowEdit != null) {
       $result.isAllowEdit = isAllowEdit;
     }
+    if (isAllowDel != null) {
+      $result.isAllowDel = isAllowDel;
+    }
     if (userList != null) {
       $result.userList.addAll(userList);
     }
@@ -209,7 +351,8 @@ class MatchRegusterInfo extends $pb.GeneratedMessage {
     ..a<$core.int>(3, _omitFieldNames ? '' : 'totalUserNum', $pb.PbFieldType.O3, protoName: 'totalUserNum')
     ..aOS(4, _omitFieldNames ? '' : 'qrCode', protoName: 'qrCode')
     ..aOB(5, _omitFieldNames ? '' : 'isAllowEdit', protoName: 'isAllowEdit')
-    ..pc<ToChackInsInfo>(6, _omitFieldNames ? '' : 'userList', $pb.PbFieldType.PM, protoName: 'userList', subBuilder: ToChackInsInfo.create)
+    ..aOB(6, _omitFieldNames ? '' : 'isAllowDel', protoName: 'isAllowDel')
+    ..pc<ToChackInsInfo>(7, _omitFieldNames ? '' : 'userList', $pb.PbFieldType.PM, protoName: 'userList', subBuilder: ToChackInsInfo.create)
     ..hasRequiredFields = false
   ;
 
@@ -280,7 +423,16 @@ class MatchRegusterInfo extends $pb.GeneratedMessage {
   void clearIsAllowEdit() => clearField(5);
 
   @$pb.TagNumber(6)
-  $core.List<ToChackInsInfo> get userList => $_getList(5);
+  $core.bool get isAllowDel => $_getBF(5);
+  @$pb.TagNumber(6)
+  set isAllowDel($core.bool v) { $_setBool(5, v); }
+  @$pb.TagNumber(6)
+  $core.bool hasIsAllowDel() => $_has(5);
+  @$pb.TagNumber(6)
+  void clearIsAllowDel() => clearField(6);
+
+  @$pb.TagNumber(7)
+  $core.List<ToChackInsInfo> get userList => $_getList(6);
 }
 
 class ToChackInsInfo extends $pb.GeneratedMessage {
@@ -290,6 +442,7 @@ class ToChackInsInfo extends $pb.GeneratedMessage {
     $core.String? nickname,
     $core.String? phone,
     $core.String? chackInsTime,
+    $core.bool? isAllowDel,
   }) {
     final $result = create();
     if (marId != null) {
@@ -307,6 +460,9 @@ class ToChackInsInfo extends $pb.GeneratedMessage {
     if (chackInsTime != null) {
       $result.chackInsTime = chackInsTime;
     }
+    if (isAllowDel != null) {
+      $result.isAllowDel = isAllowDel;
+    }
     return $result;
   }
   ToChackInsInfo._() : super();
@@ -319,6 +475,7 @@ class ToChackInsInfo extends $pb.GeneratedMessage {
     ..aOS(3, _omitFieldNames ? '' : 'nickname')
     ..aOS(4, _omitFieldNames ? '' : 'phone')
     ..aOS(5, _omitFieldNames ? '' : 'chackInsTime', protoName: 'chackInsTime')
+    ..aOB(6, _omitFieldNames ? '' : 'isAllowDel', protoName: 'isAllowDel')
     ..hasRequiredFields = false
   ;
 
@@ -387,6 +544,15 @@ class ToChackInsInfo extends $pb.GeneratedMessage {
   $core.bool hasChackInsTime() => $_has(4);
   @$pb.TagNumber(5)
   void clearChackInsTime() => clearField(5);
+
+  @$pb.TagNumber(6)
+  $core.bool get isAllowDel => $_getBF(5);
+  @$pb.TagNumber(6)
+  set isAllowDel($core.bool v) { $_setBool(5, v); }
+  @$pb.TagNumber(6)
+  $core.bool hasIsAllowDel() => $_has(5);
+  @$pb.TagNumber(6)
+  void clearIsAllowDel() => clearField(6);
 }
 
 class ToMatchRegusterAddRequest extends $pb.GeneratedMessage {

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

@@ -90,10 +90,22 @@ class ApiToClient extends $grpc.Client {
       '/to.v1.ApiTo/ToMatchRegusterAdd',
       ($1.ToMatchRegusterAddRequest value) => value.writeToBuffer(),
       ($core.List<$core.int> value) => $0.DefaultReply.fromBuffer(value));
+  static final _$toMatchRegusterEdit = $grpc.ClientMethod<$1.ToMatchRegusterEditRequest, $0.DefaultReply>(
+      '/to.v1.ApiTo/ToMatchRegusterEdit',
+      ($1.ToMatchRegusterEditRequest value) => value.writeToBuffer(),
+      ($core.List<$core.int> value) => $0.DefaultReply.fromBuffer(value));
+  static final _$toMatchRegusterDel = $grpc.ClientMethod<$0.IdRequest, $0.DefaultReply>(
+      '/to.v1.ApiTo/ToMatchRegusterDel',
+      ($0.IdRequest value) => value.writeToBuffer(),
+      ($core.List<$core.int> value) => $0.DefaultReply.fromBuffer(value));
   static final _$toMatchRegusterList = $grpc.ClientMethod<$1.ToMatchRegusterListRequest, $1.ToMatchRegusterListReply>(
       '/to.v1.ApiTo/ToMatchRegusterList',
       ($1.ToMatchRegusterListRequest value) => value.writeToBuffer(),
       ($core.List<$core.int> value) => $1.ToMatchRegusterListReply.fromBuffer(value));
+  static final _$matchChackInsDel = $grpc.ClientMethod<$0.IdRequest, $0.DefaultReply>(
+      '/to.v1.ApiTo/MatchChackInsDel',
+      ($0.IdRequest value) => value.writeToBuffer(),
+      ($core.List<$core.int> value) => $0.DefaultReply.fromBuffer(value));
 
   ApiToClient($grpc.ClientChannel channel,
       {$grpc.CallOptions? options,
@@ -169,9 +181,21 @@ class ApiToClient extends $grpc.Client {
     return $createUnaryCall(_$toMatchRegusterAdd, request, options: options);
   }
 
+  $grpc.ResponseFuture<$0.DefaultReply> toMatchRegusterEdit($1.ToMatchRegusterEditRequest request, {$grpc.CallOptions? options}) {
+    return $createUnaryCall(_$toMatchRegusterEdit, request, options: options);
+  }
+
+  $grpc.ResponseFuture<$0.DefaultReply> toMatchRegusterDel($0.IdRequest request, {$grpc.CallOptions? options}) {
+    return $createUnaryCall(_$toMatchRegusterDel, request, options: options);
+  }
+
   $grpc.ResponseFuture<$1.ToMatchRegusterListReply> toMatchRegusterList($1.ToMatchRegusterListRequest request, {$grpc.CallOptions? options}) {
     return $createUnaryCall(_$toMatchRegusterList, request, options: options);
   }
+
+  $grpc.ResponseFuture<$0.DefaultReply> matchChackInsDel($0.IdRequest request, {$grpc.CallOptions? options}) {
+    return $createUnaryCall(_$matchChackInsDel, request, options: options);
+  }
 }
 
 @$pb.GrpcServiceName('to.v1.ApiTo')
@@ -298,6 +322,20 @@ abstract class ApiToServiceBase extends $grpc.Service {
         false,
         ($core.List<$core.int> value) => $1.ToMatchRegusterAddRequest.fromBuffer(value),
         ($0.DefaultReply value) => value.writeToBuffer()));
+    $addMethod($grpc.ServiceMethod<$1.ToMatchRegusterEditRequest, $0.DefaultReply>(
+        'ToMatchRegusterEdit',
+        toMatchRegusterEdit_Pre,
+        false,
+        false,
+        ($core.List<$core.int> value) => $1.ToMatchRegusterEditRequest.fromBuffer(value),
+        ($0.DefaultReply value) => value.writeToBuffer()));
+    $addMethod($grpc.ServiceMethod<$0.IdRequest, $0.DefaultReply>(
+        'ToMatchRegusterDel',
+        toMatchRegusterDel_Pre,
+        false,
+        false,
+        ($core.List<$core.int> value) => $0.IdRequest.fromBuffer(value),
+        ($0.DefaultReply value) => value.writeToBuffer()));
     $addMethod($grpc.ServiceMethod<$1.ToMatchRegusterListRequest, $1.ToMatchRegusterListReply>(
         'ToMatchRegusterList',
         toMatchRegusterList_Pre,
@@ -305,6 +343,13 @@ abstract class ApiToServiceBase extends $grpc.Service {
         false,
         ($core.List<$core.int> value) => $1.ToMatchRegusterListRequest.fromBuffer(value),
         ($1.ToMatchRegusterListReply value) => value.writeToBuffer()));
+    $addMethod($grpc.ServiceMethod<$0.IdRequest, $0.DefaultReply>(
+        'MatchChackInsDel',
+        matchChackInsDel_Pre,
+        false,
+        false,
+        ($core.List<$core.int> value) => $0.IdRequest.fromBuffer(value),
+        ($0.DefaultReply value) => value.writeToBuffer()));
   }
 
   $async.Future<$0.DefaultReply> toSendCodeToPhoneV2_Pre($grpc.ServiceCall call, $async.Future<$0.ToSendCodeToPhoneRequestV2> request) async {
@@ -375,10 +420,22 @@ abstract class ApiToServiceBase extends $grpc.Service {
     return toMatchRegusterAdd(call, await request);
   }
 
+  $async.Future<$0.DefaultReply> toMatchRegusterEdit_Pre($grpc.ServiceCall call, $async.Future<$1.ToMatchRegusterEditRequest> request) async {
+    return toMatchRegusterEdit(call, await request);
+  }
+
+  $async.Future<$0.DefaultReply> toMatchRegusterDel_Pre($grpc.ServiceCall call, $async.Future<$0.IdRequest> request) async {
+    return toMatchRegusterDel(call, await request);
+  }
+
   $async.Future<$1.ToMatchRegusterListReply> toMatchRegusterList_Pre($grpc.ServiceCall call, $async.Future<$1.ToMatchRegusterListRequest> request) async {
     return toMatchRegusterList(call, await request);
   }
 
+  $async.Future<$0.DefaultReply> matchChackInsDel_Pre($grpc.ServiceCall call, $async.Future<$0.IdRequest> request) async {
+    return matchChackInsDel(call, await request);
+  }
+
   $async.Future<$0.DefaultReply> toSendCodeToPhoneV2($grpc.ServiceCall call, $0.ToSendCodeToPhoneRequestV2 request);
   $async.Future<$0.GetSmsSendLeftTimeReply> toGetSmsSendLeftTimeV2($grpc.ServiceCall call, $0.GetSmsSendLeftTimeRequest request);
   $async.Future<$0.SignInReply> toSignInV2($grpc.ServiceCall call, $0.ToSignInRequestV2 request);
@@ -396,5 +453,8 @@ abstract class ApiToServiceBase extends $grpc.Service {
   $async.Future<$0.ToGameRankingReply> toGameRanking($grpc.ServiceCall call, $0.ToGameRankingRequest request);
   $async.Future<$1.ToActivityListReply> toActivitySelectList($grpc.ServiceCall call, $0.IdRequest request);
   $async.Future<$0.DefaultReply> toMatchRegusterAdd($grpc.ServiceCall call, $1.ToMatchRegusterAddRequest request);
+  $async.Future<$0.DefaultReply> toMatchRegusterEdit($grpc.ServiceCall call, $1.ToMatchRegusterEditRequest request);
+  $async.Future<$0.DefaultReply> toMatchRegusterDel($grpc.ServiceCall call, $0.IdRequest request);
   $async.Future<$1.ToMatchRegusterListReply> toMatchRegusterList($grpc.ServiceCall call, $1.ToMatchRegusterListRequest request);
+  $async.Future<$0.DefaultReply> matchChackInsDel($grpc.ServiceCall call, $0.IdRequest request);
 }

+ 30 - 4
app_business/lib/generated/track_offical.pbjson.dart

@@ -13,6 +13,28 @@ import 'dart:convert' as $convert;
 import 'dart:core' as $core;
 import 'dart:typed_data' as $typed_data;
 
+@$core.Deprecated('Use toMatchRegusterEditRequestDescriptor instead')
+const ToMatchRegusterEditRequest$json = {
+  '1': 'ToMatchRegusterEditRequest',
+  '2': [
+    {'1': 'id', '3': 1, '4': 1, '5': 5, '10': 'id'},
+    {'1': 'regName', '3': 2, '4': 1, '5': 9, '10': 'regName'},
+    {'1': 'start_at', '3': 3, '4': 1, '5': 11, '6': '.google.protobuf.Timestamp', '10': 'startAt'},
+    {'1': 'stop_at', '3': 4, '4': 1, '5': 11, '6': '.google.protobuf.Timestamp', '10': 'stopAt'},
+    {'1': 'actId', '3': 5, '4': 1, '5': 5, '10': 'actId'},
+    {'1': 'isQueryPwd', '3': 6, '4': 1, '5': 8, '10': 'isQueryPwd'},
+    {'1': 'queryPasswd', '3': 7, '4': 1, '5': 9, '10': 'queryPasswd'},
+  ],
+};
+
+/// Descriptor for `ToMatchRegusterEditRequest`. Decode as a `google.protobuf.DescriptorProto`.
+final $typed_data.Uint8List toMatchRegusterEditRequestDescriptor = $convert.base64Decode(
+    'ChpUb01hdGNoUmVndXN0ZXJFZGl0UmVxdWVzdBIOCgJpZBgBIAEoBVICaWQSGAoHcmVnTmFtZR'
+    'gCIAEoCVIHcmVnTmFtZRI1CghzdGFydF9hdBgDIAEoCzIaLmdvb2dsZS5wcm90b2J1Zi5UaW1l'
+    'c3RhbXBSB3N0YXJ0QXQSMwoHc3RvcF9hdBgEIAEoCzIaLmdvb2dsZS5wcm90b2J1Zi5UaW1lc3'
+    'RhbXBSBnN0b3BBdBIUCgVhY3RJZBgFIAEoBVIFYWN0SWQSHgoKaXNRdWVyeVB3ZBgGIAEoCFIK'
+    'aXNRdWVyeVB3ZBIgCgtxdWVyeVBhc3N3ZBgHIAEoCVILcXVlcnlQYXNzd2Q=');
+
 @$core.Deprecated('Use toActivityListReplyDescriptor instead')
 const ToActivityListReply$json = {
   '1': 'ToActivityListReply',
@@ -62,7 +84,8 @@ const MatchRegusterInfo$json = {
     {'1': 'totalUserNum', '3': 3, '4': 1, '5': 5, '10': 'totalUserNum'},
     {'1': 'qrCode', '3': 4, '4': 1, '5': 9, '10': 'qrCode'},
     {'1': 'isAllowEdit', '3': 5, '4': 1, '5': 8, '10': 'isAllowEdit'},
-    {'1': 'userList', '3': 6, '4': 3, '5': 11, '6': '.to.v1.ToChackInsInfo', '10': 'userList'},
+    {'1': 'isAllowDel', '3': 6, '4': 1, '5': 8, '10': 'isAllowDel'},
+    {'1': 'userList', '3': 7, '4': 3, '5': 11, '6': '.to.v1.ToChackInsInfo', '10': 'userList'},
   ],
 };
 
@@ -70,8 +93,9 @@ const MatchRegusterInfo$json = {
 final $typed_data.Uint8List matchRegusterInfoDescriptor = $convert.base64Decode(
     'ChFNYXRjaFJlZ3VzdGVySW5mbxIOCgJpZBgBIAEoBVICaWQSEgoEbmFtZRgCIAEoCVIEbmFtZR'
     'IiCgx0b3RhbFVzZXJOdW0YAyABKAVSDHRvdGFsVXNlck51bRIWCgZxckNvZGUYBCABKAlSBnFy'
-    'Q29kZRIgCgtpc0FsbG93RWRpdBgFIAEoCFILaXNBbGxvd0VkaXQSMQoIdXNlckxpc3QYBiADKA'
-    'syFS50by52MS5Ub0NoYWNrSW5zSW5mb1IIdXNlckxpc3Q=');
+    'Q29kZRIgCgtpc0FsbG93RWRpdBgFIAEoCFILaXNBbGxvd0VkaXQSHgoKaXNBbGxvd0RlbBgGIA'
+    'EoCFIKaXNBbGxvd0RlbBIxCgh1c2VyTGlzdBgHIAMoCzIVLnRvLnYxLlRvQ2hhY2tJbnNJbmZv'
+    'Ugh1c2VyTGlzdA==');
 
 @$core.Deprecated('Use toChackInsInfoDescriptor instead')
 const ToChackInsInfo$json = {
@@ -82,6 +106,7 @@ const ToChackInsInfo$json = {
     {'1': 'nickname', '3': 3, '4': 1, '5': 9, '10': 'nickname'},
     {'1': 'phone', '3': 4, '4': 1, '5': 9, '10': 'phone'},
     {'1': 'chackInsTime', '3': 5, '4': 1, '5': 9, '10': 'chackInsTime'},
+    {'1': 'isAllowDel', '3': 6, '4': 1, '5': 8, '10': 'isAllowDel'},
   ],
 };
 
@@ -89,7 +114,8 @@ const ToChackInsInfo$json = {
 final $typed_data.Uint8List toChackInsInfoDescriptor = $convert.base64Decode(
     'Cg5Ub0NoYWNrSW5zSW5mbxIUCgVtYXJJZBgBIAEoBVIFbWFySWQSEAoDb0lkGAIgASgFUgNvSW'
     'QSGgoIbmlja25hbWUYAyABKAlSCG5pY2tuYW1lEhQKBXBob25lGAQgASgJUgVwaG9uZRIiCgxj'
-    'aGFja0luc1RpbWUYBSABKAlSDGNoYWNrSW5zVGltZQ==');
+    'aGFja0luc1RpbWUYBSABKAlSDGNoYWNrSW5zVGltZRIeCgppc0FsbG93RGVsGAYgASgIUgppc0'
+    'FsbG93RGVs');
 
 @$core.Deprecated('Use toMatchRegusterAddRequestDescriptor instead')
 const ToMatchRegusterAddRequest$json = {

+ 18 - 0
app_business/lib/service/api.dart

@@ -164,4 +164,22 @@ class ApiService extends IService {
     return BinReader(
         data: controller.stream, length: length, ext: ext, nonce: nonce);
   }
+
+  Future<void> eventEdit(int id, EventRegisterInfo event) async {
+    await stub.toMatchRegusterEdit(pb.ToMatchRegusterEditRequest()
+      ..id = id
+      ..regName = event.name
+      ..startAt = event.startAt.toPb()
+      ..stopAt = event.stopAt.toPb()
+      ..isQueryPwd = event.password != null
+      ..queryPasswd = event.password ?? '');
+  }
+}
+
+class EventRegisterInfo {
+  var id = 0;
+  var name = '';
+  var startAt = DateTime.now();
+  var stopAt = DateTime.now();
+  String? password;
 }

+ 301 - 0
app_business/lib/view/home/dialog_event_register.dart

@@ -0,0 +1,301 @@
+import 'package:track_common/model.dart';
+import 'package:track_common/widget/prelude.dart';
+
+import '../../service/api.dart';
+
+class _ArgCreate {
+  int mapId = 0;
+  Iterable<EventInfo> eventList = [];
+}
+
+class _ArgEdit {
+  int mapId = 0;
+  EventRegisterInfo old = EventRegisterInfo();
+}
+
+Future<EventRegisterInfo?> showEventRegisterDialog(
+    int mapId, Iterable<EventInfo> eventList) async {
+  return await Get.dialog(const RegisterDialog(),
+      arguments: _ArgCreate()
+        ..mapId = mapId
+        ..eventList = eventList);
+}
+
+Future<EventRegisterInfo?> showEventEditDialog(
+    int mapId, EventRegisterInfo old) async {
+  return await Get.dialog(const RegisterDialog(),
+      arguments: _ArgEdit()
+        ..mapId = mapId
+        ..old = old);
+}
+
+class RegisterDialogController extends GetxController {
+  var registerName = '';
+  final date = Rx<DateTime?>(null);
+  final registerStartAt = Rx<TimeOfDay?>(null);
+  final registerStopAt = Rx<TimeOfDay?>(null);
+  final selected = Rx<EventInfo?>(null);
+  final hasPassword = false.obs;
+  var password = '';
+  late final int mapId;
+  late final Iterable<EventInfo>? eventList;
+
+  String? get dateString {
+    final d = date.value;
+    if (d != null) {
+      return '${d.month}/${d.day}';
+    }
+    return null;
+  }
+
+  @override
+  void onInit() {
+    final args = Get.arguments;
+
+    if (args is _ArgCreate) {
+      mapId = args.mapId;
+      eventList = args.eventList;
+    }
+    if (args is _ArgEdit) {
+      eventList = null;
+      mapId = args.mapId;
+      registerName = args.old.name;
+      final d = args.old.startAt;
+      date.value = DateTime(d.year, d.month, d.day);
+      registerStartAt.value = TimeOfDay.fromDateTime(args.old.startAt);
+      registerStopAt.value = TimeOfDay.fromDateTime(args.old.stopAt);
+      password = args.old.password ?? '';
+      hasPassword.value = args.old.password != null;
+    }
+    super.onInit();
+  }
+}
+
+class RegisterDialog extends GetView<RegisterDialogController> {
+  const RegisterDialog({super.key});
+
+  @override
+  Widget build(BuildContext context) {
+    return GetBuilder(
+        init: RegisterDialogController(),
+        builder: (c) {
+          final children = <Widget>[];
+          final eventList = controller.eventList;
+
+          if (eventList != null) {
+            children.addAll([
+              SizedBox(
+                  child: DropdownMenu<EventInfo>(
+                      key: GlobalKey(),
+                      width: 320,
+                      hintText: '请选择活动',
+                      onSelected: (one) {
+                        controller.selected.value = one;
+                      },
+                      inputDecorationTheme: InputDecorationTheme(
+                        border: textBorder,
+                        isDense: true,
+                      ),
+                      dropdownMenuEntries: eventList
+                          .map((e) => DropdownMenuEntry<EventInfo>(
+                              value: e, label: e.name))
+                          .toList())),
+              const SizedBox(height: 21.34),
+            ]);
+          }
+          children.addAll([
+            _TextField(
+              hint: '请输入名称',
+              onChanged: (v) {
+                c.registerName = v;
+              },
+              initText: controller.registerName.isEmpty
+                  ? null
+                  : controller.registerName,
+            ),
+            const SizedBox(height: 21.34),
+            Row(children: [
+              Expanded(
+                  child: Obx(() => _TextField(
+                      hint: '日期',
+                      readOnly: true,
+                      initText: c.dateString,
+                      onTap: () async {
+                        c.date.value =
+                            await _showDatePicker(context, c.date.value);
+                      }))),
+              const SizedBox(width: 15.64),
+              Expanded(
+                  child: Obx(() => _TextField(
+                      hint: '开始时间',
+                      readOnly: true,
+                      initText: c.registerStartAt.value?.format(context),
+                      onTap: () async {
+                        c.registerStartAt.value = await _showTimePicker(
+                            context, c.registerStartAt.value);
+                      }))),
+              const SizedBox(width: 15.64),
+              Expanded(
+                  child: Obx(() => _TextField(
+                      hint: '结束时间',
+                      readOnly: true,
+                      initText: c.registerStopAt.value?.format(context),
+                      onTap: () async {
+                        c.registerStopAt.value = await _showTimePicker(
+                            context, c.registerStopAt.value);
+                      }))),
+            ]),
+            const SizedBox(height: 21.34),
+            Row(
+              mainAxisSize: MainAxisSize.min,
+              children: [
+                Obx(() => Switch(
+                    value: c.hasPassword.value,
+                    onChanged: (v) {
+                      c.hasPassword.value = v;
+                    })),
+                const Text('查询密码'),
+                const SizedBox(width: 12),
+                Obx(() => Expanded(
+                    child: Visibility(
+                        visible: c.hasPassword.value,
+                        child: _TextField(
+                            hint: '请输入密码',
+                            onChanged: (v) {
+                              c.password = v;
+                            })))),
+              ],
+            ),
+            const SizedBox(height: 21.34),
+            SizedBox(
+                width: double.infinity,
+                child: DarkButton(
+                    onPressed: _onRegister,
+                    child: Text(eventList != null ? '注 册' : '确 定')))
+          ]);
+
+          return AlertDialog(
+            title: Center(
+                child: Text(
+              eventList != null ? '注册比赛' : '编辑比赛',
+              style: const TextStyle(fontSize: 17),
+            )),
+            backgroundColor: Colors.white,
+            shape: RoundedRectangleBorder(
+                borderRadius: BorderRadius.circular(17.78)),
+            content: SizedBox(
+                width: 320,
+                child: ListView(shrinkWrap: true, children: children)),
+          );
+        });
+  }
+
+  void _onRegister() {
+    final date = controller.date.value;
+    final timeStartAt = controller.registerStartAt.value;
+    final timeStopAt = controller.registerStopAt.value;
+    final selected = controller.selected.value;
+
+    if (selected == null) {
+      Get.snackbar('错误', '请选择一个活动');
+      return;
+    }
+
+    if (controller.registerName.isEmpty) {
+      Get.snackbar('错误', '输入名称');
+      return;
+    }
+
+    if (date == null) {
+      Get.snackbar('错误', '请选择日期');
+      return;
+    }
+    if (timeStartAt == null) {
+      Get.snackbar('错误', '请选择开始时间');
+      return;
+    }
+
+    if (timeStopAt == null) {
+      Get.snackbar('错误', '请选择结束时间');
+      return;
+    }
+
+    final startAt =
+        date.copyWith(hour: timeStartAt.hour, minute: timeStartAt.minute);
+    final stopAt =
+        date.copyWith(hour: timeStopAt.hour, minute: timeStopAt.minute);
+
+    if (startAt.isAfter(stopAt)) {
+      Get.snackbar('错误', '结束时间应晚于开始时间');
+      return;
+    }
+
+    Get.back(
+        result: EventRegisterInfo()
+          ..id = selected.id
+          ..name = controller.registerName
+          ..startAt = startAt
+          ..stopAt = stopAt
+          ..password =
+              controller.hasPassword.value ? controller.password : null);
+  }
+
+  Future<TimeOfDay?> _showTimePicker(
+      BuildContext context, TimeOfDay? init) async {
+    final TimeOfDay? time = await showTimePicker(
+      context: context,
+      initialTime: init ?? TimeOfDay.now(),
+    );
+    return time;
+  }
+
+  Future<DateTime?> _showDatePicker(
+      BuildContext context, DateTime? init) async {
+    final DateTime? time = await showDatePicker(
+      context: context,
+      initialDate: init ?? DateTime.now(),
+      firstDate: DateTime.now(),
+      lastDate: DateTime.now().add(365.days),
+    );
+    return time;
+  }
+}
+
+final textBorder = OutlineInputBorder(
+  borderSide: const BorderSide(width: 0.71, color: Color(0xff818181)),
+  borderRadius: BorderRadius.circular(2.13),
+);
+
+class _TextField extends StatelessWidget {
+  const _TextField(
+      {required this.hint,
+      this.onChanged,
+      this.readOnly = false,
+      this.onTap,
+      this.initText});
+
+  final String hint;
+  final void Function(String)? onChanged;
+  final bool readOnly;
+  final void Function()? onTap;
+  final String? initText;
+
+  @override
+  Widget build(BuildContext context) {
+    return SizedBox(
+      child: TextFormField(
+          key: GlobalKey(),
+          initialValue: initText,
+          maxLines: 1,
+          onChanged: onChanged,
+          onTap: onTap,
+          readOnly: readOnly,
+          decoration: InputDecoration(
+            hintText: hint,
+            border: textBorder,
+            isDense: true,
+            // contentPadding: const EdgeInsets.all(8.53)
+          )),
+    );
+  }
+}

+ 97 - 5
app_business/lib/view/home/event_manage/event_manage.dart

@@ -1,4 +1,8 @@
+import 'package:app_business/service/api.dart';
+import 'package:app_business/view/home/dialog_event_register.dart';
+import 'package:pretty_qr_code/pretty_qr_code.dart';
 import 'package:track_common/widget.dart';
+import 'package:track_common/widget/prelude.dart';
 
 import 'event_manage_controller.dart';
 
@@ -53,16 +57,104 @@ class EventManage extends GetView<EventManagerController> {
   Widget level1() {
     return Obx(() => ListView(
         children: controller.eventList
-            .map((e) => AppTitleList(
-                  title: e.name,
-                  tail: Text('${e.userCount}'),
-                  isSelected: controller.selectedId.value == e.id,
+            .map((e) => EventTitle(
+                  data: e,
+                  selected: controller.selectedId.value == e.id,
                   onTap: () => controller.selectedId.value = e.id,
                 ))
             .toList()));
   }
 
   Widget level2() {
-    return SizedBox();
+    return Column(
+      children: [
+        Expanded(
+            child: Obx(() => ListView(
+                  children: controller.userList
+                      .map((e) => Text('${e.name}'))
+                      .toList(),
+                )))
+      ],
+    );
+  }
+}
+
+class EventTitle extends GetView<EventManagerController> {
+  final bool selected;
+  final EventInManage data;
+  final VoidCallback onTap;
+
+  const EventTitle(
+      {super.key,
+      required this.selected,
+      required this.data,
+      required this.onTap});
+
+  @override
+  Widget build(BuildContext context) {
+    var children = <Widget>[
+      AppTitleList(
+        title: data.name,
+        tail: Text('${data.userList.length}'),
+        isSelected: selected,
+        onTap: onTap,
+      )
+    ];
+
+    if (selected) {
+      children.add(SizedBox(
+        height: 2,
+      ));
+      children.add(Container(
+        decoration: const BoxDecoration(
+            color: Color(0xfff1f1f1),
+            borderRadius: BorderRadius.only(
+                bottomLeft: Radius.circular(14.22),
+                bottomRight: Radius.circular(14.22))),
+        padding: const EdgeInsets.all(16.3),
+        width: 221.87,
+        child: Column(
+          mainAxisSize: MainAxisSize.min,
+          children: [
+            Row(
+              children: [
+                DarkButton(
+                    onPressed: data.isAllowDel
+                        ? () => controller.deleteEvent(data)
+                        : null,
+                    child: const Text('删除')),
+                const Spacer(),
+                DarkButton(
+                    color: Colors.blue,
+                    onPressed: data.isAllowEdit
+                        ? () async {
+                            final r = await showEventEditDialog(
+                                controller.mapId!,
+                                EventRegisterInfo()..name = data.name);
+                            if (r != null) {
+                              controller.eventEdit(data.id, r);
+                            }
+                          }
+                        : null,
+                    child: const Text('修改')),
+              ],
+            ),
+            const SizedBox(height: 24),
+            SizedBox.square(
+                dimension: 128, child: PrettyQrView.data(data: data.qrCode)),
+            const SizedBox(height: 12),
+            const Text(
+              '用彩图奔跑APP扫码签到',
+              style: TextStyle(color: Colors.red, fontSize: 14.22),
+            )
+          ],
+        ),
+      ));
+    }
+
+    return Column(
+      mainAxisSize: MainAxisSize.min,
+      children: children,
+    );
   }
 }

+ 29 - 3
app_business/lib/view/home/event_manage/event_manage_controller.dart

@@ -2,13 +2,14 @@ import 'package:app_business/service/abase.dart';
 import 'package:app_business/service/api.dart';
 import 'package:fixnum/fixnum.dart';
 import 'package:track_common/service/map_watch.dart';
+import 'package:track_common/track_common.dart';
 
 class EventInManage {
   int id = 0;
   String name = '';
-  int userCount = 0;
   String qrCode = '';
   var isAllowEdit = true;
+  var isAllowDel = true;
   var userList = <UserInManage>[];
 }
 
@@ -40,15 +41,29 @@ class EventManagerController extends GetxController {
   String get dateStr =>
       '${filterDate.value.year}-${filterDate.value.month}-${filterDate.value.day}';
 
+  MapWatch? get mapWatch => Get.find<MapWatchService>().instance;
+  int? get mapId => mapWatch?.id;
+
   @override
   void onInit() {
     super.onInit();
 
-    flushList();
+    workFlush();
+  }
+
+  Future<void> workFlush() async {
+    while (!isClosed) {
+      try {
+        await flushList();
+      } catch (e) {
+        warn('flush fail: ', e);
+      }
+      await 1.seconds.delay();
+    }
   }
 
   Future<void> flushList() async {
-    final mapWatch = Get.find<MapWatchService>().instance;
+    final mapWatch = this.mapWatch;
 
     if (mapWatch != null) {
       final date = filterDate.value;
@@ -62,6 +77,9 @@ class EventManagerController extends GetxController {
           .map((e) => EventInManage()
             ..id = e.id
             ..name = e.name
+            ..qrCode = e.qrCode
+            ..isAllowEdit = e.isAllowEdit
+            ..isAllowDel = e.isAllowDel
             ..userList = e.userList
                 .map((u) => UserInManage()
                   ..id = u.oId
@@ -73,4 +91,12 @@ class EventManagerController extends GetxController {
           .toList();
     }
   }
+
+  Future<void> deleteEvent(EventInManage event) async {
+    await _api.stub.toMatchRegusterDel(IdRequest()..id = Int64(event.id));
+  }
+
+  Future<void> eventEdit(int id, EventRegisterInfo event) {
+    return _api.eventEdit(id, event);
+  }
 }

+ 16 - 0
app_business/pubspec.lock

@@ -484,6 +484,14 @@ packages:
       url: "https://pub.flutter-io.cn"
     source: hosted
     version: "1.5.1"
+  pretty_qr_code:
+    dependency: "direct main"
+    description:
+      name: pretty_qr_code
+      sha256: "799fa8d5c605028302cb7debbf3f180ce56678c4927fb2ecc4b174a3bee526d6"
+      url: "https://pub.flutter-io.cn"
+    source: hosted
+    version: "3.0.0"
   protobuf:
     dependency: transitive
     description:
@@ -500,6 +508,14 @@ packages:
       url: "https://pub.flutter-io.cn"
     source: hosted
     version: "3.6.0"
+  qr:
+    dependency: transitive
+    description:
+      name: qr
+      sha256: "64957a3930367bf97cc211a5af99551d630f2f4625e38af10edd6b19131b64b3"
+      url: "https://pub.flutter-io.cn"
+    source: hosted
+    version: "3.0.1"
   rive:
     dependency: "direct main"
     description:

+ 1 - 0
app_business/pubspec.yaml

@@ -47,6 +47,7 @@ dependencies:
   get_storage: ^2.1.1
   package_info_plus: ^4.2.0
   fixnum: ^1.1.0
+  pretty_qr_code: ^3.0.0
 
 dev_dependencies:
   flutter_test:

+ 1 - 1
protos/app_api

@@ -1 +1 @@
-Subproject commit 66494ea951859413e1cb6362613bfa5a757213f1
+Subproject commit f70b683044fbe646e56decb55e0854d0a93cc8e3