Compare commits
	
		
			14 Commits
		
	
	
		
			d9275166e7
			...
			9711496a8b
		
	
	| Author | SHA1 | Date | |
|---|---|---|---|
| 9711496a8b | |||
| 5d7f617c4d | |||
| 4f6101be68 | |||
| a922813d24 | |||
| 78f4a98993 | |||
| 0b7c37c18b | |||
| 34aa4f1b03 | |||
| bad9d26c8d | |||
| 8904c13e9c | |||
| 7ea7eec0f7 | |||
| cfef240daa | |||
| 4aaa28f1d7 | |||
| 01724622b9 | |||
| 3df1e05aef | 
										
											
												File diff suppressed because it is too large
												Load Diff
											
										
									
								
							| @ -18,6 +18,8 @@ | |||||||
| syntax = "proto3"; | syntax = "proto3"; | ||||||
| package account; | package account; | ||||||
| import "github.com/mwitkow/go-proto-validators@v0.3.2/validator.proto"; | import "github.com/mwitkow/go-proto-validators@v0.3.2/validator.proto"; | ||||||
|  | //import "descriptor.proto"; | ||||||
|  | //import "validator.proto"; | ||||||
| 
 | 
 | ||||||
| option go_package = "./;account"; | option go_package = "./;account"; | ||||||
| 
 | 
 | ||||||
| @ -25,11 +27,25 @@ service Account { | |||||||
|   rpc Login (LoginRequest) returns (TokenInfo) {} |   rpc Login (LoginRequest) returns (TokenInfo) {} | ||||||
|   rpc RefreshToken (RefreshTokenRequest) returns (TokenInfo) {} //刷新token |   rpc RefreshToken (RefreshTokenRequest) returns (TokenInfo) {} //刷新token | ||||||
|   rpc Logout (DecryptJwtRequest) returns (CommonResponse) {} |   rpc Logout (DecryptJwtRequest) returns (CommonResponse) {} | ||||||
|  |   rpc WxApp (WxAppRequest) returns (WxAppResponse) {}//获取微信公众号记录 | ||||||
|  |   rpc WxUserInfo (WxUserOrCreateRequest) returns (WxUserResponse) {}//获取微信用户信息 | ||||||
|  |   rpc WxUserCreate (WxUserOrCreateRequest) returns (WxUserResponse) {}//创建微信用户 | ||||||
|  |   rpc WxUserUpdate (WxUserUpdateRequest) returns (WxUserResponse) {}//更新微信用户 | ||||||
|  |   rpc WxGetOpenIdByCode (WxGetOpenIdByCodeRequest) returns (WxGetOpenIdByCodeResponse) {}//仅校验之前发送的验证码 | ||||||
|  |   rpc WxBoxLogin (WxGetOpenIdByCodeRequest) returns (WxBoxUserInfo) {}//微信小程序登陆并且获取详情 | ||||||
|  |   rpc WxBoxUserInfoByOpenId (WxBoxUserInfoRequest) returns (WxBoxUserInfo) {}//微信小程序登陆并且获取详情 | ||||||
|  |   rpc WxBoxTelNumByCode (WxGetOpenIdByCodeRequest) returns (WxBoxTelNumByCodeResponse) {}//小程序获取手机号 | ||||||
|  |   rpc WxBoxUpdateUser (WxBoxUserInfo) returns (CommonResponse) {}//更新用户信息 | ||||||
|  |   rpc WxBoxCreateUser (WxBoxUserInfo) returns (CommonResponse) {}//更新用户信息 | ||||||
|  |   rpc FddCreateUser (FddCreateUserRequest) returns (CommonResponse) {}//同步法大大数据 | ||||||
|  |   rpc FddUpdateUser (FddCreateUserRequest) returns (CommonResponse) {}//同步法大大数据 | ||||||
|  |   rpc FddRemoveUser (FddRemoveUserRequest) returns (CommonResponse) {}//同步法大大数据 | ||||||
|   rpc OffLine (CommonRequest) returns (CommonResponse) {} |   rpc OffLine (CommonRequest) returns (CommonResponse) {} | ||||||
|   rpc OnlineLog (LoginInfosByUserIdRequest) returns (LoginLogsResponse) {}//根据用户id获取登录的信息 |   rpc OnlineLog (LoginInfosByUserIdRequest) returns (LoginLogsResponse) {}//根据用户id获取登录的信息 | ||||||
|   rpc OnlineLogById (OnlineLogByIdRequest) returns (LoginLog) {}//根据用户id获取登录的信息 |   rpc OnlineLogById (OnlineLogByIdRequest) returns (LoginLog) {}//根据用户id获取登录的信息 | ||||||
|   rpc CheckPwd (CheckPwdRequest) returns (UpdateResponse) {}//检测密码是否正确 |   rpc CheckPwd (CheckPwdRequest) returns (UpdateResponse) {}//检测密码是否正确 | ||||||
| //  rpc RegisterOrExist (RegistRequest) returns (RequestStatus) {} |   rpc Register (RegistRequest) returns (RequestStatus) {} | ||||||
|  |   rpc RegisterOrExist (RegistRequest) returns (RequestStatus) {} | ||||||
|   rpc SendMsg (SendMsgRequest) returns (SendMsgStatusResponse) {} //登陆发送验证码 |   rpc SendMsg (SendMsgRequest) returns (SendMsgStatusResponse) {} //登陆发送验证码 | ||||||
|   rpc SendCustomMsg (SendCustomMsgRequest) returns (SendMsgStatusResponse) {}//定制化发送内容 |   rpc SendCustomMsg (SendCustomMsgRequest) returns (SendMsgStatusResponse) {}//定制化发送内容 | ||||||
|   rpc SendExCustomMsg (SendCustomMsgRequest) returns (SendMsgStatusResponse) {}//定制化发送内容 |   rpc SendExCustomMsg (SendCustomMsgRequest) returns (SendMsgStatusResponse) {}//定制化发送内容 | ||||||
| @ -39,161 +55,103 @@ service Account { | |||||||
|   rpc UpdateTelNum (SendNewTelNumMsgRequest) returns (SendMsgStatusResponse) {}//更新新手机号,校验新号码验证码 |   rpc UpdateTelNum (SendNewTelNumMsgRequest) returns (SendMsgStatusResponse) {}//更新新手机号,校验新号码验证码 | ||||||
|   rpc Authentication (AuthenticationRequest) returns (RequestStatus) {} |   rpc Authentication (AuthenticationRequest) returns (RequestStatus) {} | ||||||
|   rpc DecryptJwt (DecryptJwtRequest) returns (DecryptJwtResponse) {}//最好放在调用方 |   rpc DecryptJwt (DecryptJwtRequest) returns (DecryptJwtResponse) {}//最好放在调用方 | ||||||
|   rpc Info (InfoRequest) returns (UserInfoResponse) {} |   rpc Info (InfoRequest) returns (InfoResponse) {} | ||||||
|   rpc JobNumGetInfo (JobNumGetInfoRequest) returns (InfoResponse) {} |   rpc JobNumGetInfo (JobNumGetInfoRequest) returns (InfoResponse) {} | ||||||
|   rpc List (ListRequest) returns (ListResponse) {} |   rpc List (ListRequest) returns (ListResponse) {} | ||||||
|   rpc RandList (ListRequest) returns (ListResponse) {} |   rpc RandList (ListRequest) returns (ListResponse) {} | ||||||
|   rpc ListByIDs (ListByIDsRequest) returns (ListResponse) {} |   rpc ListByIDs (ListByIDsRequest) returns (ListResponse) {} | ||||||
|   rpc Remove (RemoveRequest) returns (RemoveResponse) {} |   rpc Remove (RemoveRequest) returns (RemoveResponse) {} | ||||||
|  |   rpc WriteOff (WriteOffRequest) returns (RemoveResponse) {} //用户注销 | ||||||
|  |   rpc WriteOffApp (RemoveRequest) returns (RemoveResponse) {} //app用户注销 | ||||||
|  |   rpc WriteOffInfo (WriteOffApproveRequest) returns (WriteOffRequest) {} //用户注销详情 | ||||||
|  |   rpc FindWriteOffList (WriteOffListRequest) returns (WriteOffListResponse) {} //用户注销列表 | ||||||
|  |   rpc WriteOffUpdate (WriteOffApproveRequest)returns(RemoveResponse){} //用户注销更新 | ||||||
|   rpc Update (UpdateRequest) returns (UpdateResponse) {} |   rpc Update (UpdateRequest) returns (UpdateResponse) {} | ||||||
|  |   rpc PrivacyInfo (PrivacyInfoRequest) returns (AccountInfo) {} | ||||||
|   rpc UsersByTel (UsersByTelRequest) returns (ListResponse) {} |   rpc UsersByTel (UsersByTelRequest) returns (ListResponse) {} | ||||||
|   rpc UserByTel (UserByTelRequest) returns (UserInfoResponse) {} |   rpc UserByTel (UserByTelRequest) returns (InfoResponse) {} | ||||||
|  |   rpc CheckBeforeRegister (CheckBeforeRegisterRequest) returns (CommonResponse) {} | ||||||
|   rpc OnlySendMsg (SendMsgRequest) returns (SendMsgStatusResponse) {} //仅发验证码 |   rpc OnlySendMsg (SendMsgRequest) returns (SendMsgStatusResponse) {} //仅发验证码 | ||||||
|   rpc OnlyCheckMsg (CheckMsgRequest) returns (SendMsgStatusResponse) {}//仅校验之前发送的验证码 |   rpc OnlyCheckMsg (CheckMsgRequest) returns (SendMsgStatusResponse) {}//仅校验之前发送的验证码 | ||||||
|  |   rpc CreateClockDevice(CreateClockDeviceRequest) returns(ClockDeviceResponse){} //创建打卡机设备 | ||||||
|  |   rpc UpdateClockDevice(UpdateClockDeviceRequest) returns(ClockDeviceResponse){} //更新打卡机设备 | ||||||
|  |   rpc RemoveClockDevice(RemoveClockDeviceRequest) returns(ClockDeviceResponse){} //删除打卡机设备 | ||||||
|  |   rpc ClockDeviceList(ClockDeviceListRequest) returns(ClockDeviceListResponse){} //打卡机设备列表 | ||||||
|  |   rpc ClockDeviceInfo(ClockDeviceInfoRequest) returns(ClockDeviceInfoResponse){} //打卡机设备详情 | ||||||
|  |   rpc ClockDeviceSingleUntie(RemoveClockDeviceRequest) returns(ClockDeviceResponse){} //单人解绑打卡机 | ||||||
|  |   rpc ClockDeviceBatchBind(ClockBatchListResponse) returns(ClockDeviceInfoResponse){} //批量绑定打卡机 | ||||||
|  |   rpc ClockDeviceBatchUntie(ClockBatchBindRequest) returns(ClockDeviceInfoResponse){} //批量解绑打卡机 | ||||||
|  |   rpc ClockDeviceBatchList(ClockBatchBindRequest) returns(ClockBatchListResponse){} //查询绑定关系 | ||||||
|  |   rpc UpdateDeviceRelevance(ClockUserDeviceBatch) returns(ClockDeviceResponse){} //更新绑定中间表 | ||||||
|   rpc MailAccountByNickName(MailAccountByNickNameRequest) returns(MaiAccountResponse){} //根据昵称姓名获取昵称的邮箱和拼音名称 |   rpc MailAccountByNickName(MailAccountByNickNameRequest) returns(MaiAccountResponse){} //根据昵称姓名获取昵称的邮箱和拼音名称 | ||||||
|  |   rpc CreateMaiAccount(CreateMaiAccountRequest) returns(CommonResponse){} //生成邮箱号 | ||||||
|  |   rpc CreateClockLog(ClockLogInfo) returns(ClockDeviceResponse){} //创建打卡记录 | ||||||
|  |   rpc SendClockInWechat(SendClockInWechatRequest) returns(CommonResponse){} //发送模版消息 | ||||||
|  |   rpc FindClockLogList(ClockLogReq) returns(ClockLogListResponse){} //查看打卡记录 | ||||||
|  |   rpc SendStrangerClockInWechat(SendClockInWechatRequest) returns(CommonResponse){} //发送陌生人模版消息 | ||||||
|   rpc ListV2 (ListV2Request) returns (ListResponse) {}// 新版列表 查询 |   rpc ListV2 (ListV2Request) returns (ListResponse) {}// 新版列表 查询 | ||||||
|   rpc QueryPersonnelWithTheSameName (QueryPersonnelWithTheSameNameRequest) returns (QueryPersonnelWithTheSameNameResponse) {}// 查询同名的员工 |   rpc CreateChainAccount(CommonRequest) returns (CreateChainAccountResponse) {}// 新版列表 查询 | ||||||
|   rpc UsersByJobNum (UsersByJobNumRequest) returns (ListResponse) {} |   rpc SendNationMsg (SendNationMsgRequest) returns (SendMsgStatusResponse) {} //发送境外国际短信验证码 --艺术商城 | ||||||
|   rpc RealName (RealNameRequest) returns (RealNameResponse) {}//实名认证 |   rpc UpdateLanguage(UpdateLanguageRequest) returns (UpdateLanguageResponse) {}// 修改用户使用的语言 | ||||||
|   rpc Register (RegistRequest) returns (RegisterResponse) {}//注册 |  | ||||||
|   rpc UserList (UserListRequest) returns (UserListResponse) {}//用户列表 |  | ||||||
|   rpc CheckRealName (CheckRealNameRequest) returns (CheckRealNameResponse) {}//审核实名 |  | ||||||
|   rpc GenerateSliderCaptcha(GenerateSliderCaptchaRequest) returns (GenerateSliderCaptchaResponse) {}// 生成滑块验证码图片+位置 |   rpc GenerateSliderCaptcha(GenerateSliderCaptchaRequest) returns (GenerateSliderCaptchaResponse) {}// 生成滑块验证码图片+位置 | ||||||
|   rpc VerifySliderCaptcha(VerifySliderCaptchaRequest) returns (VerifySliderCaptchaResponse) {}// 验证滑块验证码位置 |   rpc VerifySliderCaptcha(VerifySliderCaptchaRequest) returns (VerifySliderCaptchaResponse) {}// 验证滑块验证码位置 | ||||||
|   rpc SendNationMsg (SendNationMsgRequest) returns (SendMsgStatusResponse) {} //发送境外国际短信验证码 --艺术商城 |  | ||||||
|   rpc VerifySliderStatus(VerifySliderStatusRequest) returns (VerifySliderStatusResponse) {}// 验证滑块验证码状态 |   rpc VerifySliderStatus(VerifySliderStatusRequest) returns (VerifySliderStatusResponse) {}// 验证滑块验证码状态 | ||||||
|  |   rpc SampleAccount (SampleAccountRequest) returns (SampleAccountResponse) {} //同一帐号还有谁在登陆 | ||||||
|  |   rpc LoginAndSqueezeOther (LoginRequest) returns (TokenInfo) {} //唯一登陆,干掉其他人 | ||||||
|  |   rpc QueryPersonnelWithTheSameName (QueryPersonnelWithTheSameNameRequest) returns (QueryPersonnelWithTheSameNameResponse) {}// 查询同名的员工 | ||||||
|  |   rpc UsersByJobNum (UsersByJobNumRequest) returns (ListResponse) {} | ||||||
|  |   //人脸检测 | ||||||
|  |   rpc IsSamePerson(IsSamePersonRequest)returns(IsSamePersonResponse){}//是否是同一人 | ||||||
|  |   rpc CreateRealNameOrPassPort(UserInfo)returns(CommonResponse){}//实名信息注册 | ||||||
|  |   rpc FddCreateUserV2(FddCreateUserRequest) returns(CommonResponse){}//创建法大大 | ||||||
|  |   rpc FddUserFindByUserId(UserInfo)returns(FddInfo){}//通过userid获取法大大信息 | ||||||
|  |   rpc UserInfoById(InfoRequest)returns(UserInfo){}//通过userid获取实名信息 | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
| message VerifySliderStatusRequest { | message CheckBeforeRegisterRequest{ | ||||||
|   string nonceStr = 1; |   string  domain = 1; | ||||||
|  |   string  jobNum = 2; | ||||||
|  |   string  telNum = 3; | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
| message VerifySliderStatusResponse { | message SampleAccountRequest{ | ||||||
|   string nonceStr = 1; |   string  domain = 1; | ||||||
|   int32 status = 2; |   string  password = 2; | ||||||
|  |   string  code = 3; | ||||||
|  |   string  from = 4; | ||||||
|  |   string  telNum = 5; | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
| message SendNationMsgRequest { | message SampleAccountResponse{ | ||||||
|   string Domain   = 1 [json_name = "domain",(validator.field) = {string_not_empty: true,human_error: "70001"} ]; |   bool  isNowAlreadyLogin = 1; | ||||||
|   string TelNum   = 2 [json_name = "telNum",(validator.field) = {string_not_empty: true,human_error: "70001"}]; |   uint32  num = 2;// 同时在线的数量 | ||||||
|   string Project  = 3 [json_name = "project"]; |  | ||||||
|   uint32 signNo  = 4; |  | ||||||
|   uint32 mId  = 5; |  | ||||||
|   string scope  = 6;//标记模块 |  | ||||||
| } |  | ||||||
| message VerifySliderCaptchaResponse { |  | ||||||
|   string nonceStr = 1; |  | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
| message VerifySliderCaptchaRequest { | message LoginAndSqueezeOtherResponse{ | ||||||
|   string nonceStr = 1; |   string  needDetectImageUrl = 1; | ||||||
|   float blockX = 2; |   string  recentImageUrl = 2; | ||||||
| } |  | ||||||
| message GenerateSliderCaptchaResponse { |  | ||||||
|   string nonceStr = 1; |  | ||||||
|   string canvasSrc = 2; |  | ||||||
|   string blockSrc = 3; |  | ||||||
|   uint64 blockY = 4; |  | ||||||
|   uint64 faceY = 5; |  | ||||||
|   uint64 blockX = 6; |  | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
| message GenerateSliderCaptchaRequest { | message IsSamePersonResponse{ | ||||||
|   uint64 canvasWidth = 1; |   bool  isPass = 1; | ||||||
|   uint64 canvasHeight = 2; |   uint32  rate = 2;//相似度 | ||||||
|   uint64 blockWidth = 3; |   string  message = 3;//相似度 | ||||||
|   uint64 blockHeight = 4; |  | ||||||
|   uint64 blockRadius = 5; |  | ||||||
|   uint64 place = 6; |  | ||||||
| } | } | ||||||
| message CheckRealNameResponse{ | 
 | ||||||
|   uint64 id =1; | message IsSamePersonRequest{ | ||||||
|   string status =2; |   string  needDetectImageUrl = 1; | ||||||
|  |   string  recentImageUrl = 2; | ||||||
| } | } | ||||||
| message CheckRealNameRequest{ | 
 | ||||||
|   uint64 id = 1; | message UpdatePassportStatusRequest{ | ||||||
|   bool pass = 2; |   uint32 ID  = 1; | ||||||
|   string notPassRemarks = 3; |   uint32 status  = 2; | ||||||
| } | } | ||||||
| message UserListResponse{ | 
 | ||||||
|   uint64 count = 1; | message CreateChainAccountResponse { | ||||||
|   uint64 page = 2; |   string account = 1 ; | ||||||
|   uint64 pageSize = 3; |   string men = 2 ; | ||||||
|   repeated UserListInfo userList = 4; |   string publicKey = 3 ; | ||||||
| } |  | ||||||
| message UserListInfo{ |  | ||||||
|   uint64 id = 1; |  | ||||||
|   int32 status = 2; |  | ||||||
|   string name = 3; |  | ||||||
|   string sex = 4; |  | ||||||
|   string nationality = 5; |  | ||||||
|   int32 documentType =6; |  | ||||||
|   string certificatePicture = 7; |  | ||||||
|   string validity = 8; |  | ||||||
|   string placeOfResidence = 9; |  | ||||||
|   string groupPhoto = 10; |  | ||||||
|   string attachment = 11; |  | ||||||
|   string registrationTime = 12; |  | ||||||
|   string auditTime = 13; |  | ||||||
|   string subNum = 14; |  | ||||||
|   string notPassRemarks = 15; |  | ||||||
|   string telNum = 16; |  | ||||||
|   string telAreaCode = 17; |  | ||||||
|   string language = 18; |  | ||||||
|   string subscriberNumber = 19; |  | ||||||
|   string nickName = 20; |  | ||||||
| } |  | ||||||
| message UserListRequest{ |  | ||||||
|   string domain = 1; |  | ||||||
|   string subNum = 2; |  | ||||||
|   int32 realNameOrNot = 3; |  | ||||||
|   string name = 4; |  | ||||||
|   string sex = 5; |  | ||||||
|   int32 documentType = 6; |  | ||||||
|   int32 auditStatus = 7; |  | ||||||
|   uint64 page = 8; |  | ||||||
|   uint64 pageSize = 9; |  | ||||||
| } |  | ||||||
| message UserInfoResponse{ |  | ||||||
|   uint64 id = 1; |  | ||||||
|   int32 status = 2; |  | ||||||
|   string name = 3; |  | ||||||
|   string sex = 4; |  | ||||||
|   string nationality = 5; |  | ||||||
|   int32 documentType =6; |  | ||||||
|   string certificatePicture = 7; |  | ||||||
|   string validity = 8; |  | ||||||
|   string placeOfResidence = 9; |  | ||||||
|   string groupPhoto = 10; |  | ||||||
|   string attachment = 11; |  | ||||||
|   string subNum = 12; |  | ||||||
|   string notPassRemarks = 13; |  | ||||||
|   string domain = 14; |  | ||||||
|   string language = 15; |  | ||||||
|   string subscriberNumber = 16; |  | ||||||
|   string nickName = 17; |  | ||||||
|   string telNum = 18; |  | ||||||
| } |  | ||||||
| message RealNameResponse{ |  | ||||||
|   uint64 id = 1; |  | ||||||
|   string status = 2; |  | ||||||
| } |  | ||||||
| message RealNameRequest{ |  | ||||||
|   uint64 id = 1; |  | ||||||
|   string name = 2; |  | ||||||
|   string sex = 3; |  | ||||||
|   string nationality = 4; |  | ||||||
|   int32 documentType = 5; |  | ||||||
|   string certificatePicture = 6; |  | ||||||
|   string validity = 7; |  | ||||||
|   string placeOfResidence = 8; |  | ||||||
|   string groupPhoto = 9; |  | ||||||
|   string attachment = 10; |  | ||||||
| } |  | ||||||
| message RegisterResponse{ |  | ||||||
|   uint64 ID = 1; |  | ||||||
|   uint64 status = 2; |  | ||||||
|   string token = 3; |  | ||||||
| } | } | ||||||
| message UsersByJobNumRequest{ | message UsersByJobNumRequest{ | ||||||
|   string domain = 1 ; |   string domain = 1 ; | ||||||
| @ -227,6 +185,7 @@ message ListV2Request { | |||||||
|   repeated string departmentNames =16 ; |   repeated string departmentNames =16 ; | ||||||
|   repeated uint32 positionIds =17 ; |   repeated uint32 positionIds =17 ; | ||||||
|   repeated uint32 departmentIds =18 ; |   repeated uint32 departmentIds =18 ; | ||||||
|  |   uint32 fatherDepartmentId =19 ; | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
| message SendClockInWechatRequest { | message SendClockInWechatRequest { | ||||||
| @ -256,13 +215,19 @@ message MaiAccountResponse { | |||||||
|   string mailAccount      = 2; |   string mailAccount      = 2; | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
|  | message FddRemoveUserRequest { | ||||||
|  |   uint32 wxUserId      = 2; | ||||||
|  | } | ||||||
|  | 
 | ||||||
| message FddCreateUserRequest { | message FddCreateUserRequest { | ||||||
|   string openid        = 1 ; |   string openid        = 1 ; | ||||||
|   uint32 wxUserId      = 2; |   uint32 wxUserId      = 2; | ||||||
|   //string UserId        = 3; |   uint64 UserId        = 3; | ||||||
|   string customerId    = 4; |   string customerId    = 4; | ||||||
|   bool   isVerify      = 5; |   bool   isVerify      = 5; | ||||||
|   string   transactionNo      = 6; |   string   transactionNo      = 6; | ||||||
|  |   uint32   status      = 7; | ||||||
|  |   string   idType      = 8; | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
| message WxBoxUserInfoRequest { | message WxBoxUserInfoRequest { | ||||||
| @ -298,6 +263,8 @@ message FddInfo { | |||||||
|   string    customerId      = 2 ; |   string    customerId      = 2 ; | ||||||
|   bool      isVerify        = 3 ; |   bool      isVerify        = 3 ; | ||||||
|   string    transactionNo   = 4; |   string    transactionNo   = 4; | ||||||
|  |   uint32 status = 5; | ||||||
|  |   string    idType    =6; | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
| message UserInfo { | message UserInfo { | ||||||
| @ -314,10 +281,13 @@ message UserInfo { | |||||||
|   string    realIDImgB      = 18; |   string    realIDImgB      = 18; | ||||||
|   string    realNameIDName = 19; |   string    realNameIDName = 19; | ||||||
|   string    video = 20; |   string    video = 20; | ||||||
|  |   string idType = 21; //0 护照 港澳台 护照 通信证等 | ||||||
|  |   Passport passport = 22; //护照 港澳台 护照 通信证等 | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
| message CommonRequest { | message CommonRequest { | ||||||
|   uint64 ID         = 1 [json_name = "ID"]; |   uint64 ID         = 1 [json_name = "ID"]; | ||||||
|  |   string from         = 2 ; | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
| message WxAppRequest { | message WxAppRequest { | ||||||
| @ -418,7 +388,6 @@ message SendMsgRequest { | |||||||
|   uint32 mId  = 5; |   uint32 mId  = 5; | ||||||
|   string scope  = 6;  //标记模块 |   string scope  = 6;  //标记模块 | ||||||
|   string zone  = 7;   //地区 不同地区切换不同发送帐号 |   string zone  = 7;   //地区 不同地区切换不同发送帐号 | ||||||
|   string nonceStr = 8; |  | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
| message SendCustomMsgRequest { | message SendCustomMsgRequest { | ||||||
| @ -437,7 +406,6 @@ message CheckMsgRequest { | |||||||
|   string TelNum   = 2 [json_name = "telNum"]; |   string TelNum   = 2 [json_name = "telNum"]; | ||||||
|   string Code     = 3 [json_name = "code",(validator.field) = {string_not_empty: true,human_error: "70003"} ]; |   string Code     = 3 [json_name = "code",(validator.field) = {string_not_empty: true,human_error: "70003"} ]; | ||||||
|   string scope    = 4;//标记模块 |   string scope    = 4;//标记模块 | ||||||
|   string zone  = 5;   //地区 不同地区切换不同发送帐号 |  | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
| message SendMsgStatusResponse { | message SendMsgStatusResponse { | ||||||
| @ -488,9 +456,31 @@ message RemoveResponse { | |||||||
| 
 | 
 | ||||||
| message UpdateRequest { | message UpdateRequest { | ||||||
|   uint64 ID                           = 1 [json_name = "ID"];  //ID |   uint64 ID                           = 1 [json_name = "ID"];  //ID | ||||||
|   string Domain                       = 2 [json_name = "domain"]; |   string Domain                       = 2 [json_name = "domain",(validator.field) = {string_not_empty: true,human_error: "70001"} ]; | ||||||
|   string Language                     = 3 [json_name = "language"]; |   string NickName                     = 3 [json_name = "nickName"]; | ||||||
|   string NickName = 4 [json_name = "nickName"]; |   string Password                     = 4 [json_name = "password"];  //密码 | ||||||
|  |   string Avatar                       = 5 [json_name = "avatar"];    //头像 | ||||||
|  |   string Status                       = 7 [json_name = "status"]; | ||||||
|  |   string TelNum                       = 8 [json_name = "telNum"]; | ||||||
|  |   string EnterDate                    = 14 [json_name = "enterDate"]; | ||||||
|  |   Extend Extend                       = 17 [json_name = "extend"]; | ||||||
|  |   string Title                        = 18 [json_name = "title"]; | ||||||
|  |   string  JobNum                      = 19 [json_name = "jobNum"]; | ||||||
|  |   string BirthDate                    = 20 [json_name = "birthDate"]; | ||||||
|  |   uint64 Sex                          = 21 [json_name = "sex"]; | ||||||
|  |   string IdNum                        = 22 [json_name = "idNum"]; | ||||||
|  |   string RealName                     = 23 [json_name = "realName"]; | ||||||
|  |   string InvitationCode               = 24 [json_name = "invitationCode"]; | ||||||
|  |   string LeftDate                     = 25 [json_name = "leftDate"]; | ||||||
|  |   string Remark                       = 26 [json_name = "remark"]; | ||||||
|  |   string RecentImg = 27 [json_name = "recentImg"]; | ||||||
|  |   string ICNum = 28 [json_name = "icNum"]; | ||||||
|  |   string Train = 29 [json_name = "train"]; | ||||||
|  |   string Certificate = 30 [json_name = "certificate"]; | ||||||
|  |   repeated trainVideo TrainVideos = 31 [json_name = "trainVideos"]; | ||||||
|  |   Operator operator = 32; | ||||||
|  |   string SecurityCode = 33 [json_name = "securityCode"]; | ||||||
|  |   UserExtend userExtend = 34 ; | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
| message  Operator { | message  Operator { | ||||||
| @ -523,6 +513,18 @@ message ListRequest { | |||||||
|   string telNum = 6; |   string telNum = 6; | ||||||
|   string startEnterDate = 7; |   string startEnterDate = 7; | ||||||
|   string endEnterDate = 8; |   string endEnterDate = 8; | ||||||
|  |   string nickName = 9; | ||||||
|  |   uint32 isReal = 10; | ||||||
|  |   uint32 isMainLand = 11; | ||||||
|  |   string fromCode = 12; | ||||||
|  |   string bankName = 13; | ||||||
|  |   string bankNo = 14; | ||||||
|  |   uint32 sex = 15; | ||||||
|  |   string startRealTime = 16; | ||||||
|  |   string endRealTime = 17; | ||||||
|  |   string endCreatedAt = 18; | ||||||
|  |   string startCreatedAt = 19; | ||||||
|  |   string realName = 20; | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
| message ListResponse { | message ListResponse { | ||||||
| @ -550,6 +552,7 @@ message DecryptJwtResponse { | |||||||
|   string Account    = 3 [json_name = "account"]; |   string Account    = 3 [json_name = "account"]; | ||||||
|   string NickName   = 4 [json_name = "nickName"]; |   string NickName   = 4 [json_name = "nickName"]; | ||||||
|   bool   IsOffline  = 5 [json_name = "isOffline"]; |   bool   IsOffline  = 5 [json_name = "isOffline"]; | ||||||
|  |   string offlineCode = 6 ;//下线的原因 | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
| message DecryptJwtRequest { | message DecryptJwtRequest { | ||||||
| @ -575,23 +578,68 @@ message RequestStatus { | |||||||
| } | } | ||||||
| 
 | 
 | ||||||
| message RegistRequest { | message RegistRequest { | ||||||
|   string domain = 1; |   string Domain                       = 1 [json_name = "domain",(validator.field) = {string_not_empty: true,human_error: "70001"}]; | ||||||
|   string telNum = 2; |   string NickName                     = 2 [json_name = "nickName",(validator.field) = {length_lt: 20,string_not_empty: true,human_error: "70005"}]; | ||||||
|   string code = 3; |   string TelNum                       = 3 [json_name = "telNum"]; | ||||||
|   string address = 4; |   string Password                     = 4 [json_name = "password",(validator.field) = {length_gt: 5,human_error: "70007"}];  //密码 | ||||||
|   string telAreaCode = 5; |   string Avatar                       = 5 [json_name = "avatar"];    //头像 | ||||||
|   string language = 6; |   string EnterDate                    = 14 [json_name = "enterDate"]; | ||||||
|   string nickName = 7; |   Extend Extend                       = 15 [json_name = "extend"]; | ||||||
|  |   string JobNum                       = 16 [json_name = "JobNum"]; //工号 | ||||||
|  |   string Code                         = 17 [json_name = "code"]; //工号 | ||||||
|  |   string IdNum                        = 18 [json_name = "idNum"]; //年龄 | ||||||
|  |   string RealName                     = 19 [json_name = "realName"]; // | ||||||
|  |   string RecentImg = 20; | ||||||
|  |   string RealIDImgA = 21; | ||||||
|  |   string RealIDImgB = 22; | ||||||
|  |   string Video = 23; | ||||||
|  |   string ICNum = 24; | ||||||
|  |   string Train = 25; | ||||||
|  |   string Certificate = 26; | ||||||
|  |   string Source =27; | ||||||
|  |   Operator operator = 28; | ||||||
|  |   string Status =29; | ||||||
|  |   string BlockAddr = 30; | ||||||
|  |   Passport passport = 31; //护照 港澳台 护照 通信证等 | ||||||
|  |   string  leftDate = 32; //离职时间 | ||||||
|  |   UserExtend  UserExtend= 33; //离职时间 | ||||||
|  | } | ||||||
|  | 
 | ||||||
|  | message UserExtend { | ||||||
|  |   string id         = 1; | ||||||
|  |   string uuid       = 2; | ||||||
|  |   string userID     = 3; | ||||||
|  |   string address    = 4; | ||||||
|  |   string bankName   = 5; | ||||||
|  |   string bankNo     = 6; | ||||||
|  |   string zone       = 7; | ||||||
|  |   uint32 isMainland = 8; | ||||||
|  |   uint32 isReal = 9;      //是否实名 | ||||||
|  |   string fromCode = 10;   // 99999 | ||||||
|  |   string realTime = 11;   // 实名信息时间 | ||||||
|  |   string realName = 12;   // 实名信息时间 | ||||||
|  |   string idType   = 13;   //证件类型 | ||||||
|  |   string  idNo    = 14;   //证件号码 | ||||||
|  | } | ||||||
|  | 
 | ||||||
|  | message Passport { | ||||||
|  |   string idNum = 1; //编号 | ||||||
|  |   string realIDImgA = 2;//正反面 | ||||||
|  |   string realIDImgB = 3;//正反面 | ||||||
|  |   string name = 4; //名字 | ||||||
|  |   string idType = 5; //法大大 保持一致 "0"身份证号 "1" 护照号 "B" 港澳居民来往内地通行证号 "C" 台湾居民来往大陆通行证号 | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
| message LoginRequest { | message LoginRequest { | ||||||
|   string Domain     = 1 [json_name = "domain",(validator.field) = {string_not_empty: true,human_error: "70001"} ]; |   string Domain     = 1 [json_name = "domain",(validator.field) = {string_not_empty: true,human_error: "70001"} ]; | ||||||
|  |   //string TelNum     = 2 [json_name = "telNum",(validator.field) = {regex: "^1\\d{10}$",human_error: "70002"}]; | ||||||
|   string TelNum     = 2 [json_name = "telNum"]; |   string TelNum     = 2 [json_name = "telNum"]; | ||||||
|   string Code       = 3 [json_name = "code"]; |   string Code       = 3 [json_name = "code"]; | ||||||
|   string Password   = 4 [json_name = "password"]; |   string Password   = 4 [json_name = "password"]; | ||||||
|   string Ip         = 5 [json_name = "ip"]; |   string Ip         = 5 [json_name = "ip"]; | ||||||
|   bool passCheckIp  = 6 ; |   bool passCheckIp  = 6 ; | ||||||
|   string telAreaCode = 7; |   string from       = 7 [json_name = "from"]; //登陆来源 PC 还是 h5 之类的 | ||||||
|  |   string zone       = 8; | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
| message TokenInfo { | message TokenInfo { | ||||||
| @ -621,7 +669,7 @@ message AccountInfo { | |||||||
|   string    NickName        = 3 [json_name = "nickName"]; |   string    NickName        = 3 [json_name = "nickName"]; | ||||||
|   int64     Type            = 4 [json_name = "type"]; |   int64     Type            = 4 [json_name = "type"]; | ||||||
|   string    TelNum          = 5 [json_name = "telNum"]; |   string    TelNum          = 5 [json_name = "telNum"]; | ||||||
|   int32    Status          = 6 [json_name = "status"]; |   string    Status          = 6 [json_name = "status"]; | ||||||
|   string    Avatar          = 7 [json_name = "avatar"]; |   string    Avatar          = 7 [json_name = "avatar"]; | ||||||
|   string    CreateAt        = 8 [json_name = "createAt"]; |   string    CreateAt        = 8 [json_name = "createAt"]; | ||||||
|   uint64    RealNameID      = 9 [json_name = "realNameID"]; |   uint64    RealNameID      = 9 [json_name = "realNameID"]; | ||||||
| @ -636,7 +684,7 @@ message AccountInfo { | |||||||
|   string    JobNum          = 18 [json_name = "jobNum"]; |   string    JobNum          = 18 [json_name = "jobNum"]; | ||||||
|   string    BirthDate       = 19 [json_name = "birth_date"]; |   string    BirthDate       = 19 [json_name = "birth_date"]; | ||||||
|   uint64    Age             = 20 [json_name = "age"]; |   uint64    Age             = 20 [json_name = "age"]; | ||||||
|   string    Sex             = 21 [json_name = "sex"]; |   uint64    Sex             = 21 [json_name = "sex"]; | ||||||
|   string    Title           = 22 [json_name = "title"]; |   string    Title           = 22 [json_name = "title"]; | ||||||
|   repeated Department   Departments          = 23 [json_name = "departments"]; |   repeated Department   Departments          = 23 [json_name = "departments"]; | ||||||
|   string    Ip              = 24 [json_name = "ip"]; |   string    Ip              = 24 [json_name = "ip"]; | ||||||
| @ -659,6 +707,8 @@ message AccountInfo { | |||||||
|   string    updatedAt       = 41; |   string    updatedAt       = 41; | ||||||
|   string SecurityCode = 42 [json_name = "securityCode"]; |   string SecurityCode = 42 [json_name = "securityCode"]; | ||||||
|   string BlockAddr = 43 [json_name = "blockAddr"]; |   string BlockAddr = 43 [json_name = "blockAddr"]; | ||||||
|  |   string Language = 44 [json_name = "language"]; | ||||||
|  |   UserExtend userExtend = 45 ; | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
| message UserInfoV2 { | message UserInfoV2 { | ||||||
| @ -817,4 +867,62 @@ message ClockLogReq{ | |||||||
| message ClockLogListResponse{ | message ClockLogListResponse{ | ||||||
|   repeated ClockLogInfo data =1; |   repeated ClockLogInfo data =1; | ||||||
|   uint64 count = 2; |   uint64 count = 2; | ||||||
| } | } | ||||||
|  | 
 | ||||||
|  | message SendNationMsgRequest { | ||||||
|  |   string Domain   = 1 [json_name = "domain",(validator.field) = {string_not_empty: true,human_error: "70001"} ]; | ||||||
|  |   string TelNum   = 2 [json_name = "telNum",(validator.field) = {string_not_empty: true,human_error: "70001"}]; | ||||||
|  |   string Project  = 3 [json_name = "project"]; | ||||||
|  |   uint32 signNo  = 4; | ||||||
|  |   uint32 mId  = 5; | ||||||
|  |   string scope  = 6;//标记模块 | ||||||
|  | } | ||||||
|  | 
 | ||||||
|  | message UpdateLanguageRequest { | ||||||
|  |   string domain = 1 [json_name = "domain",(validator.field) = {string_not_empty: true,human_error: "70001"} ]; | ||||||
|  |   uint64 ID = 2; | ||||||
|  |   string language = 3; | ||||||
|  | } | ||||||
|  | 
 | ||||||
|  | message UpdateLanguageResponse { | ||||||
|  |   uint64 ID = 1; | ||||||
|  |   string telNum = 2; | ||||||
|  |   string language = 3; | ||||||
|  | } | ||||||
|  | 
 | ||||||
|  | message GenerateSliderCaptchaRequest { | ||||||
|  |   uint64 canvasWidth = 1; | ||||||
|  |   uint64 canvasHeight = 2; | ||||||
|  |   uint64 blockWidth = 3; | ||||||
|  |   uint64 blockHeight = 4; | ||||||
|  |   uint64 blockRadius = 5; | ||||||
|  |   uint64 place = 6; | ||||||
|  | } | ||||||
|  | 
 | ||||||
|  | message GenerateSliderCaptchaResponse { | ||||||
|  |   string nonceStr = 1; | ||||||
|  |   string canvasSrc = 2; | ||||||
|  |   string blockSrc = 3; | ||||||
|  |   uint64 blockY = 4; | ||||||
|  |   uint64 faceY = 5; | ||||||
|  |   uint64 blockX = 6; | ||||||
|  | } | ||||||
|  | 
 | ||||||
|  | message VerifySliderCaptchaRequest { | ||||||
|  |   string nonceStr = 1; | ||||||
|  |   float blockX = 2; | ||||||
|  | } | ||||||
|  | 
 | ||||||
|  | message VerifySliderCaptchaResponse { | ||||||
|  |   string nonceStr = 1; | ||||||
|  | } | ||||||
|  | 
 | ||||||
|  | message VerifySliderStatusRequest { | ||||||
|  |   string nonceStr = 1; | ||||||
|  | } | ||||||
|  | 
 | ||||||
|  | message VerifySliderStatusResponse { | ||||||
|  |   string nonceStr = 1; | ||||||
|  |   int32 status = 2; | ||||||
|  | } | ||||||
|  | 
 | ||||||
|  | |||||||
| @ -17,65 +17,28 @@ var _ = proto.Marshal | |||||||
| var _ = fmt.Errorf | var _ = fmt.Errorf | ||||||
| var _ = math.Inf | var _ = math.Inf | ||||||
| 
 | 
 | ||||||
| func (this *VerifySliderStatusRequest) Validate() error { | func (this *CheckBeforeRegisterRequest) Validate() error { | ||||||
| 	return nil | 	return nil | ||||||
| } | } | ||||||
| func (this *VerifySliderStatusResponse) Validate() error { | func (this *SampleAccountRequest) Validate() error { | ||||||
| 	return nil | 	return nil | ||||||
| } | } | ||||||
| func (this *SendNationMsgRequest) Validate() error { | func (this *SampleAccountResponse) Validate() error { | ||||||
| 	if this.Domain == "" { |  | ||||||
| 		return github_com_mwitkow_go_proto_validators.FieldError("Domain", fmt.Errorf(`70001`)) |  | ||||||
| 	} |  | ||||||
| 	if this.TelNum == "" { |  | ||||||
| 		return github_com_mwitkow_go_proto_validators.FieldError("TelNum", fmt.Errorf(`70001`)) |  | ||||||
| 	} |  | ||||||
| 	return nil | 	return nil | ||||||
| } | } | ||||||
| func (this *VerifySliderCaptchaResponse) Validate() error { | func (this *LoginAndSqueezeOtherResponse) Validate() error { | ||||||
| 	return nil | 	return nil | ||||||
| } | } | ||||||
| func (this *VerifySliderCaptchaRequest) Validate() error { | func (this *IsSamePersonResponse) Validate() error { | ||||||
| 	return nil | 	return nil | ||||||
| } | } | ||||||
| func (this *GenerateSliderCaptchaResponse) Validate() error { | func (this *IsSamePersonRequest) Validate() error { | ||||||
| 	return nil | 	return nil | ||||||
| } | } | ||||||
| func (this *GenerateSliderCaptchaRequest) Validate() error { | func (this *UpdatePassportStatusRequest) Validate() error { | ||||||
| 	return nil | 	return nil | ||||||
| } | } | ||||||
| func (this *CheckRealNameResponse) Validate() error { | func (this *CreateChainAccountResponse) Validate() error { | ||||||
| 	return nil |  | ||||||
| } |  | ||||||
| func (this *CheckRealNameRequest) Validate() error { |  | ||||||
| 	return nil |  | ||||||
| } |  | ||||||
| func (this *UserListResponse) Validate() error { |  | ||||||
| 	for _, item := range this.UserList { |  | ||||||
| 		if item != nil { |  | ||||||
| 			if err := github_com_mwitkow_go_proto_validators.CallValidatorIfExists(item); err != nil { |  | ||||||
| 				return github_com_mwitkow_go_proto_validators.FieldError("UserList", err) |  | ||||||
| 			} |  | ||||||
| 		} |  | ||||||
| 	} |  | ||||||
| 	return nil |  | ||||||
| } |  | ||||||
| func (this *UserListInfo) Validate() error { |  | ||||||
| 	return nil |  | ||||||
| } |  | ||||||
| func (this *UserListRequest) Validate() error { |  | ||||||
| 	return nil |  | ||||||
| } |  | ||||||
| func (this *UserInfoResponse) Validate() error { |  | ||||||
| 	return nil |  | ||||||
| } |  | ||||||
| func (this *RealNameResponse) Validate() error { |  | ||||||
| 	return nil |  | ||||||
| } |  | ||||||
| func (this *RealNameRequest) Validate() error { |  | ||||||
| 	return nil |  | ||||||
| } |  | ||||||
| func (this *RegisterResponse) Validate() error { |  | ||||||
| 	return nil | 	return nil | ||||||
| } | } | ||||||
| func (this *UsersByJobNumRequest) Validate() error { | func (this *UsersByJobNumRequest) Validate() error { | ||||||
| @ -114,6 +77,9 @@ func (this *CreateMaiAccountRequest) Validate() error { | |||||||
| func (this *MaiAccountResponse) Validate() error { | func (this *MaiAccountResponse) Validate() error { | ||||||
| 	return nil | 	return nil | ||||||
| } | } | ||||||
|  | func (this *FddRemoveUserRequest) Validate() error { | ||||||
|  | 	return nil | ||||||
|  | } | ||||||
| func (this *FddCreateUserRequest) Validate() error { | func (this *FddCreateUserRequest) Validate() error { | ||||||
| 	return nil | 	return nil | ||||||
| } | } | ||||||
| @ -146,6 +112,11 @@ func (this *FddInfo) Validate() error { | |||||||
| 	return nil | 	return nil | ||||||
| } | } | ||||||
| func (this *UserInfo) Validate() error { | func (this *UserInfo) Validate() error { | ||||||
|  | 	if this.Passport != nil { | ||||||
|  | 		if err := github_com_mwitkow_go_proto_validators.CallValidatorIfExists(this.Passport); err != nil { | ||||||
|  | 			return github_com_mwitkow_go_proto_validators.FieldError("Passport", err) | ||||||
|  | 		} | ||||||
|  | 	} | ||||||
| 	return nil | 	return nil | ||||||
| } | } | ||||||
| func (this *CommonRequest) Validate() error { | func (this *CommonRequest) Validate() error { | ||||||
| @ -280,6 +251,31 @@ func (this *RemoveResponse) Validate() error { | |||||||
| 	return nil | 	return nil | ||||||
| } | } | ||||||
| func (this *UpdateRequest) Validate() error { | func (this *UpdateRequest) Validate() error { | ||||||
|  | 	if this.Domain == "" { | ||||||
|  | 		return github_com_mwitkow_go_proto_validators.FieldError("Domain", fmt.Errorf(`70001`)) | ||||||
|  | 	} | ||||||
|  | 	if this.Extend != nil { | ||||||
|  | 		if err := github_com_mwitkow_go_proto_validators.CallValidatorIfExists(this.Extend); err != nil { | ||||||
|  | 			return github_com_mwitkow_go_proto_validators.FieldError("Extend", err) | ||||||
|  | 		} | ||||||
|  | 	} | ||||||
|  | 	for _, item := range this.TrainVideos { | ||||||
|  | 		if item != nil { | ||||||
|  | 			if err := github_com_mwitkow_go_proto_validators.CallValidatorIfExists(item); err != nil { | ||||||
|  | 				return github_com_mwitkow_go_proto_validators.FieldError("TrainVideos", err) | ||||||
|  | 			} | ||||||
|  | 		} | ||||||
|  | 	} | ||||||
|  | 	if this.Operator != nil { | ||||||
|  | 		if err := github_com_mwitkow_go_proto_validators.CallValidatorIfExists(this.Operator); err != nil { | ||||||
|  | 			return github_com_mwitkow_go_proto_validators.FieldError("Operator", err) | ||||||
|  | 		} | ||||||
|  | 	} | ||||||
|  | 	if this.UserExtend != nil { | ||||||
|  | 		if err := github_com_mwitkow_go_proto_validators.CallValidatorIfExists(this.UserExtend); err != nil { | ||||||
|  | 			return github_com_mwitkow_go_proto_validators.FieldError("UserExtend", err) | ||||||
|  | 		} | ||||||
|  | 	} | ||||||
| 	return nil | 	return nil | ||||||
| } | } | ||||||
| func (this *Operator) Validate() error { | func (this *Operator) Validate() error { | ||||||
| @ -346,6 +342,44 @@ func (this *RequestStatus) Validate() error { | |||||||
| 	return nil | 	return nil | ||||||
| } | } | ||||||
| func (this *RegistRequest) Validate() error { | func (this *RegistRequest) Validate() error { | ||||||
|  | 	if this.Domain == "" { | ||||||
|  | 		return github_com_mwitkow_go_proto_validators.FieldError("Domain", fmt.Errorf(`70001`)) | ||||||
|  | 	} | ||||||
|  | 	if this.NickName == "" { | ||||||
|  | 		return github_com_mwitkow_go_proto_validators.FieldError("NickName", fmt.Errorf(`70005`)) | ||||||
|  | 	} | ||||||
|  | 	if !(len(this.NickName) < 20) { | ||||||
|  | 		return github_com_mwitkow_go_proto_validators.FieldError("NickName", fmt.Errorf(`70005`)) | ||||||
|  | 	} | ||||||
|  | 	if !(len(this.Password) > 5) { | ||||||
|  | 		return github_com_mwitkow_go_proto_validators.FieldError("Password", fmt.Errorf(`70007`)) | ||||||
|  | 	} | ||||||
|  | 	if this.Extend != nil { | ||||||
|  | 		if err := github_com_mwitkow_go_proto_validators.CallValidatorIfExists(this.Extend); err != nil { | ||||||
|  | 			return github_com_mwitkow_go_proto_validators.FieldError("Extend", err) | ||||||
|  | 		} | ||||||
|  | 	} | ||||||
|  | 	if this.Operator != nil { | ||||||
|  | 		if err := github_com_mwitkow_go_proto_validators.CallValidatorIfExists(this.Operator); err != nil { | ||||||
|  | 			return github_com_mwitkow_go_proto_validators.FieldError("Operator", err) | ||||||
|  | 		} | ||||||
|  | 	} | ||||||
|  | 	if this.Passport != nil { | ||||||
|  | 		if err := github_com_mwitkow_go_proto_validators.CallValidatorIfExists(this.Passport); err != nil { | ||||||
|  | 			return github_com_mwitkow_go_proto_validators.FieldError("Passport", err) | ||||||
|  | 		} | ||||||
|  | 	} | ||||||
|  | 	if this.UserExtend != nil { | ||||||
|  | 		if err := github_com_mwitkow_go_proto_validators.CallValidatorIfExists(this.UserExtend); err != nil { | ||||||
|  | 			return github_com_mwitkow_go_proto_validators.FieldError("UserExtend", err) | ||||||
|  | 		} | ||||||
|  | 	} | ||||||
|  | 	return nil | ||||||
|  | } | ||||||
|  | func (this *UserExtend) Validate() error { | ||||||
|  | 	return nil | ||||||
|  | } | ||||||
|  | func (this *Passport) Validate() error { | ||||||
| 	return nil | 	return nil | ||||||
| } | } | ||||||
| func (this *LoginRequest) Validate() error { | func (this *LoginRequest) Validate() error { | ||||||
| @ -407,6 +441,11 @@ func (this *AccountInfo) Validate() error { | |||||||
| 			return github_com_mwitkow_go_proto_validators.FieldError("Operator", err) | 			return github_com_mwitkow_go_proto_validators.FieldError("Operator", err) | ||||||
| 		} | 		} | ||||||
| 	} | 	} | ||||||
|  | 	if this.UserExtend != nil { | ||||||
|  | 		if err := github_com_mwitkow_go_proto_validators.CallValidatorIfExists(this.UserExtend); err != nil { | ||||||
|  | 			return github_com_mwitkow_go_proto_validators.FieldError("UserExtend", err) | ||||||
|  | 		} | ||||||
|  | 	} | ||||||
| 	return nil | 	return nil | ||||||
| } | } | ||||||
| func (this *UserInfoV2) Validate() error { | func (this *UserInfoV2) Validate() error { | ||||||
| @ -522,3 +561,39 @@ func (this *ClockLogListResponse) Validate() error { | |||||||
| 	} | 	} | ||||||
| 	return nil | 	return nil | ||||||
| } | } | ||||||
|  | func (this *SendNationMsgRequest) Validate() error { | ||||||
|  | 	if this.Domain == "" { | ||||||
|  | 		return github_com_mwitkow_go_proto_validators.FieldError("Domain", fmt.Errorf(`70001`)) | ||||||
|  | 	} | ||||||
|  | 	if this.TelNum == "" { | ||||||
|  | 		return github_com_mwitkow_go_proto_validators.FieldError("TelNum", fmt.Errorf(`70001`)) | ||||||
|  | 	} | ||||||
|  | 	return nil | ||||||
|  | } | ||||||
|  | func (this *UpdateLanguageRequest) Validate() error { | ||||||
|  | 	if this.Domain == "" { | ||||||
|  | 		return github_com_mwitkow_go_proto_validators.FieldError("Domain", fmt.Errorf(`70001`)) | ||||||
|  | 	} | ||||||
|  | 	return nil | ||||||
|  | } | ||||||
|  | func (this *UpdateLanguageResponse) Validate() error { | ||||||
|  | 	return nil | ||||||
|  | } | ||||||
|  | func (this *GenerateSliderCaptchaRequest) Validate() error { | ||||||
|  | 	return nil | ||||||
|  | } | ||||||
|  | func (this *GenerateSliderCaptchaResponse) Validate() error { | ||||||
|  | 	return nil | ||||||
|  | } | ||||||
|  | func (this *VerifySliderCaptchaRequest) Validate() error { | ||||||
|  | 	return nil | ||||||
|  | } | ||||||
|  | func (this *VerifySliderCaptchaResponse) Validate() error { | ||||||
|  | 	return nil | ||||||
|  | } | ||||||
|  | func (this *VerifySliderStatusRequest) Validate() error { | ||||||
|  | 	return nil | ||||||
|  | } | ||||||
|  | func (this *VerifySliderStatusResponse) Validate() error { | ||||||
|  | 	return nil | ||||||
|  | } | ||||||
|  | |||||||
										
											
												File diff suppressed because it is too large
												Load Diff
											
										
									
								
							
							
								
								
									
										10455
									
								
								api/accountFiee/accountFiee.pb.go
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										10455
									
								
								api/accountFiee/accountFiee.pb.go
									
									
									
									
									
										Normal file
									
								
							
										
											
												File diff suppressed because it is too large
												Load Diff
											
										
									
								
							
							
								
								
									
										820
									
								
								api/accountFiee/accountFiee.proto
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										820
									
								
								api/accountFiee/accountFiee.proto
									
									
									
									
									
										Normal file
									
								
							| @ -0,0 +1,820 @@ | |||||||
|  | /* | ||||||
|  |  * Licensed to the Apache Software Foundation (ASF) under one or more | ||||||
|  |  * contributor license agreements.  See the NOTICE file distributed with | ||||||
|  |  * this work for additional information regarding copyright ownership. | ||||||
|  |  * The ASF licenses this file to You under the Apache License, Version 2.0 | ||||||
|  |  * (the "License"); you may not use this file except in compliance with | ||||||
|  |  * the License.  You may obtain a copy of the License at | ||||||
|  |  * | ||||||
|  |  *     http://www.apache.org/licenses/LICENSE-2.0 | ||||||
|  |  * | ||||||
|  |  * Unless required by applicable law or agreed to in writing, software | ||||||
|  |  * distributed under the License is distributed on an "AS IS" BASIS, | ||||||
|  |  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||||||
|  |  * See the License for the specific language governing permissions and | ||||||
|  |  * limitations under the License. | ||||||
|  |  */ | ||||||
|  | 
 | ||||||
|  | syntax = "proto3"; | ||||||
|  | package accountFiee; | ||||||
|  | import "github.com/mwitkow/go-proto-validators@v0.3.2/validator.proto"; | ||||||
|  | 
 | ||||||
|  | option go_package = "./;accountFiee"; | ||||||
|  | 
 | ||||||
|  | service AccountFiee { | ||||||
|  |   rpc Login (LoginRequest) returns (TokenInfo) {} | ||||||
|  |   rpc RefreshToken (RefreshTokenRequest) returns (TokenInfo) {} //刷新token | ||||||
|  |   rpc Logout (DecryptJwtRequest) returns (CommonResponse) {} | ||||||
|  |   rpc OffLine (CommonRequest) returns (CommonResponse) {} | ||||||
|  |   rpc OnlineLog (LoginInfosByUserIdRequest) returns (LoginLogsResponse) {}//根据用户id获取登录的信息 | ||||||
|  |   rpc OnlineLogById (OnlineLogByIdRequest) returns (LoginLog) {}//根据用户id获取登录的信息 | ||||||
|  |   rpc CheckPwd (CheckPwdRequest) returns (UpdateResponse) {}//检测密码是否正确 | ||||||
|  | //  rpc RegisterOrExist (RegistRequest) returns (RequestStatus) {} | ||||||
|  |   rpc SendMsg (SendMsgRequest) returns (SendMsgStatusResponse) {} //登陆发送验证码 | ||||||
|  |   rpc SendCustomMsg (SendCustomMsgRequest) returns (SendMsgStatusResponse) {}//定制化发送内容 | ||||||
|  |   rpc SendExCustomMsg (SendCustomMsgRequest) returns (SendMsgStatusResponse) {}//定制化发送内容 | ||||||
|  |   rpc SendMsgRegister (SendMsgRequest) returns (SendMsgStatusResponse) {}//注册发送 | ||||||
|  |   rpc CheckMsg (CheckMsgRequest) returns (SendMsgStatusResponse) {} | ||||||
|  |   rpc SendNewTelNumMsg (SendNewTelNumMsgRequest) returns (SendMsgStatusResponse) {}//发送新账号验证码,不携带新号码 | ||||||
|  |   rpc UpdateTelNum (SendNewTelNumMsgRequest) returns (SendMsgStatusResponse) {}//更新新手机号,校验新号码验证码 | ||||||
|  |   rpc Authentication (AuthenticationRequest) returns (RequestStatus) {} | ||||||
|  |   rpc DecryptJwt (DecryptJwtRequest) returns (DecryptJwtResponse) {}//最好放在调用方 | ||||||
|  |   rpc Info (InfoRequest) returns (UserInfoResponse) {} | ||||||
|  |   rpc JobNumGetInfo (JobNumGetInfoRequest) returns (InfoResponse) {} | ||||||
|  |   rpc List (ListRequest) returns (ListResponse) {} | ||||||
|  |   rpc RandList (ListRequest) returns (ListResponse) {} | ||||||
|  |   rpc ListByIDs (ListByIDsRequest) returns (ListResponse) {} | ||||||
|  |   rpc Remove (RemoveRequest) returns (RemoveResponse) {} | ||||||
|  |   rpc Update (UpdateRequest) returns (UpdateResponse) {} | ||||||
|  |   rpc UsersByTel (UsersByTelRequest) returns (ListResponse) {} | ||||||
|  |   rpc UserByTel (UserByTelRequest) returns (UserInfoResponse) {} | ||||||
|  |   rpc OnlySendMsg (SendMsgRequest) returns (SendMsgStatusResponse) {} //仅发验证码 | ||||||
|  |   rpc OnlyCheckMsg (CheckMsgRequest) returns (SendMsgStatusResponse) {}//仅校验之前发送的验证码 | ||||||
|  |   rpc MailAccountByNickName(MailAccountByNickNameRequest) returns(MaiAccountResponse){} //根据昵称姓名获取昵称的邮箱和拼音名称 | ||||||
|  |   rpc ListV2 (ListV2Request) returns (ListResponse) {}// 新版列表 查询 | ||||||
|  |   rpc QueryPersonnelWithTheSameName (QueryPersonnelWithTheSameNameRequest) returns (QueryPersonnelWithTheSameNameResponse) {}// 查询同名的员工 | ||||||
|  |   rpc UsersByJobNum (UsersByJobNumRequest) returns (ListResponse) {} | ||||||
|  |   rpc RealName (RealNameRequest) returns (RealNameResponse) {}//实名认证 | ||||||
|  |   rpc Register (RegistRequest) returns (RegisterResponse) {}//注册 | ||||||
|  |   rpc UserList (UserListRequest) returns (UserListResponse) {}//用户列表 | ||||||
|  |   rpc CheckRealName (CheckRealNameRequest) returns (CheckRealNameResponse) {}//审核实名 | ||||||
|  |   rpc GenerateSliderCaptcha(GenerateSliderCaptchaRequest) returns (GenerateSliderCaptchaResponse) {}// 生成滑块验证码图片+位置 | ||||||
|  |   rpc VerifySliderCaptcha(VerifySliderCaptchaRequest) returns (VerifySliderCaptchaResponse) {}// 验证滑块验证码位置 | ||||||
|  |   rpc SendNationMsg (SendNationMsgRequest) returns (SendMsgStatusResponse) {} //发送境外国际短信验证码 --艺术商城 | ||||||
|  |   rpc VerifySliderStatus(VerifySliderStatusRequest) returns (VerifySliderStatusResponse) {}// 验证滑块验证码状态 | ||||||
|  | } | ||||||
|  | 
 | ||||||
|  | message VerifySliderStatusRequest { | ||||||
|  |   string nonceStr = 1; | ||||||
|  | } | ||||||
|  | 
 | ||||||
|  | message VerifySliderStatusResponse { | ||||||
|  |   string nonceStr = 1; | ||||||
|  |   int32 status = 2; | ||||||
|  | } | ||||||
|  | 
 | ||||||
|  | message SendNationMsgRequest { | ||||||
|  |   string Domain   = 1 [json_name = "domain",(validator.field) = {string_not_empty: true,human_error: "70001"} ]; | ||||||
|  |   string TelNum   = 2 [json_name = "telNum",(validator.field) = {string_not_empty: true,human_error: "70001"}]; | ||||||
|  |   string Project  = 3 [json_name = "project"]; | ||||||
|  |   uint32 signNo  = 4; | ||||||
|  |   uint32 mId  = 5; | ||||||
|  |   string scope  = 6;//标记模块 | ||||||
|  | } | ||||||
|  | message VerifySliderCaptchaResponse { | ||||||
|  |   string nonceStr = 1; | ||||||
|  | } | ||||||
|  | 
 | ||||||
|  | message VerifySliderCaptchaRequest { | ||||||
|  |   string nonceStr = 1; | ||||||
|  |   float blockX = 2; | ||||||
|  | } | ||||||
|  | message GenerateSliderCaptchaResponse { | ||||||
|  |   string nonceStr = 1; | ||||||
|  |   string canvasSrc = 2; | ||||||
|  |   string blockSrc = 3; | ||||||
|  |   uint64 blockY = 4; | ||||||
|  |   uint64 faceY = 5; | ||||||
|  |   uint64 blockX = 6; | ||||||
|  | } | ||||||
|  | 
 | ||||||
|  | message GenerateSliderCaptchaRequest { | ||||||
|  |   uint64 canvasWidth = 1; | ||||||
|  |   uint64 canvasHeight = 2; | ||||||
|  |   uint64 blockWidth = 3; | ||||||
|  |   uint64 blockHeight = 4; | ||||||
|  |   uint64 blockRadius = 5; | ||||||
|  |   uint64 place = 6; | ||||||
|  | } | ||||||
|  | message CheckRealNameResponse{ | ||||||
|  |   uint64 id =1; | ||||||
|  |   string status =2; | ||||||
|  | } | ||||||
|  | message CheckRealNameRequest{ | ||||||
|  |   uint64 id = 1; | ||||||
|  |   bool pass = 2; | ||||||
|  |   string notPassRemarks = 3; | ||||||
|  | } | ||||||
|  | message UserListResponse{ | ||||||
|  |   uint64 count = 1; | ||||||
|  |   uint64 page = 2; | ||||||
|  |   uint64 pageSize = 3; | ||||||
|  |   repeated UserListInfo userList = 4; | ||||||
|  | } | ||||||
|  | message UserListInfo{ | ||||||
|  |   uint64 id = 1; | ||||||
|  |   int32 status = 2; | ||||||
|  |   string name = 3; | ||||||
|  |   string sex = 4; | ||||||
|  |   string nationality = 5; | ||||||
|  |   int32 documentType =6; | ||||||
|  |   string certificatePicture = 7; | ||||||
|  |   string validity = 8; | ||||||
|  |   string placeOfResidence = 9; | ||||||
|  |   string groupPhoto = 10; | ||||||
|  |   string attachment = 11; | ||||||
|  |   string registrationTime = 12; | ||||||
|  |   string auditTime = 13; | ||||||
|  |   string subNum = 14; | ||||||
|  |   string notPassRemarks = 15; | ||||||
|  |   string telNum = 16; | ||||||
|  |   string telAreaCode = 17; | ||||||
|  |   string language = 18; | ||||||
|  |   string subscriberNumber = 19; | ||||||
|  |   string nickName = 20; | ||||||
|  | } | ||||||
|  | message UserListRequest{ | ||||||
|  |   string domain = 1; | ||||||
|  |   string subNum = 2; | ||||||
|  |   int32 realNameOrNot = 3; | ||||||
|  |   string name = 4; | ||||||
|  |   string sex = 5; | ||||||
|  |   int32 documentType = 6; | ||||||
|  |   int32 auditStatus = 7; | ||||||
|  |   uint64 page = 8; | ||||||
|  |   uint64 pageSize = 9; | ||||||
|  | } | ||||||
|  | message UserInfoResponse{ | ||||||
|  |   uint64 id = 1; | ||||||
|  |   int32 status = 2; | ||||||
|  |   string name = 3; | ||||||
|  |   string sex = 4; | ||||||
|  |   string nationality = 5; | ||||||
|  |   int32 documentType =6; | ||||||
|  |   string certificatePicture = 7; | ||||||
|  |   string validity = 8; | ||||||
|  |   string placeOfResidence = 9; | ||||||
|  |   string groupPhoto = 10; | ||||||
|  |   string attachment = 11; | ||||||
|  |   string subNum = 12; | ||||||
|  |   string notPassRemarks = 13; | ||||||
|  |   string domain = 14; | ||||||
|  |   string language = 15; | ||||||
|  |   string subscriberNumber = 16; | ||||||
|  |   string nickName = 17; | ||||||
|  |   string telNum = 18; | ||||||
|  | } | ||||||
|  | message RealNameResponse{ | ||||||
|  |   uint64 id = 1; | ||||||
|  |   string status = 2; | ||||||
|  | } | ||||||
|  | message RealNameRequest{ | ||||||
|  |   uint64 id = 1; | ||||||
|  |   string name = 2; | ||||||
|  |   string sex = 3; | ||||||
|  |   string nationality = 4; | ||||||
|  |   int32 documentType = 5; | ||||||
|  |   string certificatePicture = 6; | ||||||
|  |   string validity = 7; | ||||||
|  |   string placeOfResidence = 8; | ||||||
|  |   string groupPhoto = 9; | ||||||
|  |   string attachment = 10; | ||||||
|  | } | ||||||
|  | message RegisterResponse{ | ||||||
|  |   uint64 ID = 1; | ||||||
|  |   uint64 status = 2; | ||||||
|  |   string token = 3; | ||||||
|  | } | ||||||
|  | message UsersByJobNumRequest{ | ||||||
|  |   string domain = 1 ; | ||||||
|  |   repeated string jobNum =2 ; | ||||||
|  | } | ||||||
|  | message QueryPersonnelWithTheSameNameRequest{ | ||||||
|  |   repeated string names = 1 ; | ||||||
|  |   string domain = 2 ; | ||||||
|  |   string status = 3 ; | ||||||
|  | } | ||||||
|  | message QueryPersonnelWithTheSameNameResponse{ | ||||||
|  |   repeated string names = 1 ; | ||||||
|  |   uint64 count = 2 ; | ||||||
|  | } | ||||||
|  | message ListV2Request { | ||||||
|  |   string domain   = 1 [json_name = "domain",(validator.field) = {string_not_empty: true,human_error: "70001"} ]; | ||||||
|  |   uint64 pageSize    = 2 ; | ||||||
|  |   uint64 page   = 3 ; | ||||||
|  |   string key   = 4 ; | ||||||
|  |   string nickName   = 5; | ||||||
|  |   string telNum   = 6 ; | ||||||
|  |   string status   = 7 ; | ||||||
|  |   string positionName   = 8 ; | ||||||
|  |   string jobNum   = 9 ; | ||||||
|  |   string mailAccount   = 10 ; | ||||||
|  |   string startEnterDate   = 11 ; | ||||||
|  |   string endEnterDate   = 12 ; | ||||||
|  |   uint32 positionId   = 13 ; | ||||||
|  |   uint32 departmentId   = 14 ; | ||||||
|  |   string departmentName =15 ; | ||||||
|  |   repeated string departmentNames =16 ; | ||||||
|  |   repeated uint32 positionIds =17 ; | ||||||
|  |   repeated uint32 departmentIds =18 ; | ||||||
|  | } | ||||||
|  | 
 | ||||||
|  | message SendClockInWechatRequest { | ||||||
|  |   string domain = 1; | ||||||
|  |   string telNum =2; | ||||||
|  |   string operatedAt =3; | ||||||
|  |   string clockType =4; | ||||||
|  |   uint32 userId =5; | ||||||
|  |   string ghId =6; | ||||||
|  |   string address =7; | ||||||
|  |   uint64 logId = 8; | ||||||
|  | } | ||||||
|  | message MailAccountByNickNameRequest { | ||||||
|  |   string Domain                       = 1 [json_name = "domain",(validator.field) = {string_not_empty: true,human_error: "70001"}]; | ||||||
|  |   string NickName                     = 2 [json_name = "nickName",(validator.field) = {length_lt: 20,string_not_empty: true,human_error: "70005"}]; | ||||||
|  |   uint32 ID                     = 3 ; | ||||||
|  | } | ||||||
|  | 
 | ||||||
|  | message CreateMaiAccountRequest { | ||||||
|  |   uint32 ID        = 1 ; | ||||||
|  |   string nickName      = 2; | ||||||
|  |   string domain        = 3 ; | ||||||
|  | } | ||||||
|  | 
 | ||||||
|  | message MaiAccountResponse { | ||||||
|  |   string englishName        = 1 ; | ||||||
|  |   string mailAccount      = 2; | ||||||
|  | } | ||||||
|  | 
 | ||||||
|  | message FddCreateUserRequest { | ||||||
|  |   string openid        = 1 ; | ||||||
|  |   uint32 wxUserId      = 2; | ||||||
|  |   //string UserId        = 3; | ||||||
|  |   string customerId    = 4; | ||||||
|  |   bool   isVerify      = 5; | ||||||
|  |   string   transactionNo      = 6; | ||||||
|  | } | ||||||
|  | 
 | ||||||
|  | message WxBoxUserInfoRequest { | ||||||
|  |   string openid        = 2 ; | ||||||
|  |   string ghId         = 3; | ||||||
|  | } | ||||||
|  | 
 | ||||||
|  | message WxGetOpenIdByCodeRequest { | ||||||
|  |   string code         = 1 ; | ||||||
|  |   string state        = 2 ; | ||||||
|  |   string ghId         = 3; | ||||||
|  | } | ||||||
|  | 
 | ||||||
|  | message WxGetOpenIdByCodeResponse { | ||||||
|  |   string openId         = 1 ; | ||||||
|  | } | ||||||
|  | 
 | ||||||
|  | message WxBoxTelNumByCodeResponse { | ||||||
|  |   string telNum         = 1 ; | ||||||
|  | } | ||||||
|  | 
 | ||||||
|  | message WxBoxUserInfo { | ||||||
|  |   string openId       = 1 ; | ||||||
|  |   string ghId         = 2 ; | ||||||
|  |   bool isNew          = 3 ; | ||||||
|  |   UserInfo user       = 4 ; | ||||||
|  |   uint32 wxUserId     = 5 ; | ||||||
|  |   FddInfo fdd         = 6 ; | ||||||
|  | } | ||||||
|  | 
 | ||||||
|  | message FddInfo { | ||||||
|  |   uint64    ID              = 1 ; | ||||||
|  |   string    customerId      = 2 ; | ||||||
|  |   bool      isVerify        = 3 ; | ||||||
|  |   string    transactionNo   = 4; | ||||||
|  | } | ||||||
|  | 
 | ||||||
|  | message UserInfo { | ||||||
|  |   uint64    ID              = 1 ; | ||||||
|  |   string    nickName        = 3 ; | ||||||
|  |   string    telNum          = 5 ; | ||||||
|  |   string    avatar          = 7 ; | ||||||
|  |   string    createAt        = 8 ; | ||||||
|  |   uint64    realNameID      = 9 ; | ||||||
|  |   string    realName        = 10; | ||||||
|  |   string    iDNum           = 11; | ||||||
|  |   string    domain          = 12; | ||||||
|  |   string    realIDImgA      = 17; | ||||||
|  |   string    realIDImgB      = 18; | ||||||
|  |   string    realNameIDName = 19; | ||||||
|  |   string    video = 20; | ||||||
|  | } | ||||||
|  | 
 | ||||||
|  | message CommonRequest { | ||||||
|  |   uint64 ID         = 1 [json_name = "ID"]; | ||||||
|  | } | ||||||
|  | 
 | ||||||
|  | message WxAppRequest { | ||||||
|  |   string GhId         = 1 [json_name = "ID"]; | ||||||
|  | } | ||||||
|  | 
 | ||||||
|  | message WxAppResponse { | ||||||
|  |   string AppID        = 1 [json_name = "appID"]; | ||||||
|  |   string AppSecret    = 2 [json_name = "appSecret"]; | ||||||
|  | } | ||||||
|  | 
 | ||||||
|  | message WxUserUpdateRequest { | ||||||
|  |   uint32 wxID          = 1 [json_name = "wxId" ,(validator.field) = {string_not_empty: true,human_error: "缺少参数wxID"} ]; | ||||||
|  |   uint32 userID        = 2 [json_name = "userID"]; | ||||||
|  | } | ||||||
|  | 
 | ||||||
|  | message WxUserOrCreateRequest { | ||||||
|  |   string OpenID        = 1 [json_name = "openID" ,(validator.field) = {string_not_empty: true,human_error: "缺少openid"} ]; | ||||||
|  |   string GhID          = 2 [json_name = "ghID" ,(validator.field) = {string_not_empty: true,human_error: "缺少参数ghid"} ]; | ||||||
|  | } | ||||||
|  | 
 | ||||||
|  | message WxUserResponse { | ||||||
|  |   string OpenID        = 1 [json_name = "openID"]; | ||||||
|  |   uint32 UserID        = 2 [json_name = "userID"]; | ||||||
|  |   string GhID          = 3 [json_name = "ghID"]; | ||||||
|  |   string RoleAuth      = 4 [json_name = "roleAuth"]; | ||||||
|  |   uint32 ID            = 5 [json_name = "ID"]; | ||||||
|  | } | ||||||
|  | 
 | ||||||
|  | 
 | ||||||
|  | message LoginLogsResponse { | ||||||
|  |   repeated LoginLog Data     = 1 [json_name = "data"]; | ||||||
|  | } | ||||||
|  | 
 | ||||||
|  | message LoginLog { | ||||||
|  |   string Domain     = 1 [json_name = "domain"]; | ||||||
|  |   uint64 ID         = 2 [json_name = "ID"]; | ||||||
|  |   uint64 UserId     = 3 [json_name = "userId"]; | ||||||
|  |   string Ip         = 4 [json_name = "ip"]; | ||||||
|  |   string Token      = 5 [json_name = "token"]; | ||||||
|  |   uint64 Status     = 6 [json_name = "status"]; | ||||||
|  |   string ExpireDate = 7 [json_name = "expireDate"]; | ||||||
|  |   string LastDate   = 8 [json_name = "lastDate"]; | ||||||
|  |   string LogoutDate = 9 [json_name = "logoutDate"]; | ||||||
|  |   string CreatedAt  = 10 [json_name = "createdAt"]; | ||||||
|  |   string Address    = 11 [json_name = "address"]; | ||||||
|  | } | ||||||
|  | 
 | ||||||
|  | message OnlineLogByIdRequest { | ||||||
|  |   string Domain = 1 [json_name = "domain"]; | ||||||
|  |   uint64 ID     = 2 [json_name = "ID"]; | ||||||
|  | } | ||||||
|  | 
 | ||||||
|  | message LoginInfosByUserIdRequest { | ||||||
|  |   string Domain     = 1 [json_name = "domain"]; | ||||||
|  |   uint64 UserId     = 2 [json_name = "userId"]; | ||||||
|  | } | ||||||
|  | 
 | ||||||
|  | message SendNewTelNumMsgRequest { | ||||||
|  |   string Domain     = 1 [json_name = "domain",(validator.field) = {string_not_empty: true,human_error: "70001"} ]; | ||||||
|  |   uint64 ID         = 2 [json_name = "ID",(validator.field) = {string_not_empty: true,human_error: "缺少参数"} ]; | ||||||
|  |   string NewTelNum  = 3 [json_name = "newTelNum"]; | ||||||
|  |   string Code       = 4 [json_name = "code"]; | ||||||
|  |   string Project    = 5 [json_name = "project"]; | ||||||
|  |   uint32 signNo     = 6 ; | ||||||
|  | } | ||||||
|  | 
 | ||||||
|  | message UserByTelRequest { | ||||||
|  |   string Domain   = 1 [json_name = "domain",(validator.field) = {string_not_empty: true,human_error: "70001"} ]; | ||||||
|  |   string Tel =2 [json_name = "tel"]; | ||||||
|  | } | ||||||
|  | 
 | ||||||
|  | message CommonResponse { | ||||||
|  | } | ||||||
|  | 
 | ||||||
|  | message UsersByTelRequest { | ||||||
|  |   string Domain   = 1 [json_name = "domain",(validator.field) = {string_not_empty: true,human_error: "70001"} ]; | ||||||
|  |   repeated string Tels =2 [json_name = "tels"]; | ||||||
|  | } | ||||||
|  | 
 | ||||||
|  | message ListByIDsRequest { | ||||||
|  |   string Domain   = 1 [json_name = "domain",(validator.field) = {string_not_empty: true,human_error: "70001"} ]; | ||||||
|  |   repeated uint64 IDs = 2 [json_name = "IDs"]; | ||||||
|  |   uint64 OrderType = 3 [json_name = "OrderType"]; | ||||||
|  |   uint64 Page = 4 [json_name = "page"]; | ||||||
|  |   uint64 PageSize = 5 [json_name = "pageSize"]; | ||||||
|  |   string NickName = 6 [json_name = "nickName"]; | ||||||
|  |   repeated string InvitationCode  = 7 [json_name = "invitationCode"]; | ||||||
|  | 
 | ||||||
|  | } | ||||||
|  | 
 | ||||||
|  | message SendMsgRequest { | ||||||
|  |   string Domain   = 1 [json_name = "domain",(validator.field) = {string_not_empty: true,human_error: "70001"} ]; | ||||||
|  |   string TelNum   = 2 [json_name = "telNum"]; | ||||||
|  |   //string TelNum   = 2 [json_name = "telNum",(validator.field) = {regex: "^1\\d{10}$",human_error: "70002"}]; | ||||||
|  |   string Project  = 3 [json_name = "project"]; | ||||||
|  |   uint32 signNo  = 4; | ||||||
|  |   uint32 mId  = 5; | ||||||
|  |   string scope  = 6;  //标记模块 | ||||||
|  |   string zone  = 7;   //地区 不同地区切换不同发送帐号 | ||||||
|  |   string nonceStr = 8; | ||||||
|  | } | ||||||
|  | 
 | ||||||
|  | message SendCustomMsgRequest { | ||||||
|  |   string Domain   = 1 [json_name = "domain",(validator.field) = {string_not_empty: true,human_error: "70001"} ]; | ||||||
|  |   string TelNum   = 2 [json_name = "telNum",(validator.field) = {regex: "^1\\d{10}$",human_error: "70002"}]; | ||||||
|  |   string Project  = 3 [json_name = "project"]; | ||||||
|  |   string Url      = 4 [json_name = "Url"]; | ||||||
|  |   uint64 ID       = 5 [json_name = "ID"]; | ||||||
|  |   uint64 MId      = 6 [json_name = "mId"]; | ||||||
|  |   uint64 Location = 7 [json_name = "location"]; | ||||||
|  |   uint32 SigNo = 8 [json_name = "sigNo"]; | ||||||
|  | } | ||||||
|  | 
 | ||||||
|  | message CheckMsgRequest { | ||||||
|  |   string Domain   = 1 [json_name = "domain",(validator.field) = {string_not_empty: true,human_error: "70001"} ]; | ||||||
|  |   string TelNum   = 2 [json_name = "telNum"]; | ||||||
|  |   string Code     = 3 [json_name = "code",(validator.field) = {string_not_empty: true,human_error: "70003"} ]; | ||||||
|  |   string scope    = 4;//标记模块 | ||||||
|  |   string zone  = 5;   //地区 不同地区切换不同发送帐号 | ||||||
|  | } | ||||||
|  | 
 | ||||||
|  | message SendMsgStatusResponse { | ||||||
|  | } | ||||||
|  | 
 | ||||||
|  | message RemoveRequest { | ||||||
|  |   string Domain   = 1 [json_name = "domain",(validator.field) = {string_not_empty: true,human_error: "70001"} ]; | ||||||
|  |   uint64 ID       = 2 [json_name = "ID",(validator.field) = {int_gt: 0,human_error: "70004"} ]; | ||||||
|  |   string code = 3; | ||||||
|  | } | ||||||
|  | message WriteOffRequest{ | ||||||
|  |   uint64 id = 1; | ||||||
|  |   string domain = 2; | ||||||
|  |   uint64 userId = 3; | ||||||
|  |   string tel = 4; | ||||||
|  |   string jonNum = 5; | ||||||
|  |   string userName = 6; | ||||||
|  |   string enterDate = 7; | ||||||
|  |   string positionName =8; | ||||||
|  |   uint64 positionId = 9; | ||||||
|  |   string siteName = 10; | ||||||
|  |   uint64 siteId =11; | ||||||
|  |   string authUrl =12; | ||||||
|  |   string type =13; | ||||||
|  |   uint32 status =14; | ||||||
|  |   string submitDate=15; | ||||||
|  | } | ||||||
|  | message WriteOffListRequest{ | ||||||
|  |   uint64 page = 1; | ||||||
|  |   uint64 pageSize =2; | ||||||
|  |   string domain = 3; | ||||||
|  |   string userName =4; | ||||||
|  |   uint64 userId = 5; | ||||||
|  |   uint64 siteId =6; | ||||||
|  |   string type =7; | ||||||
|  |   uint32 status =8; | ||||||
|  | } | ||||||
|  | message WriteOffApproveRequest{ | ||||||
|  |   uint64 id = 1; | ||||||
|  |   uint32 status = 2; | ||||||
|  | } | ||||||
|  | message WriteOffListResponse{ | ||||||
|  |   int64 total = 1; | ||||||
|  |   repeated WriteOffRequest writeOffList = 2; | ||||||
|  | } | ||||||
|  | message RemoveResponse { | ||||||
|  | } | ||||||
|  | 
 | ||||||
|  | message UpdateRequest { | ||||||
|  |   uint64 ID                           = 1 [json_name = "ID"];  //ID | ||||||
|  |   string Domain                       = 2 [json_name = "domain"]; | ||||||
|  |   string Language                     = 3 [json_name = "language"]; | ||||||
|  |   string NickName = 4 [json_name = "nickName"]; | ||||||
|  | } | ||||||
|  | 
 | ||||||
|  | message  Operator { | ||||||
|  |   uint32  ID = 1; | ||||||
|  |   string  Name = 2; | ||||||
|  | } | ||||||
|  | 
 | ||||||
|  | message  trainVideo { | ||||||
|  |   string  trainUUID = 1 [json_name = "trainUUID"]; | ||||||
|  |   string  trainDesc = 2 [json_name = "trainDesc"]; | ||||||
|  |   string  video = 3 [json_name = "video"]; | ||||||
|  |   string SecurityCode = 31 [json_name = "securityCode"]; | ||||||
|  | } | ||||||
|  | 
 | ||||||
|  | message UpdateResponse { | ||||||
|  | } | ||||||
|  | 
 | ||||||
|  | message PrivacyInfoRequest { | ||||||
|  |   uint64 ID                           = 1 [json_name = "ID"];  //ID | ||||||
|  |   string Domain                       = 2 [json_name = "domain",(validator.field) = {string_not_empty: true,human_error: "70001"} ]; | ||||||
|  |   string SecurityCode = 3 [json_name = "securityCode"]; | ||||||
|  | } | ||||||
|  | 
 | ||||||
|  | message ListRequest { | ||||||
|  |   string Domain   = 1 [json_name = "domain",(validator.field) = {string_not_empty: true,human_error: "70001"} ]; | ||||||
|  |   uint64 PageSize = 2 [json_name = "pageSize"]; | ||||||
|  |   uint64 Page     = 3 [json_name = "page"]; | ||||||
|  |   string key      = 4 [json_name = "key"]; | ||||||
|  |   string status   = 5 ; | ||||||
|  |   string telNum = 6; | ||||||
|  |   string startEnterDate = 7; | ||||||
|  |   string endEnterDate = 8; | ||||||
|  | } | ||||||
|  | 
 | ||||||
|  | message ListResponse { | ||||||
|  |   string Status                 = 1 [json_name = "status"]; | ||||||
|  |   uint64 Count                  = 2 [json_name = "count"]; | ||||||
|  |   repeated AccountInfo Data     = 3 [json_name = "data"]; | ||||||
|  |   uint64 AllCount               = 4 [json_name = "allCount"]; | ||||||
|  | } | ||||||
|  | 
 | ||||||
|  | message InfoRequest { | ||||||
|  |   string Domain   = 1 [json_name = "domain",(validator.field) = {string_not_empty: true,human_error: "70001"} ]; | ||||||
|  |   uint64 ID       = 2 [json_name = "id"]; | ||||||
|  |   string scene    = 3 ;//场景值 base-默认仅仅user数据 | ||||||
|  | } | ||||||
|  | 
 | ||||||
|  | message InfoResponse { | ||||||
|  |   string      Status    = 1 [json_name = "status"]; | ||||||
|  |   AccountInfo Info    = 2 [json_name = "accountInfo"]; | ||||||
|  |   bool        IsExist     = 3 [json_name = "isExist"]; | ||||||
|  | } | ||||||
|  | 
 | ||||||
|  | message DecryptJwtResponse { | ||||||
|  |   string Domain     = 1 [json_name = "status"]; | ||||||
|  |   uint64 ID         = 2 [json_name = "id"]; | ||||||
|  |   string Account    = 3 [json_name = "account"]; | ||||||
|  |   string NickName   = 4 [json_name = "nickName"]; | ||||||
|  |   bool   IsOffline  = 5 [json_name = "isOffline"]; | ||||||
|  | } | ||||||
|  | 
 | ||||||
|  | message DecryptJwtRequest { | ||||||
|  |   string token = 1 [json_name = "token"]; | ||||||
|  |   string Domain = 2 [json_name = "Domain"]; | ||||||
|  | } | ||||||
|  | 
 | ||||||
|  | message CheckPwdRequest { | ||||||
|  |   string Token = 1 [json_name = "token"]; | ||||||
|  |   string Password = 2 [json_name = "password"]; | ||||||
|  | } | ||||||
|  | 
 | ||||||
|  | message AuthenticationRequest { | ||||||
|  |   string Name = 1 [json_name = "name"]; | ||||||
|  |   string IDNum = 2 [json_name = "idNum",(validator.field) = {length_eq: 18,human_error: "70006"}]; | ||||||
|  |   string Token = 3 [json_name = "token"]; | ||||||
|  | } | ||||||
|  | 
 | ||||||
|  | message RequestStatus { | ||||||
|  |   string Status = 1 [json_name = "status"]; | ||||||
|  |   uint64 ID     = 2 [json_name = "ID"]; | ||||||
|  |   bool isExist     = 3; | ||||||
|  | } | ||||||
|  | 
 | ||||||
|  | message RegistRequest { | ||||||
|  |   string domain = 1; | ||||||
|  |   string telNum = 2; | ||||||
|  |   string code = 3; | ||||||
|  |   string address = 4; | ||||||
|  |   string telAreaCode = 5; | ||||||
|  |   string language = 6; | ||||||
|  |   string nickName = 7; | ||||||
|  | } | ||||||
|  | 
 | ||||||
|  | message LoginRequest { | ||||||
|  |   string Domain     = 1 [json_name = "domain",(validator.field) = {string_not_empty: true,human_error: "70001"} ]; | ||||||
|  |   string TelNum     = 2 [json_name = "telNum"]; | ||||||
|  |   string Code       = 3 [json_name = "code"]; | ||||||
|  |   string Password   = 4 [json_name = "password"]; | ||||||
|  |   string Ip         = 5 [json_name = "ip"]; | ||||||
|  |   bool passCheckIp  = 6 ; | ||||||
|  |   string telAreaCode = 7; | ||||||
|  | } | ||||||
|  | 
 | ||||||
|  | message TokenInfo { | ||||||
|  |   AccountInfo AccountInfo   = 1 [json_name = "accountInfo"]; | ||||||
|  |   string Token              = 2 [json_name = "token"]; | ||||||
|  |   string RefreshToken            = 4 [json_name = "refresh"]; | ||||||
|  |   bool IsSampleAddress      = 3 [json_name = "isSampleAddress"]; | ||||||
|  |   string nowAddress        = 5 [json_name = "nowAddress"]; | ||||||
|  | } | ||||||
|  | 
 | ||||||
|  | message Extend { | ||||||
|  |   string JumpTo = 1 [json_name = "jumpTo"]; | ||||||
|  |   string Lang = 2 [json_name = "lang"]; | ||||||
|  |   bool CanScan = 3 [json_name = "canScan"]; | ||||||
|  |   bool ResolutionRatio = 4 [json_name = "resolutionRatio"]; | ||||||
|  | } | ||||||
|  | 
 | ||||||
|  | message Department { | ||||||
|  |   uint64 ID = 1 [json_name = "ID"]; | ||||||
|  |   string Name = 2 [json_name = "name"]; | ||||||
|  | } | ||||||
|  | 
 | ||||||
|  | // The response message containing the greetings | ||||||
|  | message AccountInfo { | ||||||
|  |   uint64    ID              = 1 [json_name = "id"]; | ||||||
|  |   string    Account         = 2 [json_name = "account"]; | ||||||
|  |   string    NickName        = 3 [json_name = "nickName"]; | ||||||
|  |   int64     Type            = 4 [json_name = "type"]; | ||||||
|  |   string    TelNum          = 5 [json_name = "telNum"]; | ||||||
|  |   int32    Status          = 6 [json_name = "status"]; | ||||||
|  |   string    Avatar          = 7 [json_name = "avatar"]; | ||||||
|  |   string    CreateAt        = 8 [json_name = "createAt"]; | ||||||
|  |   uint64    RealNameID      = 9 [json_name = "realNameID"]; | ||||||
|  |   string    RealName        = 10 [json_name = "realName"]; | ||||||
|  |   string    IDNum           = 11 [json_name = "iDNum"]; | ||||||
|  |   string    MnemonicWords   = 12 [json_name = "mnemonicWords"]; | ||||||
|  |   uint64    IsNeedChange    = 13 [json_name = "isNeedChange"]; | ||||||
|  |   string    EnterDate       = 14 [json_name = "enterDate"]; | ||||||
|  |   float     WorkYear        = 15 [json_name = "workYear"]; | ||||||
|  |   string    Domain          = 16 [json_name = "domain"]; | ||||||
|  |   Extend    Extend          = 17 [json_name = "extend"]; | ||||||
|  |   string    JobNum          = 18 [json_name = "jobNum"]; | ||||||
|  |   string    BirthDate       = 19 [json_name = "birth_date"]; | ||||||
|  |   uint64    Age             = 20 [json_name = "age"]; | ||||||
|  |   string    Sex             = 21 [json_name = "sex"]; | ||||||
|  |   string    Title           = 22 [json_name = "title"]; | ||||||
|  |   repeated Department   Departments          = 23 [json_name = "departments"]; | ||||||
|  |   string    Ip              = 24 [json_name = "ip"]; | ||||||
|  |   string    LoginDate       = 25 [json_name = "loginDate"]; | ||||||
|  |   string    InvitationCode  = 26 [json_name = "invitationCode"]; | ||||||
|  |   uint64    NowLogId        = 27 [json_name = "nowLogId"]; | ||||||
|  |   bool      CanScan         = 28 [json_name = "canScan"]; | ||||||
|  |   string    LeftDate        = 29 [json_name = "leftDate"]; | ||||||
|  |   repeated  PositionUser  Positions = 30 [json_name = "positions"]; | ||||||
|  |   string    Remark        = 31 [json_name = "remark"]; | ||||||
|  |   string recentImg =32; | ||||||
|  |   repeated ClockUser clocks = 33; | ||||||
|  |   string mailAccount  = 34; | ||||||
|  |   string ICNum = 35 [json_name = "icNum"]; | ||||||
|  |   string englishName  = 36; | ||||||
|  |   string Train = 37 [json_name = "train"]; | ||||||
|  |   string Certificate = 38 [json_name = "certificate"]; | ||||||
|  |   repeated trainVideo TrainVideos = 39 [json_name = "trainVideos"]; | ||||||
|  |   Operator  operator        = 40; | ||||||
|  |   string    updatedAt       = 41; | ||||||
|  |   string SecurityCode = 42 [json_name = "securityCode"]; | ||||||
|  |   string BlockAddr = 43 [json_name = "blockAddr"]; | ||||||
|  | } | ||||||
|  | 
 | ||||||
|  | message UserInfoV2 { | ||||||
|  |   uint64    ID              = 1 ; | ||||||
|  |   string    Account         = 2 ; | ||||||
|  |   string    NickName        = 3 ; | ||||||
|  |   string    TelNum          = 4 ; | ||||||
|  |   string    Status          = 5 ; | ||||||
|  |   string    Avatar          = 6 ; | ||||||
|  |   string    CreateAt        = 7 ; | ||||||
|  |   string    RealName        = 8; | ||||||
|  |   string    IDNum           = 9; | ||||||
|  |   string    EnterDate       = 10; | ||||||
|  |   Extend    Extend          = 11; | ||||||
|  |   string    JobNum          = 12; | ||||||
|  |   string    recentImg       = 13; | ||||||
|  |   string    mailAccount     = 14; | ||||||
|  |   Operator  operator        = 15; | ||||||
|  |   string    updatedAt       = 16; | ||||||
|  | } | ||||||
|  | 
 | ||||||
|  | message RefreshTokenRequest { | ||||||
|  |   string    refreshToken    = 1 ; | ||||||
|  |   string    domain          = 2; | ||||||
|  |   string    ip              = 3 ; | ||||||
|  | } | ||||||
|  | 
 | ||||||
|  | message PositionUser { | ||||||
|  |   uint64            PositionID          = 1     [json_name = "positionID"]; | ||||||
|  |   string            PositionName        = 2     [json_name = "positionName"]; | ||||||
|  |   uint64            DepartmentId        = 3     [json_name = "departmentId"]; | ||||||
|  |   string            DepartmentCode      = 4     [json_name = "departmentCode"]; | ||||||
|  |   string            DepartmentName      = 5     [json_name = "departmentName"]; | ||||||
|  |   uint64            UserId              = 6     [json_name = "userId"]; | ||||||
|  |   string            UserName            = 7     [json_name = "userName"]; | ||||||
|  | } | ||||||
|  | message JobNumGetInfoRequest{ | ||||||
|  |   string jobNum = 1; | ||||||
|  |   string    domain          = 2; | ||||||
|  | } | ||||||
|  | message CreateClockDeviceRequest{ | ||||||
|  |   string deviceNum =1; | ||||||
|  |   string deviceName =2; | ||||||
|  |   string deviceSite = 3; | ||||||
|  | } | ||||||
|  | message UpdateClockDeviceRequest{ | ||||||
|  |   uint64 id = 1; | ||||||
|  |   string deviceNum =2; | ||||||
|  |   string deviceName =3; | ||||||
|  |   string deviceSite = 4; | ||||||
|  | } | ||||||
|  | message ClockDeviceResponse{ | ||||||
|  |   uint64 id = 1; | ||||||
|  | } | ||||||
|  | message RemoveClockDeviceRequest{ | ||||||
|  |   uint64 id = 1; | ||||||
|  | } | ||||||
|  | message ClockDeviceListRequest{ | ||||||
|  |   uint64 id =1; | ||||||
|  |   string deviceSite = 2; | ||||||
|  |   string deviceNum = 3; | ||||||
|  |   string deviceName = 4; | ||||||
|  |   uint64 page = 5 ; | ||||||
|  |   uint64 pageSize = 6 ; | ||||||
|  |   repeated uint64 ids = 7; | ||||||
|  | } | ||||||
|  | message ClockDeviceListResponse{ | ||||||
|  |   uint64 count =1; | ||||||
|  |   repeated ClockDeviceInfo data = 2; | ||||||
|  | } | ||||||
|  | message ClockUser{ | ||||||
|  |   uint64 id       =1; | ||||||
|  |   string createdAt =2; | ||||||
|  |   string updatedAt =3; | ||||||
|  |   string deletedAt =4; | ||||||
|  |   uint64 deviceID  =5; | ||||||
|  |   uint64 userId    =6; | ||||||
|  |   uint64 status    =7; | ||||||
|  |   ClockDeviceInfo device = 8; | ||||||
|  | } | ||||||
|  | message ClockDeviceInfo { | ||||||
|  |   uint64 id = 1 ; | ||||||
|  |   string createAt = 2 ; | ||||||
|  |   string updateAt = 3 ; | ||||||
|  |   string deviceSite = 4; | ||||||
|  |   string deviceNum = 5; | ||||||
|  |   string deviceName = 6; | ||||||
|  |   uint64 userNum = 7; | ||||||
|  |   repeated ClockUserRel data = 8 ; | ||||||
|  | } | ||||||
|  | 
 | ||||||
|  | message ClockDeviceInfoResponse{ | ||||||
|  |   uint64 count = 1; | ||||||
|  |   repeated ClockUserRel data = 2 ; | ||||||
|  | } | ||||||
|  | message ClockUserRel { | ||||||
|  |   uint64    id = 1 ; | ||||||
|  |   string    createAt = 2 ; | ||||||
|  |   string    updateAt = 3; | ||||||
|  |   string    nickName = 4 ; | ||||||
|  |   string    jobNum = 5 ; | ||||||
|  |   string icNum = 6; | ||||||
|  | } | ||||||
|  | message ClockDeviceInfoRequest{ | ||||||
|  |   uint64 id = 1; | ||||||
|  |   uint64 page = 2 ; | ||||||
|  |   uint64 pageSize = 3 ; | ||||||
|  | } | ||||||
|  | message ClockBatchBindRequest{ | ||||||
|  |   uint64 id = 1; | ||||||
|  |   repeated uint64 userId = 2; | ||||||
|  |   repeated uint64 deviceId =3; | ||||||
|  | } | ||||||
|  | message ClockBatchListResponse{ | ||||||
|  |  repeated ClockUserDeviceBatch data = 1; | ||||||
|  | } | ||||||
|  | message ClockUserDeviceBatch{ | ||||||
|  |   uint64 userId = 1; | ||||||
|  |   uint64 deviceId = 2; | ||||||
|  |   string JobNum = 3; | ||||||
|  |   string deviceNum = 4; | ||||||
|  |   string deviceName = 5; | ||||||
|  |   string workStatus = 6; | ||||||
|  | } | ||||||
|  | message ClockLogInfo{ | ||||||
|  |   uint64 id = 1; | ||||||
|  |   string sn = 2; | ||||||
|  |   string userId =3; | ||||||
|  |   string recogType =4; | ||||||
|  |   string recogTime =5; | ||||||
|  |   float gender =6; | ||||||
|  |   string photo =7; | ||||||
|  |   float passStatus =8; | ||||||
|  |   string userName =9; | ||||||
|  |   float userType =10; | ||||||
|  |   string confidence =11; | ||||||
|  |   float reflectivity =12; | ||||||
|  |   string cardNumber =13; | ||||||
|  |   string passWord =14; | ||||||
|  |   string qrCode =15; | ||||||
|  |   string tel = 16; | ||||||
|  |   string reasonVisit = 17; | ||||||
|  |   string receiverTel = 18; | ||||||
|  |   uint64 numOfPeople = 19; | ||||||
|  | } | ||||||
|  | message ClockLogReq{ | ||||||
|  |   uint64 id = 1; | ||||||
|  |   uint64 page = 2; | ||||||
|  |   uint64 pageSize = 3; | ||||||
|  |   string userName = 4; | ||||||
|  |   string recogType = 5; | ||||||
|  |   string deviceNum = 6; | ||||||
|  |   string recogDate = 7; | ||||||
|  |   uint64 userId = 8; | ||||||
|  | } | ||||||
|  | message ClockLogListResponse{ | ||||||
|  |   repeated ClockLogInfo data =1; | ||||||
|  |   uint64 count = 2; | ||||||
|  | } | ||||||
							
								
								
									
										524
									
								
								api/accountFiee/accountFiee.validator.pb.go
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										524
									
								
								api/accountFiee/accountFiee.validator.pb.go
									
									
									
									
									
										Normal file
									
								
							| @ -0,0 +1,524 @@ | |||||||
|  | // Code generated by protoc-gen-gogo. DO NOT EDIT.
 | ||||||
|  | // source: api/accountFiee/accountFiee.proto
 | ||||||
|  | 
 | ||||||
|  | package accountFiee | ||||||
|  | 
 | ||||||
|  | import ( | ||||||
|  | 	fmt "fmt" | ||||||
|  | 	math "math" | ||||||
|  | 	proto "github.com/golang/protobuf/proto" | ||||||
|  | 	_ "github.com/mwitkow/go-proto-validators" | ||||||
|  | 	regexp "regexp" | ||||||
|  | 	github_com_mwitkow_go_proto_validators "github.com/mwitkow/go-proto-validators" | ||||||
|  | ) | ||||||
|  | 
 | ||||||
|  | // Reference imports to suppress errors if they are not otherwise used.
 | ||||||
|  | var _ = proto.Marshal | ||||||
|  | var _ = fmt.Errorf | ||||||
|  | var _ = math.Inf | ||||||
|  | 
 | ||||||
|  | func (this *VerifySliderStatusRequest) Validate() error { | ||||||
|  | 	return nil | ||||||
|  | } | ||||||
|  | func (this *VerifySliderStatusResponse) Validate() error { | ||||||
|  | 	return nil | ||||||
|  | } | ||||||
|  | func (this *SendNationMsgRequest) Validate() error { | ||||||
|  | 	if this.Domain == "" { | ||||||
|  | 		return github_com_mwitkow_go_proto_validators.FieldError("Domain", fmt.Errorf(`70001`)) | ||||||
|  | 	} | ||||||
|  | 	if this.TelNum == "" { | ||||||
|  | 		return github_com_mwitkow_go_proto_validators.FieldError("TelNum", fmt.Errorf(`70001`)) | ||||||
|  | 	} | ||||||
|  | 	return nil | ||||||
|  | } | ||||||
|  | func (this *VerifySliderCaptchaResponse) Validate() error { | ||||||
|  | 	return nil | ||||||
|  | } | ||||||
|  | func (this *VerifySliderCaptchaRequest) Validate() error { | ||||||
|  | 	return nil | ||||||
|  | } | ||||||
|  | func (this *GenerateSliderCaptchaResponse) Validate() error { | ||||||
|  | 	return nil | ||||||
|  | } | ||||||
|  | func (this *GenerateSliderCaptchaRequest) Validate() error { | ||||||
|  | 	return nil | ||||||
|  | } | ||||||
|  | func (this *CheckRealNameResponse) Validate() error { | ||||||
|  | 	return nil | ||||||
|  | } | ||||||
|  | func (this *CheckRealNameRequest) Validate() error { | ||||||
|  | 	return nil | ||||||
|  | } | ||||||
|  | func (this *UserListResponse) Validate() error { | ||||||
|  | 	for _, item := range this.UserList { | ||||||
|  | 		if item != nil { | ||||||
|  | 			if err := github_com_mwitkow_go_proto_validators.CallValidatorIfExists(item); err != nil { | ||||||
|  | 				return github_com_mwitkow_go_proto_validators.FieldError("UserList", err) | ||||||
|  | 			} | ||||||
|  | 		} | ||||||
|  | 	} | ||||||
|  | 	return nil | ||||||
|  | } | ||||||
|  | func (this *UserListInfo) Validate() error { | ||||||
|  | 	return nil | ||||||
|  | } | ||||||
|  | func (this *UserListRequest) Validate() error { | ||||||
|  | 	return nil | ||||||
|  | } | ||||||
|  | func (this *UserInfoResponse) Validate() error { | ||||||
|  | 	return nil | ||||||
|  | } | ||||||
|  | func (this *RealNameResponse) Validate() error { | ||||||
|  | 	return nil | ||||||
|  | } | ||||||
|  | func (this *RealNameRequest) Validate() error { | ||||||
|  | 	return nil | ||||||
|  | } | ||||||
|  | func (this *RegisterResponse) Validate() error { | ||||||
|  | 	return nil | ||||||
|  | } | ||||||
|  | func (this *UsersByJobNumRequest) Validate() error { | ||||||
|  | 	return nil | ||||||
|  | } | ||||||
|  | func (this *QueryPersonnelWithTheSameNameRequest) Validate() error { | ||||||
|  | 	return nil | ||||||
|  | } | ||||||
|  | func (this *QueryPersonnelWithTheSameNameResponse) Validate() error { | ||||||
|  | 	return nil | ||||||
|  | } | ||||||
|  | func (this *ListV2Request) Validate() error { | ||||||
|  | 	if this.Domain == "" { | ||||||
|  | 		return github_com_mwitkow_go_proto_validators.FieldError("Domain", fmt.Errorf(`70001`)) | ||||||
|  | 	} | ||||||
|  | 	return nil | ||||||
|  | } | ||||||
|  | func (this *SendClockInWechatRequest) Validate() error { | ||||||
|  | 	return nil | ||||||
|  | } | ||||||
|  | func (this *MailAccountByNickNameRequest) Validate() error { | ||||||
|  | 	if this.Domain == "" { | ||||||
|  | 		return github_com_mwitkow_go_proto_validators.FieldError("Domain", fmt.Errorf(`70001`)) | ||||||
|  | 	} | ||||||
|  | 	if this.NickName == "" { | ||||||
|  | 		return github_com_mwitkow_go_proto_validators.FieldError("NickName", fmt.Errorf(`70005`)) | ||||||
|  | 	} | ||||||
|  | 	if !(len(this.NickName) < 20) { | ||||||
|  | 		return github_com_mwitkow_go_proto_validators.FieldError("NickName", fmt.Errorf(`70005`)) | ||||||
|  | 	} | ||||||
|  | 	return nil | ||||||
|  | } | ||||||
|  | func (this *CreateMaiAccountRequest) Validate() error { | ||||||
|  | 	return nil | ||||||
|  | } | ||||||
|  | func (this *MaiAccountResponse) Validate() error { | ||||||
|  | 	return nil | ||||||
|  | } | ||||||
|  | func (this *FddCreateUserRequest) Validate() error { | ||||||
|  | 	return nil | ||||||
|  | } | ||||||
|  | func (this *WxBoxUserInfoRequest) Validate() error { | ||||||
|  | 	return nil | ||||||
|  | } | ||||||
|  | func (this *WxGetOpenIdByCodeRequest) Validate() error { | ||||||
|  | 	return nil | ||||||
|  | } | ||||||
|  | func (this *WxGetOpenIdByCodeResponse) Validate() error { | ||||||
|  | 	return nil | ||||||
|  | } | ||||||
|  | func (this *WxBoxTelNumByCodeResponse) Validate() error { | ||||||
|  | 	return nil | ||||||
|  | } | ||||||
|  | func (this *WxBoxUserInfo) Validate() error { | ||||||
|  | 	if this.User != nil { | ||||||
|  | 		if err := github_com_mwitkow_go_proto_validators.CallValidatorIfExists(this.User); err != nil { | ||||||
|  | 			return github_com_mwitkow_go_proto_validators.FieldError("User", err) | ||||||
|  | 		} | ||||||
|  | 	} | ||||||
|  | 	if this.Fdd != nil { | ||||||
|  | 		if err := github_com_mwitkow_go_proto_validators.CallValidatorIfExists(this.Fdd); err != nil { | ||||||
|  | 			return github_com_mwitkow_go_proto_validators.FieldError("Fdd", err) | ||||||
|  | 		} | ||||||
|  | 	} | ||||||
|  | 	return nil | ||||||
|  | } | ||||||
|  | func (this *FddInfo) Validate() error { | ||||||
|  | 	return nil | ||||||
|  | } | ||||||
|  | func (this *UserInfo) Validate() error { | ||||||
|  | 	return nil | ||||||
|  | } | ||||||
|  | func (this *CommonRequest) Validate() error { | ||||||
|  | 	return nil | ||||||
|  | } | ||||||
|  | func (this *WxAppRequest) Validate() error { | ||||||
|  | 	return nil | ||||||
|  | } | ||||||
|  | func (this *WxAppResponse) Validate() error { | ||||||
|  | 	return nil | ||||||
|  | } | ||||||
|  | func (this *WxUserUpdateRequest) Validate() error { | ||||||
|  | 	return nil | ||||||
|  | } | ||||||
|  | func (this *WxUserOrCreateRequest) Validate() error { | ||||||
|  | 	if this.OpenID == "" { | ||||||
|  | 		return github_com_mwitkow_go_proto_validators.FieldError("OpenID", fmt.Errorf(`缺少openid`)) | ||||||
|  | 	} | ||||||
|  | 	if this.GhID == "" { | ||||||
|  | 		return github_com_mwitkow_go_proto_validators.FieldError("GhID", fmt.Errorf(`缺少参数ghid`)) | ||||||
|  | 	} | ||||||
|  | 	return nil | ||||||
|  | } | ||||||
|  | func (this *WxUserResponse) Validate() error { | ||||||
|  | 	return nil | ||||||
|  | } | ||||||
|  | func (this *LoginLogsResponse) Validate() error { | ||||||
|  | 	for _, item := range this.Data { | ||||||
|  | 		if item != nil { | ||||||
|  | 			if err := github_com_mwitkow_go_proto_validators.CallValidatorIfExists(item); err != nil { | ||||||
|  | 				return github_com_mwitkow_go_proto_validators.FieldError("Data", err) | ||||||
|  | 			} | ||||||
|  | 		} | ||||||
|  | 	} | ||||||
|  | 	return nil | ||||||
|  | } | ||||||
|  | func (this *LoginLog) Validate() error { | ||||||
|  | 	return nil | ||||||
|  | } | ||||||
|  | func (this *OnlineLogByIdRequest) Validate() error { | ||||||
|  | 	return nil | ||||||
|  | } | ||||||
|  | func (this *LoginInfosByUserIdRequest) Validate() error { | ||||||
|  | 	return nil | ||||||
|  | } | ||||||
|  | func (this *SendNewTelNumMsgRequest) Validate() error { | ||||||
|  | 	if this.Domain == "" { | ||||||
|  | 		return github_com_mwitkow_go_proto_validators.FieldError("Domain", fmt.Errorf(`70001`)) | ||||||
|  | 	} | ||||||
|  | 	return nil | ||||||
|  | } | ||||||
|  | func (this *UserByTelRequest) Validate() error { | ||||||
|  | 	if this.Domain == "" { | ||||||
|  | 		return github_com_mwitkow_go_proto_validators.FieldError("Domain", fmt.Errorf(`70001`)) | ||||||
|  | 	} | ||||||
|  | 	return nil | ||||||
|  | } | ||||||
|  | func (this *CommonResponse) Validate() error { | ||||||
|  | 	return nil | ||||||
|  | } | ||||||
|  | func (this *UsersByTelRequest) Validate() error { | ||||||
|  | 	if this.Domain == "" { | ||||||
|  | 		return github_com_mwitkow_go_proto_validators.FieldError("Domain", fmt.Errorf(`70001`)) | ||||||
|  | 	} | ||||||
|  | 	return nil | ||||||
|  | } | ||||||
|  | func (this *ListByIDsRequest) Validate() error { | ||||||
|  | 	if this.Domain == "" { | ||||||
|  | 		return github_com_mwitkow_go_proto_validators.FieldError("Domain", fmt.Errorf(`70001`)) | ||||||
|  | 	} | ||||||
|  | 	return nil | ||||||
|  | } | ||||||
|  | func (this *SendMsgRequest) Validate() error { | ||||||
|  | 	if this.Domain == "" { | ||||||
|  | 		return github_com_mwitkow_go_proto_validators.FieldError("Domain", fmt.Errorf(`70001`)) | ||||||
|  | 	} | ||||||
|  | 	return nil | ||||||
|  | } | ||||||
|  | 
 | ||||||
|  | var _regex_SendCustomMsgRequest_TelNum = regexp.MustCompile(`^1\d{10}$`) | ||||||
|  | 
 | ||||||
|  | func (this *SendCustomMsgRequest) Validate() error { | ||||||
|  | 	if this.Domain == "" { | ||||||
|  | 		return github_com_mwitkow_go_proto_validators.FieldError("Domain", fmt.Errorf(`70001`)) | ||||||
|  | 	} | ||||||
|  | 	if !_regex_SendCustomMsgRequest_TelNum.MatchString(this.TelNum) { | ||||||
|  | 		return github_com_mwitkow_go_proto_validators.FieldError("TelNum", fmt.Errorf(`70002`)) | ||||||
|  | 	} | ||||||
|  | 	return nil | ||||||
|  | } | ||||||
|  | func (this *CheckMsgRequest) Validate() error { | ||||||
|  | 	if this.Domain == "" { | ||||||
|  | 		return github_com_mwitkow_go_proto_validators.FieldError("Domain", fmt.Errorf(`70001`)) | ||||||
|  | 	} | ||||||
|  | 	if this.Code == "" { | ||||||
|  | 		return github_com_mwitkow_go_proto_validators.FieldError("Code", fmt.Errorf(`70003`)) | ||||||
|  | 	} | ||||||
|  | 	return nil | ||||||
|  | } | ||||||
|  | func (this *SendMsgStatusResponse) Validate() error { | ||||||
|  | 	return nil | ||||||
|  | } | ||||||
|  | func (this *RemoveRequest) Validate() error { | ||||||
|  | 	if this.Domain == "" { | ||||||
|  | 		return github_com_mwitkow_go_proto_validators.FieldError("Domain", fmt.Errorf(`70001`)) | ||||||
|  | 	} | ||||||
|  | 	if !(this.ID > 0) { | ||||||
|  | 		return github_com_mwitkow_go_proto_validators.FieldError("ID", fmt.Errorf(`70004`)) | ||||||
|  | 	} | ||||||
|  | 	return nil | ||||||
|  | } | ||||||
|  | func (this *WriteOffRequest) Validate() error { | ||||||
|  | 	return nil | ||||||
|  | } | ||||||
|  | func (this *WriteOffListRequest) Validate() error { | ||||||
|  | 	return nil | ||||||
|  | } | ||||||
|  | func (this *WriteOffApproveRequest) Validate() error { | ||||||
|  | 	return nil | ||||||
|  | } | ||||||
|  | func (this *WriteOffListResponse) Validate() error { | ||||||
|  | 	for _, item := range this.WriteOffList { | ||||||
|  | 		if item != nil { | ||||||
|  | 			if err := github_com_mwitkow_go_proto_validators.CallValidatorIfExists(item); err != nil { | ||||||
|  | 				return github_com_mwitkow_go_proto_validators.FieldError("WriteOffList", err) | ||||||
|  | 			} | ||||||
|  | 		} | ||||||
|  | 	} | ||||||
|  | 	return nil | ||||||
|  | } | ||||||
|  | func (this *RemoveResponse) Validate() error { | ||||||
|  | 	return nil | ||||||
|  | } | ||||||
|  | func (this *UpdateRequest) Validate() error { | ||||||
|  | 	return nil | ||||||
|  | } | ||||||
|  | func (this *Operator) Validate() error { | ||||||
|  | 	return nil | ||||||
|  | } | ||||||
|  | func (this *TrainVideo) Validate() error { | ||||||
|  | 	return nil | ||||||
|  | } | ||||||
|  | func (this *UpdateResponse) Validate() error { | ||||||
|  | 	return nil | ||||||
|  | } | ||||||
|  | func (this *PrivacyInfoRequest) Validate() error { | ||||||
|  | 	if this.Domain == "" { | ||||||
|  | 		return github_com_mwitkow_go_proto_validators.FieldError("Domain", fmt.Errorf(`70001`)) | ||||||
|  | 	} | ||||||
|  | 	return nil | ||||||
|  | } | ||||||
|  | func (this *ListRequest) Validate() error { | ||||||
|  | 	if this.Domain == "" { | ||||||
|  | 		return github_com_mwitkow_go_proto_validators.FieldError("Domain", fmt.Errorf(`70001`)) | ||||||
|  | 	} | ||||||
|  | 	return nil | ||||||
|  | } | ||||||
|  | func (this *ListResponse) Validate() error { | ||||||
|  | 	for _, item := range this.Data { | ||||||
|  | 		if item != nil { | ||||||
|  | 			if err := github_com_mwitkow_go_proto_validators.CallValidatorIfExists(item); err != nil { | ||||||
|  | 				return github_com_mwitkow_go_proto_validators.FieldError("Data", err) | ||||||
|  | 			} | ||||||
|  | 		} | ||||||
|  | 	} | ||||||
|  | 	return nil | ||||||
|  | } | ||||||
|  | func (this *InfoRequest) Validate() error { | ||||||
|  | 	if this.Domain == "" { | ||||||
|  | 		return github_com_mwitkow_go_proto_validators.FieldError("Domain", fmt.Errorf(`70001`)) | ||||||
|  | 	} | ||||||
|  | 	return nil | ||||||
|  | } | ||||||
|  | func (this *InfoResponse) Validate() error { | ||||||
|  | 	if this.Info != nil { | ||||||
|  | 		if err := github_com_mwitkow_go_proto_validators.CallValidatorIfExists(this.Info); err != nil { | ||||||
|  | 			return github_com_mwitkow_go_proto_validators.FieldError("Info", err) | ||||||
|  | 		} | ||||||
|  | 	} | ||||||
|  | 	return nil | ||||||
|  | } | ||||||
|  | func (this *DecryptJwtResponse) Validate() error { | ||||||
|  | 	return nil | ||||||
|  | } | ||||||
|  | func (this *DecryptJwtRequest) Validate() error { | ||||||
|  | 	return nil | ||||||
|  | } | ||||||
|  | func (this *CheckPwdRequest) Validate() error { | ||||||
|  | 	return nil | ||||||
|  | } | ||||||
|  | func (this *AuthenticationRequest) Validate() error { | ||||||
|  | 	if !(len(this.IDNum) == 18) { | ||||||
|  | 		return github_com_mwitkow_go_proto_validators.FieldError("IDNum", fmt.Errorf(`70006`)) | ||||||
|  | 	} | ||||||
|  | 	return nil | ||||||
|  | } | ||||||
|  | func (this *RequestStatus) Validate() error { | ||||||
|  | 	return nil | ||||||
|  | } | ||||||
|  | func (this *RegistRequest) Validate() error { | ||||||
|  | 	return nil | ||||||
|  | } | ||||||
|  | func (this *LoginRequest) Validate() error { | ||||||
|  | 	if this.Domain == "" { | ||||||
|  | 		return github_com_mwitkow_go_proto_validators.FieldError("Domain", fmt.Errorf(`70001`)) | ||||||
|  | 	} | ||||||
|  | 	return nil | ||||||
|  | } | ||||||
|  | func (this *TokenInfo) Validate() error { | ||||||
|  | 	if this.AccountInfo != nil { | ||||||
|  | 		if err := github_com_mwitkow_go_proto_validators.CallValidatorIfExists(this.AccountInfo); err != nil { | ||||||
|  | 			return github_com_mwitkow_go_proto_validators.FieldError("AccountInfo", err) | ||||||
|  | 		} | ||||||
|  | 	} | ||||||
|  | 	return nil | ||||||
|  | } | ||||||
|  | func (this *Extend) Validate() error { | ||||||
|  | 	return nil | ||||||
|  | } | ||||||
|  | func (this *Department) Validate() error { | ||||||
|  | 	return nil | ||||||
|  | } | ||||||
|  | func (this *AccountInfo) Validate() error { | ||||||
|  | 	if this.Extend != nil { | ||||||
|  | 		if err := github_com_mwitkow_go_proto_validators.CallValidatorIfExists(this.Extend); err != nil { | ||||||
|  | 			return github_com_mwitkow_go_proto_validators.FieldError("Extend", err) | ||||||
|  | 		} | ||||||
|  | 	} | ||||||
|  | 	for _, item := range this.Departments { | ||||||
|  | 		if item != nil { | ||||||
|  | 			if err := github_com_mwitkow_go_proto_validators.CallValidatorIfExists(item); err != nil { | ||||||
|  | 				return github_com_mwitkow_go_proto_validators.FieldError("Departments", err) | ||||||
|  | 			} | ||||||
|  | 		} | ||||||
|  | 	} | ||||||
|  | 	for _, item := range this.Positions { | ||||||
|  | 		if item != nil { | ||||||
|  | 			if err := github_com_mwitkow_go_proto_validators.CallValidatorIfExists(item); err != nil { | ||||||
|  | 				return github_com_mwitkow_go_proto_validators.FieldError("Positions", err) | ||||||
|  | 			} | ||||||
|  | 		} | ||||||
|  | 	} | ||||||
|  | 	for _, item := range this.Clocks { | ||||||
|  | 		if item != nil { | ||||||
|  | 			if err := github_com_mwitkow_go_proto_validators.CallValidatorIfExists(item); err != nil { | ||||||
|  | 				return github_com_mwitkow_go_proto_validators.FieldError("Clocks", err) | ||||||
|  | 			} | ||||||
|  | 		} | ||||||
|  | 	} | ||||||
|  | 	for _, item := range this.TrainVideos { | ||||||
|  | 		if item != nil { | ||||||
|  | 			if err := github_com_mwitkow_go_proto_validators.CallValidatorIfExists(item); err != nil { | ||||||
|  | 				return github_com_mwitkow_go_proto_validators.FieldError("TrainVideos", err) | ||||||
|  | 			} | ||||||
|  | 		} | ||||||
|  | 	} | ||||||
|  | 	if this.Operator != nil { | ||||||
|  | 		if err := github_com_mwitkow_go_proto_validators.CallValidatorIfExists(this.Operator); err != nil { | ||||||
|  | 			return github_com_mwitkow_go_proto_validators.FieldError("Operator", err) | ||||||
|  | 		} | ||||||
|  | 	} | ||||||
|  | 	return nil | ||||||
|  | } | ||||||
|  | func (this *UserInfoV2) Validate() error { | ||||||
|  | 	if this.Extend != nil { | ||||||
|  | 		if err := github_com_mwitkow_go_proto_validators.CallValidatorIfExists(this.Extend); err != nil { | ||||||
|  | 			return github_com_mwitkow_go_proto_validators.FieldError("Extend", err) | ||||||
|  | 		} | ||||||
|  | 	} | ||||||
|  | 	if this.Operator != nil { | ||||||
|  | 		if err := github_com_mwitkow_go_proto_validators.CallValidatorIfExists(this.Operator); err != nil { | ||||||
|  | 			return github_com_mwitkow_go_proto_validators.FieldError("Operator", err) | ||||||
|  | 		} | ||||||
|  | 	} | ||||||
|  | 	return nil | ||||||
|  | } | ||||||
|  | func (this *RefreshTokenRequest) Validate() error { | ||||||
|  | 	return nil | ||||||
|  | } | ||||||
|  | func (this *PositionUser) Validate() error { | ||||||
|  | 	return nil | ||||||
|  | } | ||||||
|  | func (this *JobNumGetInfoRequest) Validate() error { | ||||||
|  | 	return nil | ||||||
|  | } | ||||||
|  | func (this *CreateClockDeviceRequest) Validate() error { | ||||||
|  | 	return nil | ||||||
|  | } | ||||||
|  | func (this *UpdateClockDeviceRequest) Validate() error { | ||||||
|  | 	return nil | ||||||
|  | } | ||||||
|  | func (this *ClockDeviceResponse) Validate() error { | ||||||
|  | 	return nil | ||||||
|  | } | ||||||
|  | func (this *RemoveClockDeviceRequest) Validate() error { | ||||||
|  | 	return nil | ||||||
|  | } | ||||||
|  | func (this *ClockDeviceListRequest) Validate() error { | ||||||
|  | 	return nil | ||||||
|  | } | ||||||
|  | func (this *ClockDeviceListResponse) Validate() error { | ||||||
|  | 	for _, item := range this.Data { | ||||||
|  | 		if item != nil { | ||||||
|  | 			if err := github_com_mwitkow_go_proto_validators.CallValidatorIfExists(item); err != nil { | ||||||
|  | 				return github_com_mwitkow_go_proto_validators.FieldError("Data", err) | ||||||
|  | 			} | ||||||
|  | 		} | ||||||
|  | 	} | ||||||
|  | 	return nil | ||||||
|  | } | ||||||
|  | func (this *ClockUser) Validate() error { | ||||||
|  | 	if this.Device != nil { | ||||||
|  | 		if err := github_com_mwitkow_go_proto_validators.CallValidatorIfExists(this.Device); err != nil { | ||||||
|  | 			return github_com_mwitkow_go_proto_validators.FieldError("Device", err) | ||||||
|  | 		} | ||||||
|  | 	} | ||||||
|  | 	return nil | ||||||
|  | } | ||||||
|  | func (this *ClockDeviceInfo) Validate() error { | ||||||
|  | 	for _, item := range this.Data { | ||||||
|  | 		if item != nil { | ||||||
|  | 			if err := github_com_mwitkow_go_proto_validators.CallValidatorIfExists(item); err != nil { | ||||||
|  | 				return github_com_mwitkow_go_proto_validators.FieldError("Data", err) | ||||||
|  | 			} | ||||||
|  | 		} | ||||||
|  | 	} | ||||||
|  | 	return nil | ||||||
|  | } | ||||||
|  | func (this *ClockDeviceInfoResponse) Validate() error { | ||||||
|  | 	for _, item := range this.Data { | ||||||
|  | 		if item != nil { | ||||||
|  | 			if err := github_com_mwitkow_go_proto_validators.CallValidatorIfExists(item); err != nil { | ||||||
|  | 				return github_com_mwitkow_go_proto_validators.FieldError("Data", err) | ||||||
|  | 			} | ||||||
|  | 		} | ||||||
|  | 	} | ||||||
|  | 	return nil | ||||||
|  | } | ||||||
|  | func (this *ClockUserRel) Validate() error { | ||||||
|  | 	return nil | ||||||
|  | } | ||||||
|  | func (this *ClockDeviceInfoRequest) Validate() error { | ||||||
|  | 	return nil | ||||||
|  | } | ||||||
|  | func (this *ClockBatchBindRequest) Validate() error { | ||||||
|  | 	return nil | ||||||
|  | } | ||||||
|  | func (this *ClockBatchListResponse) Validate() error { | ||||||
|  | 	for _, item := range this.Data { | ||||||
|  | 		if item != nil { | ||||||
|  | 			if err := github_com_mwitkow_go_proto_validators.CallValidatorIfExists(item); err != nil { | ||||||
|  | 				return github_com_mwitkow_go_proto_validators.FieldError("Data", err) | ||||||
|  | 			} | ||||||
|  | 		} | ||||||
|  | 	} | ||||||
|  | 	return nil | ||||||
|  | } | ||||||
|  | func (this *ClockUserDeviceBatch) Validate() error { | ||||||
|  | 	return nil | ||||||
|  | } | ||||||
|  | func (this *ClockLogInfo) Validate() error { | ||||||
|  | 	return nil | ||||||
|  | } | ||||||
|  | func (this *ClockLogReq) Validate() error { | ||||||
|  | 	return nil | ||||||
|  | } | ||||||
|  | func (this *ClockLogListResponse) Validate() error { | ||||||
|  | 	for _, item := range this.Data { | ||||||
|  | 		if item != nil { | ||||||
|  | 			if err := github_com_mwitkow_go_proto_validators.CallValidatorIfExists(item); err != nil { | ||||||
|  | 				return github_com_mwitkow_go_proto_validators.FieldError("Data", err) | ||||||
|  | 			} | ||||||
|  | 		} | ||||||
|  | 	} | ||||||
|  | 	return nil | ||||||
|  | } | ||||||
							
								
								
									
										1859
									
								
								api/accountFiee/accountFiee_triple.pb.go
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										1859
									
								
								api/accountFiee/accountFiee_triple.pb.go
									
									
									
									
									
										Normal file
									
								
							
										
											
												File diff suppressed because it is too large
												Load Diff
											
										
									
								
							| @ -7,6 +7,7 @@ | |||||||
| package cast | package cast | ||||||
| 
 | 
 | ||||||
| import ( | import ( | ||||||
|  | 	_ "github.com/envoyproxy/protoc-gen-validate/validate" | ||||||
| 	protoreflect "google.golang.org/protobuf/reflect/protoreflect" | 	protoreflect "google.golang.org/protobuf/reflect/protoreflect" | ||||||
| 	protoimpl "google.golang.org/protobuf/runtime/protoimpl" | 	protoimpl "google.golang.org/protobuf/runtime/protoimpl" | ||||||
| 	_ "google.golang.org/protobuf/types/descriptorpb" | 	_ "google.golang.org/protobuf/types/descriptorpb" | ||||||
| @ -23,19 +24,182 @@ const ( | |||||||
| 	_ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) | 	_ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) | ||||||
| ) | ) | ||||||
| 
 | 
 | ||||||
|  | type PlatformType int32 | ||||||
|  | 
 | ||||||
|  | const ( | ||||||
|  | 	PlatformType_UNKNOWN PlatformType = 0 | ||||||
|  | 	PlatformType_TIKTOK  PlatformType = 1 | ||||||
|  | 	PlatformType_YOUTUBE PlatformType = 2 | ||||||
|  | 	PlatformType_INS     PlatformType = 3 | ||||||
|  | ) | ||||||
|  | 
 | ||||||
|  | // Enum value maps for PlatformType.
 | ||||||
|  | var ( | ||||||
|  | 	PlatformType_name = map[int32]string{ | ||||||
|  | 		0: "UNKNOWN", | ||||||
|  | 		1: "TIKTOK", | ||||||
|  | 		2: "YOUTUBE", | ||||||
|  | 		3: "INS", | ||||||
|  | 	} | ||||||
|  | 	PlatformType_value = map[string]int32{ | ||||||
|  | 		"UNKNOWN": 0, | ||||||
|  | 		"TIKTOK":  1, | ||||||
|  | 		"YOUTUBE": 2, | ||||||
|  | 		"INS":     3, | ||||||
|  | 	} | ||||||
|  | ) | ||||||
|  | 
 | ||||||
|  | func (x PlatformType) Enum() *PlatformType { | ||||||
|  | 	p := new(PlatformType) | ||||||
|  | 	*p = x | ||||||
|  | 	return p | ||||||
|  | } | ||||||
|  | 
 | ||||||
|  | func (x PlatformType) String() string { | ||||||
|  | 	return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) | ||||||
|  | } | ||||||
|  | 
 | ||||||
|  | func (PlatformType) Descriptor() protoreflect.EnumDescriptor { | ||||||
|  | 	return file_pb_fiee_cast_proto_enumTypes[0].Descriptor() | ||||||
|  | } | ||||||
|  | 
 | ||||||
|  | func (PlatformType) Type() protoreflect.EnumType { | ||||||
|  | 	return &file_pb_fiee_cast_proto_enumTypes[0] | ||||||
|  | } | ||||||
|  | 
 | ||||||
|  | func (x PlatformType) Number() protoreflect.EnumNumber { | ||||||
|  | 	return protoreflect.EnumNumber(x) | ||||||
|  | } | ||||||
|  | 
 | ||||||
|  | // Deprecated: Use PlatformType.Descriptor instead.
 | ||||||
|  | func (PlatformType) EnumDescriptor() ([]byte, []int) { | ||||||
|  | 	return file_pb_fiee_cast_proto_rawDescGZIP(), []int{0} | ||||||
|  | } | ||||||
|  | 
 | ||||||
|  | type MediaUserListReq struct { | ||||||
|  | 	state         protoimpl.MessageState | ||||||
|  | 	sizeCache     protoimpl.SizeCache | ||||||
|  | 	unknownFields protoimpl.UnknownFields | ||||||
|  | 
 | ||||||
|  | 	Phone            string `protobuf:"bytes,1,opt,name=phone,proto3" json:"phone,omitempty"` | ||||||
|  | 	UserPlatformName string `protobuf:"bytes,2,opt,name=userPlatformName,proto3" json:"userPlatformName,omitempty"` | ||||||
|  | 	ManagerName      string `protobuf:"bytes,3,opt,name=managerName,proto3" json:"managerName,omitempty"` | ||||||
|  | 	PlatformType     uint32 `protobuf:"varint,4,opt,name=platformType,proto3" json:"platformType,omitempty"` | ||||||
|  | } | ||||||
|  | 
 | ||||||
|  | func (x *MediaUserListReq) Reset() { | ||||||
|  | 	*x = MediaUserListReq{} | ||||||
|  | 	mi := &file_pb_fiee_cast_proto_msgTypes[0] | ||||||
|  | 	ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) | ||||||
|  | 	ms.StoreMessageInfo(mi) | ||||||
|  | } | ||||||
|  | 
 | ||||||
|  | func (x *MediaUserListReq) String() string { | ||||||
|  | 	return protoimpl.X.MessageStringOf(x) | ||||||
|  | } | ||||||
|  | 
 | ||||||
|  | func (*MediaUserListReq) ProtoMessage() {} | ||||||
|  | 
 | ||||||
|  | func (x *MediaUserListReq) ProtoReflect() protoreflect.Message { | ||||||
|  | 	mi := &file_pb_fiee_cast_proto_msgTypes[0] | ||||||
|  | 	if x != nil { | ||||||
|  | 		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) | ||||||
|  | 		if ms.LoadMessageInfo() == nil { | ||||||
|  | 			ms.StoreMessageInfo(mi) | ||||||
|  | 		} | ||||||
|  | 		return ms | ||||||
|  | 	} | ||||||
|  | 	return mi.MessageOf(x) | ||||||
|  | } | ||||||
|  | 
 | ||||||
|  | // Deprecated: Use MediaUserListReq.ProtoReflect.Descriptor instead.
 | ||||||
|  | func (*MediaUserListReq) Descriptor() ([]byte, []int) { | ||||||
|  | 	return file_pb_fiee_cast_proto_rawDescGZIP(), []int{0} | ||||||
|  | } | ||||||
|  | 
 | ||||||
|  | func (x *MediaUserListReq) GetPhone() string { | ||||||
|  | 	if x != nil { | ||||||
|  | 		return x.Phone | ||||||
|  | 	} | ||||||
|  | 	return "" | ||||||
|  | } | ||||||
|  | 
 | ||||||
|  | func (x *MediaUserListReq) GetUserPlatformName() string { | ||||||
|  | 	if x != nil { | ||||||
|  | 		return x.UserPlatformName | ||||||
|  | 	} | ||||||
|  | 	return "" | ||||||
|  | } | ||||||
|  | 
 | ||||||
|  | func (x *MediaUserListReq) GetManagerName() string { | ||||||
|  | 	if x != nil { | ||||||
|  | 		return x.ManagerName | ||||||
|  | 	} | ||||||
|  | 	return "" | ||||||
|  | } | ||||||
|  | 
 | ||||||
|  | func (x *MediaUserListReq) GetPlatformType() uint32 { | ||||||
|  | 	if x != nil { | ||||||
|  | 		return x.PlatformType | ||||||
|  | 	} | ||||||
|  | 	return 0 | ||||||
|  | } | ||||||
|  | 
 | ||||||
|  | type MediaUserListResp struct { | ||||||
|  | 	state         protoimpl.MessageState | ||||||
|  | 	sizeCache     protoimpl.SizeCache | ||||||
|  | 	unknownFields protoimpl.UnknownFields | ||||||
|  | } | ||||||
|  | 
 | ||||||
|  | func (x *MediaUserListResp) Reset() { | ||||||
|  | 	*x = MediaUserListResp{} | ||||||
|  | 	mi := &file_pb_fiee_cast_proto_msgTypes[1] | ||||||
|  | 	ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) | ||||||
|  | 	ms.StoreMessageInfo(mi) | ||||||
|  | } | ||||||
|  | 
 | ||||||
|  | func (x *MediaUserListResp) String() string { | ||||||
|  | 	return protoimpl.X.MessageStringOf(x) | ||||||
|  | } | ||||||
|  | 
 | ||||||
|  | func (*MediaUserListResp) ProtoMessage() {} | ||||||
|  | 
 | ||||||
|  | func (x *MediaUserListResp) ProtoReflect() protoreflect.Message { | ||||||
|  | 	mi := &file_pb_fiee_cast_proto_msgTypes[1] | ||||||
|  | 	if x != nil { | ||||||
|  | 		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) | ||||||
|  | 		if ms.LoadMessageInfo() == nil { | ||||||
|  | 			ms.StoreMessageInfo(mi) | ||||||
|  | 		} | ||||||
|  | 		return ms | ||||||
|  | 	} | ||||||
|  | 	return mi.MessageOf(x) | ||||||
|  | } | ||||||
|  | 
 | ||||||
|  | // Deprecated: Use MediaUserListResp.ProtoReflect.Descriptor instead.
 | ||||||
|  | func (*MediaUserListResp) Descriptor() ([]byte, []int) { | ||||||
|  | 	return file_pb_fiee_cast_proto_rawDescGZIP(), []int{1} | ||||||
|  | } | ||||||
|  | 
 | ||||||
| type UpdateMediaAccountReq struct { | type UpdateMediaAccountReq struct { | ||||||
| 	state         protoimpl.MessageState | 	state         protoimpl.MessageState | ||||||
| 	sizeCache     protoimpl.SizeCache | 	sizeCache     protoimpl.SizeCache | ||||||
| 	unknownFields protoimpl.UnknownFields | 	unknownFields protoimpl.UnknownFields | ||||||
| 
 | 
 | ||||||
| 	Phone       string `protobuf:"bytes,1,opt,name=phone,proto3" json:"phone,omitempty"` | 	PlatformType     PlatformType `protobuf:"varint,1,opt,name=platformType,proto3,enum=Cast.PlatformType" json:"platformType,omitempty"` | ||||||
| 	BindUserID  string `protobuf:"bytes,2,opt,name=bindUserID,proto3" json:"bindUserID,omitempty"` | 	PlatformUserName string       `protobuf:"bytes,2,opt,name=platformUserName,proto3" json:"platformUserName,omitempty"` | ||||||
| 	AccountUuid string `protobuf:"bytes,3,opt,name=accountUuid,proto3" json:"accountUuid,omitempty"` | 	PlatformUserID   string       `protobuf:"bytes,3,opt,name=platformUserID,proto3" json:"platformUserID,omitempty"` | ||||||
|  | 	ArtistUuid       string       `protobuf:"bytes,4,opt,name=artistUuid,proto3" json:"artistUuid,omitempty"` | ||||||
|  | 	ArtistUserName   string       `protobuf:"bytes,5,opt,name=artistUserName,proto3" json:"artistUserName,omitempty"` | ||||||
|  | 	ArtistPhone      string       `protobuf:"bytes,6,opt,name=artistPhone,proto3" json:"artistPhone,omitempty"` | ||||||
|  | 	MediaAccountUuid string       `protobuf:"bytes,7,opt,name=mediaAccountUuid,proto3" json:"mediaAccountUuid,omitempty"` | ||||||
|  | 	ManagerUuid      string       `protobuf:"bytes,8,opt,name=managerUuid,proto3" json:"managerUuid,omitempty"` | ||||||
|  | 	ManagerUserName  string       `protobuf:"bytes,9,opt,name=managerUserName,proto3" json:"managerUserName,omitempty"` | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
| func (x *UpdateMediaAccountReq) Reset() { | func (x *UpdateMediaAccountReq) Reset() { | ||||||
| 	*x = UpdateMediaAccountReq{} | 	*x = UpdateMediaAccountReq{} | ||||||
| 	mi := &file_pb_fiee_cast_proto_msgTypes[0] | 	mi := &file_pb_fiee_cast_proto_msgTypes[2] | ||||||
| 	ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) | 	ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) | ||||||
| 	ms.StoreMessageInfo(mi) | 	ms.StoreMessageInfo(mi) | ||||||
| } | } | ||||||
| @ -47,7 +211,7 @@ func (x *UpdateMediaAccountReq) String() string { | |||||||
| func (*UpdateMediaAccountReq) ProtoMessage() {} | func (*UpdateMediaAccountReq) ProtoMessage() {} | ||||||
| 
 | 
 | ||||||
| func (x *UpdateMediaAccountReq) ProtoReflect() protoreflect.Message { | func (x *UpdateMediaAccountReq) ProtoReflect() protoreflect.Message { | ||||||
| 	mi := &file_pb_fiee_cast_proto_msgTypes[0] | 	mi := &file_pb_fiee_cast_proto_msgTypes[2] | ||||||
| 	if x != nil { | 	if x != nil { | ||||||
| 		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) | 		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) | ||||||
| 		if ms.LoadMessageInfo() == nil { | 		if ms.LoadMessageInfo() == nil { | ||||||
| @ -60,26 +224,68 @@ func (x *UpdateMediaAccountReq) ProtoReflect() protoreflect.Message { | |||||||
| 
 | 
 | ||||||
| // Deprecated: Use UpdateMediaAccountReq.ProtoReflect.Descriptor instead.
 | // Deprecated: Use UpdateMediaAccountReq.ProtoReflect.Descriptor instead.
 | ||||||
| func (*UpdateMediaAccountReq) Descriptor() ([]byte, []int) { | func (*UpdateMediaAccountReq) Descriptor() ([]byte, []int) { | ||||||
| 	return file_pb_fiee_cast_proto_rawDescGZIP(), []int{0} | 	return file_pb_fiee_cast_proto_rawDescGZIP(), []int{2} | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
| func (x *UpdateMediaAccountReq) GetPhone() string { | func (x *UpdateMediaAccountReq) GetPlatformType() PlatformType { | ||||||
| 	if x != nil { | 	if x != nil { | ||||||
| 		return x.Phone | 		return x.PlatformType | ||||||
|  | 	} | ||||||
|  | 	return PlatformType_UNKNOWN | ||||||
|  | } | ||||||
|  | 
 | ||||||
|  | func (x *UpdateMediaAccountReq) GetPlatformUserName() string { | ||||||
|  | 	if x != nil { | ||||||
|  | 		return x.PlatformUserName | ||||||
| 	} | 	} | ||||||
| 	return "" | 	return "" | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
| func (x *UpdateMediaAccountReq) GetBindUserID() string { | func (x *UpdateMediaAccountReq) GetPlatformUserID() string { | ||||||
| 	if x != nil { | 	if x != nil { | ||||||
| 		return x.BindUserID | 		return x.PlatformUserID | ||||||
| 	} | 	} | ||||||
| 	return "" | 	return "" | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
| func (x *UpdateMediaAccountReq) GetAccountUuid() string { | func (x *UpdateMediaAccountReq) GetArtistUuid() string { | ||||||
| 	if x != nil { | 	if x != nil { | ||||||
| 		return x.AccountUuid | 		return x.ArtistUuid | ||||||
|  | 	} | ||||||
|  | 	return "" | ||||||
|  | } | ||||||
|  | 
 | ||||||
|  | func (x *UpdateMediaAccountReq) GetArtistUserName() string { | ||||||
|  | 	if x != nil { | ||||||
|  | 		return x.ArtistUserName | ||||||
|  | 	} | ||||||
|  | 	return "" | ||||||
|  | } | ||||||
|  | 
 | ||||||
|  | func (x *UpdateMediaAccountReq) GetArtistPhone() string { | ||||||
|  | 	if x != nil { | ||||||
|  | 		return x.ArtistPhone | ||||||
|  | 	} | ||||||
|  | 	return "" | ||||||
|  | } | ||||||
|  | 
 | ||||||
|  | func (x *UpdateMediaAccountReq) GetMediaAccountUuid() string { | ||||||
|  | 	if x != nil { | ||||||
|  | 		return x.MediaAccountUuid | ||||||
|  | 	} | ||||||
|  | 	return "" | ||||||
|  | } | ||||||
|  | 
 | ||||||
|  | func (x *UpdateMediaAccountReq) GetManagerUuid() string { | ||||||
|  | 	if x != nil { | ||||||
|  | 		return x.ManagerUuid | ||||||
|  | 	} | ||||||
|  | 	return "" | ||||||
|  | } | ||||||
|  | 
 | ||||||
|  | func (x *UpdateMediaAccountReq) GetManagerUserName() string { | ||||||
|  | 	if x != nil { | ||||||
|  | 		return x.ManagerUserName | ||||||
| 	} | 	} | ||||||
| 	return "" | 	return "" | ||||||
| } | } | ||||||
| @ -89,12 +295,12 @@ type UpdateMediaAccountResp struct { | |||||||
| 	sizeCache     protoimpl.SizeCache | 	sizeCache     protoimpl.SizeCache | ||||||
| 	unknownFields protoimpl.UnknownFields | 	unknownFields protoimpl.UnknownFields | ||||||
| 
 | 
 | ||||||
| 	AccountUuid string `protobuf:"bytes,1,opt,name=accountUuid,proto3" json:"accountUuid,omitempty"` | 	MediaAccountUuid string `protobuf:"bytes,1,opt,name=mediaAccountUuid,proto3" json:"mediaAccountUuid,omitempty"` | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
| func (x *UpdateMediaAccountResp) Reset() { | func (x *UpdateMediaAccountResp) Reset() { | ||||||
| 	*x = UpdateMediaAccountResp{} | 	*x = UpdateMediaAccountResp{} | ||||||
| 	mi := &file_pb_fiee_cast_proto_msgTypes[1] | 	mi := &file_pb_fiee_cast_proto_msgTypes[3] | ||||||
| 	ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) | 	ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) | ||||||
| 	ms.StoreMessageInfo(mi) | 	ms.StoreMessageInfo(mi) | ||||||
| } | } | ||||||
| @ -106,7 +312,7 @@ func (x *UpdateMediaAccountResp) String() string { | |||||||
| func (*UpdateMediaAccountResp) ProtoMessage() {} | func (*UpdateMediaAccountResp) ProtoMessage() {} | ||||||
| 
 | 
 | ||||||
| func (x *UpdateMediaAccountResp) ProtoReflect() protoreflect.Message { | func (x *UpdateMediaAccountResp) ProtoReflect() protoreflect.Message { | ||||||
| 	mi := &file_pb_fiee_cast_proto_msgTypes[1] | 	mi := &file_pb_fiee_cast_proto_msgTypes[3] | ||||||
| 	if x != nil { | 	if x != nil { | ||||||
| 		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) | 		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) | ||||||
| 		if ms.LoadMessageInfo() == nil { | 		if ms.LoadMessageInfo() == nil { | ||||||
| @ -119,12 +325,12 @@ func (x *UpdateMediaAccountResp) ProtoReflect() protoreflect.Message { | |||||||
| 
 | 
 | ||||||
| // Deprecated: Use UpdateMediaAccountResp.ProtoReflect.Descriptor instead.
 | // Deprecated: Use UpdateMediaAccountResp.ProtoReflect.Descriptor instead.
 | ||||||
| func (*UpdateMediaAccountResp) Descriptor() ([]byte, []int) { | func (*UpdateMediaAccountResp) Descriptor() ([]byte, []int) { | ||||||
| 	return file_pb_fiee_cast_proto_rawDescGZIP(), []int{1} | 	return file_pb_fiee_cast_proto_rawDescGZIP(), []int{3} | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
| func (x *UpdateMediaAccountResp) GetAccountUuid() string { | func (x *UpdateMediaAccountResp) GetMediaAccountUuid() string { | ||||||
| 	if x != nil { | 	if x != nil { | ||||||
| 		return x.AccountUuid | 		return x.MediaAccountUuid | ||||||
| 	} | 	} | ||||||
| 	return "" | 	return "" | ||||||
| } | } | ||||||
| @ -141,7 +347,7 @@ type UpdateWorkReq struct { | |||||||
| 
 | 
 | ||||||
| func (x *UpdateWorkReq) Reset() { | func (x *UpdateWorkReq) Reset() { | ||||||
| 	*x = UpdateWorkReq{} | 	*x = UpdateWorkReq{} | ||||||
| 	mi := &file_pb_fiee_cast_proto_msgTypes[2] | 	mi := &file_pb_fiee_cast_proto_msgTypes[4] | ||||||
| 	ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) | 	ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) | ||||||
| 	ms.StoreMessageInfo(mi) | 	ms.StoreMessageInfo(mi) | ||||||
| } | } | ||||||
| @ -153,7 +359,7 @@ func (x *UpdateWorkReq) String() string { | |||||||
| func (*UpdateWorkReq) ProtoMessage() {} | func (*UpdateWorkReq) ProtoMessage() {} | ||||||
| 
 | 
 | ||||||
| func (x *UpdateWorkReq) ProtoReflect() protoreflect.Message { | func (x *UpdateWorkReq) ProtoReflect() protoreflect.Message { | ||||||
| 	mi := &file_pb_fiee_cast_proto_msgTypes[2] | 	mi := &file_pb_fiee_cast_proto_msgTypes[4] | ||||||
| 	if x != nil { | 	if x != nil { | ||||||
| 		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) | 		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) | ||||||
| 		if ms.LoadMessageInfo() == nil { | 		if ms.LoadMessageInfo() == nil { | ||||||
| @ -166,7 +372,7 @@ func (x *UpdateWorkReq) ProtoReflect() protoreflect.Message { | |||||||
| 
 | 
 | ||||||
| // Deprecated: Use UpdateWorkReq.ProtoReflect.Descriptor instead.
 | // Deprecated: Use UpdateWorkReq.ProtoReflect.Descriptor instead.
 | ||||||
| func (*UpdateWorkReq) Descriptor() ([]byte, []int) { | func (*UpdateWorkReq) Descriptor() ([]byte, []int) { | ||||||
| 	return file_pb_fiee_cast_proto_rawDescGZIP(), []int{2} | 	return file_pb_fiee_cast_proto_rawDescGZIP(), []int{4} | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
| func (x *UpdateWorkReq) GetTitle() string { | func (x *UpdateWorkReq) GetTitle() string { | ||||||
| @ -200,7 +406,7 @@ type UpdateWorkResp struct { | |||||||
| 
 | 
 | ||||||
| func (x *UpdateWorkResp) Reset() { | func (x *UpdateWorkResp) Reset() { | ||||||
| 	*x = UpdateWorkResp{} | 	*x = UpdateWorkResp{} | ||||||
| 	mi := &file_pb_fiee_cast_proto_msgTypes[3] | 	mi := &file_pb_fiee_cast_proto_msgTypes[5] | ||||||
| 	ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) | 	ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) | ||||||
| 	ms.StoreMessageInfo(mi) | 	ms.StoreMessageInfo(mi) | ||||||
| } | } | ||||||
| @ -212,7 +418,7 @@ func (x *UpdateWorkResp) String() string { | |||||||
| func (*UpdateWorkResp) ProtoMessage() {} | func (*UpdateWorkResp) ProtoMessage() {} | ||||||
| 
 | 
 | ||||||
| func (x *UpdateWorkResp) ProtoReflect() protoreflect.Message { | func (x *UpdateWorkResp) ProtoReflect() protoreflect.Message { | ||||||
| 	mi := &file_pb_fiee_cast_proto_msgTypes[3] | 	mi := &file_pb_fiee_cast_proto_msgTypes[5] | ||||||
| 	if x != nil { | 	if x != nil { | ||||||
| 		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) | 		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) | ||||||
| 		if ms.LoadMessageInfo() == nil { | 		if ms.LoadMessageInfo() == nil { | ||||||
| @ -225,7 +431,7 @@ func (x *UpdateWorkResp) ProtoReflect() protoreflect.Message { | |||||||
| 
 | 
 | ||||||
| // Deprecated: Use UpdateWorkResp.ProtoReflect.Descriptor instead.
 | // Deprecated: Use UpdateWorkResp.ProtoReflect.Descriptor instead.
 | ||||||
| func (*UpdateWorkResp) Descriptor() ([]byte, []int) { | func (*UpdateWorkResp) Descriptor() ([]byte, []int) { | ||||||
| 	return file_pb_fiee_cast_proto_rawDescGZIP(), []int{3} | 	return file_pb_fiee_cast_proto_rawDescGZIP(), []int{5} | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
| func (x *UpdateWorkResp) GetWorkUuid() string { | func (x *UpdateWorkResp) GetWorkUuid() string { | ||||||
| @ -245,37 +451,76 @@ var file_pb_fiee_cast_proto_rawDesc = []byte{ | |||||||
| 	0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x64, 0x65, 0x73, 0x63, | 	0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x64, 0x65, 0x73, 0x63, | ||||||
| 	0x72, 0x69, 0x70, 0x74, 0x6f, 0x72, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1b, 0x67, 0x6f, | 	0x72, 0x69, 0x70, 0x74, 0x6f, 0x72, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1b, 0x67, 0x6f, | ||||||
| 	0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x65, 0x6d, | 	0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x65, 0x6d, | ||||||
| 	0x70, 0x74, 0x79, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x6f, 0x0a, 0x15, 0x55, 0x70, 0x64, | 	0x70, 0x74, 0x79, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x15, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, | ||||||
| 	0x61, 0x74, 0x65, 0x4d, 0x65, 0x64, 0x69, 0x61, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x52, | 	0x6e, 0x2f, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, | ||||||
| 	0x65, 0x71, 0x12, 0x14, 0x0a, 0x05, 0x70, 0x68, 0x6f, 0x6e, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, | 	0x22, 0x9a, 0x01, 0x0a, 0x10, 0x4d, 0x65, 0x64, 0x69, 0x61, 0x55, 0x73, 0x65, 0x72, 0x4c, 0x69, | ||||||
| 	0x09, 0x52, 0x05, 0x70, 0x68, 0x6f, 0x6e, 0x65, 0x12, 0x1e, 0x0a, 0x0a, 0x62, 0x69, 0x6e, 0x64, | 	0x73, 0x74, 0x52, 0x65, 0x71, 0x12, 0x14, 0x0a, 0x05, 0x70, 0x68, 0x6f, 0x6e, 0x65, 0x18, 0x01, | ||||||
| 	0x55, 0x73, 0x65, 0x72, 0x49, 0x44, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x62, 0x69, | 	0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x70, 0x68, 0x6f, 0x6e, 0x65, 0x12, 0x2a, 0x0a, 0x10, 0x75, | ||||||
| 	0x6e, 0x64, 0x55, 0x73, 0x65, 0x72, 0x49, 0x44, 0x12, 0x20, 0x0a, 0x0b, 0x61, 0x63, 0x63, 0x6f, | 	0x73, 0x65, 0x72, 0x50, 0x6c, 0x61, 0x74, 0x66, 0x6f, 0x72, 0x6d, 0x4e, 0x61, 0x6d, 0x65, 0x18, | ||||||
| 	0x75, 0x6e, 0x74, 0x55, 0x75, 0x69, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x61, | 	0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x10, 0x75, 0x73, 0x65, 0x72, 0x50, 0x6c, 0x61, 0x74, 0x66, | ||||||
| 	0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x55, 0x75, 0x69, 0x64, 0x22, 0x3a, 0x0a, 0x16, 0x55, 0x70, | 	0x6f, 0x72, 0x6d, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x20, 0x0a, 0x0b, 0x6d, 0x61, 0x6e, 0x61, 0x67, | ||||||
|  | 	0x65, 0x72, 0x4e, 0x61, 0x6d, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x6d, 0x61, | ||||||
|  | 	0x6e, 0x61, 0x67, 0x65, 0x72, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x22, 0x0a, 0x0c, 0x70, 0x6c, 0x61, | ||||||
|  | 	0x74, 0x66, 0x6f, 0x72, 0x6d, 0x54, 0x79, 0x70, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0d, 0x52, | ||||||
|  | 	0x0c, 0x70, 0x6c, 0x61, 0x74, 0x66, 0x6f, 0x72, 0x6d, 0x54, 0x79, 0x70, 0x65, 0x22, 0x13, 0x0a, | ||||||
|  | 	0x11, 0x4d, 0x65, 0x64, 0x69, 0x61, 0x55, 0x73, 0x65, 0x72, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, | ||||||
|  | 	0x73, 0x70, 0x22, 0x85, 0x03, 0x0a, 0x15, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x4d, 0x65, 0x64, | ||||||
|  | 	0x69, 0x61, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x52, 0x65, 0x71, 0x12, 0x36, 0x0a, 0x0c, | ||||||
|  | 	0x70, 0x6c, 0x61, 0x74, 0x66, 0x6f, 0x72, 0x6d, 0x54, 0x79, 0x70, 0x65, 0x18, 0x01, 0x20, 0x01, | ||||||
|  | 	0x28, 0x0e, 0x32, 0x12, 0x2e, 0x43, 0x61, 0x73, 0x74, 0x2e, 0x50, 0x6c, 0x61, 0x74, 0x66, 0x6f, | ||||||
|  | 	0x72, 0x6d, 0x54, 0x79, 0x70, 0x65, 0x52, 0x0c, 0x70, 0x6c, 0x61, 0x74, 0x66, 0x6f, 0x72, 0x6d, | ||||||
|  | 	0x54, 0x79, 0x70, 0x65, 0x12, 0x2a, 0x0a, 0x10, 0x70, 0x6c, 0x61, 0x74, 0x66, 0x6f, 0x72, 0x6d, | ||||||
|  | 	0x55, 0x73, 0x65, 0x72, 0x4e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x10, | ||||||
|  | 	0x70, 0x6c, 0x61, 0x74, 0x66, 0x6f, 0x72, 0x6d, 0x55, 0x73, 0x65, 0x72, 0x4e, 0x61, 0x6d, 0x65, | ||||||
|  | 	0x12, 0x26, 0x0a, 0x0e, 0x70, 0x6c, 0x61, 0x74, 0x66, 0x6f, 0x72, 0x6d, 0x55, 0x73, 0x65, 0x72, | ||||||
|  | 	0x49, 0x44, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0e, 0x70, 0x6c, 0x61, 0x74, 0x66, 0x6f, | ||||||
|  | 	0x72, 0x6d, 0x55, 0x73, 0x65, 0x72, 0x49, 0x44, 0x12, 0x1e, 0x0a, 0x0a, 0x61, 0x72, 0x74, 0x69, | ||||||
|  | 	0x73, 0x74, 0x55, 0x75, 0x69, 0x64, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x61, 0x72, | ||||||
|  | 	0x74, 0x69, 0x73, 0x74, 0x55, 0x75, 0x69, 0x64, 0x12, 0x26, 0x0a, 0x0e, 0x61, 0x72, 0x74, 0x69, | ||||||
|  | 	0x73, 0x74, 0x55, 0x73, 0x65, 0x72, 0x4e, 0x61, 0x6d, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, | ||||||
|  | 	0x52, 0x0e, 0x61, 0x72, 0x74, 0x69, 0x73, 0x74, 0x55, 0x73, 0x65, 0x72, 0x4e, 0x61, 0x6d, 0x65, | ||||||
|  | 	0x12, 0x20, 0x0a, 0x0b, 0x61, 0x72, 0x74, 0x69, 0x73, 0x74, 0x50, 0x68, 0x6f, 0x6e, 0x65, 0x18, | ||||||
|  | 	0x06, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x61, 0x72, 0x74, 0x69, 0x73, 0x74, 0x50, 0x68, 0x6f, | ||||||
|  | 	0x6e, 0x65, 0x12, 0x2a, 0x0a, 0x10, 0x6d, 0x65, 0x64, 0x69, 0x61, 0x41, 0x63, 0x63, 0x6f, 0x75, | ||||||
|  | 	0x6e, 0x74, 0x55, 0x75, 0x69, 0x64, 0x18, 0x07, 0x20, 0x01, 0x28, 0x09, 0x52, 0x10, 0x6d, 0x65, | ||||||
|  | 	0x64, 0x69, 0x61, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x55, 0x75, 0x69, 0x64, 0x12, 0x20, | ||||||
|  | 	0x0a, 0x0b, 0x6d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x72, 0x55, 0x75, 0x69, 0x64, 0x18, 0x08, 0x20, | ||||||
|  | 	0x01, 0x28, 0x09, 0x52, 0x0b, 0x6d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x72, 0x55, 0x75, 0x69, 0x64, | ||||||
|  | 	0x12, 0x28, 0x0a, 0x0f, 0x6d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x72, 0x55, 0x73, 0x65, 0x72, 0x4e, | ||||||
|  | 	0x61, 0x6d, 0x65, 0x18, 0x09, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0f, 0x6d, 0x61, 0x6e, 0x61, 0x67, | ||||||
|  | 	0x65, 0x72, 0x55, 0x73, 0x65, 0x72, 0x4e, 0x61, 0x6d, 0x65, 0x22, 0x44, 0x0a, 0x16, 0x55, 0x70, | ||||||
| 	0x64, 0x61, 0x74, 0x65, 0x4d, 0x65, 0x64, 0x69, 0x61, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, | 	0x64, 0x61, 0x74, 0x65, 0x4d, 0x65, 0x64, 0x69, 0x61, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, | ||||||
| 	0x52, 0x65, 0x73, 0x70, 0x12, 0x20, 0x0a, 0x0b, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x55, | 	0x52, 0x65, 0x73, 0x70, 0x12, 0x2a, 0x0a, 0x10, 0x6d, 0x65, 0x64, 0x69, 0x61, 0x41, 0x63, 0x63, | ||||||
| 	0x75, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x61, 0x63, 0x63, 0x6f, 0x75, | 	0x6f, 0x75, 0x6e, 0x74, 0x55, 0x75, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x10, | ||||||
| 	0x6e, 0x74, 0x55, 0x75, 0x69, 0x64, 0x22, 0x55, 0x0a, 0x0d, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, | 	0x6d, 0x65, 0x64, 0x69, 0x61, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x55, 0x75, 0x69, 0x64, | ||||||
| 	0x57, 0x6f, 0x72, 0x6b, 0x52, 0x65, 0x71, 0x12, 0x14, 0x0a, 0x05, 0x74, 0x69, 0x74, 0x6c, 0x65, | 	0x22, 0x55, 0x0a, 0x0d, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x57, 0x6f, 0x72, 0x6b, 0x52, 0x65, | ||||||
| 	0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x74, 0x69, 0x74, 0x6c, 0x65, 0x12, 0x18, 0x0a, | 	0x71, 0x12, 0x14, 0x0a, 0x05, 0x74, 0x69, 0x74, 0x6c, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, | ||||||
| 	0x07, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, | 	0x52, 0x05, 0x74, 0x69, 0x74, 0x6c, 0x65, 0x12, 0x18, 0x0a, 0x07, 0x63, 0x6f, 0x6e, 0x74, 0x65, | ||||||
| 	0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x12, 0x14, 0x0a, 0x05, 0x69, 0x6d, 0x61, 0x67, 0x65, | 	0x6e, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, | ||||||
| 	0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x69, 0x6d, 0x61, 0x67, 0x65, 0x22, 0x2c, 0x0a, | 	0x74, 0x12, 0x14, 0x0a, 0x05, 0x69, 0x6d, 0x61, 0x67, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, | ||||||
| 	0x0e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x57, 0x6f, 0x72, 0x6b, 0x52, 0x65, 0x73, 0x70, 0x12, | 	0x52, 0x05, 0x69, 0x6d, 0x61, 0x67, 0x65, 0x22, 0x2c, 0x0a, 0x0e, 0x55, 0x70, 0x64, 0x61, 0x74, | ||||||
| 	0x1a, 0x0a, 0x08, 0x77, 0x6f, 0x72, 0x6b, 0x55, 0x75, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, | 	0x65, 0x57, 0x6f, 0x72, 0x6b, 0x52, 0x65, 0x73, 0x70, 0x12, 0x1a, 0x0a, 0x08, 0x77, 0x6f, 0x72, | ||||||
| 	0x09, 0x52, 0x08, 0x77, 0x6f, 0x72, 0x6b, 0x55, 0x75, 0x69, 0x64, 0x32, 0x94, 0x01, 0x0a, 0x04, | 	0x6b, 0x55, 0x75, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x77, 0x6f, 0x72, | ||||||
| 	0x43, 0x61, 0x73, 0x74, 0x12, 0x51, 0x0a, 0x12, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x4d, 0x65, | 	0x6b, 0x55, 0x75, 0x69, 0x64, 0x2a, 0x3d, 0x0a, 0x0c, 0x50, 0x6c, 0x61, 0x74, 0x66, 0x6f, 0x72, | ||||||
| 	0x64, 0x69, 0x61, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x1b, 0x2e, 0x43, 0x61, 0x73, | 	0x6d, 0x54, 0x79, 0x70, 0x65, 0x12, 0x0b, 0x0a, 0x07, 0x55, 0x4e, 0x4b, 0x4e, 0x4f, 0x57, 0x4e, | ||||||
| 	0x74, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x4d, 0x65, 0x64, 0x69, 0x61, 0x41, 0x63, 0x63, | 	0x10, 0x00, 0x12, 0x0a, 0x0a, 0x06, 0x54, 0x49, 0x4b, 0x54, 0x4f, 0x4b, 0x10, 0x01, 0x12, 0x0b, | ||||||
| 	0x6f, 0x75, 0x6e, 0x74, 0x52, 0x65, 0x71, 0x1a, 0x1c, 0x2e, 0x43, 0x61, 0x73, 0x74, 0x2e, 0x55, | 	0x0a, 0x07, 0x59, 0x4f, 0x55, 0x54, 0x55, 0x42, 0x45, 0x10, 0x02, 0x12, 0x07, 0x0a, 0x03, 0x49, | ||||||
|  | 	0x4e, 0x53, 0x10, 0x03, 0x32, 0xd8, 0x01, 0x0a, 0x04, 0x43, 0x61, 0x73, 0x74, 0x12, 0x42, 0x0a, | ||||||
|  | 	0x0d, 0x4d, 0x65, 0x64, 0x69, 0x61, 0x55, 0x73, 0x65, 0x72, 0x4c, 0x69, 0x73, 0x74, 0x12, 0x16, | ||||||
|  | 	0x2e, 0x43, 0x61, 0x73, 0x74, 0x2e, 0x4d, 0x65, 0x64, 0x69, 0x61, 0x55, 0x73, 0x65, 0x72, 0x4c, | ||||||
|  | 	0x69, 0x73, 0x74, 0x52, 0x65, 0x71, 0x1a, 0x17, 0x2e, 0x43, 0x61, 0x73, 0x74, 0x2e, 0x4d, 0x65, | ||||||
|  | 	0x64, 0x69, 0x61, 0x55, 0x73, 0x65, 0x72, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, 0x73, 0x70, 0x22, | ||||||
|  | 	0x00, 0x12, 0x51, 0x0a, 0x12, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x4d, 0x65, 0x64, 0x69, 0x61, | ||||||
|  | 	0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x1b, 0x2e, 0x43, 0x61, 0x73, 0x74, 0x2e, 0x55, | ||||||
| 	0x70, 0x64, 0x61, 0x74, 0x65, 0x4d, 0x65, 0x64, 0x69, 0x61, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, | 	0x70, 0x64, 0x61, 0x74, 0x65, 0x4d, 0x65, 0x64, 0x69, 0x61, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, | ||||||
| 	0x74, 0x52, 0x65, 0x73, 0x70, 0x22, 0x00, 0x12, 0x39, 0x0a, 0x0a, 0x55, 0x70, 0x64, 0x61, 0x74, | 	0x74, 0x52, 0x65, 0x71, 0x1a, 0x1c, 0x2e, 0x43, 0x61, 0x73, 0x74, 0x2e, 0x55, 0x70, 0x64, 0x61, | ||||||
| 	0x65, 0x57, 0x6f, 0x72, 0x6b, 0x12, 0x13, 0x2e, 0x43, 0x61, 0x73, 0x74, 0x2e, 0x55, 0x70, 0x64, | 	0x74, 0x65, 0x4d, 0x65, 0x64, 0x69, 0x61, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x52, 0x65, | ||||||
| 	0x61, 0x74, 0x65, 0x57, 0x6f, 0x72, 0x6b, 0x52, 0x65, 0x71, 0x1a, 0x14, 0x2e, 0x43, 0x61, 0x73, | 	0x73, 0x70, 0x22, 0x00, 0x12, 0x39, 0x0a, 0x0a, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x57, 0x6f, | ||||||
| 	0x74, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x57, 0x6f, 0x72, 0x6b, 0x52, 0x65, 0x73, 0x70, | 	0x72, 0x6b, 0x12, 0x13, 0x2e, 0x43, 0x61, 0x73, 0x74, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, | ||||||
| 	0x22, 0x00, 0x42, 0x0d, 0x5a, 0x0b, 0x2e, 0x2f, 0x63, 0x61, 0x73, 0x74, 0x3b, 0x63, 0x61, 0x73, | 	0x57, 0x6f, 0x72, 0x6b, 0x52, 0x65, 0x71, 0x1a, 0x14, 0x2e, 0x43, 0x61, 0x73, 0x74, 0x2e, 0x55, | ||||||
| 	0x74, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, | 	0x70, 0x64, 0x61, 0x74, 0x65, 0x57, 0x6f, 0x72, 0x6b, 0x52, 0x65, 0x73, 0x70, 0x22, 0x00, 0x42, | ||||||
|  | 	0x0d, 0x5a, 0x0b, 0x2e, 0x2f, 0x63, 0x61, 0x73, 0x74, 0x3b, 0x63, 0x61, 0x73, 0x74, 0x62, 0x06, | ||||||
|  | 	0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
| var ( | var ( | ||||||
| @ -290,23 +535,30 @@ func file_pb_fiee_cast_proto_rawDescGZIP() []byte { | |||||||
| 	return file_pb_fiee_cast_proto_rawDescData | 	return file_pb_fiee_cast_proto_rawDescData | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
| var file_pb_fiee_cast_proto_msgTypes = make([]protoimpl.MessageInfo, 4) | var file_pb_fiee_cast_proto_enumTypes = make([]protoimpl.EnumInfo, 1) | ||||||
|  | var file_pb_fiee_cast_proto_msgTypes = make([]protoimpl.MessageInfo, 6) | ||||||
| var file_pb_fiee_cast_proto_goTypes = []any{ | var file_pb_fiee_cast_proto_goTypes = []any{ | ||||||
| 	(*UpdateMediaAccountReq)(nil),  // 0: Cast.UpdateMediaAccountReq
 | 	(PlatformType)(0),              // 0: Cast.PlatformType
 | ||||||
| 	(*UpdateMediaAccountResp)(nil), // 1: Cast.UpdateMediaAccountResp
 | 	(*MediaUserListReq)(nil),       // 1: Cast.MediaUserListReq
 | ||||||
| 	(*UpdateWorkReq)(nil),          // 2: Cast.UpdateWorkReq
 | 	(*MediaUserListResp)(nil),      // 2: Cast.MediaUserListResp
 | ||||||
| 	(*UpdateWorkResp)(nil),         // 3: Cast.UpdateWorkResp
 | 	(*UpdateMediaAccountReq)(nil),  // 3: Cast.UpdateMediaAccountReq
 | ||||||
|  | 	(*UpdateMediaAccountResp)(nil), // 4: Cast.UpdateMediaAccountResp
 | ||||||
|  | 	(*UpdateWorkReq)(nil),          // 5: Cast.UpdateWorkReq
 | ||||||
|  | 	(*UpdateWorkResp)(nil),         // 6: Cast.UpdateWorkResp
 | ||||||
| } | } | ||||||
| var file_pb_fiee_cast_proto_depIdxs = []int32{ | var file_pb_fiee_cast_proto_depIdxs = []int32{ | ||||||
| 	0, // 0: Cast.Cast.UpdateMediaAccount:input_type -> Cast.UpdateMediaAccountReq
 | 	0, // 0: Cast.UpdateMediaAccountReq.platformType:type_name -> Cast.PlatformType
 | ||||||
| 	2, // 1: Cast.Cast.UpdateWork:input_type -> Cast.UpdateWorkReq
 | 	1, // 1: Cast.Cast.MediaUserList:input_type -> Cast.MediaUserListReq
 | ||||||
| 	1, // 2: Cast.Cast.UpdateMediaAccount:output_type -> Cast.UpdateMediaAccountResp
 | 	3, // 2: Cast.Cast.UpdateMediaAccount:input_type -> Cast.UpdateMediaAccountReq
 | ||||||
| 	3, // 3: Cast.Cast.UpdateWork:output_type -> Cast.UpdateWorkResp
 | 	5, // 3: Cast.Cast.UpdateWork:input_type -> Cast.UpdateWorkReq
 | ||||||
| 	2, // [2:4] is the sub-list for method output_type
 | 	2, // 4: Cast.Cast.MediaUserList:output_type -> Cast.MediaUserListResp
 | ||||||
| 	0, // [0:2] is the sub-list for method input_type
 | 	4, // 5: Cast.Cast.UpdateMediaAccount:output_type -> Cast.UpdateMediaAccountResp
 | ||||||
| 	0, // [0:0] is the sub-list for extension type_name
 | 	6, // 6: Cast.Cast.UpdateWork:output_type -> Cast.UpdateWorkResp
 | ||||||
| 	0, // [0:0] is the sub-list for extension extendee
 | 	4, // [4:7] is the sub-list for method output_type
 | ||||||
| 	0, // [0:0] is the sub-list for field type_name
 | 	1, // [1:4] is the sub-list for method input_type
 | ||||||
|  | 	1, // [1:1] is the sub-list for extension type_name
 | ||||||
|  | 	1, // [1:1] is the sub-list for extension extendee
 | ||||||
|  | 	0, // [0:1] is the sub-list for field type_name
 | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
| func init() { file_pb_fiee_cast_proto_init() } | func init() { file_pb_fiee_cast_proto_init() } | ||||||
| @ -319,13 +571,14 @@ func file_pb_fiee_cast_proto_init() { | |||||||
| 		File: protoimpl.DescBuilder{ | 		File: protoimpl.DescBuilder{ | ||||||
| 			GoPackagePath: reflect.TypeOf(x{}).PkgPath(), | 			GoPackagePath: reflect.TypeOf(x{}).PkgPath(), | ||||||
| 			RawDescriptor: file_pb_fiee_cast_proto_rawDesc, | 			RawDescriptor: file_pb_fiee_cast_proto_rawDesc, | ||||||
| 			NumEnums:      0, | 			NumEnums:      1, | ||||||
| 			NumMessages:   4, | 			NumMessages:   6, | ||||||
| 			NumExtensions: 0, | 			NumExtensions: 0, | ||||||
| 			NumServices:   1, | 			NumServices:   1, | ||||||
| 		}, | 		}, | ||||||
| 		GoTypes:           file_pb_fiee_cast_proto_goTypes, | 		GoTypes:           file_pb_fiee_cast_proto_goTypes, | ||||||
| 		DependencyIndexes: file_pb_fiee_cast_proto_depIdxs, | 		DependencyIndexes: file_pb_fiee_cast_proto_depIdxs, | ||||||
|  | 		EnumInfos:         file_pb_fiee_cast_proto_enumTypes, | ||||||
| 		MessageInfos:      file_pb_fiee_cast_proto_msgTypes, | 		MessageInfos:      file_pb_fiee_cast_proto_msgTypes, | ||||||
| 	}.Build() | 	}.Build() | ||||||
| 	File_pb_fiee_cast_proto = out.File | 	File_pb_fiee_cast_proto = out.File | ||||||
|  | |||||||
							
								
								
									
										678
									
								
								api/cast/cast.pb.validate.go
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										678
									
								
								api/cast/cast.pb.validate.go
									
									
									
									
									
										Normal file
									
								
							| @ -0,0 +1,678 @@ | |||||||
|  | // Code generated by protoc-gen-validate. DO NOT EDIT.
 | ||||||
|  | // source: pb/fiee/cast.proto
 | ||||||
|  | 
 | ||||||
|  | package cast | ||||||
|  | 
 | ||||||
|  | import ( | ||||||
|  | 	"bytes" | ||||||
|  | 	"errors" | ||||||
|  | 	"fmt" | ||||||
|  | 	"net" | ||||||
|  | 	"net/mail" | ||||||
|  | 	"net/url" | ||||||
|  | 	"regexp" | ||||||
|  | 	"sort" | ||||||
|  | 	"strings" | ||||||
|  | 	"time" | ||||||
|  | 	"unicode/utf8" | ||||||
|  | 
 | ||||||
|  | 	"google.golang.org/protobuf/types/known/anypb" | ||||||
|  | ) | ||||||
|  | 
 | ||||||
|  | // ensure the imports are used
 | ||||||
|  | var ( | ||||||
|  | 	_ = bytes.MinRead | ||||||
|  | 	_ = errors.New("") | ||||||
|  | 	_ = fmt.Print | ||||||
|  | 	_ = utf8.UTFMax | ||||||
|  | 	_ = (*regexp.Regexp)(nil) | ||||||
|  | 	_ = (*strings.Reader)(nil) | ||||||
|  | 	_ = net.IPv4len | ||||||
|  | 	_ = time.Duration(0) | ||||||
|  | 	_ = (*url.URL)(nil) | ||||||
|  | 	_ = (*mail.Address)(nil) | ||||||
|  | 	_ = anypb.Any{} | ||||||
|  | 	_ = sort.Sort | ||||||
|  | ) | ||||||
|  | 
 | ||||||
|  | // Validate checks the field values on MediaUserListReq with the rules defined
 | ||||||
|  | // in the proto definition for this message. If any rules are violated, the
 | ||||||
|  | // first error encountered is returned, or nil if there are no violations.
 | ||||||
|  | func (m *MediaUserListReq) Validate() error { | ||||||
|  | 	return m.validate(false) | ||||||
|  | } | ||||||
|  | 
 | ||||||
|  | // ValidateAll checks the field values on MediaUserListReq with the rules
 | ||||||
|  | // defined in the proto definition for this message. If any rules are
 | ||||||
|  | // violated, the result is a list of violation errors wrapped in
 | ||||||
|  | // MediaUserListReqMultiError, or nil if none found.
 | ||||||
|  | func (m *MediaUserListReq) ValidateAll() error { | ||||||
|  | 	return m.validate(true) | ||||||
|  | } | ||||||
|  | 
 | ||||||
|  | func (m *MediaUserListReq) validate(all bool) error { | ||||||
|  | 	if m == nil { | ||||||
|  | 		return nil | ||||||
|  | 	} | ||||||
|  | 
 | ||||||
|  | 	var errors []error | ||||||
|  | 
 | ||||||
|  | 	// no validation rules for Phone
 | ||||||
|  | 
 | ||||||
|  | 	// no validation rules for UserPlatformName
 | ||||||
|  | 
 | ||||||
|  | 	// no validation rules for ManagerName
 | ||||||
|  | 
 | ||||||
|  | 	// no validation rules for PlatformType
 | ||||||
|  | 
 | ||||||
|  | 	if len(errors) > 0 { | ||||||
|  | 		return MediaUserListReqMultiError(errors) | ||||||
|  | 	} | ||||||
|  | 
 | ||||||
|  | 	return nil | ||||||
|  | } | ||||||
|  | 
 | ||||||
|  | // MediaUserListReqMultiError is an error wrapping multiple validation errors
 | ||||||
|  | // returned by MediaUserListReq.ValidateAll() if the designated constraints
 | ||||||
|  | // aren't met.
 | ||||||
|  | type MediaUserListReqMultiError []error | ||||||
|  | 
 | ||||||
|  | // Error returns a concatenation of all the error messages it wraps.
 | ||||||
|  | func (m MediaUserListReqMultiError) Error() string { | ||||||
|  | 	var msgs []string | ||||||
|  | 	for _, err := range m { | ||||||
|  | 		msgs = append(msgs, err.Error()) | ||||||
|  | 	} | ||||||
|  | 	return strings.Join(msgs, "; ") | ||||||
|  | } | ||||||
|  | 
 | ||||||
|  | // AllErrors returns a list of validation violation errors.
 | ||||||
|  | func (m MediaUserListReqMultiError) AllErrors() []error { return m } | ||||||
|  | 
 | ||||||
|  | // MediaUserListReqValidationError is the validation error returned by
 | ||||||
|  | // MediaUserListReq.Validate if the designated constraints aren't met.
 | ||||||
|  | type MediaUserListReqValidationError struct { | ||||||
|  | 	field  string | ||||||
|  | 	reason string | ||||||
|  | 	cause  error | ||||||
|  | 	key    bool | ||||||
|  | } | ||||||
|  | 
 | ||||||
|  | // Field function returns field value.
 | ||||||
|  | func (e MediaUserListReqValidationError) Field() string { return e.field } | ||||||
|  | 
 | ||||||
|  | // Reason function returns reason value.
 | ||||||
|  | func (e MediaUserListReqValidationError) Reason() string { return e.reason } | ||||||
|  | 
 | ||||||
|  | // Cause function returns cause value.
 | ||||||
|  | func (e MediaUserListReqValidationError) Cause() error { return e.cause } | ||||||
|  | 
 | ||||||
|  | // Key function returns key value.
 | ||||||
|  | func (e MediaUserListReqValidationError) Key() bool { return e.key } | ||||||
|  | 
 | ||||||
|  | // ErrorName returns error name.
 | ||||||
|  | func (e MediaUserListReqValidationError) ErrorName() string { return "MediaUserListReqValidationError" } | ||||||
|  | 
 | ||||||
|  | // Error satisfies the builtin error interface
 | ||||||
|  | func (e MediaUserListReqValidationError) Error() string { | ||||||
|  | 	cause := "" | ||||||
|  | 	if e.cause != nil { | ||||||
|  | 		cause = fmt.Sprintf(" | caused by: %v", e.cause) | ||||||
|  | 	} | ||||||
|  | 
 | ||||||
|  | 	key := "" | ||||||
|  | 	if e.key { | ||||||
|  | 		key = "key for " | ||||||
|  | 	} | ||||||
|  | 
 | ||||||
|  | 	return fmt.Sprintf( | ||||||
|  | 		"invalid %sMediaUserListReq.%s: %s%s", | ||||||
|  | 		key, | ||||||
|  | 		e.field, | ||||||
|  | 		e.reason, | ||||||
|  | 		cause) | ||||||
|  | } | ||||||
|  | 
 | ||||||
|  | var _ error = MediaUserListReqValidationError{} | ||||||
|  | 
 | ||||||
|  | var _ interface { | ||||||
|  | 	Field() string | ||||||
|  | 	Reason() string | ||||||
|  | 	Key() bool | ||||||
|  | 	Cause() error | ||||||
|  | 	ErrorName() string | ||||||
|  | } = MediaUserListReqValidationError{} | ||||||
|  | 
 | ||||||
|  | // Validate checks the field values on MediaUserListResp with the rules defined
 | ||||||
|  | // in the proto definition for this message. If any rules are violated, the
 | ||||||
|  | // first error encountered is returned, or nil if there are no violations.
 | ||||||
|  | func (m *MediaUserListResp) Validate() error { | ||||||
|  | 	return m.validate(false) | ||||||
|  | } | ||||||
|  | 
 | ||||||
|  | // ValidateAll checks the field values on MediaUserListResp with the rules
 | ||||||
|  | // defined in the proto definition for this message. If any rules are
 | ||||||
|  | // violated, the result is a list of violation errors wrapped in
 | ||||||
|  | // MediaUserListRespMultiError, or nil if none found.
 | ||||||
|  | func (m *MediaUserListResp) ValidateAll() error { | ||||||
|  | 	return m.validate(true) | ||||||
|  | } | ||||||
|  | 
 | ||||||
|  | func (m *MediaUserListResp) validate(all bool) error { | ||||||
|  | 	if m == nil { | ||||||
|  | 		return nil | ||||||
|  | 	} | ||||||
|  | 
 | ||||||
|  | 	var errors []error | ||||||
|  | 
 | ||||||
|  | 	if len(errors) > 0 { | ||||||
|  | 		return MediaUserListRespMultiError(errors) | ||||||
|  | 	} | ||||||
|  | 
 | ||||||
|  | 	return nil | ||||||
|  | } | ||||||
|  | 
 | ||||||
|  | // MediaUserListRespMultiError is an error wrapping multiple validation errors
 | ||||||
|  | // returned by MediaUserListResp.ValidateAll() if the designated constraints
 | ||||||
|  | // aren't met.
 | ||||||
|  | type MediaUserListRespMultiError []error | ||||||
|  | 
 | ||||||
|  | // Error returns a concatenation of all the error messages it wraps.
 | ||||||
|  | func (m MediaUserListRespMultiError) Error() string { | ||||||
|  | 	var msgs []string | ||||||
|  | 	for _, err := range m { | ||||||
|  | 		msgs = append(msgs, err.Error()) | ||||||
|  | 	} | ||||||
|  | 	return strings.Join(msgs, "; ") | ||||||
|  | } | ||||||
|  | 
 | ||||||
|  | // AllErrors returns a list of validation violation errors.
 | ||||||
|  | func (m MediaUserListRespMultiError) AllErrors() []error { return m } | ||||||
|  | 
 | ||||||
|  | // MediaUserListRespValidationError is the validation error returned by
 | ||||||
|  | // MediaUserListResp.Validate if the designated constraints aren't met.
 | ||||||
|  | type MediaUserListRespValidationError struct { | ||||||
|  | 	field  string | ||||||
|  | 	reason string | ||||||
|  | 	cause  error | ||||||
|  | 	key    bool | ||||||
|  | } | ||||||
|  | 
 | ||||||
|  | // Field function returns field value.
 | ||||||
|  | func (e MediaUserListRespValidationError) Field() string { return e.field } | ||||||
|  | 
 | ||||||
|  | // Reason function returns reason value.
 | ||||||
|  | func (e MediaUserListRespValidationError) Reason() string { return e.reason } | ||||||
|  | 
 | ||||||
|  | // Cause function returns cause value.
 | ||||||
|  | func (e MediaUserListRespValidationError) Cause() error { return e.cause } | ||||||
|  | 
 | ||||||
|  | // Key function returns key value.
 | ||||||
|  | func (e MediaUserListRespValidationError) Key() bool { return e.key } | ||||||
|  | 
 | ||||||
|  | // ErrorName returns error name.
 | ||||||
|  | func (e MediaUserListRespValidationError) ErrorName() string { | ||||||
|  | 	return "MediaUserListRespValidationError" | ||||||
|  | } | ||||||
|  | 
 | ||||||
|  | // Error satisfies the builtin error interface
 | ||||||
|  | func (e MediaUserListRespValidationError) Error() string { | ||||||
|  | 	cause := "" | ||||||
|  | 	if e.cause != nil { | ||||||
|  | 		cause = fmt.Sprintf(" | caused by: %v", e.cause) | ||||||
|  | 	} | ||||||
|  | 
 | ||||||
|  | 	key := "" | ||||||
|  | 	if e.key { | ||||||
|  | 		key = "key for " | ||||||
|  | 	} | ||||||
|  | 
 | ||||||
|  | 	return fmt.Sprintf( | ||||||
|  | 		"invalid %sMediaUserListResp.%s: %s%s", | ||||||
|  | 		key, | ||||||
|  | 		e.field, | ||||||
|  | 		e.reason, | ||||||
|  | 		cause) | ||||||
|  | } | ||||||
|  | 
 | ||||||
|  | var _ error = MediaUserListRespValidationError{} | ||||||
|  | 
 | ||||||
|  | var _ interface { | ||||||
|  | 	Field() string | ||||||
|  | 	Reason() string | ||||||
|  | 	Key() bool | ||||||
|  | 	Cause() error | ||||||
|  | 	ErrorName() string | ||||||
|  | } = MediaUserListRespValidationError{} | ||||||
|  | 
 | ||||||
|  | // Validate checks the field values on UpdateMediaAccountReq with the rules
 | ||||||
|  | // defined in the proto definition for this message. If any rules are
 | ||||||
|  | // violated, the first error encountered is returned, or nil if there are no violations.
 | ||||||
|  | func (m *UpdateMediaAccountReq) Validate() error { | ||||||
|  | 	return m.validate(false) | ||||||
|  | } | ||||||
|  | 
 | ||||||
|  | // ValidateAll checks the field values on UpdateMediaAccountReq with the rules
 | ||||||
|  | // defined in the proto definition for this message. If any rules are
 | ||||||
|  | // violated, the result is a list of violation errors wrapped in
 | ||||||
|  | // UpdateMediaAccountReqMultiError, or nil if none found.
 | ||||||
|  | func (m *UpdateMediaAccountReq) ValidateAll() error { | ||||||
|  | 	return m.validate(true) | ||||||
|  | } | ||||||
|  | 
 | ||||||
|  | func (m *UpdateMediaAccountReq) validate(all bool) error { | ||||||
|  | 	if m == nil { | ||||||
|  | 		return nil | ||||||
|  | 	} | ||||||
|  | 
 | ||||||
|  | 	var errors []error | ||||||
|  | 
 | ||||||
|  | 	// no validation rules for PlatformType
 | ||||||
|  | 
 | ||||||
|  | 	// no validation rules for PlatformUserName
 | ||||||
|  | 
 | ||||||
|  | 	// no validation rules for PlatformUserID
 | ||||||
|  | 
 | ||||||
|  | 	// no validation rules for ArtistUuid
 | ||||||
|  | 
 | ||||||
|  | 	// no validation rules for ArtistUserName
 | ||||||
|  | 
 | ||||||
|  | 	// no validation rules for ArtistPhone
 | ||||||
|  | 
 | ||||||
|  | 	// no validation rules for MediaAccountUuid
 | ||||||
|  | 
 | ||||||
|  | 	// no validation rules for ManagerUuid
 | ||||||
|  | 
 | ||||||
|  | 	// no validation rules for ManagerUserName
 | ||||||
|  | 
 | ||||||
|  | 	if len(errors) > 0 { | ||||||
|  | 		return UpdateMediaAccountReqMultiError(errors) | ||||||
|  | 	} | ||||||
|  | 
 | ||||||
|  | 	return nil | ||||||
|  | } | ||||||
|  | 
 | ||||||
|  | // UpdateMediaAccountReqMultiError is an error wrapping multiple validation
 | ||||||
|  | // errors returned by UpdateMediaAccountReq.ValidateAll() if the designated
 | ||||||
|  | // constraints aren't met.
 | ||||||
|  | type UpdateMediaAccountReqMultiError []error | ||||||
|  | 
 | ||||||
|  | // Error returns a concatenation of all the error messages it wraps.
 | ||||||
|  | func (m UpdateMediaAccountReqMultiError) Error() string { | ||||||
|  | 	var msgs []string | ||||||
|  | 	for _, err := range m { | ||||||
|  | 		msgs = append(msgs, err.Error()) | ||||||
|  | 	} | ||||||
|  | 	return strings.Join(msgs, "; ") | ||||||
|  | } | ||||||
|  | 
 | ||||||
|  | // AllErrors returns a list of validation violation errors.
 | ||||||
|  | func (m UpdateMediaAccountReqMultiError) AllErrors() []error { return m } | ||||||
|  | 
 | ||||||
|  | // UpdateMediaAccountReqValidationError is the validation error returned by
 | ||||||
|  | // UpdateMediaAccountReq.Validate if the designated constraints aren't met.
 | ||||||
|  | type UpdateMediaAccountReqValidationError struct { | ||||||
|  | 	field  string | ||||||
|  | 	reason string | ||||||
|  | 	cause  error | ||||||
|  | 	key    bool | ||||||
|  | } | ||||||
|  | 
 | ||||||
|  | // Field function returns field value.
 | ||||||
|  | func (e UpdateMediaAccountReqValidationError) Field() string { return e.field } | ||||||
|  | 
 | ||||||
|  | // Reason function returns reason value.
 | ||||||
|  | func (e UpdateMediaAccountReqValidationError) Reason() string { return e.reason } | ||||||
|  | 
 | ||||||
|  | // Cause function returns cause value.
 | ||||||
|  | func (e UpdateMediaAccountReqValidationError) Cause() error { return e.cause } | ||||||
|  | 
 | ||||||
|  | // Key function returns key value.
 | ||||||
|  | func (e UpdateMediaAccountReqValidationError) Key() bool { return e.key } | ||||||
|  | 
 | ||||||
|  | // ErrorName returns error name.
 | ||||||
|  | func (e UpdateMediaAccountReqValidationError) ErrorName() string { | ||||||
|  | 	return "UpdateMediaAccountReqValidationError" | ||||||
|  | } | ||||||
|  | 
 | ||||||
|  | // Error satisfies the builtin error interface
 | ||||||
|  | func (e UpdateMediaAccountReqValidationError) Error() string { | ||||||
|  | 	cause := "" | ||||||
|  | 	if e.cause != nil { | ||||||
|  | 		cause = fmt.Sprintf(" | caused by: %v", e.cause) | ||||||
|  | 	} | ||||||
|  | 
 | ||||||
|  | 	key := "" | ||||||
|  | 	if e.key { | ||||||
|  | 		key = "key for " | ||||||
|  | 	} | ||||||
|  | 
 | ||||||
|  | 	return fmt.Sprintf( | ||||||
|  | 		"invalid %sUpdateMediaAccountReq.%s: %s%s", | ||||||
|  | 		key, | ||||||
|  | 		e.field, | ||||||
|  | 		e.reason, | ||||||
|  | 		cause) | ||||||
|  | } | ||||||
|  | 
 | ||||||
|  | var _ error = UpdateMediaAccountReqValidationError{} | ||||||
|  | 
 | ||||||
|  | var _ interface { | ||||||
|  | 	Field() string | ||||||
|  | 	Reason() string | ||||||
|  | 	Key() bool | ||||||
|  | 	Cause() error | ||||||
|  | 	ErrorName() string | ||||||
|  | } = UpdateMediaAccountReqValidationError{} | ||||||
|  | 
 | ||||||
|  | // Validate checks the field values on UpdateMediaAccountResp with the rules
 | ||||||
|  | // defined in the proto definition for this message. If any rules are
 | ||||||
|  | // violated, the first error encountered is returned, or nil if there are no violations.
 | ||||||
|  | func (m *UpdateMediaAccountResp) Validate() error { | ||||||
|  | 	return m.validate(false) | ||||||
|  | } | ||||||
|  | 
 | ||||||
|  | // ValidateAll checks the field values on UpdateMediaAccountResp with the rules
 | ||||||
|  | // defined in the proto definition for this message. If any rules are
 | ||||||
|  | // violated, the result is a list of violation errors wrapped in
 | ||||||
|  | // UpdateMediaAccountRespMultiError, or nil if none found.
 | ||||||
|  | func (m *UpdateMediaAccountResp) ValidateAll() error { | ||||||
|  | 	return m.validate(true) | ||||||
|  | } | ||||||
|  | 
 | ||||||
|  | func (m *UpdateMediaAccountResp) validate(all bool) error { | ||||||
|  | 	if m == nil { | ||||||
|  | 		return nil | ||||||
|  | 	} | ||||||
|  | 
 | ||||||
|  | 	var errors []error | ||||||
|  | 
 | ||||||
|  | 	// no validation rules for MediaAccountUuid
 | ||||||
|  | 
 | ||||||
|  | 	if len(errors) > 0 { | ||||||
|  | 		return UpdateMediaAccountRespMultiError(errors) | ||||||
|  | 	} | ||||||
|  | 
 | ||||||
|  | 	return nil | ||||||
|  | } | ||||||
|  | 
 | ||||||
|  | // UpdateMediaAccountRespMultiError is an error wrapping multiple validation
 | ||||||
|  | // errors returned by UpdateMediaAccountResp.ValidateAll() if the designated
 | ||||||
|  | // constraints aren't met.
 | ||||||
|  | type UpdateMediaAccountRespMultiError []error | ||||||
|  | 
 | ||||||
|  | // Error returns a concatenation of all the error messages it wraps.
 | ||||||
|  | func (m UpdateMediaAccountRespMultiError) Error() string { | ||||||
|  | 	var msgs []string | ||||||
|  | 	for _, err := range m { | ||||||
|  | 		msgs = append(msgs, err.Error()) | ||||||
|  | 	} | ||||||
|  | 	return strings.Join(msgs, "; ") | ||||||
|  | } | ||||||
|  | 
 | ||||||
|  | // AllErrors returns a list of validation violation errors.
 | ||||||
|  | func (m UpdateMediaAccountRespMultiError) AllErrors() []error { return m } | ||||||
|  | 
 | ||||||
|  | // UpdateMediaAccountRespValidationError is the validation error returned by
 | ||||||
|  | // UpdateMediaAccountResp.Validate if the designated constraints aren't met.
 | ||||||
|  | type UpdateMediaAccountRespValidationError struct { | ||||||
|  | 	field  string | ||||||
|  | 	reason string | ||||||
|  | 	cause  error | ||||||
|  | 	key    bool | ||||||
|  | } | ||||||
|  | 
 | ||||||
|  | // Field function returns field value.
 | ||||||
|  | func (e UpdateMediaAccountRespValidationError) Field() string { return e.field } | ||||||
|  | 
 | ||||||
|  | // Reason function returns reason value.
 | ||||||
|  | func (e UpdateMediaAccountRespValidationError) Reason() string { return e.reason } | ||||||
|  | 
 | ||||||
|  | // Cause function returns cause value.
 | ||||||
|  | func (e UpdateMediaAccountRespValidationError) Cause() error { return e.cause } | ||||||
|  | 
 | ||||||
|  | // Key function returns key value.
 | ||||||
|  | func (e UpdateMediaAccountRespValidationError) Key() bool { return e.key } | ||||||
|  | 
 | ||||||
|  | // ErrorName returns error name.
 | ||||||
|  | func (e UpdateMediaAccountRespValidationError) ErrorName() string { | ||||||
|  | 	return "UpdateMediaAccountRespValidationError" | ||||||
|  | } | ||||||
|  | 
 | ||||||
|  | // Error satisfies the builtin error interface
 | ||||||
|  | func (e UpdateMediaAccountRespValidationError) Error() string { | ||||||
|  | 	cause := "" | ||||||
|  | 	if e.cause != nil { | ||||||
|  | 		cause = fmt.Sprintf(" | caused by: %v", e.cause) | ||||||
|  | 	} | ||||||
|  | 
 | ||||||
|  | 	key := "" | ||||||
|  | 	if e.key { | ||||||
|  | 		key = "key for " | ||||||
|  | 	} | ||||||
|  | 
 | ||||||
|  | 	return fmt.Sprintf( | ||||||
|  | 		"invalid %sUpdateMediaAccountResp.%s: %s%s", | ||||||
|  | 		key, | ||||||
|  | 		e.field, | ||||||
|  | 		e.reason, | ||||||
|  | 		cause) | ||||||
|  | } | ||||||
|  | 
 | ||||||
|  | var _ error = UpdateMediaAccountRespValidationError{} | ||||||
|  | 
 | ||||||
|  | var _ interface { | ||||||
|  | 	Field() string | ||||||
|  | 	Reason() string | ||||||
|  | 	Key() bool | ||||||
|  | 	Cause() error | ||||||
|  | 	ErrorName() string | ||||||
|  | } = UpdateMediaAccountRespValidationError{} | ||||||
|  | 
 | ||||||
|  | // Validate checks the field values on UpdateWorkReq with the rules defined in
 | ||||||
|  | // the proto definition for this message. If any rules are violated, the first
 | ||||||
|  | // error encountered is returned, or nil if there are no violations.
 | ||||||
|  | func (m *UpdateWorkReq) Validate() error { | ||||||
|  | 	return m.validate(false) | ||||||
|  | } | ||||||
|  | 
 | ||||||
|  | // ValidateAll checks the field values on UpdateWorkReq with the rules defined
 | ||||||
|  | // in the proto definition for this message. If any rules are violated, the
 | ||||||
|  | // result is a list of violation errors wrapped in UpdateWorkReqMultiError, or
 | ||||||
|  | // nil if none found.
 | ||||||
|  | func (m *UpdateWorkReq) ValidateAll() error { | ||||||
|  | 	return m.validate(true) | ||||||
|  | } | ||||||
|  | 
 | ||||||
|  | func (m *UpdateWorkReq) validate(all bool) error { | ||||||
|  | 	if m == nil { | ||||||
|  | 		return nil | ||||||
|  | 	} | ||||||
|  | 
 | ||||||
|  | 	var errors []error | ||||||
|  | 
 | ||||||
|  | 	// no validation rules for Title
 | ||||||
|  | 
 | ||||||
|  | 	// no validation rules for Content
 | ||||||
|  | 
 | ||||||
|  | 	// no validation rules for Image
 | ||||||
|  | 
 | ||||||
|  | 	if len(errors) > 0 { | ||||||
|  | 		return UpdateWorkReqMultiError(errors) | ||||||
|  | 	} | ||||||
|  | 
 | ||||||
|  | 	return nil | ||||||
|  | } | ||||||
|  | 
 | ||||||
|  | // UpdateWorkReqMultiError is an error wrapping multiple validation errors
 | ||||||
|  | // returned by UpdateWorkReq.ValidateAll() if the designated constraints
 | ||||||
|  | // aren't met.
 | ||||||
|  | type UpdateWorkReqMultiError []error | ||||||
|  | 
 | ||||||
|  | // Error returns a concatenation of all the error messages it wraps.
 | ||||||
|  | func (m UpdateWorkReqMultiError) Error() string { | ||||||
|  | 	var msgs []string | ||||||
|  | 	for _, err := range m { | ||||||
|  | 		msgs = append(msgs, err.Error()) | ||||||
|  | 	} | ||||||
|  | 	return strings.Join(msgs, "; ") | ||||||
|  | } | ||||||
|  | 
 | ||||||
|  | // AllErrors returns a list of validation violation errors.
 | ||||||
|  | func (m UpdateWorkReqMultiError) AllErrors() []error { return m } | ||||||
|  | 
 | ||||||
|  | // UpdateWorkReqValidationError is the validation error returned by
 | ||||||
|  | // UpdateWorkReq.Validate if the designated constraints aren't met.
 | ||||||
|  | type UpdateWorkReqValidationError struct { | ||||||
|  | 	field  string | ||||||
|  | 	reason string | ||||||
|  | 	cause  error | ||||||
|  | 	key    bool | ||||||
|  | } | ||||||
|  | 
 | ||||||
|  | // Field function returns field value.
 | ||||||
|  | func (e UpdateWorkReqValidationError) Field() string { return e.field } | ||||||
|  | 
 | ||||||
|  | // Reason function returns reason value.
 | ||||||
|  | func (e UpdateWorkReqValidationError) Reason() string { return e.reason } | ||||||
|  | 
 | ||||||
|  | // Cause function returns cause value.
 | ||||||
|  | func (e UpdateWorkReqValidationError) Cause() error { return e.cause } | ||||||
|  | 
 | ||||||
|  | // Key function returns key value.
 | ||||||
|  | func (e UpdateWorkReqValidationError) Key() bool { return e.key } | ||||||
|  | 
 | ||||||
|  | // ErrorName returns error name.
 | ||||||
|  | func (e UpdateWorkReqValidationError) ErrorName() string { return "UpdateWorkReqValidationError" } | ||||||
|  | 
 | ||||||
|  | // Error satisfies the builtin error interface
 | ||||||
|  | func (e UpdateWorkReqValidationError) Error() string { | ||||||
|  | 	cause := "" | ||||||
|  | 	if e.cause != nil { | ||||||
|  | 		cause = fmt.Sprintf(" | caused by: %v", e.cause) | ||||||
|  | 	} | ||||||
|  | 
 | ||||||
|  | 	key := "" | ||||||
|  | 	if e.key { | ||||||
|  | 		key = "key for " | ||||||
|  | 	} | ||||||
|  | 
 | ||||||
|  | 	return fmt.Sprintf( | ||||||
|  | 		"invalid %sUpdateWorkReq.%s: %s%s", | ||||||
|  | 		key, | ||||||
|  | 		e.field, | ||||||
|  | 		e.reason, | ||||||
|  | 		cause) | ||||||
|  | } | ||||||
|  | 
 | ||||||
|  | var _ error = UpdateWorkReqValidationError{} | ||||||
|  | 
 | ||||||
|  | var _ interface { | ||||||
|  | 	Field() string | ||||||
|  | 	Reason() string | ||||||
|  | 	Key() bool | ||||||
|  | 	Cause() error | ||||||
|  | 	ErrorName() string | ||||||
|  | } = UpdateWorkReqValidationError{} | ||||||
|  | 
 | ||||||
|  | // Validate checks the field values on UpdateWorkResp with the rules defined in
 | ||||||
|  | // the proto definition for this message. If any rules are violated, the first
 | ||||||
|  | // error encountered is returned, or nil if there are no violations.
 | ||||||
|  | func (m *UpdateWorkResp) Validate() error { | ||||||
|  | 	return m.validate(false) | ||||||
|  | } | ||||||
|  | 
 | ||||||
|  | // ValidateAll checks the field values on UpdateWorkResp with the rules defined
 | ||||||
|  | // in the proto definition for this message. If any rules are violated, the
 | ||||||
|  | // result is a list of violation errors wrapped in UpdateWorkRespMultiError,
 | ||||||
|  | // or nil if none found.
 | ||||||
|  | func (m *UpdateWorkResp) ValidateAll() error { | ||||||
|  | 	return m.validate(true) | ||||||
|  | } | ||||||
|  | 
 | ||||||
|  | func (m *UpdateWorkResp) validate(all bool) error { | ||||||
|  | 	if m == nil { | ||||||
|  | 		return nil | ||||||
|  | 	} | ||||||
|  | 
 | ||||||
|  | 	var errors []error | ||||||
|  | 
 | ||||||
|  | 	// no validation rules for WorkUuid
 | ||||||
|  | 
 | ||||||
|  | 	if len(errors) > 0 { | ||||||
|  | 		return UpdateWorkRespMultiError(errors) | ||||||
|  | 	} | ||||||
|  | 
 | ||||||
|  | 	return nil | ||||||
|  | } | ||||||
|  | 
 | ||||||
|  | // UpdateWorkRespMultiError is an error wrapping multiple validation errors
 | ||||||
|  | // returned by UpdateWorkResp.ValidateAll() if the designated constraints
 | ||||||
|  | // aren't met.
 | ||||||
|  | type UpdateWorkRespMultiError []error | ||||||
|  | 
 | ||||||
|  | // Error returns a concatenation of all the error messages it wraps.
 | ||||||
|  | func (m UpdateWorkRespMultiError) Error() string { | ||||||
|  | 	var msgs []string | ||||||
|  | 	for _, err := range m { | ||||||
|  | 		msgs = append(msgs, err.Error()) | ||||||
|  | 	} | ||||||
|  | 	return strings.Join(msgs, "; ") | ||||||
|  | } | ||||||
|  | 
 | ||||||
|  | // AllErrors returns a list of validation violation errors.
 | ||||||
|  | func (m UpdateWorkRespMultiError) AllErrors() []error { return m } | ||||||
|  | 
 | ||||||
|  | // UpdateWorkRespValidationError is the validation error returned by
 | ||||||
|  | // UpdateWorkResp.Validate if the designated constraints aren't met.
 | ||||||
|  | type UpdateWorkRespValidationError struct { | ||||||
|  | 	field  string | ||||||
|  | 	reason string | ||||||
|  | 	cause  error | ||||||
|  | 	key    bool | ||||||
|  | } | ||||||
|  | 
 | ||||||
|  | // Field function returns field value.
 | ||||||
|  | func (e UpdateWorkRespValidationError) Field() string { return e.field } | ||||||
|  | 
 | ||||||
|  | // Reason function returns reason value.
 | ||||||
|  | func (e UpdateWorkRespValidationError) Reason() string { return e.reason } | ||||||
|  | 
 | ||||||
|  | // Cause function returns cause value.
 | ||||||
|  | func (e UpdateWorkRespValidationError) Cause() error { return e.cause } | ||||||
|  | 
 | ||||||
|  | // Key function returns key value.
 | ||||||
|  | func (e UpdateWorkRespValidationError) Key() bool { return e.key } | ||||||
|  | 
 | ||||||
|  | // ErrorName returns error name.
 | ||||||
|  | func (e UpdateWorkRespValidationError) ErrorName() string { return "UpdateWorkRespValidationError" } | ||||||
|  | 
 | ||||||
|  | // Error satisfies the builtin error interface
 | ||||||
|  | func (e UpdateWorkRespValidationError) Error() string { | ||||||
|  | 	cause := "" | ||||||
|  | 	if e.cause != nil { | ||||||
|  | 		cause = fmt.Sprintf(" | caused by: %v", e.cause) | ||||||
|  | 	} | ||||||
|  | 
 | ||||||
|  | 	key := "" | ||||||
|  | 	if e.key { | ||||||
|  | 		key = "key for " | ||||||
|  | 	} | ||||||
|  | 
 | ||||||
|  | 	return fmt.Sprintf( | ||||||
|  | 		"invalid %sUpdateWorkResp.%s: %s%s", | ||||||
|  | 		key, | ||||||
|  | 		e.field, | ||||||
|  | 		e.reason, | ||||||
|  | 		cause) | ||||||
|  | } | ||||||
|  | 
 | ||||||
|  | var _ error = UpdateWorkRespValidationError{} | ||||||
|  | 
 | ||||||
|  | var _ interface { | ||||||
|  | 	Field() string | ||||||
|  | 	Reason() string | ||||||
|  | 	Key() bool | ||||||
|  | 	Cause() error | ||||||
|  | 	ErrorName() string | ||||||
|  | } = UpdateWorkRespValidationError{} | ||||||
| @ -7,6 +7,7 @@ import ( | |||||||
| 	fmt "fmt" | 	fmt "fmt" | ||||||
| 	math "math" | 	math "math" | ||||||
| 	proto "github.com/golang/protobuf/proto" | 	proto "github.com/golang/protobuf/proto" | ||||||
|  | 	_ "github.com/envoyproxy/protoc-gen-validate/validate" | ||||||
| 	_ "google.golang.org/protobuf/types/known/wrapperspb" | 	_ "google.golang.org/protobuf/types/known/wrapperspb" | ||||||
| 	_ "google.golang.org/protobuf/types/descriptorpb" | 	_ "google.golang.org/protobuf/types/descriptorpb" | ||||||
| 	_ "google.golang.org/protobuf/types/known/emptypb" | 	_ "google.golang.org/protobuf/types/known/emptypb" | ||||||
| @ -17,6 +18,12 @@ var _ = proto.Marshal | |||||||
| var _ = fmt.Errorf | var _ = fmt.Errorf | ||||||
| var _ = math.Inf | var _ = math.Inf | ||||||
| 
 | 
 | ||||||
|  | func (this *MediaUserListReq) Validate() error { | ||||||
|  | 	return nil | ||||||
|  | } | ||||||
|  | func (this *MediaUserListResp) Validate() error { | ||||||
|  | 	return nil | ||||||
|  | } | ||||||
| func (this *UpdateMediaAccountReq) Validate() error { | func (this *UpdateMediaAccountReq) Validate() error { | ||||||
| 	return nil | 	return nil | ||||||
| } | } | ||||||
|  | |||||||
| @ -28,6 +28,7 @@ const _ = grpc_go.SupportPackageIsVersion7 | |||||||
| //
 | //
 | ||||||
| // For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream.
 | // For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream.
 | ||||||
| type CastClient interface { | type CastClient interface { | ||||||
|  | 	MediaUserList(ctx context.Context, in *MediaUserListReq, opts ...grpc_go.CallOption) (*MediaUserListResp, common.ErrorWithAttachment) | ||||||
| 	UpdateMediaAccount(ctx context.Context, in *UpdateMediaAccountReq, opts ...grpc_go.CallOption) (*UpdateMediaAccountResp, common.ErrorWithAttachment) | 	UpdateMediaAccount(ctx context.Context, in *UpdateMediaAccountReq, opts ...grpc_go.CallOption) (*UpdateMediaAccountResp, common.ErrorWithAttachment) | ||||||
| 	UpdateWork(ctx context.Context, in *UpdateWorkReq, opts ...grpc_go.CallOption) (*UpdateWorkResp, common.ErrorWithAttachment) | 	UpdateWork(ctx context.Context, in *UpdateWorkReq, opts ...grpc_go.CallOption) (*UpdateWorkResp, common.ErrorWithAttachment) | ||||||
| } | } | ||||||
| @ -37,6 +38,7 @@ type castClient struct { | |||||||
| } | } | ||||||
| 
 | 
 | ||||||
| type CastClientImpl struct { | type CastClientImpl struct { | ||||||
|  | 	MediaUserList      func(ctx context.Context, in *MediaUserListReq) (*MediaUserListResp, error) | ||||||
| 	UpdateMediaAccount func(ctx context.Context, in *UpdateMediaAccountReq) (*UpdateMediaAccountResp, error) | 	UpdateMediaAccount func(ctx context.Context, in *UpdateMediaAccountReq) (*UpdateMediaAccountResp, error) | ||||||
| 	UpdateWork         func(ctx context.Context, in *UpdateWorkReq) (*UpdateWorkResp, error) | 	UpdateWork         func(ctx context.Context, in *UpdateWorkReq) (*UpdateWorkResp, error) | ||||||
| } | } | ||||||
| @ -53,6 +55,12 @@ func NewCastClient(cc *triple.TripleConn) CastClient { | |||||||
| 	return &castClient{cc} | 	return &castClient{cc} | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
|  | func (c *castClient) MediaUserList(ctx context.Context, in *MediaUserListReq, opts ...grpc_go.CallOption) (*MediaUserListResp, common.ErrorWithAttachment) { | ||||||
|  | 	out := new(MediaUserListResp) | ||||||
|  | 	interfaceKey := ctx.Value(constant.InterfaceKey).(string) | ||||||
|  | 	return out, c.cc.Invoke(ctx, "/"+interfaceKey+"/MediaUserList", in, out) | ||||||
|  | } | ||||||
|  | 
 | ||||||
| func (c *castClient) UpdateMediaAccount(ctx context.Context, in *UpdateMediaAccountReq, opts ...grpc_go.CallOption) (*UpdateMediaAccountResp, common.ErrorWithAttachment) { | func (c *castClient) UpdateMediaAccount(ctx context.Context, in *UpdateMediaAccountReq, opts ...grpc_go.CallOption) (*UpdateMediaAccountResp, common.ErrorWithAttachment) { | ||||||
| 	out := new(UpdateMediaAccountResp) | 	out := new(UpdateMediaAccountResp) | ||||||
| 	interfaceKey := ctx.Value(constant.InterfaceKey).(string) | 	interfaceKey := ctx.Value(constant.InterfaceKey).(string) | ||||||
| @ -69,6 +77,7 @@ func (c *castClient) UpdateWork(ctx context.Context, in *UpdateWorkReq, opts ... | |||||||
| // All implementations must embed UnimplementedCastServer
 | // All implementations must embed UnimplementedCastServer
 | ||||||
| // for forward compatibility
 | // for forward compatibility
 | ||||||
| type CastServer interface { | type CastServer interface { | ||||||
|  | 	MediaUserList(context.Context, *MediaUserListReq) (*MediaUserListResp, error) | ||||||
| 	UpdateMediaAccount(context.Context, *UpdateMediaAccountReq) (*UpdateMediaAccountResp, error) | 	UpdateMediaAccount(context.Context, *UpdateMediaAccountReq) (*UpdateMediaAccountResp, error) | ||||||
| 	UpdateWork(context.Context, *UpdateWorkReq) (*UpdateWorkResp, error) | 	UpdateWork(context.Context, *UpdateWorkReq) (*UpdateWorkResp, error) | ||||||
| 	mustEmbedUnimplementedCastServer() | 	mustEmbedUnimplementedCastServer() | ||||||
| @ -79,6 +88,9 @@ type UnimplementedCastServer struct { | |||||||
| 	proxyImpl protocol.Invoker | 	proxyImpl protocol.Invoker | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
|  | func (UnimplementedCastServer) MediaUserList(context.Context, *MediaUserListReq) (*MediaUserListResp, error) { | ||||||
|  | 	return nil, status.Errorf(codes.Unimplemented, "method MediaUserList not implemented") | ||||||
|  | } | ||||||
| func (UnimplementedCastServer) UpdateMediaAccount(context.Context, *UpdateMediaAccountReq) (*UpdateMediaAccountResp, error) { | func (UnimplementedCastServer) UpdateMediaAccount(context.Context, *UpdateMediaAccountReq) (*UpdateMediaAccountResp, error) { | ||||||
| 	return nil, status.Errorf(codes.Unimplemented, "method UpdateMediaAccount not implemented") | 	return nil, status.Errorf(codes.Unimplemented, "method UpdateMediaAccount not implemented") | ||||||
| } | } | ||||||
| @ -113,6 +125,35 @@ func RegisterCastServer(s grpc_go.ServiceRegistrar, srv CastServer) { | |||||||
| 	s.RegisterService(&Cast_ServiceDesc, srv) | 	s.RegisterService(&Cast_ServiceDesc, srv) | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
|  | func _Cast_MediaUserList_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc_go.UnaryServerInterceptor) (interface{}, error) { | ||||||
|  | 	in := new(MediaUserListReq) | ||||||
|  | 	if err := dec(in); err != nil { | ||||||
|  | 		return nil, err | ||||||
|  | 	} | ||||||
|  | 	base := srv.(dubbo3.Dubbo3GrpcService) | ||||||
|  | 	args := []interface{}{} | ||||||
|  | 	args = append(args, in) | ||||||
|  | 	md, _ := metadata.FromIncomingContext(ctx) | ||||||
|  | 	invAttachment := make(map[string]interface{}, len(md)) | ||||||
|  | 	for k, v := range md { | ||||||
|  | 		invAttachment[k] = v | ||||||
|  | 	} | ||||||
|  | 	invo := invocation.NewRPCInvocation("MediaUserList", args, invAttachment) | ||||||
|  | 	if interceptor == nil { | ||||||
|  | 		result := base.XXX_GetProxyImpl().Invoke(ctx, invo) | ||||||
|  | 		return result, result.Error() | ||||||
|  | 	} | ||||||
|  | 	info := &grpc_go.UnaryServerInfo{ | ||||||
|  | 		Server:     srv, | ||||||
|  | 		FullMethod: ctx.Value("XXX_TRIPLE_GO_INTERFACE_NAME").(string), | ||||||
|  | 	} | ||||||
|  | 	handler := func(ctx context.Context, req interface{}) (interface{}, error) { | ||||||
|  | 		result := base.XXX_GetProxyImpl().Invoke(ctx, invo) | ||||||
|  | 		return result, result.Error() | ||||||
|  | 	} | ||||||
|  | 	return interceptor(ctx, in, info, handler) | ||||||
|  | } | ||||||
|  | 
 | ||||||
| func _Cast_UpdateMediaAccount_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc_go.UnaryServerInterceptor) (interface{}, error) { | func _Cast_UpdateMediaAccount_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc_go.UnaryServerInterceptor) (interface{}, error) { | ||||||
| 	in := new(UpdateMediaAccountReq) | 	in := new(UpdateMediaAccountReq) | ||||||
| 	if err := dec(in); err != nil { | 	if err := dec(in); err != nil { | ||||||
| @ -178,6 +219,10 @@ var Cast_ServiceDesc = grpc_go.ServiceDesc{ | |||||||
| 	ServiceName: "Cast.Cast", | 	ServiceName: "Cast.Cast", | ||||||
| 	HandlerType: (*CastServer)(nil), | 	HandlerType: (*CastServer)(nil), | ||||||
| 	Methods: []grpc_go.MethodDesc{ | 	Methods: []grpc_go.MethodDesc{ | ||||||
|  | 		{ | ||||||
|  | 			MethodName: "MediaUserList", | ||||||
|  | 			Handler:    _Cast_MediaUserList_Handler, | ||||||
|  | 		}, | ||||||
| 		{ | 		{ | ||||||
| 			MethodName: "UpdateMediaAccount", | 			MethodName: "UpdateMediaAccount", | ||||||
| 			Handler:    _Cast_UpdateMediaAccount_Handler, | 			Handler:    _Cast_UpdateMediaAccount_Handler, | ||||||
|  | |||||||
| @ -4,8 +4,8 @@ dubbo: | |||||||
|       protocol: zookeeper |       protocol: zookeeper | ||||||
|       timeout: 3s |       timeout: 3s | ||||||
|       #      address: 121.229.45.214:9004 |       #      address: 121.229.45.214:9004 | ||||||
|       address: 172.16.100.93:2181 | #      address: 172.16.100.93:2181 | ||||||
| #      address: 127.0.0.1:2181 |       address: 127.0.0.1:2181 | ||||||
|   #      address: 114.218.158.24:2181 |   #      address: 114.218.158.24:2181 | ||||||
|   consumer: |   consumer: | ||||||
|     filter: tracing |     filter: tracing | ||||||
| @ -24,13 +24,24 @@ dubbo: | |||||||
|         retries: 0 |         retries: 0 | ||||||
|         interface: com.fontree.microservices.fiee.bundle # must be compatible with grpc or dubbo-java |         interface: com.fontree.microservices.fiee.bundle # must be compatible with grpc or dubbo-java | ||||||
|       AccountClientImpl: |       AccountClientImpl: | ||||||
|  |         protocol: tri | ||||||
|  |         retries: 0 | ||||||
|  |         interface: com.fontree.microservices.common.Account | ||||||
|  |         filter: echo,metrics,token,accesslog,sign,tps,generic_service,execute | ||||||
|  |         params: | ||||||
|  |           .accessKeyId: "Accountksl" | ||||||
|  |           .secretAccessKey: "BSDY-FDF1-Fontree_account" | ||||||
|  |       AccountFieeClientImpl: | ||||||
|         protocol: tri |         protocol: tri | ||||||
|         retries: 3 |         retries: 3 | ||||||
|         interface: com.fontree.microservices.common.micro.account |         interface: com.fontree.microservices.common.micro.account.fiee | ||||||
| #        filter: echo,metrics,token,accesslog,sign,tps,generic_service,execute,pshutdown,auth,fonValidateFilter | #        filter: echo,metrics,token,accesslog,sign,tps,generic_service,execute,pshutdown,auth,fonValidateFilter | ||||||
|       PaymentClientImpl: |       PaymentCentClientImpl: | ||||||
|         interface: com.fontree.microservices.common.payment # must be compatible with grpc or dubbo-java |         interface: com.fontree.microservices.common.payment # must be compatible with grpc or dubbo-java | ||||||
|         filter: cshutdown,sign,auth |         filter: cshutdown,sign,auth | ||||||
|         params: |         params: | ||||||
|           .accessKeyId: "Paymentksl" |           .accessKeyId: "Paymentksl" | ||||||
|           .secretAccessKey: "BSDY-FDF1-Fontree_payment" |           .secretAccessKey: "BSDY-FDF1-Fontree_payment" | ||||||
|  |       CastClientImpl: | ||||||
|  |         protocol: tri | ||||||
|  |         interface: com.fontree.microservices.fiee.multicast | ||||||
|  | |||||||
| @ -25,7 +25,15 @@ dubbo: | |||||||
|       AccountClientImpl: |       AccountClientImpl: | ||||||
|         protocol: tri |         protocol: tri | ||||||
|         retries: 0 |         retries: 0 | ||||||
|         interface: com.fontree.microservices.common.micro.account |         interface: com.fontree.microservices.common.Account | ||||||
|  |         filter: echo,metrics,token,accesslog,sign,tps,generic_service,execute | ||||||
|  |         params: | ||||||
|  |           .accessKeyId: "Accountksl" | ||||||
|  |           .secretAccessKey: "BSDY-FDF1-Fontree_account" | ||||||
|  |       AccountFieeClientImpl: | ||||||
|  |         protocol: tri | ||||||
|  |         retries: 0 | ||||||
|  |         interface: com.fontree.microservices.common.micro.account.fiee | ||||||
|       PaymentCentClientImpl: |       PaymentCentClientImpl: | ||||||
|         protocol: tri |         protocol: tri | ||||||
|         retries: 0 |         retries: 0 | ||||||
| @ -34,3 +42,6 @@ dubbo: | |||||||
|         params: |         params: | ||||||
|           .accessKeyId: "Paymentksl" |           .accessKeyId: "Paymentksl" | ||||||
|           .secretAccessKey: "BSDY-FDF1-Fontree_payment" |           .secretAccessKey: "BSDY-FDF1-Fontree_payment" | ||||||
|  |       CastClientImpl: | ||||||
|  |         protocol: tri | ||||||
|  |         interface: com.fontree.microservices.fiee.multicast | ||||||
|  | |||||||
| @ -4,5 +4,44 @@ dubbo: | |||||||
|       protocol: zookeeper |       protocol: zookeeper | ||||||
|       timeout: 3s |       timeout: 3s | ||||||
|       #      address: 121.229.45.214:9004 |       #      address: 121.229.45.214:9004 | ||||||
|       address: 127.0.0.1:2181 |       address: 172.16.100.93:2181 | ||||||
|   #      address: 114.218.158.24:2181 |   #      address: 127.0.0.1:2181 | ||||||
|  |   #      address: 114.218.158.24:2181 | ||||||
|  |   consumer: | ||||||
|  |     filter: tracing | ||||||
|  |     request-timeout: 30s | ||||||
|  |     references: | ||||||
|  |       OrderClientImpl: | ||||||
|  |         protocol: tri | ||||||
|  |         retries: 0 | ||||||
|  |         interface: com.fontree.microservices.common.order # must be compatible with grpc or dubbo-java | ||||||
|  |         #        filter: cshutdown,sign,fonDomainFilter,fonValidateFilter | ||||||
|  |         params: | ||||||
|  |           .accessKeyId: "SYD8-order-04" | ||||||
|  |           .secretAccessKey: "Al-order-FDF112" | ||||||
|  |       BundleClientImpl: | ||||||
|  |         protocol: tri | ||||||
|  |         retries: 0 | ||||||
|  |         interface: com.fontree.microservices.fiee.bundle # must be compatible with grpc or dubbo-java | ||||||
|  |       AccountClientImpl: | ||||||
|  |         protocol: tri | ||||||
|  |         retries: 0 | ||||||
|  |         interface: com.fontree.microservices.common.Account | ||||||
|  |         filter: echo,metrics,token,accesslog,sign,tps,generic_service,execute | ||||||
|  |         params: | ||||||
|  |           .accessKeyId: "Accountksl" | ||||||
|  |           .secretAccessKey: "BSDY-FDF1-Fontree_account" | ||||||
|  |       AccountFieeClientImpl: | ||||||
|  |         protocol: tri | ||||||
|  |         retries: 3 | ||||||
|  |         interface: com.fontree.microservices.common.micro.account.fiee | ||||||
|  |       #        filter: echo,metrics,token,accesslog,sign,tps,generic_service,execute,pshutdown,auth,fonValidateFilter | ||||||
|  |       PaymentCentClientImpl: | ||||||
|  |         interface: com.fontree.microservices.common.payment # must be compatible with grpc or dubbo-java | ||||||
|  |         filter: cshutdown,sign,auth | ||||||
|  |         params: | ||||||
|  |           .accessKeyId: "Paymentksl" | ||||||
|  |           .secretAccessKey: "BSDY-FDF1-Fontree_payment" | ||||||
|  |       CastClientImpl: | ||||||
|  |         protocol: tri | ||||||
|  |         interface: com.fontree.microservices.fiee.multicast | ||||||
|  | |||||||
							
								
								
									
										5
									
								
								go.mod
									
									
									
									
									
								
							
							
						
						
									
										5
									
								
								go.mod
									
									
									
									
									
								
							| @ -112,7 +112,9 @@ require ( | |||||||
| ) | ) | ||||||
| 
 | 
 | ||||||
| require ( | require ( | ||||||
|  | 	github.com/360EntSecGroup-Skylar/excelize v1.4.1 | ||||||
| 	github.com/BurntSushi/toml v1.2.1 | 	github.com/BurntSushi/toml v1.2.1 | ||||||
|  | 	github.com/PuerkitoBio/goquery v1.10.3 | ||||||
| 	github.com/disintegration/imaging v1.6.2 | 	github.com/disintegration/imaging v1.6.2 | ||||||
| 	github.com/fonchain_enterprise/utils/objstorage v0.0.0-00010101000000-000000000000 | 	github.com/fonchain_enterprise/utils/objstorage v0.0.0-00010101000000-000000000000 | ||||||
| 	github.com/gin-contrib/pprof v1.4.0 | 	github.com/gin-contrib/pprof v1.4.0 | ||||||
| @ -127,8 +129,6 @@ require ( | |||||||
| 
 | 
 | ||||||
| require ( | require ( | ||||||
| 	cloud.google.com/go v0.65.0 // indirect | 	cloud.google.com/go v0.65.0 // indirect | ||||||
| 	github.com/360EntSecGroup-Skylar/excelize v1.4.1 // indirect |  | ||||||
| 	github.com/PuerkitoBio/goquery v1.10.3 // indirect |  | ||||||
| 	github.com/afex/hystrix-go v0.0.0-20180502004556-fa1af6a1f4f5 // indirect | 	github.com/afex/hystrix-go v0.0.0-20180502004556-fa1af6a1f4f5 // indirect | ||||||
| 	github.com/alibaba/sentinel-golang v1.0.4 // indirect | 	github.com/alibaba/sentinel-golang v1.0.4 // indirect | ||||||
| 	github.com/aliyun/alibaba-cloud-sdk-go v1.61.18 // indirect | 	github.com/aliyun/alibaba-cloud-sdk-go v1.61.18 // indirect | ||||||
| @ -156,7 +156,6 @@ require ( | |||||||
| 	github.com/go-logr/stdr v1.2.2 // indirect | 	github.com/go-logr/stdr v1.2.2 // indirect | ||||||
| 	github.com/go-resty/resty/v2 v2.7.0 // indirect | 	github.com/go-resty/resty/v2 v2.7.0 // indirect | ||||||
| 	github.com/golang/mock v1.5.0 // indirect | 	github.com/golang/mock v1.5.0 // indirect | ||||||
| 	github.com/google/go-cmp v0.6.0 // indirect |  | ||||||
| 	github.com/google/uuid v1.6.0 // indirect | 	github.com/google/uuid v1.6.0 // indirect | ||||||
| 	github.com/gopherjs/gopherjs v0.0.0-20200217142428-fce0ec30dd00 // indirect | 	github.com/gopherjs/gopherjs v0.0.0-20200217142428-fce0ec30dd00 // indirect | ||||||
| 	github.com/grpc-ecosystem/grpc-opentracing v0.0.0-20180507213350-8e809c8a8645 // indirect | 	github.com/grpc-ecosystem/grpc-opentracing v0.0.0-20180507213350-8e809c8a8645 // indirect | ||||||
|  | |||||||
							
								
								
									
										14
									
								
								go.sum
									
									
									
									
									
								
							
							
						
						
									
										14
									
								
								go.sum
									
									
									
									
									
								
							| @ -286,6 +286,7 @@ github.com/go-ole/go-ole v1.2.4 h1:nNBDSCOigTSiarFpYE9J/KtEA1IOW4CNeqT9TQDqCxI= | |||||||
| github.com/go-ole/go-ole v1.2.4/go.mod h1:XCwSNxSkXRo4vlyPy93sltvi/qJq0jqQhjqQNIwKuxM= | github.com/go-ole/go-ole v1.2.4/go.mod h1:XCwSNxSkXRo4vlyPy93sltvi/qJq0jqQhjqQNIwKuxM= | ||||||
| github.com/go-playground/assert/v2 v2.0.1/go.mod h1:VDjEfimB/XKnb+ZQfWdccd7VUvScMdVu0Titje2rxJ4= | github.com/go-playground/assert/v2 v2.0.1/go.mod h1:VDjEfimB/XKnb+ZQfWdccd7VUvScMdVu0Titje2rxJ4= | ||||||
| github.com/go-playground/assert/v2 v2.2.0 h1:JvknZsQTYeFEAhQwI4qEt9cyV5ONwRHC+lYKSsYSR8s= | github.com/go-playground/assert/v2 v2.2.0 h1:JvknZsQTYeFEAhQwI4qEt9cyV5ONwRHC+lYKSsYSR8s= | ||||||
|  | github.com/go-playground/assert/v2 v2.2.0/go.mod h1:VDjEfimB/XKnb+ZQfWdccd7VUvScMdVu0Titje2rxJ4= | ||||||
| github.com/go-playground/locales v0.13.0/go.mod h1:taPMhCMXrRLJO55olJkUXHZBHCxTMfnGwq/HNwmWNS8= | github.com/go-playground/locales v0.13.0/go.mod h1:taPMhCMXrRLJO55olJkUXHZBHCxTMfnGwq/HNwmWNS8= | ||||||
| github.com/go-playground/locales v0.14.0/go.mod h1:sawfccIbzZTqEDETgFXqTho0QybSa7l++s0DH+LDiLs= | github.com/go-playground/locales v0.14.0/go.mod h1:sawfccIbzZTqEDETgFXqTho0QybSa7l++s0DH+LDiLs= | ||||||
| github.com/go-playground/locales v0.14.1 h1:EWaQ/wswjilfKLTECiXz7Rh+3BjFhfDFKv/oXslEjJA= | github.com/go-playground/locales v0.14.1 h1:EWaQ/wswjilfKLTECiXz7Rh+3BjFhfDFKv/oXslEjJA= | ||||||
| @ -387,8 +388,7 @@ github.com/google/go-cmp v0.5.5/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/ | |||||||
| github.com/google/go-cmp v0.5.6/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= | github.com/google/go-cmp v0.5.6/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= | ||||||
| github.com/google/go-cmp v0.5.7/go.mod h1:n+brtR0CgQNWTVd5ZUFpTBC8YFBDLK/h/bpaJ8/DtOE= | github.com/google/go-cmp v0.5.7/go.mod h1:n+brtR0CgQNWTVd5ZUFpTBC8YFBDLK/h/bpaJ8/DtOE= | ||||||
| github.com/google/go-cmp v0.5.8/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= | github.com/google/go-cmp v0.5.8/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= | ||||||
| github.com/google/go-cmp v0.5.9 h1:O2Tfq5qg4qc4AmwVlvv0oLiVAGB7enBSJ2x2DqQFi38= | github.com/google/go-cmp v0.6.0 h1:ofyhxvXcZhMsU5ulbFiLKl/XBFqE1GSq7atu8tAmTRI= | ||||||
| github.com/google/go-cmp v0.5.9/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= |  | ||||||
| github.com/google/go-cmp v0.6.0/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= | github.com/google/go-cmp v0.6.0/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= | ||||||
| github.com/google/gofuzz v1.0.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg= | github.com/google/gofuzz v1.0.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg= | ||||||
| github.com/google/martian v2.1.0+incompatible/go.mod h1:9I4somxYTbIHy5NJKHRl3wXiIaQGbYVAs8BPL6v8lEs= | github.com/google/martian v2.1.0+incompatible/go.mod h1:9I4somxYTbIHy5NJKHRl3wXiIaQGbYVAs8BPL6v8lEs= | ||||||
| @ -958,10 +958,10 @@ golang.org/x/crypto v0.0.0-20210711020723-a769d52b0f97/go.mod h1:GvvjBRRGRdwPK5y | |||||||
| golang.org/x/crypto v0.0.0-20210921155107-089bfa567519/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc= | golang.org/x/crypto v0.0.0-20210921155107-089bfa567519/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc= | ||||||
| golang.org/x/crypto v0.0.0-20211215153901-e495a2d5b3d3/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4= | golang.org/x/crypto v0.0.0-20211215153901-e495a2d5b3d3/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4= | ||||||
| golang.org/x/crypto v0.13.0/go.mod h1:y6Z2r+Rw4iayiXXAIxJIDAJ1zMW4yaTpebo8fPOliYc= | golang.org/x/crypto v0.13.0/go.mod h1:y6Z2r+Rw4iayiXXAIxJIDAJ1zMW4yaTpebo8fPOliYc= | ||||||
| golang.org/x/crypto v0.19.0 h1:ENy+Az/9Y1vSrlrvBSyna3PITt4tiZLf7sgCjZBX7Wo= |  | ||||||
| golang.org/x/crypto v0.19.0/go.mod h1:Iy9bg/ha4yyC70EfRS8jz+B6ybOBKMaSxLj6P6oBDfU= | golang.org/x/crypto v0.19.0/go.mod h1:Iy9bg/ha4yyC70EfRS8jz+B6ybOBKMaSxLj6P6oBDfU= | ||||||
| golang.org/x/crypto v0.23.0/go.mod h1:CKFgDieR+mRhux2Lsu27y0fO304Db0wZe70UKqHu0v8= | golang.org/x/crypto v0.23.0/go.mod h1:CKFgDieR+mRhux2Lsu27y0fO304Db0wZe70UKqHu0v8= | ||||||
| golang.org/x/crypto v0.31.0/go.mod h1:kDsLvtWBEx7MV9tJOj9bnXsPbxwJQ6csT/x4KIN4Ssk= | golang.org/x/crypto v0.31.0/go.mod h1:kDsLvtWBEx7MV9tJOj9bnXsPbxwJQ6csT/x4KIN4Ssk= | ||||||
|  | golang.org/x/crypto v0.37.0 h1:kJNSjF/Xp7kU0iB2Z+9viTPMW4EqqsrywMXLJOOsXSE= | ||||||
| golang.org/x/crypto v0.37.0/go.mod h1:vg+k43peMZ0pUMhYmVAWysMK35e6ioLh3wB8ZCAfbVc= | golang.org/x/crypto v0.37.0/go.mod h1:vg+k43peMZ0pUMhYmVAWysMK35e6ioLh3wB8ZCAfbVc= | ||||||
| golang.org/x/exp v0.0.0-20180321215751-8460e604b9de/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= | golang.org/x/exp v0.0.0-20180321215751-8460e604b9de/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= | ||||||
| golang.org/x/exp v0.0.0-20180807140117-3d87b88a115f/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= | golang.org/x/exp v0.0.0-20180807140117-3d87b88a115f/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= | ||||||
| @ -1060,7 +1060,6 @@ golang.org/x/net v0.0.0-20220722155237-a158d28d115b/go.mod h1:XRhObCWvk6IyKnWLug | |||||||
| golang.org/x/net v0.6.0/go.mod h1:2Tu9+aMcznHK/AK1HMvgo6xiTLG5rD5rZLDS+rp2Bjs= | golang.org/x/net v0.6.0/go.mod h1:2Tu9+aMcznHK/AK1HMvgo6xiTLG5rD5rZLDS+rp2Bjs= | ||||||
| golang.org/x/net v0.10.0/go.mod h1:0qNGK6F8kojg2nk9dLZ2mShWaEBan6FAoqfSigmmuDg= | golang.org/x/net v0.10.0/go.mod h1:0qNGK6F8kojg2nk9dLZ2mShWaEBan6FAoqfSigmmuDg= | ||||||
| golang.org/x/net v0.15.0/go.mod h1:idbUs1IY1+zTqbi8yxTbhexhEEk5ur9LInksu6HrEpk= | golang.org/x/net v0.15.0/go.mod h1:idbUs1IY1+zTqbi8yxTbhexhEEk5ur9LInksu6HrEpk= | ||||||
| golang.org/x/net v0.21.0 h1:AQyQV4dYCvJ7vGmJyKki9+PBdyvhkSd8EIx/qb0AYv4= |  | ||||||
| golang.org/x/net v0.21.0/go.mod h1:bIjVDfnllIU7BJ2DNgfnXvpSvtn8VRwhlsaeUTyUS44= | golang.org/x/net v0.21.0/go.mod h1:bIjVDfnllIU7BJ2DNgfnXvpSvtn8VRwhlsaeUTyUS44= | ||||||
| golang.org/x/net v0.25.0/go.mod h1:JkAGAh7GEvH74S6FOH42FLoXpXbE/aqXSrIQjXgsiwM= | golang.org/x/net v0.25.0/go.mod h1:JkAGAh7GEvH74S6FOH42FLoXpXbE/aqXSrIQjXgsiwM= | ||||||
| golang.org/x/net v0.33.0/go.mod h1:HXLR5J+9DxmrqMwG9qjGCxZ+zKXxBru04zlTvWlWuN4= | golang.org/x/net v0.33.0/go.mod h1:HXLR5J+9DxmrqMwG9qjGCxZ+zKXxBru04zlTvWlWuN4= | ||||||
| @ -1086,12 +1085,12 @@ golang.org/x/sync v0.0.0-20201020160332-67f06af15bc9/go.mod h1:RxMgew5VJxzue5/jJ | |||||||
| golang.org/x/sync v0.0.0-20201207232520-09787c993a3a/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= | golang.org/x/sync v0.0.0-20201207232520-09787c993a3a/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= | ||||||
| golang.org/x/sync v0.0.0-20210220032951-036812b2e83c/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= | golang.org/x/sync v0.0.0-20210220032951-036812b2e83c/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= | ||||||
| golang.org/x/sync v0.0.0-20220722155255-886fb9371eb4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= | golang.org/x/sync v0.0.0-20220722155255-886fb9371eb4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= | ||||||
| golang.org/x/sync v0.1.0 h1:wsuoTGHzEhffawBOhz5CYhcrV4IdKZbEyZjBMuTp12o= |  | ||||||
| golang.org/x/sync v0.1.0/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= | golang.org/x/sync v0.1.0/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= | ||||||
| golang.org/x/sync v0.3.0/go.mod h1:FU7BRWz2tNW+3quACPkgCx/L+uEAv1htQ0V83Z9Rj+Y= | golang.org/x/sync v0.3.0/go.mod h1:FU7BRWz2tNW+3quACPkgCx/L+uEAv1htQ0V83Z9Rj+Y= | ||||||
| golang.org/x/sync v0.6.0/go.mod h1:Czt+wKu1gCyEFDUtn0jG5QVvpJ6rzVqr5aXyt9drQfk= | golang.org/x/sync v0.6.0/go.mod h1:Czt+wKu1gCyEFDUtn0jG5QVvpJ6rzVqr5aXyt9drQfk= | ||||||
| golang.org/x/sync v0.7.0/go.mod h1:Czt+wKu1gCyEFDUtn0jG5QVvpJ6rzVqr5aXyt9drQfk= | golang.org/x/sync v0.7.0/go.mod h1:Czt+wKu1gCyEFDUtn0jG5QVvpJ6rzVqr5aXyt9drQfk= | ||||||
| golang.org/x/sync v0.10.0/go.mod h1:Czt+wKu1gCyEFDUtn0jG5QVvpJ6rzVqr5aXyt9drQfk= | golang.org/x/sync v0.10.0/go.mod h1:Czt+wKu1gCyEFDUtn0jG5QVvpJ6rzVqr5aXyt9drQfk= | ||||||
|  | golang.org/x/sync v0.13.0 h1:AauUjRAJ9OSnvULf/ARrrVywoJDy0YS2AwQ98I37610= | ||||||
| golang.org/x/sync v0.13.0/go.mod h1:1dzgHSNfp02xaA81J2MS99Qcpr2w7fw1gpm99rleRqA= | golang.org/x/sync v0.13.0/go.mod h1:1dzgHSNfp02xaA81J2MS99Qcpr2w7fw1gpm99rleRqA= | ||||||
| golang.org/x/sys v0.0.0-20180823144017-11551d06cbcc/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= | golang.org/x/sys v0.0.0-20180823144017-11551d06cbcc/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= | ||||||
| golang.org/x/sys v0.0.0-20180830151530-49385e6e1522/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= | golang.org/x/sys v0.0.0-20180830151530-49385e6e1522/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= | ||||||
| @ -1175,10 +1174,9 @@ golang.org/x/sys v0.6.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= | |||||||
| golang.org/x/sys v0.8.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= | golang.org/x/sys v0.8.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= | ||||||
| golang.org/x/sys v0.12.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= | golang.org/x/sys v0.12.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= | ||||||
| golang.org/x/sys v0.17.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= | golang.org/x/sys v0.17.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= | ||||||
| golang.org/x/sys v0.18.0 h1:DBdB3niSjOA/O0blCZBqDefyWNYveAYMNF1Wum0DYQ4= |  | ||||||
| golang.org/x/sys v0.18.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= |  | ||||||
| golang.org/x/sys v0.20.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= | golang.org/x/sys v0.20.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= | ||||||
| golang.org/x/sys v0.28.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= | golang.org/x/sys v0.28.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= | ||||||
|  | golang.org/x/sys v0.32.0 h1:s77OFDvIQeibCmezSnk/q6iAfkdiQaJi4VzroCFrN20= | ||||||
| golang.org/x/sys v0.32.0/go.mod h1:BJP2sWEmIv4KK5OTEluFJCKSidICx8ciO85XgH3Ak8k= | golang.org/x/sys v0.32.0/go.mod h1:BJP2sWEmIv4KK5OTEluFJCKSidICx8ciO85XgH3Ak8k= | ||||||
| golang.org/x/telemetry v0.0.0-20240228155512-f48c80bd79b2/go.mod h1:TeRTkGYfJXctD9OcfyVLyj2J3IxLnKwHJR8f4D8a3YE= | golang.org/x/telemetry v0.0.0-20240228155512-f48c80bd79b2/go.mod h1:TeRTkGYfJXctD9OcfyVLyj2J3IxLnKwHJR8f4D8a3YE= | ||||||
| golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= | golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= | ||||||
| @ -1201,10 +1199,10 @@ golang.org/x/text v0.3.7/go.mod h1:u+2+/6zg+i71rQMx5EYifcz6MCKuco9NR6JIITiCfzQ= | |||||||
| golang.org/x/text v0.7.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8= | golang.org/x/text v0.7.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8= | ||||||
| golang.org/x/text v0.9.0/go.mod h1:e1OnstbJyHTd6l/uOt8jFFHp6TRDWZR/bV3emEE/zU8= | golang.org/x/text v0.9.0/go.mod h1:e1OnstbJyHTd6l/uOt8jFFHp6TRDWZR/bV3emEE/zU8= | ||||||
| golang.org/x/text v0.13.0/go.mod h1:TvPlkZtksWOMsz7fbANvkp4WM8x/WCo/om8BMLbz+aE= | golang.org/x/text v0.13.0/go.mod h1:TvPlkZtksWOMsz7fbANvkp4WM8x/WCo/om8BMLbz+aE= | ||||||
| golang.org/x/text v0.14.0 h1:ScX5w1eTa3QqT8oi6+ziP7dTV1S2+ALU0bI+0zXKWiQ= |  | ||||||
| golang.org/x/text v0.14.0/go.mod h1:18ZOQIKpY8NJVqYksKHtTdi31H5itFRjB5/qKTNYzSU= | golang.org/x/text v0.14.0/go.mod h1:18ZOQIKpY8NJVqYksKHtTdi31H5itFRjB5/qKTNYzSU= | ||||||
| golang.org/x/text v0.15.0/go.mod h1:18ZOQIKpY8NJVqYksKHtTdi31H5itFRjB5/qKTNYzSU= | golang.org/x/text v0.15.0/go.mod h1:18ZOQIKpY8NJVqYksKHtTdi31H5itFRjB5/qKTNYzSU= | ||||||
| golang.org/x/text v0.21.0/go.mod h1:4IBbMaMmOPCJ8SecivzSH54+73PCFmPWxNTLm+vZkEQ= | golang.org/x/text v0.21.0/go.mod h1:4IBbMaMmOPCJ8SecivzSH54+73PCFmPWxNTLm+vZkEQ= | ||||||
|  | golang.org/x/text v0.24.0 h1:dd5Bzh4yt5KYA8f9CJHCP4FB4D51c2c6JvN37xJJkJ0= | ||||||
| golang.org/x/text v0.24.0/go.mod h1:L8rBsPeo2pSS+xqN0d5u2ikmjtmoJbDBT1b7nHvFCdU= | golang.org/x/text v0.24.0/go.mod h1:L8rBsPeo2pSS+xqN0d5u2ikmjtmoJbDBT1b7nHvFCdU= | ||||||
| golang.org/x/time v0.0.0-20180412165947-fbb02b2291d2/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= | golang.org/x/time v0.0.0-20180412165947-fbb02b2291d2/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= | ||||||
| golang.org/x/time v0.0.0-20181108054448-85acf8d2951c/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= | golang.org/x/time v0.0.0-20181108054448-85acf8d2951c/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= | ||||||
|  | |||||||
| @ -38,7 +38,7 @@ const ( | |||||||
| 	NotExistInentifier    = 202 | 	NotExistInentifier    = 202 | ||||||
| 	ERROR                 = 500 | 	ERROR                 = 500 | ||||||
| 	InvalidParams         = 400 | 	InvalidParams         = 400 | ||||||
| 
 | 	NotLoginSqueeze       = 409 | ||||||
| 	//成员错误
 | 	//成员错误
 | ||||||
| 	ErrorExistNick          = 10001 | 	ErrorExistNick          = 10001 | ||||||
| 	ErrorExistUser          = 10002 | 	ErrorExistUser          = 10002 | ||||||
| @ -146,3 +146,14 @@ const ( | |||||||
| 	NotFilled = 3 | 	NotFilled = 3 | ||||||
| 	Save      = 4 | 	Save      = 4 | ||||||
| ) | ) | ||||||
|  | 
 | ||||||
|  | var OfflineMap = map[string]string{ | ||||||
|  | 	"ErrOfflineZhCN": "您已经下线", | ||||||
|  | 	"ErrOfflineEN":   "You have been offline", | ||||||
|  | 	"ErrOfflineZhTW": "您已經下線", | ||||||
|  | } | ||||||
|  | var LoginMap = map[string]string{ | ||||||
|  | 	"ErrNotLoginZhCN": "请先登录", | ||||||
|  | 	"ErrNotLoginEN":   "Please login first", | ||||||
|  | 	"ErrNotLoginZhTW": "請先登錄", | ||||||
|  | } | ||||||
|  | |||||||
| @ -4,6 +4,8 @@ const ( | |||||||
| 	SERVER_CONFIG         = "conf.ini" | 	SERVER_CONFIG         = "conf.ini" | ||||||
| 	SERVER_DUBBOGO_CONFIG = "dubbogo.yaml" | 	SERVER_DUBBOGO_CONFIG = "dubbogo.yaml" | ||||||
| 	MODE_ENV              = "MODE_ENV" | 	MODE_ENV              = "MODE_ENV" | ||||||
|  | 	LoginFromPC           = "pc" | ||||||
|  | 	OfflineSqueeze        = "squeeze" | ||||||
| ) | ) | ||||||
| 
 | 
 | ||||||
| const ( | const ( | ||||||
|  | |||||||
							
								
								
									
										1093
									
								
								pkg/e/oa_msg.go
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										1093
									
								
								pkg/e/oa_msg.go
									
									
									
									
									
										Normal file
									
								
							
										
											
												File diff suppressed because it is too large
												Load Diff
											
										
									
								
							
							
								
								
									
										132
									
								
								pkg/logic/language.go
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										132
									
								
								pkg/logic/language.go
									
									
									
									
									
										Normal file
									
								
							| @ -0,0 +1,132 @@ | |||||||
|  | package logic | ||||||
|  | 
 | ||||||
|  | import ( | ||||||
|  | 	"fonchain-fiee/pkg/e" | ||||||
|  | 	"github.com/gin-gonic/gin" | ||||||
|  | 	"strings" | ||||||
|  | ) | ||||||
|  | 
 | ||||||
|  | func GetLanguage(c *gin.Context) string { | ||||||
|  | 	lang := c.Request.Header.Get("Accept-Language") | ||||||
|  | 	lang = strings.Split(lang, ",")[0] | ||||||
|  | 	if lang == "zh-CN" || lang == "zh" || lang == "ZhCN" { | ||||||
|  | 		lang = "ZhCN" | ||||||
|  | 	} else if lang == "zh-TW" || lang == "ZhTW" { | ||||||
|  | 		lang = "ZhTW" | ||||||
|  | 	} else if lang == "en" || lang == "EN" { | ||||||
|  | 		lang = "EN" | ||||||
|  | 	} | ||||||
|  | 	return lang | ||||||
|  | } | ||||||
|  | 
 | ||||||
|  | func ConvertOfflineMsg(c *gin.Context, key string) string { | ||||||
|  | 	language := GetLanguage(c) | ||||||
|  | 	switch language { | ||||||
|  | 	case "EN": | ||||||
|  | 		return e.OfflineMap[strings.Join([]string{key, "EN"}, "")] | ||||||
|  | 	case "ZhCN": | ||||||
|  | 		return e.OfflineMap[strings.Join([]string{key, "ZhCN"}, "")] | ||||||
|  | 	case "ZhTW": | ||||||
|  | 		return e.OfflineMap[strings.Join([]string{key, "ZhTW"}, "")] | ||||||
|  | 	default: | ||||||
|  | 		return key | ||||||
|  | 	} | ||||||
|  | } | ||||||
|  | 
 | ||||||
|  | func ConvertLoginMsg(c *gin.Context, key string) string { | ||||||
|  | 	language := GetLanguage(c) | ||||||
|  | 	switch language { | ||||||
|  | 	case "EN": | ||||||
|  | 		return e.LoginMap[strings.Join([]string{key, "EN"}, "")] | ||||||
|  | 	case "ZhCN": | ||||||
|  | 		return e.LoginMap[strings.Join([]string{key, "ZhCN"}, "")] | ||||||
|  | 	case "ZhTW": | ||||||
|  | 		return e.LoginMap[strings.Join([]string{key, "ZhTW"}, "")] | ||||||
|  | 	default: | ||||||
|  | 		return key | ||||||
|  | 	} | ||||||
|  | } | ||||||
|  | 
 | ||||||
|  | func ConvertWeek(language string, week int32) string { | ||||||
|  | 	switch language { | ||||||
|  | 	case "EN": | ||||||
|  | 		switch week { | ||||||
|  | 		case 1: | ||||||
|  | 			return "Monday" | ||||||
|  | 		case 2: | ||||||
|  | 			return "Tuesday" | ||||||
|  | 		case 3: | ||||||
|  | 			return "Wednesday" | ||||||
|  | 		case 4: | ||||||
|  | 			return "Thursday" | ||||||
|  | 		case 5: | ||||||
|  | 			return "Friday" | ||||||
|  | 		case 6: | ||||||
|  | 			return "Saturday" | ||||||
|  | 		case 7: | ||||||
|  | 			return "Sunday" | ||||||
|  | 		} | ||||||
|  | 	case "ZhCN": | ||||||
|  | 		switch week { | ||||||
|  | 		case 1: | ||||||
|  | 			return "星期一" | ||||||
|  | 		case 2: | ||||||
|  | 			return "星期二" | ||||||
|  | 		case 3: | ||||||
|  | 			return "星期三" | ||||||
|  | 		case 4: | ||||||
|  | 			return "星期四" | ||||||
|  | 		case 5: | ||||||
|  | 			return "星期五" | ||||||
|  | 		case 6: | ||||||
|  | 			return "星期六" | ||||||
|  | 		case 7: | ||||||
|  | 			return "星期日" | ||||||
|  | 		} | ||||||
|  | 	case "ZhTW": | ||||||
|  | 		switch week { | ||||||
|  | 		case 1: | ||||||
|  | 			return "星期一" | ||||||
|  | 		case 2: | ||||||
|  | 			return "星期二" | ||||||
|  | 		case 3: | ||||||
|  | 			return "星期三" | ||||||
|  | 		case 4: | ||||||
|  | 			return "星期四" | ||||||
|  | 		case 5: | ||||||
|  | 			return "星期五" | ||||||
|  | 		case 6: | ||||||
|  | 			return "星期六" | ||||||
|  | 		case 7: | ||||||
|  | 			return "星期日" | ||||||
|  | 		} | ||||||
|  | 	} | ||||||
|  | 	return "" | ||||||
|  | } | ||||||
|  | 
 | ||||||
|  | func ConvertAmPm(language string, amPm string) string { | ||||||
|  | 	switch language { | ||||||
|  | 	case "EN": | ||||||
|  | 		switch amPm { | ||||||
|  | 		case "上午": | ||||||
|  | 			return "AM" | ||||||
|  | 		case "下午": | ||||||
|  | 			return "PM" | ||||||
|  | 		} | ||||||
|  | 	} | ||||||
|  | 	return amPm | ||||||
|  | } | ||||||
|  | 
 | ||||||
|  | func ConvertOaMsg(c *gin.Context, key string) string { | ||||||
|  | 	language := GetLanguage(c) | ||||||
|  | 	switch language { | ||||||
|  | 	case "EN": | ||||||
|  | 		return e.GetMsgEN(strings.Join([]string{key, "EN"}, "")) | ||||||
|  | 	case "ZhCN": | ||||||
|  | 		return e.GetMsgZhCN(strings.Join([]string{key, "ZhCN"}, "")) | ||||||
|  | 	case "ZhTW": | ||||||
|  | 		return e.GetMsgZhTW(strings.Join([]string{key, "ZhTW"}, "")) | ||||||
|  | 	default: | ||||||
|  | 		return key | ||||||
|  | 	} | ||||||
|  | } | ||||||
| @ -1,19 +1,25 @@ | |||||||
| package middleware | package middleware | ||||||
| 
 | 
 | ||||||
| import ( | import ( | ||||||
|  | 	"dubbo.apache.org/dubbo-go/v3/common/logger" | ||||||
| 	"errors" | 	"errors" | ||||||
| 	"fmt" | 	"fmt" | ||||||
| 	api "fonchain-fiee/api/account" | 	"fonchain-fiee/api/account" | ||||||
|  | 	api "fonchain-fiee/api/accountFiee" | ||||||
| 	jwt2 "fonchain-fiee/pkg/common/jwt" | 	jwt2 "fonchain-fiee/pkg/common/jwt" | ||||||
| 	"fonchain-fiee/pkg/common/m" | 	"fonchain-fiee/pkg/common/m" | ||||||
| 	"fonchain-fiee/pkg/e" | 	"fonchain-fiee/pkg/e" | ||||||
|  | 	"fonchain-fiee/pkg/logic" | ||||||
|  | 	"fonchain-fiee/pkg/model" | ||||||
| 	"fonchain-fiee/pkg/model/login" | 	"fonchain-fiee/pkg/model/login" | ||||||
| 	"fonchain-fiee/pkg/service" | 	"fonchain-fiee/pkg/service" | ||||||
|  | 	"fonchain-fiee/pkg/utils/secret" | ||||||
| 	"github.com/gin-gonic/gin" | 	"github.com/gin-gonic/gin" | ||||||
|  | 	"time" | ||||||
| ) | ) | ||||||
| 
 | 
 | ||||||
| // CheckLogin 检测登陆
 | // CheckLogin 检测登陆
 | ||||||
| func CheckLogin(provider *api.AccountClientImpl) gin.HandlerFunc { | func CheckLogin(provider *api.AccountFieeClientImpl) gin.HandlerFunc { | ||||||
| 
 | 
 | ||||||
| 	return func(ctx *gin.Context) { | 	return func(ctx *gin.Context) { | ||||||
| 
 | 
 | ||||||
| @ -38,7 +44,7 @@ func CheckLogin(provider *api.AccountClientImpl) gin.HandlerFunc { | |||||||
| 			Domain: jwt.Domain, | 			Domain: jwt.Domain, | ||||||
| 		} | 		} | ||||||
| 
 | 
 | ||||||
| 		infoRes, err := service.AccountProvider.UserByTel(ctx, infoReq) | 		infoRes, err := service.AccountFieeProvider.UserByTel(ctx, infoReq) | ||||||
| 		if err != nil { | 		if err != nil { | ||||||
| 			service.Error(ctx, err) | 			service.Error(ctx, err) | ||||||
| 			return | 			return | ||||||
| @ -69,3 +75,108 @@ func CheckLogin(provider *api.AccountClientImpl) gin.HandlerFunc { | |||||||
| 		ctx.Next() | 		ctx.Next() | ||||||
| 	} | 	} | ||||||
| } | } | ||||||
|  | func CheckWebLogin(provider *account.AccountClientImpl) gin.HandlerFunc { | ||||||
|  | 
 | ||||||
|  | 	return func(ctx *gin.Context) { | ||||||
|  | 		startTime := time.Now() | ||||||
|  | 		//如果没有登录
 | ||||||
|  | 		authorization := ctx.GetHeader(e.Authorization) | ||||||
|  | 		if authorization == "" { | ||||||
|  | 			service.NotLoginRes(ctx, logic.ConvertLoginMsg(ctx, e.ErrNotLogin)) | ||||||
|  | 			return | ||||||
|  | 		} | ||||||
|  | 
 | ||||||
|  | 		jwt, err := secret.GetJwtFromStr(authorization) | ||||||
|  | 
 | ||||||
|  | 		logger.Info("---------end帐号转jwt:时间:", time.Now().Sub(startTime)) | ||||||
|  | 		if err != nil { | ||||||
|  | 			service.NotLoginRes(ctx, err.Error()) | ||||||
|  | 			return | ||||||
|  | 		} | ||||||
|  | 
 | ||||||
|  | 		//0 解密
 | ||||||
|  | 		req := account.DecryptJwtRequest{ | ||||||
|  | 			Token:  jwt, | ||||||
|  | 			Domain: "fontree", | ||||||
|  | 		} | ||||||
|  | 
 | ||||||
|  | 		info, err := service.AccountProvider.DecryptJwt(ctx, &req) | ||||||
|  | 		logger.Info("---------end帐号微服务解密:时间:", time.Now().Sub(startTime)) | ||||||
|  | 
 | ||||||
|  | 		if err != nil { | ||||||
|  | 			service.NotLoginRes(ctx, err.Error()) | ||||||
|  | 			return | ||||||
|  | 		} | ||||||
|  | 
 | ||||||
|  | 		//if info.OfflineCode == e.OfflineSqueeze {
 | ||||||
|  | 		//	service.Error(ctx, e.NotLoginSqueeze, errors.New(e.ErrOfflineSqueeze))
 | ||||||
|  | 		//	return
 | ||||||
|  | 		//}
 | ||||||
|  | 
 | ||||||
|  | 		if info.IsOffline == true { | ||||||
|  | 			service.ErrorWeb(ctx, e.NotLogin, errors.New(logic.ConvertOfflineMsg(ctx, e.ErrOffline))) | ||||||
|  | 			return | ||||||
|  | 		} | ||||||
|  | 
 | ||||||
|  | 		//1 获取用户的账号信息
 | ||||||
|  | 		infoReq := &account.InfoRequest{ | ||||||
|  | 			ID:     info.ID, | ||||||
|  | 			Scene:  "base", | ||||||
|  | 			Domain: "fontree", | ||||||
|  | 		} | ||||||
|  | 
 | ||||||
|  | 		infoRes, err := service.AccountProvider.Info(ctx, infoReq) | ||||||
|  | 
 | ||||||
|  | 		logger.Info("---------end帐号info时间:", time.Now().Sub(startTime)) | ||||||
|  | 
 | ||||||
|  | 		if err != nil { | ||||||
|  | 			service.ErrorWeb(ctx, e.Error, err) | ||||||
|  | 			return | ||||||
|  | 		} | ||||||
|  | 
 | ||||||
|  | 		//3 获取用户的岗位信息
 | ||||||
|  | 		//uReq := rule.RulesRequest{
 | ||||||
|  | 		//	AccountID: info.ID,
 | ||||||
|  | 		//}
 | ||||||
|  | 		//
 | ||||||
|  | 		//qres, err1 := service.RuleProvider.UserInfo(ctx, &uReq)
 | ||||||
|  | 		//
 | ||||||
|  | 		//logger.Info("---------end帐号,rule的userInfo:时间:", time.Now().Sub(startTime))
 | ||||||
|  | 		//if err1 != nil {
 | ||||||
|  | 		//	service.Error(ctx, e.Error, err)
 | ||||||
|  | 		//	return
 | ||||||
|  | 		//}
 | ||||||
|  | 
 | ||||||
|  | 		loginInfo := login.Info{ | ||||||
|  | 			Domain: info.Domain, | ||||||
|  | 			ID:     info.ID, | ||||||
|  | 			//Account:        info.Account,
 | ||||||
|  | 			//NickName:       info.NickName,
 | ||||||
|  | 			//PositionUsers:  qres.PositionUsers,
 | ||||||
|  | 			//Extend:         infoRes.Info.Extend,
 | ||||||
|  | 			TelNum: infoRes.Info.TelNum, | ||||||
|  | 			//Avatar:         infoRes.Info.Avatar,
 | ||||||
|  | 			//JumpTo:         "",
 | ||||||
|  | 			//DepartmentName: "",
 | ||||||
|  | 		} | ||||||
|  | 
 | ||||||
|  | 		//if infoRes.Info.Extend != nil {
 | ||||||
|  | 		//	loginInfo.JumpTo = infoRes.Info.Extend.JumpTo
 | ||||||
|  | 		//}
 | ||||||
|  | 		//
 | ||||||
|  | 		//if len(qres.PositionUsers) >= 1 {
 | ||||||
|  | 		//	loginInfo.DepartmentName = qres.PositionUsers[0].DepartmentName
 | ||||||
|  | 		//}
 | ||||||
|  | 
 | ||||||
|  | 		ctx.Set("jwtInfo", loginInfo) | ||||||
|  | 		var mLoginInfo model.LoginInfo | ||||||
|  | 		mLoginInfo.ID = loginInfo.ID | ||||||
|  | 		mLoginInfo.NickName = loginInfo.Name | ||||||
|  | 		mLoginInfo.Phone = loginInfo.TelNum | ||||||
|  | 		//mLoginInfo.PositionUsers = qres.PositionUsers
 | ||||||
|  | 		ctx.Set("mLoginInfo", mLoginInfo) | ||||||
|  | 		logger.Info("---------check_login:总时间", time.Now().Sub(startTime)) | ||||||
|  | 		ctx.Next() | ||||||
|  | 
 | ||||||
|  | 	} | ||||||
|  | } | ||||||
|  | |||||||
| @ -2,6 +2,8 @@ package middleware | |||||||
| 
 | 
 | ||||||
| import ( | import ( | ||||||
| 	"bytes" | 	"bytes" | ||||||
|  | 	"fmt" | ||||||
|  | 	"io" | ||||||
| 	"io/ioutil" | 	"io/ioutil" | ||||||
| 	"log" | 	"log" | ||||||
| 	"net" | 	"net" | ||||||
| @ -24,7 +26,13 @@ func NewLogger() gin.HandlerFunc { | |||||||
| 		latencyTime := endTime.Sub(startTime) // 请求方式
 | 		latencyTime := endTime.Sub(startTime) // 请求方式
 | ||||||
| 		path := c.Request.URL.Path | 		path := c.Request.URL.Path | ||||||
| 		query := c.Request.URL.RawQuery | 		query := c.Request.URL.RawQuery | ||||||
| 		data, _ := ioutil.ReadAll(c.Request.Body) | 		data, _ := io.ReadAll(c.Request.Body) | ||||||
|  | 		val := c.GetHeader("Accept-Language") | ||||||
|  | 		if val == "" { | ||||||
|  | 			c.Request.Header.Set("Accept-Language", "zh-CN") | ||||||
|  | 		} | ||||||
|  | 		val2 := c.GetHeader("Accept-Language") | ||||||
|  | 		fmt.Println(val2) | ||||||
| 		log.Printf("[%s] %s %d %s %s %s %s %s %s", path, c.Request.Method, c.Writer.Status(), query, | 		log.Printf("[%s] %s %d %s %s %s %s %s %s", path, c.Request.Method, c.Writer.Status(), query, | ||||||
| 			string(data), c.ClientIP(), c.Request.UserAgent(), c.Errors.ByType(gin.ErrorTypePrivate).String(), latencyTime.String()) | 			string(data), c.ClientIP(), c.Request.UserAgent(), c.Errors.ByType(gin.ErrorTypePrivate).String(), latencyTime.String()) | ||||||
| 
 | 
 | ||||||
|  | |||||||
							
								
								
									
										18
									
								
								pkg/model/middleware.go
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										18
									
								
								pkg/model/middleware.go
									
									
									
									
									
										Normal file
									
								
							| @ -0,0 +1,18 @@ | |||||||
|  | package model | ||||||
|  | 
 | ||||||
|  | import ( | ||||||
|  | 	api "fonchain-fiee/api/account" | ||||||
|  | 	//"github.com/fonchain_enterprise/fonchain-main/api/rule"
 | ||||||
|  | ) | ||||||
|  | 
 | ||||||
|  | type LoginInfo struct { | ||||||
|  | 	Domain         string | ||||||
|  | 	ID             uint64 | ||||||
|  | 	Account        string | ||||||
|  | 	NickName       string | ||||||
|  | 	JumpTo         string | ||||||
|  | 	DepartmentName string | ||||||
|  | 	Phone          string | ||||||
|  | 	Extend         *api.Extend | ||||||
|  | 	//PositionUsers  []*rule.PositionUser
 | ||||||
|  | } | ||||||
| @ -1,13 +1,15 @@ | |||||||
| package router | package router | ||||||
| 
 | 
 | ||||||
| import ( | import ( | ||||||
|  | 	"fonchain-fiee/pkg/middleware" | ||||||
|  | 	"fonchain-fiee/pkg/service" | ||||||
| 	"fonchain-fiee/pkg/service/bundle" | 	"fonchain-fiee/pkg/service/bundle" | ||||||
| 	"github.com/gin-gonic/gin" | 	"github.com/gin-gonic/gin" | ||||||
| ) | ) | ||||||
| 
 | 
 | ||||||
| func BundleRouter(r *gin.RouterGroup) { | func BundleRouter(r *gin.RouterGroup) { | ||||||
| 	bundleRoute := r.Group("bundle") | 	bundleRoute := r.Group("bundle") | ||||||
| 
 | 	bundleRoute.Use(middleware.CheckWebLogin(service.AccountProvider)) | ||||||
| 	// 套餐
 | 	// 套餐
 | ||||||
| 	{ | 	{ | ||||||
| 		bundleClientRoute := bundleRoute.Group("system") | 		bundleClientRoute := bundleRoute.Group("system") | ||||||
|  | |||||||
| @ -14,16 +14,22 @@ func BundleOrderRouter(r *gin.RouterGroup) { | |||||||
| 	r.POST("/antom/callback", bundle.AntomWebhook) // Antom回调
 | 	r.POST("/antom/callback", bundle.AntomWebhook) // Antom回调
 | ||||||
| 
 | 
 | ||||||
| 	bundleOrderRoute := r.Group("bundle-order") | 	bundleOrderRoute := r.Group("bundle-order") | ||||||
| 	bundleOrderRoute.Use(middleware.CheckLogin(service.AccountProvider)) | 	bundleOrderRoute.Use(middleware.CheckLogin(service.AccountFieeProvider)) | ||||||
|  | 	bundleOrderWebRoute := r.Group("bundle-order") | ||||||
|  | 	bundleOrderWebRoute.Use(middleware.CheckWebLogin(service.AccountProvider)) | ||||||
| 
 | 
 | ||||||
| 	// 套餐
 | 	// 套餐
 | ||||||
| 	{ | 	{ | ||||||
| 		bundleOrderClientRoute := bundleOrderRoute.Group("common") | 		bundleOrderClientWebRoute := bundleOrderWebRoute.Group("common/web") | ||||||
| 		{ | 		{ | ||||||
| 			bundleOrderClientRoute.POST("bundle-order-list", bundle.OrderRecordsList) | 			bundleOrderClientWebRoute.POST("bundle-order-list", bundle.OrderRecordsList) | ||||||
|  | 		} | ||||||
|  | 		bundleOrderClientAppRoute := bundleOrderRoute.Group("common/app") | ||||||
|  | 		{ | ||||||
|  | 			bundleOrderClientAppRoute.POST("bundle-order-list", bundle.OrderRecordsList) | ||||||
| 		} | 		} | ||||||
| 
 | 
 | ||||||
| 		bundleOrderWebRoute := bundleOrderRoute.Group("web") | 		//bundleOrderWebRoute := bundleOrderRoute.Group("web")
 | ||||||
| 		{ | 		{ | ||||||
| 			bundleOrderWebRoute.POST("financial-confirm", bundle.UpdateFinancialConfirmationStatus) | 			bundleOrderWebRoute.POST("financial-confirm", bundle.UpdateFinancialConfirmationStatus) | ||||||
| 			bundleOrderWebRoute.POST("order-export", bundle.ExportOrderInfo) | 			bundleOrderWebRoute.POST("order-export", bundle.ExportOrderInfo) | ||||||
|  | |||||||
| @ -10,9 +10,14 @@ import ( | |||||||
| func MediaRouter(r *gin.RouterGroup) { | func MediaRouter(r *gin.RouterGroup) { | ||||||
| 	//noAuth := r.Group("")
 | 	//noAuth := r.Group("")
 | ||||||
| 	auth := r.Group("") | 	auth := r.Group("") | ||||||
| 	auth.Use(middleware.CheckLogin(service.AccountProvider)) | 	auth.Use(middleware.CheckWebLogin(service.AccountProvider)) | ||||||
| 	media := auth.Group("media") | 	media := auth.Group("media") | ||||||
| 	{ | 	{ | ||||||
| 		media.POST("update-account", serviceCast.UpdateMediaAccount) | 		media.POST("update-account", serviceCast.UpdateMediaAccount) | ||||||
| 	} | 	} | ||||||
|  | 
 | ||||||
|  | 	work := auth.Group("work") | ||||||
|  | 	{ | ||||||
|  | 		work.POST("update-work", serviceCast.UpdateWork) | ||||||
|  | 	} | ||||||
| } | } | ||||||
|  | |||||||
| @ -56,15 +56,17 @@ func NewRouter() *gin.Engine { | |||||||
| 		privateGroup.POST("generate/captcha", account.GenerateCaptcha) //生成滑块验证码
 | 		privateGroup.POST("generate/captcha", account.GenerateCaptcha) //生成滑块验证码
 | ||||||
| 		privateGroup.POST("validate/captcha", account.ValidateCaptcha) //验证滑块验证码
 | 		privateGroup.POST("validate/captcha", account.ValidateCaptcha) //验证滑块验证码
 | ||||||
| 		acRoute := privateGroup.Group("/user") | 		acRoute := privateGroup.Group("/user") | ||||||
| 		acRoute.Use(middleware.CheckLogin(service.AccountProvider)) | 		acRoute.Use(middleware.CheckLogin(service.AccountFieeProvider)) | ||||||
| 		{ | 		{ | ||||||
| 			acRoute.POST("real-name", account.RealName) //实名
 | 			acRoute.POST("real-name", account.RealName) //实名
 | ||||||
| 			acRoute.POST("info", account.UserInfo)      //用户详情
 | 			acRoute.POST("info", account.UserInfo)      //用户详情
 | ||||||
| 			acRoute.POST("update", account.UserUpdate)  //用户更新
 | 			acRoute.POST("update", account.UserUpdate)  //用户更新
 | ||||||
| 		} | 		} | ||||||
|  | 		webAcRouter := privateGroup.Group("/user") | ||||||
|  | 		webAcRouter.Use(middleware.CheckWebLogin(service.AccountProvider)) | ||||||
| 		{ | 		{ | ||||||
| 			acRoute.POST("list", account.UserList)         //用户列表
 | 			webAcRouter.POST("list", account.UserList)         //用户列表
 | ||||||
| 			acRoute.POST("approval", account.UserApproval) //实名审核
 | 			webAcRouter.POST("approval", account.UserApproval) //实名审核
 | ||||||
| 		} | 		} | ||||||
| 	} | 	} | ||||||
| 	{ | 	{ | ||||||
| @ -72,7 +74,7 @@ func NewRouter() *gin.Engine { | |||||||
| 	} | 	} | ||||||
| 	// 上传
 | 	// 上传
 | ||||||
| 	upData := privateGroup.Group("upload") | 	upData := privateGroup.Group("upload") | ||||||
| 	upData.Use(middleware.CheckLogin(service.AccountProvider)) | 	upData.Use(middleware.CheckLogin(service.AccountFieeProvider)) | ||||||
| 	{ | 	{ | ||||||
| 		upData.POST("img", upload.UploadImg) | 		upData.POST("img", upload.UploadImg) | ||||||
| 	} | 	} | ||||||
|  | |||||||
| @ -10,7 +10,7 @@ import ( | |||||||
| 
 | 
 | ||||||
| func ValueAddBundleRouter(r *gin.RouterGroup) { | func ValueAddBundleRouter(r *gin.RouterGroup) { | ||||||
| 	valueAddBundleRoute := r.Group("valueAdd-bundle") | 	valueAddBundleRoute := r.Group("valueAdd-bundle") | ||||||
| 	valueAddBundleRoute.Use(middleware.CheckLogin(service.AccountProvider)) | 	valueAddBundleRoute.Use(middleware.CheckWebLogin(service.AccountProvider)) | ||||||
| 
 | 
 | ||||||
| 	// 增值套餐
 | 	// 增值套餐
 | ||||||
| 	{ | 	{ | ||||||
|  | |||||||
							
								
								
									
										25
									
								
								pkg/serializer/common.go
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										25
									
								
								pkg/serializer/common.go
									
									
									
									
									
										Normal file
									
								
							| @ -0,0 +1,25 @@ | |||||||
|  | package serializer | ||||||
|  | 
 | ||||||
|  | // Response 基础序列化器
 | ||||||
|  | type Response struct { | ||||||
|  | 	Status    int         `json:"status"` | ||||||
|  | 	Data      interface{} `json:"data"` | ||||||
|  | 	Msg       string      `json:"msg"` | ||||||
|  | 	Code      int         `json:"code"` | ||||||
|  | 	Error     error       `json:"error"` | ||||||
|  | 	Err       string      `json:"err"` | ||||||
|  | 	Keys      []string    `json:"keys"` | ||||||
|  | 	Mark      string      `json:"mark,omitempty"` | ||||||
|  | 	Page      *PageInfo   `json:"page,omitempty"` | ||||||
|  | 	Positions interface{} `json:"positions"` | ||||||
|  | } | ||||||
|  | type PageInfo struct { | ||||||
|  | 	Page     int32 `json:"page" query:"page"` | ||||||
|  | 	PageSize int32 `json:"pageSize" query:"pageSize"` | ||||||
|  | 	Total    int32 `json:"total"` | ||||||
|  | } | ||||||
|  | 
 | ||||||
|  | type UseFaceClockIn struct { | ||||||
|  | 	Result int    `json:"Result"` | ||||||
|  | 	Msg    string `json:"Msg"` | ||||||
|  | } | ||||||
| @ -3,7 +3,7 @@ package account | |||||||
| import ( | import ( | ||||||
| 	"context" | 	"context" | ||||||
| 	"fmt" | 	"fmt" | ||||||
| 	"fonchain-fiee/api/account" | 	account "fonchain-fiee/api/accountFiee" | ||||||
| 	"fonchain-fiee/pkg/e" | 	"fonchain-fiee/pkg/e" | ||||||
| 	"fonchain-fiee/pkg/model/login" | 	"fonchain-fiee/pkg/model/login" | ||||||
| 	"fonchain-fiee/pkg/model/union" | 	"fonchain-fiee/pkg/model/union" | ||||||
| @ -18,7 +18,7 @@ func UserApproval(c *gin.Context) { | |||||||
| 		service.Error(c, err) | 		service.Error(c, err) | ||||||
| 		return | 		return | ||||||
| 	} | 	} | ||||||
| 	res, err := service.AccountProvider.CheckRealName(context.Background(), &req) | 	res, err := service.AccountFieeProvider.CheckRealName(c, &req) | ||||||
| 	if err != nil { | 	if err != nil { | ||||||
| 		service.Error(c, err) | 		service.Error(c, err) | ||||||
| 		return | 		return | ||||||
| @ -34,7 +34,7 @@ func UserList(c *gin.Context) { | |||||||
| 		return | 		return | ||||||
| 	} | 	} | ||||||
| 	req.Domain = "app" | 	req.Domain = "app" | ||||||
| 	res, err := service.AccountProvider.UserList(context.Background(), &req) | 	res, err := service.AccountFieeProvider.UserList(context.Background(), &req) | ||||||
| 	if err != nil { | 	if err != nil { | ||||||
| 		service.Error(c, err) | 		service.Error(c, err) | ||||||
| 		return | 		return | ||||||
| @ -48,7 +48,7 @@ func UserInfo(c *gin.Context) { | |||||||
| 	user := login.GetUserInfoFromC(c) | 	user := login.GetUserInfoFromC(c) | ||||||
| 	req.ID = user.ID | 	req.ID = user.ID | ||||||
| 	req.Domain = user.Domain | 	req.Domain = user.Domain | ||||||
| 	res, err := service.AccountProvider.Info(context.Background(), &req) | 	res, err := service.AccountFieeProvider.Info(c, &req) | ||||||
| 	if err != nil { | 	if err != nil { | ||||||
| 		service.Error(c, err) | 		service.Error(c, err) | ||||||
| 		return | 		return | ||||||
| @ -67,7 +67,7 @@ func UserUpdate(c *gin.Context) { | |||||||
| 	user := login.GetUserInfoFromC(c) | 	user := login.GetUserInfoFromC(c) | ||||||
| 	req.ID = user.ID | 	req.ID = user.ID | ||||||
| 	req.Domain = user.Domain | 	req.Domain = user.Domain | ||||||
| 	res, err := service.AccountProvider.Update(context.Background(), &account.UpdateRequest{ | 	res, err := service.AccountFieeProvider.Update(c, &account.UpdateRequest{ | ||||||
| 		ID:       req.ID, | 		ID:       req.ID, | ||||||
| 		Domain:   req.Domain, | 		Domain:   req.Domain, | ||||||
| 		Language: req.Language, | 		Language: req.Language, | ||||||
| @ -88,7 +88,7 @@ func SendMsg(c *gin.Context) { | |||||||
| 		service.Error(c, err) | 		service.Error(c, err) | ||||||
| 		return | 		return | ||||||
| 	} | 	} | ||||||
| 	data, err := service.AccountProvider.VerifySliderStatus(context.Background(), &account.VerifySliderStatusRequest{ | 	data, err := service.AccountFieeProvider.VerifySliderStatus(c, &account.VerifySliderStatusRequest{ | ||||||
| 		NonceStr: req.NonceStr, | 		NonceStr: req.NonceStr, | ||||||
| 	}) | 	}) | ||||||
| 	fmt.Println("data=============>", data, err) | 	fmt.Println("data=============>", data, err) | ||||||
| @ -151,7 +151,7 @@ func SendMsg(c *gin.Context) { | |||||||
| 			MId:     req.MId, | 			MId:     req.MId, | ||||||
| 			Scope:   req.Scope, | 			Scope:   req.Scope, | ||||||
| 		} | 		} | ||||||
| 		res, err := service.AccountProvider.SendNationMsg(context.Background(), tempReq) | 		res, err := service.AccountFieeProvider.SendNationMsg(context.Background(), tempReq) | ||||||
| 		if err != nil { | 		if err != nil { | ||||||
| 			service.Error(c, err) | 			service.Error(c, err) | ||||||
| 			return | 			return | ||||||
| @ -159,7 +159,7 @@ func SendMsg(c *gin.Context) { | |||||||
| 		service.Success(c, res) | 		service.Success(c, res) | ||||||
| 		return | 		return | ||||||
| 	} else { | 	} else { | ||||||
| 		res, err := service.AccountProvider.SendMsg(context.Background(), &req) | 		res, err := service.AccountFieeProvider.SendMsg(context.Background(), &req) | ||||||
| 		if err != nil { | 		if err != nil { | ||||||
| 			service.Error(c, err) | 			service.Error(c, err) | ||||||
| 			return | 			return | ||||||
| @ -171,7 +171,7 @@ func SendMsg(c *gin.Context) { | |||||||
| 
 | 
 | ||||||
| 	//req.Domain = "app"
 | 	//req.Domain = "app"
 | ||||||
| 	//req.SignNo = uint32(config.DefaultSignNo)
 | 	//req.SignNo = uint32(config.DefaultSignNo)
 | ||||||
| 	//res, err := service.AccountProvider.SendMsg(context.Background(), &req)
 | 	//res, err := service.AccountFieeProvider.SendMsg(context.Background(), &req)
 | ||||||
| 	//if err != nil {
 | 	//if err != nil {
 | ||||||
| 	//	service.Error(c, err)
 | 	//	service.Error(c, err)
 | ||||||
| 	//	return
 | 	//	return
 | ||||||
| @ -187,7 +187,7 @@ func RealName(c *gin.Context) { | |||||||
| 	} | 	} | ||||||
| 	user := login.GetUserInfoFromC(c) | 	user := login.GetUserInfoFromC(c) | ||||||
| 	req.Id = user.ID | 	req.Id = user.ID | ||||||
| 	res, err := service.AccountProvider.RealName(context.Background(), &req) | 	res, err := service.AccountFieeProvider.RealName(context.Background(), &req) | ||||||
| 	if err != nil { | 	if err != nil { | ||||||
| 		service.Error(c, err) | 		service.Error(c, err) | ||||||
| 		return | 		return | ||||||
| @ -207,7 +207,7 @@ func CheckMsg(c *gin.Context) { | |||||||
| 		return | 		return | ||||||
| 	} | 	} | ||||||
| 	req.TelNum = req.Zone + req.TelNum | 	req.TelNum = req.Zone + req.TelNum | ||||||
| 	res, err := service.AccountProvider.CheckMsg(context.Background(), &req) | 	res, err := service.AccountFieeProvider.CheckMsg(context.Background(), &req) | ||||||
| 	if err != nil { | 	if err != nil { | ||||||
| 		service.Error(c, err) | 		service.Error(c, err) | ||||||
| 		return | 		return | ||||||
| @ -225,7 +225,7 @@ func GenerateCaptcha(c *gin.Context) { | |||||||
| 		return | 		return | ||||||
| 	} | 	} | ||||||
| 
 | 
 | ||||||
| 	res, err := service.AccountProvider.GenerateSliderCaptcha(context.Background(), &req) | 	res, err := service.AccountFieeProvider.GenerateSliderCaptcha(context.Background(), &req) | ||||||
| 
 | 
 | ||||||
| 	if err != nil { | 	if err != nil { | ||||||
| 		service.Error(c, err) | 		service.Error(c, err) | ||||||
| @ -245,7 +245,7 @@ func ValidateCaptcha(c *gin.Context) { | |||||||
| 		return | 		return | ||||||
| 	} | 	} | ||||||
| 
 | 
 | ||||||
| 	res, err := service.AccountProvider.VerifySliderCaptcha(context.Background(), &req) | 	res, err := service.AccountFieeProvider.VerifySliderCaptcha(context.Background(), &req) | ||||||
| 
 | 
 | ||||||
| 	if err != nil { | 	if err != nil { | ||||||
| 		service.Error(c, err) | 		service.Error(c, err) | ||||||
| @ -258,7 +258,7 @@ func ValidateCaptcha(c *gin.Context) { | |||||||
| func UserLogout(c *gin.Context) { | func UserLogout(c *gin.Context) { | ||||||
| 	req := account.DecryptJwtRequest{} | 	req := account.DecryptJwtRequest{} | ||||||
| 	req.Token = c.GetHeader(e.Authorization) | 	req.Token = c.GetHeader(e.Authorization) | ||||||
| 	res, err := service.AccountProvider.Logout(c, &req) | 	res, err := service.AccountFieeProvider.Logout(c, &req) | ||||||
| 	if err != nil { | 	if err != nil { | ||||||
| 		service.Error(c, err) | 		service.Error(c, err) | ||||||
| 		return | 		return | ||||||
| @ -274,12 +274,12 @@ func UserRegister(c *gin.Context) { | |||||||
| 		return | 		return | ||||||
| 	} | 	} | ||||||
| 	req.Domain = "app" | 	req.Domain = "app" | ||||||
| 	res, err := service.AccountProvider.Register(context.Background(), &req) | 	res, err := service.AccountFieeProvider.Register(context.Background(), &req) | ||||||
| 	if err != nil { | 	if err != nil { | ||||||
| 		service.Error(c, err) | 		service.Error(c, err) | ||||||
| 		return | 		return | ||||||
| 	} | 	} | ||||||
| 	tokenInfo, err := service.AccountProvider.Login(context.Background(), &account.LoginRequest{ | 	tokenInfo, err := service.AccountFieeProvider.Login(context.Background(), &account.LoginRequest{ | ||||||
| 		Domain:      req.Domain, | 		Domain:      req.Domain, | ||||||
| 		TelNum:      req.TelNum, | 		TelNum:      req.TelNum, | ||||||
| 		Code:        req.Code, | 		Code:        req.Code, | ||||||
| @ -303,7 +303,7 @@ func UserLogin(c *gin.Context) { | |||||||
| 	} | 	} | ||||||
| 	req.Ip = c.ClientIP() | 	req.Ip = c.ClientIP() | ||||||
| 	req.Domain = "fontree" | 	req.Domain = "fontree" | ||||||
| 	res, err := service.AccountProvider.Login(c, &req) | 	res, err := service.AccountFieeProvider.Login(c, &req) | ||||||
| 	if err != nil { | 	if err != nil { | ||||||
| 		service.Error(c, err) | 		service.Error(c, err) | ||||||
| 		return | 		return | ||||||
|  | |||||||
							
								
								
									
										283
									
								
								pkg/service/approval/model/oa_type.go
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										283
									
								
								pkg/service/approval/model/oa_type.go
									
									
									
									
									
										Normal file
									
								
							| @ -0,0 +1,283 @@ | |||||||
|  | package model | ||||||
|  | 
 | ||||||
|  | // 或签 会签
 | ||||||
|  | const ( | ||||||
|  | 	AndSignType   = "AND" | ||||||
|  | 	OrSignType    = "OR" | ||||||
|  | 	ErrorSignType = "签核类型错误" | ||||||
|  | ) | ||||||
|  | 
 | ||||||
|  | var OaTypeMap = map[string]string{ | ||||||
|  | 	"leave":              "leave", // 事假
 | ||||||
|  | 	"sick":               "leave", // 病假
 | ||||||
|  | 	"annualLeave":        "leave", // 年假
 | ||||||
|  | 	"dayOff":             "leave", // 调休
 | ||||||
|  | 	"maritalLeave":       "leave", // 婚假
 | ||||||
|  | 	"matingCheckLeave":   "leave", // 孕检假
 | ||||||
|  | 	"maternityLeave":     "leave", // 产假
 | ||||||
|  | 	"paternityLeave":     "leave", // 陪产假
 | ||||||
|  | 	"parentalLeave":      "leave", // 育儿假
 | ||||||
|  | 	"nursingLeave":       "leave", // 独生子女护理假
 | ||||||
|  | 	"funeralLeave":       "leave", // 丧假
 | ||||||
|  | 	"abortLeave":         "leave", // 流产假
 | ||||||
|  | 	"breastFeedingLeave": "leave", // 哺乳假
 | ||||||
|  | 
 | ||||||
|  | 	"makeUp":       "makeUp",       // 补卡
 | ||||||
|  | 	"overTime":     "overTime",     // 加班
 | ||||||
|  | 	"outWork":      "outWork",      // 外勤
 | ||||||
|  | 	"handover":     "handover",     // 离职
 | ||||||
|  | 	"handover-1":   "handover",     // 离职
 | ||||||
|  | 	"handover-2":   "handover",     // 离职
 | ||||||
|  | 	"handover-3":   "handover",     // 离职
 | ||||||
|  | 	"handover-4":   "handover",     // 离职
 | ||||||
|  | 	"handover-5":   "handover",     // 离职
 | ||||||
|  | 	"handover-6":   "handover",     // 离职
 | ||||||
|  | 	"handover-7":   "handover",     // 离职
 | ||||||
|  | 	"handover-8":   "handover",     // 离职
 | ||||||
|  | 	"handover-9":   "handover",     // 离职
 | ||||||
|  | 	"handover-10":  "handover",     // 离职
 | ||||||
|  | 	"handover-11":  "handover",     // 离职
 | ||||||
|  | 	"handover-12":  "handover",     // 离职
 | ||||||
|  | 	"handover-13":  "handover",     // 离职
 | ||||||
|  | 	"handover-14":  "handover",     // 离职
 | ||||||
|  | 	"handover-15":  "handover",     // 离职
 | ||||||
|  | 	"handover-16":  "handover",     // 离职
 | ||||||
|  | 	"handover-17":  "handover",     // 离职
 | ||||||
|  | 	"handover-18":  "handover",     // 离职
 | ||||||
|  | 	"handover-19":  "handover",     // 离职
 | ||||||
|  | 	"handover-20":  "handover",     // 离职
 | ||||||
|  | 	"handover-21":  "handover",     // 离职
 | ||||||
|  | 	"handover-22":  "handover",     // 离职
 | ||||||
|  | 	"handover-23":  "handover",     // 离职
 | ||||||
|  | 	"handover-24":  "handover",     // 离职
 | ||||||
|  | 	"handover-25":  "handover",     // 离职
 | ||||||
|  | 	"handover-26":  "handover",     // 离职
 | ||||||
|  | 	"handover-27":  "handover",     // 离职
 | ||||||
|  | 	"handover-28":  "handover",     // 离职
 | ||||||
|  | 	"handover-29":  "handover",     // 离职
 | ||||||
|  | 	"handover-30":  "handover",     // 离职
 | ||||||
|  | 	"handover-31":  "handover",     // 离职
 | ||||||
|  | 	"handover-32":  "handover",     // 离职
 | ||||||
|  | 	"handover-33":  "handover",     // 离职
 | ||||||
|  | 	"handover-34":  "handover",     // 离职
 | ||||||
|  | 	"handover-35":  "handover",     // 离职
 | ||||||
|  | 	"handover-36":  "handover",     // 离职
 | ||||||
|  | 	"handover-37":  "handover",     // 离职
 | ||||||
|  | 	"handover-38":  "handover",     // 离职
 | ||||||
|  | 	"handover-39":  "handover",     // 离职
 | ||||||
|  | 	"handover-40":  "handover",     // 离职
 | ||||||
|  | 	"handover-41":  "handover",     // 离职
 | ||||||
|  | 	"handover-42":  "handover",     // 离职
 | ||||||
|  | 	"handover-43":  "handover",     // 离职
 | ||||||
|  | 	"handover-44":  "handover",     // 离职
 | ||||||
|  | 	"handover-45":  "handover",     // 离职
 | ||||||
|  | 	"handover-46":  "handover",     // 离职
 | ||||||
|  | 	"handover-47":  "handover",     // 离职
 | ||||||
|  | 	"handover-48":  "handover",     // 离职
 | ||||||
|  | 	"handover-49":  "handover",     // 离职
 | ||||||
|  | 	"handover-50":  "handover",     // 离职
 | ||||||
|  | 	"handover-51":  "handover",     // 离职
 | ||||||
|  | 	"handover-52":  "handover",     // 离职
 | ||||||
|  | 	"handover-53":  "handover",     // 离职
 | ||||||
|  | 	"turnover":     "turnover",     // 离职
 | ||||||
|  | 	"turnover-1":   "turnover",     // 离职
 | ||||||
|  | 	"turnover-2":   "turnover",     // 离职
 | ||||||
|  | 	"turnover-3":   "turnover",     // 离职
 | ||||||
|  | 	"turnover-4":   "turnover",     // 离职
 | ||||||
|  | 	"turnover-5":   "turnover",     // 离职
 | ||||||
|  | 	"turnover-6":   "turnover",     // 离职
 | ||||||
|  | 	"turnover-7":   "turnover",     // 离职
 | ||||||
|  | 	"turnover-8":   "turnover",     // 离职
 | ||||||
|  | 	"turnover-9":   "turnover",     // 离职
 | ||||||
|  | 	"turnover-10":  "turnover",     // 离职
 | ||||||
|  | 	"turnover-11":  "turnover",     // 离职
 | ||||||
|  | 	"turnover-12":  "turnover",     // 离职
 | ||||||
|  | 	"turnover-13":  "turnover",     // 离职
 | ||||||
|  | 	"turnover-14":  "turnover",     // 离职
 | ||||||
|  | 	"turnover-15":  "turnover",     // 离职
 | ||||||
|  | 	"turnover-16":  "turnover",     // 离职
 | ||||||
|  | 	"turnover-17":  "turnover",     // 离职
 | ||||||
|  | 	"turnover-18":  "turnover",     // 离职
 | ||||||
|  | 	"turnover-19":  "turnover",     // 离职
 | ||||||
|  | 	"turnover-20":  "turnover",     // 离职
 | ||||||
|  | 	"turnover-21":  "turnover",     // 离职
 | ||||||
|  | 	"turnover-22":  "turnover",     // 离职
 | ||||||
|  | 	"turnover-23":  "turnover",     // 离职
 | ||||||
|  | 	"turnover-24":  "turnover",     // 离职
 | ||||||
|  | 	"turnover-25":  "turnover",     // 离职
 | ||||||
|  | 	"turnover-26":  "turnover",     // 离职
 | ||||||
|  | 	"turnover-27":  "turnover",     // 离职
 | ||||||
|  | 	"turnover-28":  "turnover",     // 离职
 | ||||||
|  | 	"turnover-29":  "turnover",     // 离职
 | ||||||
|  | 	"turnover-30":  "turnover",     // 离职
 | ||||||
|  | 	"turnover-31":  "turnover",     // 离职
 | ||||||
|  | 	"turnover-32":  "turnover",     // 离职
 | ||||||
|  | 	"turnover-33":  "turnover",     // 离职
 | ||||||
|  | 	"turnover-34":  "turnover",     // 离职
 | ||||||
|  | 	"turnover-35":  "turnover",     // 离职
 | ||||||
|  | 	"turnover-36":  "turnover",     // 离职
 | ||||||
|  | 	"turnover-37":  "turnover",     // 离职
 | ||||||
|  | 	"turnover-38":  "turnover",     // 离职
 | ||||||
|  | 	"turnover-39":  "turnover",     // 离职
 | ||||||
|  | 	"turnover-40":  "turnover",     // 离职
 | ||||||
|  | 	"turnover-41":  "turnover",     // 离职
 | ||||||
|  | 	"turnover-42":  "turnover",     // 离职
 | ||||||
|  | 	"turnover-43":  "turnover",     // 离职
 | ||||||
|  | 	"turnover-44":  "turnover",     // 离职
 | ||||||
|  | 	"turnover-45":  "turnover",     // 离职
 | ||||||
|  | 	"turnover-46":  "turnover",     // 离职
 | ||||||
|  | 	"turnover-47":  "turnover",     // 离职
 | ||||||
|  | 	"turnover-48":  "turnover",     // 离职
 | ||||||
|  | 	"turnover-49":  "turnover",     // 离职
 | ||||||
|  | 	"turnover-50":  "turnover",     // 离职
 | ||||||
|  | 	"turnover-51":  "turnover",     // 离职
 | ||||||
|  | 	"turnover-52":  "turnover",     // 离职
 | ||||||
|  | 	"turnover-53":  "turnover",     // 离职
 | ||||||
|  | 	"businessTrip": "businessTrip", // 出差
 | ||||||
|  | 	"goOut":        "goOut",        // 外出
 | ||||||
|  | 
 | ||||||
|  | 	"annualLeaveApply":      "leaveApply", // 年假申请
 | ||||||
|  | 	"maritalLeaveApply":     "leaveApply", // 婚假申请
 | ||||||
|  | 	"matingCheckLeaveApply": "leaveApply", // 孕检假申请
 | ||||||
|  | 	"maternityLeaveApply":   "leaveApply", // 产假申请
 | ||||||
|  | 	"paternityLeaveApply":   "leaveApply", // 陪产假申请
 | ||||||
|  | 	"parentalLeaveApply":    "leaveApply", // 育儿假申请
 | ||||||
|  | 	"nursingLeaveApply":     "leaveApply", // 独生子女护理假申请
 | ||||||
|  | 	"funeralLeaveApply":     "leaveApply", // 丧假申请
 | ||||||
|  | } | ||||||
|  | 
 | ||||||
|  | var EnglishMap = map[string]string{ | ||||||
|  | 	"普通审批":      "General approval", | ||||||
|  | 	"画作申请审批":    "Approval of the painting application", | ||||||
|  | 	"画展包审批":     "Approval of the exhibition package", | ||||||
|  | 	"画展包数量审批":   "Approval of the number of painting packages", | ||||||
|  | 	"画展审批":      "Approval of art exhibitions", | ||||||
|  | 	"画展包付款单申请":  "Application for payment slip for exhibition package", | ||||||
|  | 	"画作润格审批":    "Painting Runge Approval", | ||||||
|  | 	"画展包修改审批":   "Approval of modification of the exhibition package", | ||||||
|  | 	"任命审批":      "Appointment approval", | ||||||
|  | 	"人员增补申请":    "Personnel Supplement Request", | ||||||
|  | 	"录用申请":      "Job application", | ||||||
|  | 	"签到申请":      "Check-in application", | ||||||
|  | 	"退回审批":      "Return for approval", | ||||||
|  | 	"特殊画展包生成审批": "Approval of special painting package generation", | ||||||
|  | 
 | ||||||
|  | 	"事假":      "Leave",                           // 事假
 | ||||||
|  | 	"病假":      "sick leave",                      // 病假
 | ||||||
|  | 	"年假":      "annual leave",                    // 年假
 | ||||||
|  | 	"调休":      "Compensatory leave",              // 调休
 | ||||||
|  | 	"婚假":      "Marriage leave",                  // 婚假
 | ||||||
|  | 	"孕检假":     "Pregnancy test leave",            // 孕检假
 | ||||||
|  | 	"产假":      "maternity leave",                 // 产假
 | ||||||
|  | 	"陪产假":     "Paternity leave",                 // 陪产假
 | ||||||
|  | 	"育儿假":     "Parental leave",                  // 育儿假
 | ||||||
|  | 	"独生子女护理假": "Nursing leave for an only child", // 独生子女护理假
 | ||||||
|  | 	"丧假":      "Bereavement leave",               // 丧假
 | ||||||
|  | 	"流产假":     "Miscarriage leave",               // 流产假
 | ||||||
|  | 	"哺乳假":     "Breastfeeding leave",             // 哺乳假
 | ||||||
|  | 
 | ||||||
|  | 	"补卡":   "makeUp",                  // 补卡
 | ||||||
|  | 	"加班":   "overtime",                // 加班
 | ||||||
|  | 	"外勤":   "out work",                // 外勤
 | ||||||
|  | 	"离职申请": "Resignation application", // 离职
 | ||||||
|  | 	"离职交接": "Separation handover",     // 离职交接
 | ||||||
|  | 	"出差":   "business trip",           // 出差
 | ||||||
|  | 	"外出":   "Out",                     // 外出
 | ||||||
|  | 
 | ||||||
|  | 	"育儿假额度申请":      "parentalLeaveApply", // 育儿假申请
 | ||||||
|  | 	"独生子女护理假申请":    "nursingLeaveApply",  // 独生子女护理假申请
 | ||||||
|  | 	"岗位申请":         "employ application", //岗位申请
 | ||||||
|  | 	"上午":           "AM", | ||||||
|  | 	"下午":           "PM", | ||||||
|  | 	"开始时间不应晚于结束时间": "The start time should not be later than the end time", | ||||||
|  | 	"未申请假期余额":      "Leave balance is not requested", | ||||||
|  | 	"请填写完整信息":      "Please fill in the complete information", | ||||||
|  | 	"所选时间段已有申请":    "There is already an application for the selected time period", | ||||||
|  | 	"请填写撤销理由":      "Please fill in the reason for withdrawal", | ||||||
|  | 	"您今天已经对该审批人同类的审批发送过短信!": "You've already sent an SMS message today for an approval of the same type as that approver", | ||||||
|  | 	"当前状态无法修改":              "The current status cannot be modified", | ||||||
|  | 	"请假时长超出范围":              "The length of the leave is out of range", | ||||||
|  | 	"该请假类型申请时间不在本年度":        "This leave type is not available in the current year", | ||||||
|  | 	"假期余额不足":                "Insufficient leave balance", | ||||||
|  | 	"该请假类型申请时间不在本月":         "This leave type is not available in this month", | ||||||
|  | 	"离职申请未完成":               "The resignation application is not complete", | ||||||
|  | 	"用户已提交过离职申请":            "The user has submitted a resignation request", | ||||||
|  | 	"用户已提交过离职交接":            "The user has submitted an off-boarding handover", | ||||||
|  | 	"该工号已存在":                "The job number already exists", | ||||||
|  | 	"考勤规则查询错误":              "Attendance rule query error", | ||||||
|  | } | ||||||
|  | 
 | ||||||
|  | var ChineseTraditionalMap = map[string]string{ | ||||||
|  | 	"普通审批":      "普通審批", | ||||||
|  | 	"画作申请审批":    "畫作申請審批", | ||||||
|  | 	"画展包审批":     "畫展包審批", | ||||||
|  | 	"画展包数量审批":   "畫展包數量審批", | ||||||
|  | 	"画展审批":      "畫展審批", | ||||||
|  | 	"画展包付款单申请":  "畫展包付款單申請", | ||||||
|  | 	"画作润格审批":    "畫作潤格審批", | ||||||
|  | 	"画展包修改审批":   "畫展包修改審批", | ||||||
|  | 	"任命审批":      "任命審批", | ||||||
|  | 	"人员增补申请":    "人員增補申請", | ||||||
|  | 	"录用申请":      "錄用申請", | ||||||
|  | 	"签到申请":      "簽到申請", | ||||||
|  | 	"退回审批":      "退回審批", | ||||||
|  | 	"特殊画展包生成审批": "特殊畫展包生成審批", | ||||||
|  | 
 | ||||||
|  | 	"事假":      "事假",      // 事假
 | ||||||
|  | 	"病假":      "病假",      // 病假
 | ||||||
|  | 	"年假":      "年假",      // 年假
 | ||||||
|  | 	"调休":      "調休",      // 调休
 | ||||||
|  | 	"婚假":      "婚假",      // 婚假
 | ||||||
|  | 	"孕检假":     "孕檢假",     // 孕检假
 | ||||||
|  | 	"产假":      "產假",      // 产假
 | ||||||
|  | 	"陪产假":     "陪產假",     // 陪产假
 | ||||||
|  | 	"育儿假":     "育兒假",     // 育儿假
 | ||||||
|  | 	"独生子女护理假": "獨生子女護理假", // 独生子女护理假
 | ||||||
|  | 	"丧假":      "喪假",      // 丧假
 | ||||||
|  | 	"流产假":     "流產假",     // 流产假
 | ||||||
|  | 	"哺乳假":     "哺乳假",     // 哺乳假
 | ||||||
|  | 
 | ||||||
|  | 	"补卡":   "補卡",   // 补卡
 | ||||||
|  | 	"加班":   "加班",   // 加班
 | ||||||
|  | 	"外勤":   "外勤",   // 外勤
 | ||||||
|  | 	"离职申请": "離職申請", // 离职
 | ||||||
|  | 	"离职交接": "離職交接", // 离职交接
 | ||||||
|  | 	"出差":   "出差",   // 出差
 | ||||||
|  | 	"外出":   "外出",   // 外出
 | ||||||
|  | 
 | ||||||
|  | 	"育儿假额度申请":      "育兒假額度申請",   // 育儿假申请
 | ||||||
|  | 	"独生子女护理假申请":    "獨生子女護理假申請", // 独生子女护理假申请
 | ||||||
|  | 	"岗位申请":         "崗位申請",      //岗位申请
 | ||||||
|  | 	"上午":           "上午", | ||||||
|  | 	"下午":           "下午", | ||||||
|  | 	"开始时间不应晚于结束时间": "開始時間不應晚於結束時間", | ||||||
|  | 	"未申请假期余额":      "未申請假期餘額", | ||||||
|  | 	"请填写完整信息":      "請填寫完整資訊", | ||||||
|  | 	"所选时间段已有申请":    "所選時間段已有申請", | ||||||
|  | 	"请填写撤销理由":      "請填寫撤銷理由", | ||||||
|  | 	"您今天已经对该审批人同类的审批发送过短信!": "您今天已經對該審批人同類的審批發送過簡訊", | ||||||
|  | 	"当前状态无法修改":              "當前狀態無法修改", | ||||||
|  | 	"请假时长超出范围":              "請假時長超出範圍", | ||||||
|  | 	"该请假类型申请时间不在本年度":        "該請假類型申請時間不在本年度", | ||||||
|  | 	"假期余额不足":                "假期餘額不足", | ||||||
|  | 	"该请假类型申请时间不在本月":         "該請假類型申請時間不在本月", | ||||||
|  | 	"离职申请未完成":               "離職申請未完成", | ||||||
|  | 	"用户已提交过离职申请":            "使用者已提交過離職申請", | ||||||
|  | 	"用户已提交过离职交接":            "使用者已提交過離職交接", | ||||||
|  | 	"该工号已存在":                "該工號已存在", | ||||||
|  | 	"考勤规则查询错误":              "考勤规则查询错误", | ||||||
|  | } | ||||||
|  | 
 | ||||||
|  | func GetOaType(k string) string { | ||||||
|  | 	return OaTypeMap[k] | ||||||
|  | } | ||||||
|  | 
 | ||||||
|  | func GetLanguageType(lang string, k string) string { | ||||||
|  | 	if lang == "EN" && EnglishMap[k] != "" { | ||||||
|  | 		return EnglishMap[k] | ||||||
|  | 	} else if lang == "ZhTW" && ChineseTraditionalMap[k] != "" { | ||||||
|  | 		return ChineseTraditionalMap[k] | ||||||
|  | 	} else { | ||||||
|  | 		return k | ||||||
|  | 	} | ||||||
|  | } | ||||||
| @ -1,7 +1,12 @@ | |||||||
| package service | package service | ||||||
| 
 | 
 | ||||||
| import ( | import ( | ||||||
|  | 	"fmt" | ||||||
| 	"fonchain-fiee/pkg/common" | 	"fonchain-fiee/pkg/common" | ||||||
|  | 	"fonchain-fiee/pkg/e" | ||||||
|  | 	"fonchain-fiee/pkg/logic" | ||||||
|  | 	"fonchain-fiee/pkg/serializer" | ||||||
|  | 	"fonchain-fiee/pkg/service/approval/model" | ||||||
| 	"github.com/gin-gonic/gin" | 	"github.com/gin-gonic/gin" | ||||||
| 	"net/http" | 	"net/http" | ||||||
| ) | ) | ||||||
| @ -56,6 +61,43 @@ func Success1(c *gin.Context, msg string, datas ...interface{}) { | |||||||
| 	c.Abort() | 	c.Abort() | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
|  | // Error 统一错误返回
 | ||||||
|  | func ErrorWeb(c *gin.Context, code int, err error, msg ...string) { | ||||||
|  | 
 | ||||||
|  | 	fmt.Println("err:", err) | ||||||
|  | 	status := e.Failed | ||||||
|  | 	if code == e.NotLogin { | ||||||
|  | 		status = e.NotLogin | ||||||
|  | 	} | ||||||
|  | 
 | ||||||
|  | 	if code == e.NotLoginSqueeze { | ||||||
|  | 		status = e.NotLoginSqueeze | ||||||
|  | 	} | ||||||
|  | 
 | ||||||
|  | 	var msgStr string | ||||||
|  | 	if msg != nil { | ||||||
|  | 		msgStr = msg[0] | ||||||
|  | 	} else if err != nil { | ||||||
|  | 		msgStr = err.Error() | ||||||
|  | 	} | ||||||
|  | 
 | ||||||
|  | 	// 国际化
 | ||||||
|  | 	if e.VerifyMsgKey(msgStr) { | ||||||
|  | 		msgStr = logic.ConvertOaMsg(c, msgStr) | ||||||
|  | 	} else { | ||||||
|  | 		lang := c.Request.Header.Get("Accept-Language") | ||||||
|  | 		msgStr = model.GetLanguageType(lang, msgStr) | ||||||
|  | 	} | ||||||
|  | 
 | ||||||
|  | 	c.JSON(e.Success, serializer.Response{ | ||||||
|  | 		Status: status, | ||||||
|  | 		Msg:    msgStr, | ||||||
|  | 		Data:   nil, | ||||||
|  | 	}) | ||||||
|  | 
 | ||||||
|  | 	c.Abort() | ||||||
|  | } | ||||||
|  | 
 | ||||||
| // Error 统一错误返回
 | // Error 统一错误返回
 | ||||||
| func Error(c *gin.Context, err error) { | func Error(c *gin.Context, err error) { | ||||||
| 
 | 
 | ||||||
| @ -103,6 +145,19 @@ func Retry(c *gin.Context, err error) { | |||||||
| 	c.Abort() | 	c.Abort() | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
|  | // NotLoginRes 未登录的返回
 | ||||||
|  | func NotLoginRes(c *gin.Context, msg string) { | ||||||
|  | 
 | ||||||
|  | 	c.JSON(e.Success, serializer.Response{ | ||||||
|  | 		Code:   401, | ||||||
|  | 		Status: 1, | ||||||
|  | 		Msg:    msg, | ||||||
|  | 		Data:   nil, | ||||||
|  | 	}) | ||||||
|  | 
 | ||||||
|  | 	c.Abort() | ||||||
|  | } | ||||||
|  | 
 | ||||||
| func NotLoginError(c *gin.Context, err error) { | func NotLoginError(c *gin.Context, err error) { | ||||||
| 
 | 
 | ||||||
| 	errMsg := "" | 	errMsg := "" | ||||||
|  | |||||||
| @ -4,7 +4,7 @@ import ( | |||||||
| 	"context" | 	"context" | ||||||
| 	"errors" | 	"errors" | ||||||
| 	"fmt" | 	"fmt" | ||||||
| 	"fonchain-fiee/api/account" | 	"fonchain-fiee/api/accountFiee" | ||||||
| 	"fonchain-fiee/api/bundle" | 	"fonchain-fiee/api/bundle" | ||||||
| 	"fonchain-fiee/api/order" | 	"fonchain-fiee/api/order" | ||||||
| 	"fonchain-fiee/pkg/model/login" | 	"fonchain-fiee/pkg/model/login" | ||||||
| @ -259,7 +259,7 @@ func OrderRecordsList(c *gin.Context) { | |||||||
| 				continue | 				continue | ||||||
| 			} | 			} | ||||||
| 
 | 
 | ||||||
| 			userInfo, _ := service.AccountProvider.Info(context.Background(), &account.InfoRequest{ | 			userInfo, _ := service.AccountFieeProvider.Info(context.Background(), &accountFiee.InfoRequest{ | ||||||
| 				Domain: "app", | 				Domain: "app", | ||||||
| 				ID:     userID, | 				ID:     userID, | ||||||
| 			}) | 			}) | ||||||
| @ -356,7 +356,7 @@ func ExportOrderInfo(c *gin.Context) { | |||||||
| 				continue | 				continue | ||||||
| 			} | 			} | ||||||
| 
 | 
 | ||||||
| 			userInfo, _ := service.AccountProvider.Info(context.Background(), &account.InfoRequest{ | 			userInfo, _ := service.AccountFieeProvider.Info(context.Background(), &accountFiee.InfoRequest{ | ||||||
| 				Domain: "app", | 				Domain: "app", | ||||||
| 				ID:     userID, | 				ID:     userID, | ||||||
| 			}) | 			}) | ||||||
|  | |||||||
| @ -8,10 +8,17 @@ import ( | |||||||
| 
 | 
 | ||||||
| func UpdateMediaAccount(ctx *gin.Context) { | func UpdateMediaAccount(ctx *gin.Context) { | ||||||
| 	var req *cast.UpdateMediaAccountReq | 	var req *cast.UpdateMediaAccountReq | ||||||
| 	if err := ctx.ShouldBind(&req); err != nil { | 	var err error | ||||||
|  | 	if err = ctx.ShouldBind(&req); err != nil { | ||||||
| 		service.Error(ctx, err) | 		service.Error(ctx, err) | ||||||
| 		return | 		return | ||||||
| 	} | 	} | ||||||
|  | 	if err = req.Validate(); err != nil { | ||||||
|  | 		service.Error(ctx, err) | ||||||
|  | 		return | ||||||
|  | 	} | ||||||
|  | 	// 查询艺人的信息
 | ||||||
|  | 	service.AccountFieeProvider.Info | ||||||
| 	resp, err := service.CastProvider.UpdateMediaAccount(ctx, req) | 	resp, err := service.CastProvider.UpdateMediaAccount(ctx, req) | ||||||
| 	if err != nil { | 	if err != nil { | ||||||
| 		service.Error(ctx, err) | 		service.Error(ctx, err) | ||||||
|  | |||||||
| @ -6,6 +6,7 @@ import ( | |||||||
| 	_ "dubbo.apache.org/dubbo-go/v3/imports" | 	_ "dubbo.apache.org/dubbo-go/v3/imports" | ||||||
| 	"fmt" | 	"fmt" | ||||||
| 	"fonchain-fiee/api/account" | 	"fonchain-fiee/api/account" | ||||||
|  | 	"fonchain-fiee/api/accountFiee" | ||||||
| 	"fonchain-fiee/api/bundle" | 	"fonchain-fiee/api/bundle" | ||||||
| 	"fonchain-fiee/api/cast" | 	"fonchain-fiee/api/cast" | ||||||
| 	"fonchain-fiee/api/order" | 	"fonchain-fiee/api/order" | ||||||
| @ -15,6 +16,7 @@ import ( | |||||||
| ) | ) | ||||||
| 
 | 
 | ||||||
| var AccountProvider = new(account.AccountClientImpl) | var AccountProvider = new(account.AccountClientImpl) | ||||||
|  | var AccountFieeProvider = new(accountFiee.AccountFieeClientImpl) | ||||||
| 
 | 
 | ||||||
| var BundleProvider = new(bundle.BundleClientImpl) | var BundleProvider = new(bundle.BundleClientImpl) | ||||||
| var OrderProvider = new(order.OrderClientImpl) | var OrderProvider = new(order.OrderClientImpl) | ||||||
| @ -26,6 +28,7 @@ func init() { | |||||||
| 	config.SetConsumerService(OrderProvider) | 	config.SetConsumerService(OrderProvider) | ||||||
| 	config.SetConsumerService(AccountProvider) | 	config.SetConsumerService(AccountProvider) | ||||||
| 	config.SetConsumerService(PaymentProvider) | 	config.SetConsumerService(PaymentProvider) | ||||||
|  | 	config.SetConsumerService(AccountFieeProvider) | ||||||
| 	config.SetConsumerService(CastProvider) | 	config.SetConsumerService(CastProvider) | ||||||
| 
 | 
 | ||||||
| 	if err := config.Load(); err != nil { | 	if err := config.Load(); err != nil { | ||||||
|  | |||||||
| @ -83,7 +83,8 @@ func ForwardTest(c *gin.Context) { | |||||||
| 	price := strings.TrimSpace(priceDiv.Text()) | 	price := strings.TrimSpace(priceDiv.Text()) | ||||||
| 
 | 
 | ||||||
| 	// Get change
 | 	// Get change
 | ||||||
| 	changeDiv := priceDiv.NextFiltered("div.font-semibold.inline-block.text-2xl.text-red-vivid") | 	changeDiv := priceDiv.NextFiltered("div.font-semibold.inline-block.text-2xl") | ||||||
|  | 	//"font-semibold inline-block text-2xl text-green-vivid"
 | ||||||
| 	change := strings.TrimSpace(changeDiv.Text()) | 	change := strings.TrimSpace(changeDiv.Text()) | ||||||
| 
 | 
 | ||||||
| 	if price != "" && change != "" { | 	if price != "" && change != "" { | ||||||
| @ -119,7 +120,7 @@ func ForwardTest(c *gin.Context) { | |||||||
| 			Change:      changeValue, | 			Change:      changeValue, | ||||||
| 		}) | 		}) | ||||||
| 	} else { | 	} else { | ||||||
| 		c.JSON(http.StatusNotFound, gin.H{ | 		c.JSON(http.StatusOK, gin.H{ | ||||||
| 			"error":       "未找到全部数据", | 			"error":       "未找到全部数据", | ||||||
| 			"Open":        openValue, | 			"Open":        openValue, | ||||||
| 			"Volume":      volumeValue, | 			"Volume":      volumeValue, | ||||||
|  | |||||||
							
								
								
									
										77
									
								
								pkg/utils/secret/aes/aes.go
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										77
									
								
								pkg/utils/secret/aes/aes.go
									
									
									
									
									
										Normal file
									
								
							| @ -0,0 +1,77 @@ | |||||||
|  | package aes | ||||||
|  | 
 | ||||||
|  | import ( | ||||||
|  | 	"bytes" | ||||||
|  | 	"crypto/aes" | ||||||
|  | 	"crypto/cipher" | ||||||
|  | 	"errors" | ||||||
|  | ) | ||||||
|  | 
 | ||||||
|  | //高级加密标准(Adevanced Encryption Standard ,AES)
 | ||||||
|  | 
 | ||||||
|  | //16,24,32位字符串的话,分别对应AES-128,AES-192,AES-256 加密方法
 | ||||||
|  | //key不能泄露
 | ||||||
|  | var PwdKey = []byte("tyfon918tyfon918") | ||||||
|  | 
 | ||||||
|  | //PKCS7 填充模式
 | ||||||
|  | func PKCS7Padding(ciphertext []byte, blockSize int) []byte { | ||||||
|  | 	padding := blockSize - len(ciphertext)%blockSize | ||||||
|  | 	//Repeat()函数的功能是把切片[]byte{byte(padding)}复制padding个,然后合并成新的字节切片返回
 | ||||||
|  | 	padtext := bytes.Repeat([]byte{byte(padding)}, padding) | ||||||
|  | 	return append(ciphertext, padtext...) | ||||||
|  | } | ||||||
|  | 
 | ||||||
|  | //填充的反向操作,删除填充字符串
 | ||||||
|  | func PKCS7UnPadding(origData []byte) ([]byte, error) { | ||||||
|  | 	//获取数据长度
 | ||||||
|  | 	length := len(origData) | ||||||
|  | 	if length == 0 { | ||||||
|  | 		return nil, errors.New("加密字符串错误!") | ||||||
|  | 	} else { | ||||||
|  | 		//获取填充字符串长度
 | ||||||
|  | 		unpadding := int(origData[length-1]) | ||||||
|  | 		//截取切片,删除填充字节,并且返回明文
 | ||||||
|  | 		return origData[:(length - unpadding)], nil | ||||||
|  | 	} | ||||||
|  | } | ||||||
|  | 
 | ||||||
|  | //实现加密
 | ||||||
|  | func AesEcrypt(origData []byte, key []byte) ([]byte, error) { | ||||||
|  | 	//创建加密算法实例
 | ||||||
|  | 	block, err := aes.NewCipher(key) | ||||||
|  | 	if err != nil { | ||||||
|  | 		return nil, err | ||||||
|  | 	} | ||||||
|  | 	//获取块的大小
 | ||||||
|  | 	blockSize := block.BlockSize() | ||||||
|  | 	//对数据进行填充,让数据长度满足需求
 | ||||||
|  | 	origData = PKCS7Padding(origData, blockSize) | ||||||
|  | 	//采用AES加密方法中CBC加密模式
 | ||||||
|  | 	blocMode := cipher.NewCBCEncrypter(block, key[:blockSize]) | ||||||
|  | 	crypted := make([]byte, len(origData)) | ||||||
|  | 	//执行加密
 | ||||||
|  | 	blocMode.CryptBlocks(crypted, origData) | ||||||
|  | 	return crypted, nil | ||||||
|  | } | ||||||
|  | 
 | ||||||
|  | //实现解密
 | ||||||
|  | func AesDeCrypt(cypted []byte, key []byte) ([]byte, error) { | ||||||
|  | 	//创建加密算法实例
 | ||||||
|  | 	block, err := aes.NewCipher(key) | ||||||
|  | 	if err != nil { | ||||||
|  | 		return nil, err | ||||||
|  | 	} | ||||||
|  | 	//获取块大小
 | ||||||
|  | 	blockSize := block.BlockSize() | ||||||
|  | 	//创建加密客户端实例
 | ||||||
|  | 	blockMode := cipher.NewCBCDecrypter(block, key[:blockSize]) | ||||||
|  | 	origData := make([]byte, len(cypted)) | ||||||
|  | 	//这个函数也可以用来解密
 | ||||||
|  | 	blockMode.CryptBlocks(origData, cypted) | ||||||
|  | 	//去除填充字符串
 | ||||||
|  | 	origData, err = PKCS7UnPadding(origData) | ||||||
|  | 	if err != nil { | ||||||
|  | 		return nil, err | ||||||
|  | 	} | ||||||
|  | 	return origData, err | ||||||
|  | } | ||||||
							
								
								
									
										36
									
								
								pkg/utils/secret/aes/aes_test.go
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										36
									
								
								pkg/utils/secret/aes/aes_test.go
									
									
									
									
									
										Normal file
									
								
							| @ -0,0 +1,36 @@ | |||||||
|  | package aes | ||||||
|  | 
 | ||||||
|  | import ( | ||||||
|  | 	"encoding/hex" | ||||||
|  | 	"testing" | ||||||
|  | ) | ||||||
|  | 
 | ||||||
|  | func TestSecret(t *testing.T) { | ||||||
|  | 	textA := "我是王德法" | ||||||
|  | 	textABytes := []byte(textA) | ||||||
|  | 
 | ||||||
|  | 	token, err := AesEcrypt(textABytes, PwdKey) | ||||||
|  | 	if err != nil { | ||||||
|  | 		t.Errorf("加密错误 %s", err.Error()) | ||||||
|  | 	} | ||||||
|  | 
 | ||||||
|  | 	//fmt.Println(token)
 | ||||||
|  | 	tokenStr := hex.EncodeToString(token) | ||||||
|  | 
 | ||||||
|  | 	tokenByte, err := hex.DecodeString(tokenStr) | ||||||
|  | 	if err != nil { | ||||||
|  | 		t.Errorf("hex加密错误 %s", err.Error()) | ||||||
|  | 	} | ||||||
|  | 
 | ||||||
|  | 	res, err := AesDeCrypt(tokenByte, PwdKey) | ||||||
|  | 	if err != nil { | ||||||
|  | 		t.Errorf("解密错误 %s", err.Error()) | ||||||
|  | 	} | ||||||
|  | 
 | ||||||
|  | 	if string(res) == textA { | ||||||
|  | 		t.Logf("加解密通过 %s", string(res)) | ||||||
|  | 	} else { | ||||||
|  | 		t.Errorf("解析内容不符合") | ||||||
|  | 	} | ||||||
|  | 
 | ||||||
|  | } | ||||||
							
								
								
									
										105
									
								
								pkg/utils/secret/secret.go
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										105
									
								
								pkg/utils/secret/secret.go
									
									
									
									
									
										Normal file
									
								
							| @ -0,0 +1,105 @@ | |||||||
|  | package secret | ||||||
|  | 
 | ||||||
|  | import ( | ||||||
|  | 	"encoding/hex" | ||||||
|  | 	"errors" | ||||||
|  | 	"fmt" | ||||||
|  | 	"fonchain-fiee/pkg/utils/secret/aes" | ||||||
|  | 	"strings" | ||||||
|  | ) | ||||||
|  | 
 | ||||||
|  | func GetPositionCode(positionName string) string { | ||||||
|  | 	code := "other" | ||||||
|  | 	positionMap := map[string]string{"宣传部": "xcb", "鉴证科": "jzk", "经纪人": "jjr", "普通用户": "com"} | ||||||
|  | 
 | ||||||
|  | 	if v, ok := positionMap[positionName]; ok { | ||||||
|  | 		code = v | ||||||
|  | 	} | ||||||
|  | 
 | ||||||
|  | 	return code | ||||||
|  | } | ||||||
|  | 
 | ||||||
|  | func CombineSecret(position, name, toke string) (string, error) { | ||||||
|  | 	abc := position + "(~!@)" + name + "(~!@)" + toke | ||||||
|  | 	b, err := aes.AesEcrypt([]byte(abc), aes.PwdKey) | ||||||
|  | 	if err != nil { | ||||||
|  | 		return "", errors.New("解析错误") | ||||||
|  | 	} | ||||||
|  | 
 | ||||||
|  | 	return hex.EncodeToString(b), nil | ||||||
|  | } | ||||||
|  | 
 | ||||||
|  | func getToken(token string) (string, error) { | ||||||
|  | 
 | ||||||
|  | 	if strings.Contains(token, "(~!@)") == false { | ||||||
|  | 		return "", errors.New("解析错误") | ||||||
|  | 	} | ||||||
|  | 
 | ||||||
|  | 	str1 := strings.Split(token, "(~!@)") | ||||||
|  | 
 | ||||||
|  | 	if len(str1) != 3 { | ||||||
|  | 		return "", errors.New("解析数量错误") | ||||||
|  | 	} | ||||||
|  | 
 | ||||||
|  | 	return str1[2], nil | ||||||
|  | } | ||||||
|  | 
 | ||||||
|  | func GetJwtFromStr(authorization string) (string, error) { | ||||||
|  | 
 | ||||||
|  | 	tokenByte, err := hex.DecodeString(authorization) | ||||||
|  | 	if err != nil { | ||||||
|  | 		return "", err | ||||||
|  | 	} | ||||||
|  | 	defer func() { | ||||||
|  | 		if msg := recover(); msg != nil { | ||||||
|  | 			fmt.Println("panic信息:", msg, "---recover恢复---") | ||||||
|  | 		} | ||||||
|  | 	}() | ||||||
|  | 
 | ||||||
|  | 	token, err := aes.AesDeCrypt(tokenByte, aes.PwdKey) | ||||||
|  | 
 | ||||||
|  | 	if err != nil { | ||||||
|  | 		return "", err | ||||||
|  | 	} | ||||||
|  | 
 | ||||||
|  | 	//解密下
 | ||||||
|  | 	jwt, err := getToken(string(token)) | ||||||
|  | 
 | ||||||
|  | 	if err != nil { | ||||||
|  | 		return "", err | ||||||
|  | 	} | ||||||
|  | 
 | ||||||
|  | 	return jwt, nil | ||||||
|  | 
 | ||||||
|  | } | ||||||
|  | 
 | ||||||
|  | func CommonCombineSecret(abc string) (string, error) { | ||||||
|  | 	b, err := aes.AesEcrypt([]byte(abc), aes.PwdKey) | ||||||
|  | 	if err != nil { | ||||||
|  | 		return "", errors.New("解析错误") | ||||||
|  | 	} | ||||||
|  | 
 | ||||||
|  | 	return hex.EncodeToString(b), nil | ||||||
|  | } | ||||||
|  | 
 | ||||||
|  | func CommonDec(abc string) (string, error) { | ||||||
|  | 
 | ||||||
|  | 	tokenByte, err := hex.DecodeString(abc) | ||||||
|  | 	if err != nil { | ||||||
|  | 		return "", err | ||||||
|  | 	} | ||||||
|  | 	defer func() { | ||||||
|  | 		if msg := recover(); msg != nil { | ||||||
|  | 			fmt.Println("panic信息:", msg, "---recover恢复---") | ||||||
|  | 		} | ||||||
|  | 	}() | ||||||
|  | 
 | ||||||
|  | 	token, err := aes.AesDeCrypt(tokenByte, aes.PwdKey) | ||||||
|  | 
 | ||||||
|  | 	if err != nil { | ||||||
|  | 		return "", err | ||||||
|  | 	} | ||||||
|  | 
 | ||||||
|  | 	return string(token), nil | ||||||
|  | 
 | ||||||
|  | } | ||||||
							
								
								
									
										58
									
								
								pkg/utils/secret/secret_test.go
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										58
									
								
								pkg/utils/secret/secret_test.go
									
									
									
									
									
										Normal file
									
								
							| @ -0,0 +1,58 @@ | |||||||
|  | package secret | ||||||
|  | 
 | ||||||
|  | import ( | ||||||
|  | 	"fmt" | ||||||
|  | 	"testing" | ||||||
|  | ) | ||||||
|  | 
 | ||||||
|  | func TestCodetInfo(t *testing.T) { | ||||||
|  | 
 | ||||||
|  | 	if GetPositionCode("鉴证科") != "jzk" { | ||||||
|  | 		t.Errorf("验证错误 ") | ||||||
|  | 	} | ||||||
|  | 
 | ||||||
|  | 	if GetPositionCode("鉴证科1") == "jzk" { | ||||||
|  | 		t.Errorf("验证错误 ") | ||||||
|  | 	} | ||||||
|  | 
 | ||||||
|  | } | ||||||
|  | 
 | ||||||
|  | func TestSecretInfo(t *testing.T) { | ||||||
|  | 	token := "abc" | ||||||
|  | 	position := "pppp" | ||||||
|  | 	name := "王德发" | ||||||
|  | 	str, err := CombineSecret(position, name, token) | ||||||
|  | 	if err != nil { | ||||||
|  | 		t.Errorf("组合加密错误 %s", err.Error()) | ||||||
|  | 		return | ||||||
|  | 	} | ||||||
|  | 
 | ||||||
|  | 	t.Logf("加密之后 %s", str) | ||||||
|  | 
 | ||||||
|  | 	tokenExample, err := GetJwtFromStr(str) | ||||||
|  | 	if err != nil { | ||||||
|  | 		t.Errorf("获取token组合加密错误 %s", err.Error()) | ||||||
|  | 		return | ||||||
|  | 	} | ||||||
|  | 
 | ||||||
|  | 	if tokenExample != token { | ||||||
|  | 		t.Errorf("解密不符合 %s", "解析内容不匹配") | ||||||
|  | 	} | ||||||
|  | 
 | ||||||
|  | 	t.Logf("加解密通过 %s", tokenExample) | ||||||
|  | 
 | ||||||
|  | } | ||||||
|  | 
 | ||||||
|  | func TestCommonCombineSecret(t *testing.T) { | ||||||
|  | 	a := "zzzz" | ||||||
|  | 	str, err := CommonCombineSecret(a) | ||||||
|  | 	if err != nil { | ||||||
|  | 		t.Errorf("组合加密错误 %s", err.Error()) | ||||||
|  | 		return | ||||||
|  | 	} | ||||||
|  | 
 | ||||||
|  | 	t.Logf("加密之后 %s", str) | ||||||
|  | 
 | ||||||
|  | 	tokenExample, err := CommonDec(str) | ||||||
|  | 	fmt.Println(tokenExample, err) | ||||||
|  | } | ||||||
		Loading…
	
		Reference in New Issue
	
	Block a user