Merge branch 'feature/BETERAN-BACKEND-APP-BROWSER-init' of https://gitlab.loafle.net/bet/beteran-backend-app-browser into feature/BETERAN-BACKEND-APP-BROWSER-init

This commit is contained in:
이담 정 2022-08-13 03:54:07 +00:00
commit a238b5bde7
7 changed files with 249 additions and 195 deletions

View File

@ -22,6 +22,7 @@ import {
startWith, startWith,
Subject, Subject,
switchMap, switchMap,
take,
takeUntil, takeUntil,
timer, timer,
} from 'rxjs'; } from 'rxjs';
@ -32,7 +33,10 @@ import { Partner } from '../models/partner';
import { PartnerPagination } from '../models/partner-pagination'; import { PartnerPagination } from '../models/partner-pagination';
import { PartnerService } from '../services/partner.service'; import { PartnerService } from '../services/partner.service';
import { ActivatedRoute, Router } from '@angular/router'; import { ActivatedRoute, Router } from '@angular/router';
import { RegistComposeComponent } from '../compose/regist-compose.component'; import {
RegistComposeComponent,
RegistComposeResult,
} from '../compose/regist-compose.component';
import { CashComposeComponent } from '../compose/cash-compose.component'; import { CashComposeComponent } from '../compose/cash-compose.component';
import { CommissionComposeComponent } from '../compose/commission-compose.component'; import { CommissionComposeComponent } from '../compose/commission-compose.component';
import { CompComposeComponent } from '../compose/comp-compose.component'; import { CompComposeComponent } from '../compose/comp-compose.component';
@ -242,12 +246,15 @@ export class ListComponent implements OnInit, AfterViewInit, OnDestroy {
__onClickRegist(event: MouseEvent, partner: MemberModel): void { __onClickRegist(event: MouseEvent, partner: MemberModel): void {
const dialogRef = this._matDialog.open(RegistComposeComponent, { const dialogRef = this._matDialog.open(RegistComposeComponent, {
data: { title: '대본 등록하기', parent: partner, sites: this.sites }, data: { title: '대본 등록', parent: partner, sites: this.sites },
}); });
dialogRef.afterClosed().subscribe((result) => { dialogRef
console.log('Compose dialog was closed!'); .afterClosed()
}); .pipe(take(1))
.subscribe((result: RegistComposeResult) => {
console.log('Compose dialog was closed: ', result);
});
} }
__onClickCash(event: MouseEvent): void { __onClickCash(event: MouseEvent): void {
const dialogRef = this._matDialog.open(CashComposeComponent, { const dialogRef = this._matDialog.open(CashComposeComponent, {

View File

@ -3,7 +3,7 @@
<div <div
class="flex flex-0 items-center justify-between h-16 pr-3 sm:pr-5 pl-6 sm:pl-8 bg-primary text-on-primary" class="flex flex-0 items-center justify-between h-16 pr-3 sm:pr-5 pl-6 sm:pl-8 bg-primary text-on-primary"
> >
<div class="text-lg font-medium">{{ data.title }} 등록</div> <div class="text-lg font-medium">{{ data.title }}</div>
<button mat-icon-button (click)="saveAndClose()" [tabIndex]="-1"> <button mat-icon-button (click)="saveAndClose()" [tabIndex]="-1">
<mat-icon <mat-icon
class="text-current" class="text-current"
@ -12,6 +12,17 @@
</button> </button>
</div> </div>
<fuse-alert
class="mt-8 -mb-4"
*ngIf="showAlert"
[appearance]="'outline'"
[showIcon]="false"
[type]="alert.type"
[@shake]="alert.type === 'error'"
>
{{ alert.message }}
</fuse-alert>
<!-- Compose form --> <!-- Compose form -->
<form <form
class="flex flex-col flex-auto p-6 sm:p-8 overflow-y-auto" class="flex flex-col flex-auto p-6 sm:p-8 overflow-y-auto"
@ -98,12 +109,23 @@
</mat-error> </mat-error>
</mat-form-field> </mat-form-field>
<mat-form-field> <!-- <mat-form-field>
<mat-label>정산종류</mat-label> <mat-label>정산종류</mat-label>
<input matInput [formControlName]="'calculateType'" /> <input matInput [formControlName]="'calculateType'" />
<mat-error *ngIf="composeForm.get('calculateType')?.hasError('required')"> <mat-error *ngIf="composeForm.get('calculateType')?.hasError('required')">
정산종류는 필수 입력입니다. 정산종류는 필수 입력입니다.
</mat-error> </mat-error>
</mat-form-field> -->
<mat-form-field>
<mat-label>정산종류</mat-label>
<mat-select [formControlName]="'calculateType'">
<mat-option [value]="0"> 롤링 </mat-option>
</mat-select>
<mat-error *ngIf="composeForm.get('siteName')?.hasError('required')">
정산종류는 필수 입력입니다.
</mat-error>
</mat-form-field> </mat-form-field>
<mat-form-field> <mat-form-field>
@ -116,12 +138,26 @@
<mat-form-field> <mat-form-field>
<mat-label>은행명</mat-label> <mat-label>은행명</mat-label>
<input matInput [formControlName]="'bankName'" />
<mat-select [formControlName]="'bankName'" placeholder="은행 선택">
<mat-option *ngFor="let bank of data.banks" [value]="bank.getId()">
{{ bank.getName() }}
</mat-option>
<mat-option [value]="'0'"> 국민은행 </mat-option>
</mat-select>
<mat-error *ngIf="composeForm.get('bankName')?.hasError('required')"> <mat-error *ngIf="composeForm.get('bankName')?.hasError('required')">
은행명은 필수 입력입니다. 은행명은 필수 입력입니다.
</mat-error> </mat-error>
</mat-form-field> </mat-form-field>
<!-- <mat-form-field>
<mat-label>은행명</mat-label>
<input matInput [formControlName]="'bankName'" />
<mat-error *ngIf="composeForm.get('bankName')?.hasError('required')">
은행명은 필수 입력입니다.
</mat-error>
</mat-form-field> -->
<mat-form-field> <mat-form-field>
<mat-label>계좌번호</mat-label> <mat-label>계좌번호</mat-label>
<input matInput [formControlName]="'accountNumber'" /> <input matInput [formControlName]="'accountNumber'" />
@ -160,6 +196,7 @@
mat-flat-button mat-flat-button
[color]="'primary'" [color]="'primary'"
(click)="send()" (click)="send()"
[disabled]="isSendDisable"
> >
등록 등록
</button> </button>

View File

@ -7,46 +7,45 @@ import {
} from '@angular/core'; } from '@angular/core';
import { FormBuilder, FormGroup, Validators } from '@angular/forms'; import { FormBuilder, FormGroup, Validators } from '@angular/forms';
import { MatDialogRef, MAT_DIALOG_DATA } from '@angular/material/dialog'; import { MatDialogRef, MAT_DIALOG_DATA } from '@angular/material/dialog';
import { FuseAlertType } from '@fuse/components/alert';
import { SiteService } from 'app/modules/polyglot/domain/services/site.service'; import { SiteService } from 'app/modules/polyglot/domain/services/site.service';
import { IdentityService } from 'app/modules/polyglot/member/services/identity.service'; import { IdentityService } from 'app/modules/polyglot/member/services/identity.service';
import { MemberService } from 'app/modules/polyglot/member/services/member.service';
import {
CreateMemberRequest,
CreateMemberResponse,
} from 'app/modules/protobuf/c2se/backend/member_pb';
import { Bank } from 'app/modules/protobuf/models/account/bank_pb';
import { Site } from 'app/modules/protobuf/models/domain/site_pb'; import { Site } from 'app/modules/protobuf/models/domain/site_pb';
import { MemberModel } from 'app/modules/protobuf/models/member/member_pb'; import { MemberModel } from 'app/modules/protobuf/models/member/member_pb';
import { fuseAnimations } from '@fuse/animations';
export interface RegistComposeData { export interface RegistComposeData {
title: string; title: string;
parent: MemberModel; parent: MemberModel;
sites: Site[]; sites: Site[];
banks: Bank[];
} }
export interface RegistComposeResult { export interface RegistComposeResult {
parentId: string; choice: boolean;
siteName: string;
signinId: string;
password: string;
exchangePassword: string;
nickname: string;
calculateType: string;
phoneNumber: string;
bankName: string;
accountNumber: string;
accountHolder: string;
} }
@Component({ @Component({
selector: 'app-regist-compose', selector: 'app-regist-compose',
templateUrl: './regist-compose.component.html', templateUrl: './regist-compose.component.html',
encapsulation: ViewEncapsulation.None, encapsulation: ViewEncapsulation.None,
animations: fuseAnimations,
}) })
export class RegistComposeComponent implements OnInit { export class RegistComposeComponent implements OnInit {
composeForm!: FormGroup; composeForm!: FormGroup;
sites: any[] = [];
// quillModules: any = {
// toolbar: [
// ['bold', 'italic', 'underline'],
// [{ align: [] }, { list: 'ordered' }, { list: 'bullet' }],
// ['clean'],
// ],
// };
alert: { type: FuseAlertType; message: string } = {
type: 'success',
message: '등록이 성공하였습니다.',
};
showAlert: boolean = false;
isSendDisable = false;
/** /**
* Constructor * Constructor
*/ */
@ -55,10 +54,9 @@ export class RegistComposeComponent implements OnInit {
@Inject(MAT_DIALOG_DATA) public data: RegistComposeData, @Inject(MAT_DIALOG_DATA) public data: RegistComposeData,
private _formBuilder: FormBuilder, private _formBuilder: FormBuilder,
private _identityService: IdentityService, private _identityService: IdentityService,
private _memberService: MemberService,
private _changeDetectorRef: ChangeDetectorRef private _changeDetectorRef: ChangeDetectorRef
) { ) {}
this.data.sites.forEach((v) => console.log(v.getUrl()));
}
// ----------------------------------------------------------------------------------------------------- // -----------------------------------------------------------------------------------------------------
// @ Lifecycle hooks // @ Lifecycle hooks
@ -111,11 +109,61 @@ export class RegistComposeComponent implements OnInit {
/** /**
* Send the message * Send the message
*
}
*/ */
send(): void { send(): void {
console.log(this.composeForm.value); if (!this.composeForm.valid) {
return;
}
this.isSendDisable = true;
const {
partnerId,
siteName,
signinId,
password,
exchangePassword,
nickname,
calculateType,
phoneNumber,
bankName,
accountNumber,
accountHolder,
} = this.composeForm.value;
const member = new CreateMemberRequest();
const site = new Site();
site.setId(siteName);
member.setSiteId(siteName);
member.setUsername(signinId);
member.setPassword('beteran');
member.setMemberClassId('ae9b874e-5d0e-4c4d-8432-f45f02691ceb');
member.setMemberLevelId('c56231ac-2120-4a81-a30a-5d41fafb6c57');
member.setReferrerMemberUsername(this.data.parent.getUsername());
member.setNickname(nickname);
member.setMobilePhoneNumber(phoneNumber);
this._memberService
.createMember(member)
.then((res: CreateMemberResponse.Result) => {
console.log(res.getMember());
this.showAlert = true;
})
.catch((e) => {
this.showAlert = true;
this.alert = { type: 'error', message: '등록에 실패하였습니다.' };
})
.finally(() => (this.showAlert = false));
} }
private close(): void {
this.matDialogRef.close({
choice: true,
});
}
__checkSigninId(event: FocusEvent): void { __checkSigninId(event: FocusEvent): void {
const signinId = this.composeForm.get('signinId')?.value; const signinId = this.composeForm.get('signinId')?.value;
// console.log(event, '::', signinId); // console.log(event, '::', signinId);

View File

@ -27,6 +27,7 @@ import { COMPOSE } from './compose';
import { partnerRoutes } from './partner.routing'; import { partnerRoutes } from './partner.routing';
import { MatDialogModule } from '@angular/material/dialog'; import { MatDialogModule } from '@angular/material/dialog';
import { FuseAlertModule } from '@fuse/components/alert';
@NgModule({ @NgModule({
declarations: [COMPONENTS, COMPOSE], declarations: [COMPONENTS, COMPOSE],
@ -53,6 +54,8 @@ import { MatDialogModule } from '@angular/material/dialog';
MatMenuModule, MatMenuModule,
MatRadioModule, MatRadioModule,
MatDividerModule, MatDividerModule,
FuseAlertModule,
], ],
}) })
export class PartnerModule {} export class PartnerModule {}

View File

@ -17,8 +17,12 @@ import {
UpdateMemberRequest, UpdateMemberRequest,
UpdateMemberResponse, UpdateMemberResponse,
SUBJECT_UPDATE_MEMBER, SUBJECT_UPDATE_MEMBER,
CreateMemberResponse,
CreateMemberRequest,
SUBJECT_CREATE_MEMBER,
} from 'app/modules/protobuf/c2se/backend/member_pb'; } from 'app/modules/protobuf/c2se/backend/member_pb';
import { Pagination } from 'app/modules/protobuf/protobuf/pagination/pagination_pb'; import { Pagination } from 'app/modules/protobuf/protobuf/pagination/pagination_pb';
import { MemberModel } from 'app/modules/protobuf/models/member/member_pb';
@Injectable({ @Injectable({
providedIn: 'root', providedIn: 'root',
@ -157,46 +161,22 @@ export class MemberService {
// classId: 4b014ef5-3bab-4413-aaf9-b0040a70ec77 // classId: 4b014ef5-3bab-4413-aaf9-b0040a70ec77
// levelId: c56231ac-2120-4a81-a30a-5d41fafb6c57 // levelId: c56231ac-2120-4a81-a30a-5d41fafb6c57
// createMember( createMember(req: CreateMemberRequest): Promise<CreateMemberResponse.Result> {
// siteId: string = '8429a7ab-b9de-400b-a209-28ff46e22bec', return new Promise<CreateMemberResponse.Result>((resolve, reject) => {
// memberLevelId: string = 'c56231ac-2120-4a81-a30a-5d41fafb6c57', this.__natsService
// classId: string = '4b014ef5-3bab-4413-aaf9-b0040a70ec77', .request<CreateMemberResponse.Result>(
// signinId: string, SUBJECT_CREATE_MEMBER,
// nickname: string, req.serializeBinary(),
// password: string, CreateMemberResponse.deserializeBinary
// mobilePhoneNumber: string )
// ): Promise<MemberRequ.Result> { .then((result) => {
// return new Promise<UpdateMemberResponse.Result>((resolve, reject) => { console.log('createMember Result: ', result);
// let req = new UpdateMemberRequest(); resolve(result);
// req.setId(id); })
.catch((e: Error) => {
// if (!!siteId) { console.log('failed', e);
// req.setSiteId(siteId); reject(e);
// } });
// if (!!memberLevelId) { });
// req.setMemberLevelId(memberLevelId); }
// }
// if (!!password) {
// req.setPassword(password);
// }
// if (!!mobilePhoneNumber) {
// req.setMobilePhoneNumber(mobilePhoneNumber);
// }
// this.__natsService
// .request<UpdateMemberResponse.Result>(
// SUBJECT_UPDATE_MEMBER,
// req.serializeBinary(),
// UpdateMemberResponse.deserializeBinary
// )
// .then((result) => {
// console.log('updateMember Result: ', result);
// resolve(result);
// })
// .catch((e: Error) => {
// console.log('failed', e);
// reject(e);
// });
// });
// }
} }

View File

@ -118,7 +118,7 @@ export namespace CreateMemberLevelResponse {
} }
} }
export class ListMemberLevelesRequest extends jspb.Message { export class ListMemberLevelsRequest extends jspb.Message {
hasPagination(): boolean; hasPagination(): boolean;
clearPagination(): void; clearPagination(): void;
getPagination(): protobuf_pagination_pagination_pb.Pagination | undefined; getPagination(): protobuf_pagination_pagination_pb.Pagination | undefined;
@ -146,27 +146,27 @@ export class ListMemberLevelesRequest extends jspb.Message {
setNameLike(value: string): void; setNameLike(value: string): void;
serializeBinary(): Uint8Array; serializeBinary(): Uint8Array;
toObject(includeInstance?: boolean): ListMemberLevelesRequest.AsObject; toObject(includeInstance?: boolean): ListMemberLevelsRequest.AsObject;
static toObject( static toObject(
includeInstance: boolean, includeInstance: boolean,
msg: ListMemberLevelesRequest msg: ListMemberLevelsRequest
): ListMemberLevelesRequest.AsObject; ): ListMemberLevelsRequest.AsObject;
static extensions: { [key: number]: jspb.ExtensionFieldInfo<jspb.Message> }; static extensions: { [key: number]: jspb.ExtensionFieldInfo<jspb.Message> };
static extensionsBinary: { static extensionsBinary: {
[key: number]: jspb.ExtensionFieldBinaryInfo<jspb.Message>; [key: number]: jspb.ExtensionFieldBinaryInfo<jspb.Message>;
}; };
static serializeBinaryToWriter( static serializeBinaryToWriter(
message: ListMemberLevelesRequest, message: ListMemberLevelsRequest,
writer: jspb.BinaryWriter writer: jspb.BinaryWriter
): void; ): void;
static deserializeBinary(bytes: Uint8Array): ListMemberLevelesRequest; static deserializeBinary(bytes: Uint8Array): ListMemberLevelsRequest;
static deserializeBinaryFromReader( static deserializeBinaryFromReader(
message: ListMemberLevelesRequest, message: ListMemberLevelsRequest,
reader: jspb.BinaryReader reader: jspb.BinaryReader
): ListMemberLevelesRequest; ): ListMemberLevelsRequest;
} }
export namespace ListMemberLevelesRequest { export namespace ListMemberLevelsRequest {
export type AsObject = { export type AsObject = {
pagination?: protobuf_pagination_pagination_pb.Pagination.AsObject; pagination?: protobuf_pagination_pagination_pb.Pagination.AsObject;
searchesList: Array<protobuf_pagination_search_pb.Search.AsObject>; searchesList: Array<protobuf_pagination_search_pb.Search.AsObject>;
@ -353,14 +353,12 @@ export class UpdateMemberLevelRequest extends jspb.Message {
getId(): string; getId(): string;
setId(value: string): void; setId(value: string): void;
hasParentId(): boolean;
clearParentId(): void;
getParentId(): string;
setParentId(value: string): void;
getName(): string; getName(): string;
setName(value: string): void; setName(value: string): void;
getSortOrder(): number;
setSortOrder(value: number): void;
serializeBinary(): Uint8Array; serializeBinary(): Uint8Array;
toObject(includeInstance?: boolean): UpdateMemberLevelRequest.AsObject; toObject(includeInstance?: boolean): UpdateMemberLevelRequest.AsObject;
static toObject( static toObject(
@ -385,8 +383,8 @@ export class UpdateMemberLevelRequest extends jspb.Message {
export namespace UpdateMemberLevelRequest { export namespace UpdateMemberLevelRequest {
export type AsObject = { export type AsObject = {
id: string; id: string;
parentId: string;
name: string; name: string;
sortOrder: number;
}; };
} }

View File

@ -73,7 +73,7 @@ goog.exportSymbol(
global global
); );
goog.exportSymbol( goog.exportSymbol(
"proto.bet.beteran.c2se.backend.member_level.ListMemberLevelesRequest", "proto.bet.beteran.c2se.backend.member_level.ListMemberLevelsRequest",
null, null,
global global
); );
@ -202,20 +202,21 @@ if (goog.DEBUG && !COMPILED) {
* @extends {jspb.Message} * @extends {jspb.Message}
* @constructor * @constructor
*/ */
proto.bet.beteran.c2se.backend.member_level.ListMemberLevelesRequest = proto.bet.beteran.c2se.backend.member_level.ListMemberLevelsRequest = function (
function (opt_data) { opt_data
jspb.Message.initialize( ) {
this, jspb.Message.initialize(
opt_data, this,
0, opt_data,
-1, 0,
proto.bet.beteran.c2se.backend.member_level.ListMemberLevelesRequest -1,
.repeatedFields_, proto.bet.beteran.c2se.backend.member_level.ListMemberLevelsRequest
null .repeatedFields_,
); null
}; );
};
goog.inherits( goog.inherits(
proto.bet.beteran.c2se.backend.member_level.ListMemberLevelesRequest, proto.bet.beteran.c2se.backend.member_level.ListMemberLevelsRequest,
jspb.Message jspb.Message
); );
if (goog.DEBUG && !COMPILED) { if (goog.DEBUG && !COMPILED) {
@ -223,8 +224,8 @@ if (goog.DEBUG && !COMPILED) {
* @public * @public
* @override * @override
*/ */
proto.bet.beteran.c2se.backend.member_level.ListMemberLevelesRequest.displayName = proto.bet.beteran.c2se.backend.member_level.ListMemberLevelsRequest.displayName =
"proto.bet.beteran.c2se.backend.member_level.ListMemberLevelesRequest"; "proto.bet.beteran.c2se.backend.member_level.ListMemberLevelsRequest";
} }
/** /**
* Generated by JsPbCodeGenerator. * Generated by JsPbCodeGenerator.
@ -1098,7 +1099,7 @@ proto.bet.beteran.c2se.backend.member_level.CreateMemberLevelResponse.prototype.
* @private {!Array<number>} * @private {!Array<number>}
* @const * @const
*/ */
proto.bet.beteran.c2se.backend.member_level.ListMemberLevelesRequest.repeatedFields_ = proto.bet.beteran.c2se.backend.member_level.ListMemberLevelsRequest.repeatedFields_ =
[2, 3]; [2, 3];
if (jspb.Message.GENERATE_TO_OBJECT) { if (jspb.Message.GENERATE_TO_OBJECT) {
@ -1114,9 +1115,9 @@ if (jspb.Message.GENERATE_TO_OBJECT) {
* http://goto/soy-param-migration * http://goto/soy-param-migration
* @return {!Object} * @return {!Object}
*/ */
proto.bet.beteran.c2se.backend.member_level.ListMemberLevelesRequest.prototype.toObject = proto.bet.beteran.c2se.backend.member_level.ListMemberLevelsRequest.prototype.toObject =
function (opt_includeInstance) { function (opt_includeInstance) {
return proto.bet.beteran.c2se.backend.member_level.ListMemberLevelesRequest.toObject( return proto.bet.beteran.c2se.backend.member_level.ListMemberLevelsRequest.toObject(
opt_includeInstance, opt_includeInstance,
this this
); );
@ -1127,11 +1128,11 @@ if (jspb.Message.GENERATE_TO_OBJECT) {
* @param {boolean|undefined} includeInstance Deprecated. Whether to include * @param {boolean|undefined} includeInstance Deprecated. Whether to include
* the JSPB instance for transitional soy proto support: * the JSPB instance for transitional soy proto support:
* http://goto/soy-param-migration * http://goto/soy-param-migration
* @param {!proto.bet.beteran.c2se.backend.member_level.ListMemberLevelesRequest} msg The msg instance to transform. * @param {!proto.bet.beteran.c2se.backend.member_level.ListMemberLevelsRequest} msg The msg instance to transform.
* @return {!Object} * @return {!Object}
* @suppress {unusedLocalVariables} f is only used for nested messages * @suppress {unusedLocalVariables} f is only used for nested messages
*/ */
proto.bet.beteran.c2se.backend.member_level.ListMemberLevelesRequest.toObject = proto.bet.beteran.c2se.backend.member_level.ListMemberLevelsRequest.toObject =
function (includeInstance, msg) { function (includeInstance, msg) {
var f, var f,
obj = { obj = {
@ -1164,14 +1165,14 @@ if (jspb.Message.GENERATE_TO_OBJECT) {
/** /**
* Deserializes binary data (in protobuf wire format). * Deserializes binary data (in protobuf wire format).
* @param {jspb.ByteSource} bytes The bytes to deserialize. * @param {jspb.ByteSource} bytes The bytes to deserialize.
* @return {!proto.bet.beteran.c2se.backend.member_level.ListMemberLevelesRequest} * @return {!proto.bet.beteran.c2se.backend.member_level.ListMemberLevelsRequest}
*/ */
proto.bet.beteran.c2se.backend.member_level.ListMemberLevelesRequest.deserializeBinary = proto.bet.beteran.c2se.backend.member_level.ListMemberLevelsRequest.deserializeBinary =
function (bytes) { function (bytes) {
var reader = new jspb.BinaryReader(bytes); var reader = new jspb.BinaryReader(bytes);
var msg = var msg =
new proto.bet.beteran.c2se.backend.member_level.ListMemberLevelesRequest(); new proto.bet.beteran.c2se.backend.member_level.ListMemberLevelsRequest();
return proto.bet.beteran.c2se.backend.member_level.ListMemberLevelesRequest.deserializeBinaryFromReader( return proto.bet.beteran.c2se.backend.member_level.ListMemberLevelsRequest.deserializeBinaryFromReader(
msg, msg,
reader reader
); );
@ -1180,11 +1181,11 @@ proto.bet.beteran.c2se.backend.member_level.ListMemberLevelesRequest.deserialize
/** /**
* Deserializes binary data (in protobuf wire format) from the * Deserializes binary data (in protobuf wire format) from the
* given reader into the given message object. * given reader into the given message object.
* @param {!proto.bet.beteran.c2se.backend.member_level.ListMemberLevelesRequest} msg The message object to deserialize into. * @param {!proto.bet.beteran.c2se.backend.member_level.ListMemberLevelsRequest} msg The message object to deserialize into.
* @param {!jspb.BinaryReader} reader The BinaryReader to use. * @param {!jspb.BinaryReader} reader The BinaryReader to use.
* @return {!proto.bet.beteran.c2se.backend.member_level.ListMemberLevelesRequest} * @return {!proto.bet.beteran.c2se.backend.member_level.ListMemberLevelsRequest}
*/ */
proto.bet.beteran.c2se.backend.member_level.ListMemberLevelesRequest.deserializeBinaryFromReader = proto.bet.beteran.c2se.backend.member_level.ListMemberLevelsRequest.deserializeBinaryFromReader =
function (msg, reader) { function (msg, reader) {
while (reader.nextField()) { while (reader.nextField()) {
if (reader.isEndGroup()) { if (reader.isEndGroup()) {
@ -1233,10 +1234,10 @@ proto.bet.beteran.c2se.backend.member_level.ListMemberLevelesRequest.deserialize
* Serializes the message to binary data (in protobuf wire format). * Serializes the message to binary data (in protobuf wire format).
* @return {!Uint8Array} * @return {!Uint8Array}
*/ */
proto.bet.beteran.c2se.backend.member_level.ListMemberLevelesRequest.prototype.serializeBinary = proto.bet.beteran.c2se.backend.member_level.ListMemberLevelsRequest.prototype.serializeBinary =
function () { function () {
var writer = new jspb.BinaryWriter(); var writer = new jspb.BinaryWriter();
proto.bet.beteran.c2se.backend.member_level.ListMemberLevelesRequest.serializeBinaryToWriter( proto.bet.beteran.c2se.backend.member_level.ListMemberLevelsRequest.serializeBinaryToWriter(
this, this,
writer writer
); );
@ -1246,11 +1247,11 @@ proto.bet.beteran.c2se.backend.member_level.ListMemberLevelesRequest.prototype.s
/** /**
* Serializes the given message to binary data (in protobuf wire * Serializes the given message to binary data (in protobuf wire
* format), writing to the given BinaryWriter. * format), writing to the given BinaryWriter.
* @param {!proto.bet.beteran.c2se.backend.member_level.ListMemberLevelesRequest} message * @param {!proto.bet.beteran.c2se.backend.member_level.ListMemberLevelsRequest} message
* @param {!jspb.BinaryWriter} writer * @param {!jspb.BinaryWriter} writer
* @suppress {unusedLocalVariables} f is only used for nested messages * @suppress {unusedLocalVariables} f is only used for nested messages
*/ */
proto.bet.beteran.c2se.backend.member_level.ListMemberLevelesRequest.serializeBinaryToWriter = proto.bet.beteran.c2se.backend.member_level.ListMemberLevelsRequest.serializeBinaryToWriter =
function (message, writer) { function (message, writer) {
var f = undefined; var f = undefined;
f = message.getPagination(); f = message.getPagination();
@ -1287,7 +1288,7 @@ proto.bet.beteran.c2se.backend.member_level.ListMemberLevelesRequest.serializeBi
* optional bet.protobuf.pagination.Pagination pagination = 1; * optional bet.protobuf.pagination.Pagination pagination = 1;
* @return {?proto.bet.protobuf.pagination.Pagination} * @return {?proto.bet.protobuf.pagination.Pagination}
*/ */
proto.bet.beteran.c2se.backend.member_level.ListMemberLevelesRequest.prototype.getPagination = proto.bet.beteran.c2se.backend.member_level.ListMemberLevelsRequest.prototype.getPagination =
function () { function () {
return /** @type{?proto.bet.protobuf.pagination.Pagination} */ ( return /** @type{?proto.bet.protobuf.pagination.Pagination} */ (
jspb.Message.getWrapperField( jspb.Message.getWrapperField(
@ -1300,18 +1301,18 @@ proto.bet.beteran.c2se.backend.member_level.ListMemberLevelesRequest.prototype.g
/** /**
* @param {?proto.bet.protobuf.pagination.Pagination|undefined} value * @param {?proto.bet.protobuf.pagination.Pagination|undefined} value
* @return {!proto.bet.beteran.c2se.backend.member_level.ListMemberLevelesRequest} returns this * @return {!proto.bet.beteran.c2se.backend.member_level.ListMemberLevelsRequest} returns this
*/ */
proto.bet.beteran.c2se.backend.member_level.ListMemberLevelesRequest.prototype.setPagination = proto.bet.beteran.c2se.backend.member_level.ListMemberLevelsRequest.prototype.setPagination =
function (value) { function (value) {
return jspb.Message.setWrapperField(this, 1, value); return jspb.Message.setWrapperField(this, 1, value);
}; };
/** /**
* Clears the message field making it undefined. * Clears the message field making it undefined.
* @return {!proto.bet.beteran.c2se.backend.member_level.ListMemberLevelesRequest} returns this * @return {!proto.bet.beteran.c2se.backend.member_level.ListMemberLevelsRequest} returns this
*/ */
proto.bet.beteran.c2se.backend.member_level.ListMemberLevelesRequest.prototype.clearPagination = proto.bet.beteran.c2se.backend.member_level.ListMemberLevelsRequest.prototype.clearPagination =
function () { function () {
return this.setPagination(undefined); return this.setPagination(undefined);
}; };
@ -1320,7 +1321,7 @@ proto.bet.beteran.c2se.backend.member_level.ListMemberLevelesRequest.prototype.c
* Returns whether this field is set. * Returns whether this field is set.
* @return {boolean} * @return {boolean}
*/ */
proto.bet.beteran.c2se.backend.member_level.ListMemberLevelesRequest.prototype.hasPagination = proto.bet.beteran.c2se.backend.member_level.ListMemberLevelsRequest.prototype.hasPagination =
function () { function () {
return jspb.Message.getField(this, 1) != null; return jspb.Message.getField(this, 1) != null;
}; };
@ -1329,7 +1330,7 @@ proto.bet.beteran.c2se.backend.member_level.ListMemberLevelesRequest.prototype.h
* repeated bet.protobuf.pagination.Search searches = 2; * repeated bet.protobuf.pagination.Search searches = 2;
* @return {!Array<!proto.bet.protobuf.pagination.Search>} * @return {!Array<!proto.bet.protobuf.pagination.Search>}
*/ */
proto.bet.beteran.c2se.backend.member_level.ListMemberLevelesRequest.prototype.getSearchesList = proto.bet.beteran.c2se.backend.member_level.ListMemberLevelsRequest.prototype.getSearchesList =
function () { function () {
return /** @type{!Array<!proto.bet.protobuf.pagination.Search>} */ ( return /** @type{!Array<!proto.bet.protobuf.pagination.Search>} */ (
jspb.Message.getRepeatedWrapperField( jspb.Message.getRepeatedWrapperField(
@ -1342,9 +1343,9 @@ proto.bet.beteran.c2se.backend.member_level.ListMemberLevelesRequest.prototype.g
/** /**
* @param {!Array<!proto.bet.protobuf.pagination.Search>} value * @param {!Array<!proto.bet.protobuf.pagination.Search>} value
* @return {!proto.bet.beteran.c2se.backend.member_level.ListMemberLevelesRequest} returns this * @return {!proto.bet.beteran.c2se.backend.member_level.ListMemberLevelsRequest} returns this
*/ */
proto.bet.beteran.c2se.backend.member_level.ListMemberLevelesRequest.prototype.setSearchesList = proto.bet.beteran.c2se.backend.member_level.ListMemberLevelsRequest.prototype.setSearchesList =
function (value) { function (value) {
return jspb.Message.setRepeatedWrapperField(this, 2, value); return jspb.Message.setRepeatedWrapperField(this, 2, value);
}; };
@ -1354,7 +1355,7 @@ proto.bet.beteran.c2se.backend.member_level.ListMemberLevelesRequest.prototype.s
* @param {number=} opt_index * @param {number=} opt_index
* @return {!proto.bet.protobuf.pagination.Search} * @return {!proto.bet.protobuf.pagination.Search}
*/ */
proto.bet.beteran.c2se.backend.member_level.ListMemberLevelesRequest.prototype.addSearches = proto.bet.beteran.c2se.backend.member_level.ListMemberLevelsRequest.prototype.addSearches =
function (opt_value, opt_index) { function (opt_value, opt_index) {
return jspb.Message.addToRepeatedWrapperField( return jspb.Message.addToRepeatedWrapperField(
this, this,
@ -1367,9 +1368,9 @@ proto.bet.beteran.c2se.backend.member_level.ListMemberLevelesRequest.prototype.a
/** /**
* Clears the list making it empty but non-null. * Clears the list making it empty but non-null.
* @return {!proto.bet.beteran.c2se.backend.member_level.ListMemberLevelesRequest} returns this * @return {!proto.bet.beteran.c2se.backend.member_level.ListMemberLevelsRequest} returns this
*/ */
proto.bet.beteran.c2se.backend.member_level.ListMemberLevelesRequest.prototype.clearSearchesList = proto.bet.beteran.c2se.backend.member_level.ListMemberLevelsRequest.prototype.clearSearchesList =
function () { function () {
return this.setSearchesList([]); return this.setSearchesList([]);
}; };
@ -1378,7 +1379,7 @@ proto.bet.beteran.c2se.backend.member_level.ListMemberLevelesRequest.prototype.c
* repeated bet.protobuf.pagination.Sort sorts = 3; * repeated bet.protobuf.pagination.Sort sorts = 3;
* @return {!Array<!proto.bet.protobuf.pagination.Sort>} * @return {!Array<!proto.bet.protobuf.pagination.Sort>}
*/ */
proto.bet.beteran.c2se.backend.member_level.ListMemberLevelesRequest.prototype.getSortsList = proto.bet.beteran.c2se.backend.member_level.ListMemberLevelsRequest.prototype.getSortsList =
function () { function () {
return /** @type{!Array<!proto.bet.protobuf.pagination.Sort>} */ ( return /** @type{!Array<!proto.bet.protobuf.pagination.Sort>} */ (
jspb.Message.getRepeatedWrapperField( jspb.Message.getRepeatedWrapperField(
@ -1391,9 +1392,9 @@ proto.bet.beteran.c2se.backend.member_level.ListMemberLevelesRequest.prototype.g
/** /**
* @param {!Array<!proto.bet.protobuf.pagination.Sort>} value * @param {!Array<!proto.bet.protobuf.pagination.Sort>} value
* @return {!proto.bet.beteran.c2se.backend.member_level.ListMemberLevelesRequest} returns this * @return {!proto.bet.beteran.c2se.backend.member_level.ListMemberLevelsRequest} returns this
*/ */
proto.bet.beteran.c2se.backend.member_level.ListMemberLevelesRequest.prototype.setSortsList = proto.bet.beteran.c2se.backend.member_level.ListMemberLevelsRequest.prototype.setSortsList =
function (value) { function (value) {
return jspb.Message.setRepeatedWrapperField(this, 3, value); return jspb.Message.setRepeatedWrapperField(this, 3, value);
}; };
@ -1403,7 +1404,7 @@ proto.bet.beteran.c2se.backend.member_level.ListMemberLevelesRequest.prototype.s
* @param {number=} opt_index * @param {number=} opt_index
* @return {!proto.bet.protobuf.pagination.Sort} * @return {!proto.bet.protobuf.pagination.Sort}
*/ */
proto.bet.beteran.c2se.backend.member_level.ListMemberLevelesRequest.prototype.addSorts = proto.bet.beteran.c2se.backend.member_level.ListMemberLevelsRequest.prototype.addSorts =
function (opt_value, opt_index) { function (opt_value, opt_index) {
return jspb.Message.addToRepeatedWrapperField( return jspb.Message.addToRepeatedWrapperField(
this, this,
@ -1416,9 +1417,9 @@ proto.bet.beteran.c2se.backend.member_level.ListMemberLevelesRequest.prototype.a
/** /**
* Clears the list making it empty but non-null. * Clears the list making it empty but non-null.
* @return {!proto.bet.beteran.c2se.backend.member_level.ListMemberLevelesRequest} returns this * @return {!proto.bet.beteran.c2se.backend.member_level.ListMemberLevelsRequest} returns this
*/ */
proto.bet.beteran.c2se.backend.member_level.ListMemberLevelesRequest.prototype.clearSortsList = proto.bet.beteran.c2se.backend.member_level.ListMemberLevelsRequest.prototype.clearSortsList =
function () { function () {
return this.setSortsList([]); return this.setSortsList([]);
}; };
@ -1427,7 +1428,7 @@ proto.bet.beteran.c2se.backend.member_level.ListMemberLevelesRequest.prototype.c
* optional string name_like = 4; * optional string name_like = 4;
* @return {string} * @return {string}
*/ */
proto.bet.beteran.c2se.backend.member_level.ListMemberLevelesRequest.prototype.getNameLike = proto.bet.beteran.c2se.backend.member_level.ListMemberLevelsRequest.prototype.getNameLike =
function () { function () {
return /** @type {string} */ ( return /** @type {string} */ (
jspb.Message.getFieldWithDefault(this, 4, "") jspb.Message.getFieldWithDefault(this, 4, "")
@ -1436,18 +1437,18 @@ proto.bet.beteran.c2se.backend.member_level.ListMemberLevelesRequest.prototype.g
/** /**
* @param {string} value * @param {string} value
* @return {!proto.bet.beteran.c2se.backend.member_level.ListMemberLevelesRequest} returns this * @return {!proto.bet.beteran.c2se.backend.member_level.ListMemberLevelsRequest} returns this
*/ */
proto.bet.beteran.c2se.backend.member_level.ListMemberLevelesRequest.prototype.setNameLike = proto.bet.beteran.c2se.backend.member_level.ListMemberLevelsRequest.prototype.setNameLike =
function (value) { function (value) {
return jspb.Message.setField(this, 4, value); return jspb.Message.setField(this, 4, value);
}; };
/** /**
* Clears the field making it undefined. * Clears the field making it undefined.
* @return {!proto.bet.beteran.c2se.backend.member_level.ListMemberLevelesRequest} returns this * @return {!proto.bet.beteran.c2se.backend.member_level.ListMemberLevelsRequest} returns this
*/ */
proto.bet.beteran.c2se.backend.member_level.ListMemberLevelesRequest.prototype.clearNameLike = proto.bet.beteran.c2se.backend.member_level.ListMemberLevelsRequest.prototype.clearNameLike =
function () { function () {
return jspb.Message.setField(this, 4, undefined); return jspb.Message.setField(this, 4, undefined);
}; };
@ -1456,7 +1457,7 @@ proto.bet.beteran.c2se.backend.member_level.ListMemberLevelesRequest.prototype.c
* Returns whether this field is set. * Returns whether this field is set.
* @return {boolean} * @return {boolean}
*/ */
proto.bet.beteran.c2se.backend.member_level.ListMemberLevelesRequest.prototype.hasNameLike = proto.bet.beteran.c2se.backend.member_level.ListMemberLevelsRequest.prototype.hasNameLike =
function () { function () {
return jspb.Message.getField(this, 4) != null; return jspb.Message.getField(this, 4) != null;
}; };
@ -2459,8 +2460,8 @@ if (jspb.Message.GENERATE_TO_OBJECT) {
var f, var f,
obj = { obj = {
id: jspb.Message.getFieldWithDefault(msg, 1, ""), id: jspb.Message.getFieldWithDefault(msg, 1, ""),
parentId: jspb.Message.getFieldWithDefault(msg, 2, ""), name: jspb.Message.getFieldWithDefault(msg, 2, ""),
name: jspb.Message.getFieldWithDefault(msg, 3, ""), sortOrder: jspb.Message.getFieldWithDefault(msg, 3, 0),
}; };
if (includeInstance) { if (includeInstance) {
@ -2507,11 +2508,11 @@ proto.bet.beteran.c2se.backend.member_level.UpdateMemberLevelRequest.deserialize
break; break;
case 2: case 2:
var value = /** @type {string} */ (reader.readString()); var value = /** @type {string} */ (reader.readString());
msg.setParentId(value); msg.setName(value);
break; break;
case 3: case 3:
var value = /** @type {string} */ (reader.readString()); var value = /** @type {number} */ (reader.readUint32());
msg.setName(value); msg.setSortOrder(value);
break; break;
default: default:
reader.skipField(); reader.skipField();
@ -2549,13 +2550,13 @@ proto.bet.beteran.c2se.backend.member_level.UpdateMemberLevelRequest.serializeBi
if (f.length > 0) { if (f.length > 0) {
writer.writeString(1, f); writer.writeString(1, f);
} }
f = /** @type {string} */ (jspb.Message.getField(message, 2));
if (f != null) {
writer.writeString(2, f);
}
f = message.getName(); f = message.getName();
if (f.length > 0) { if (f.length > 0) {
writer.writeString(3, f); writer.writeString(2, f);
}
f = message.getSortOrder();
if (f !== 0) {
writer.writeUint32(3, f);
} }
}; };
@ -2580,61 +2581,41 @@ proto.bet.beteran.c2se.backend.member_level.UpdateMemberLevelRequest.prototype.s
}; };
/** /**
* optional string parent_id = 2; * optional string name = 2;
* @return {string} * @return {string}
*/ */
proto.bet.beteran.c2se.backend.member_level.UpdateMemberLevelRequest.prototype.getParentId = proto.bet.beteran.c2se.backend.member_level.UpdateMemberLevelRequest.prototype.getName =
function () { function () {
return /** @type {string} */ ( return /** @type {string} */ (
jspb.Message.getFieldWithDefault(this, 2, "") jspb.Message.getFieldWithDefault(this, 2, "")
); );
}; };
/**
* @param {string} value
* @return {!proto.bet.beteran.c2se.backend.member_level.UpdateMemberLevelRequest} returns this
*/
proto.bet.beteran.c2se.backend.member_level.UpdateMemberLevelRequest.prototype.setParentId =
function (value) {
return jspb.Message.setField(this, 2, value);
};
/**
* Clears the field making it undefined.
* @return {!proto.bet.beteran.c2se.backend.member_level.UpdateMemberLevelRequest} returns this
*/
proto.bet.beteran.c2se.backend.member_level.UpdateMemberLevelRequest.prototype.clearParentId =
function () {
return jspb.Message.setField(this, 2, undefined);
};
/**
* Returns whether this field is set.
* @return {boolean}
*/
proto.bet.beteran.c2se.backend.member_level.UpdateMemberLevelRequest.prototype.hasParentId =
function () {
return jspb.Message.getField(this, 2) != null;
};
/**
* optional string name = 3;
* @return {string}
*/
proto.bet.beteran.c2se.backend.member_level.UpdateMemberLevelRequest.prototype.getName =
function () {
return /** @type {string} */ (
jspb.Message.getFieldWithDefault(this, 3, "")
);
};
/** /**
* @param {string} value * @param {string} value
* @return {!proto.bet.beteran.c2se.backend.member_level.UpdateMemberLevelRequest} returns this * @return {!proto.bet.beteran.c2se.backend.member_level.UpdateMemberLevelRequest} returns this
*/ */
proto.bet.beteran.c2se.backend.member_level.UpdateMemberLevelRequest.prototype.setName = proto.bet.beteran.c2se.backend.member_level.UpdateMemberLevelRequest.prototype.setName =
function (value) { function (value) {
return jspb.Message.setProto3StringField(this, 3, value); return jspb.Message.setProto3StringField(this, 2, value);
};
/**
* optional uint32 sort_order = 3;
* @return {number}
*/
proto.bet.beteran.c2se.backend.member_level.UpdateMemberLevelRequest.prototype.getSortOrder =
function () {
return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 3, 0));
};
/**
* @param {number} value
* @return {!proto.bet.beteran.c2se.backend.member_level.UpdateMemberLevelRequest} returns this
*/
proto.bet.beteran.c2se.backend.member_level.UpdateMemberLevelRequest.prototype.setSortOrder =
function (value) {
return jspb.Message.setProto3IntField(this, 3, value);
}; };
if (jspb.Message.GENERATE_TO_OBJECT) { if (jspb.Message.GENERATE_TO_OBJECT) {