修改
This commit is contained in:
parent
9693306b5d
commit
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;
|
|
||||||
}
|
|
||||||
|
|
||||||
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 domain = 1;
|
||||||
string subNum = 2;
|
string jobNum = 2;
|
||||||
int32 realNameOrNot = 3;
|
string telNum = 3;
|
||||||
string name = 4;
|
|
||||||
string sex = 5;
|
|
||||||
int32 documentType = 6;
|
|
||||||
int32 auditStatus = 7;
|
|
||||||
uint64 page = 8;
|
|
||||||
uint64 pageSize = 9;
|
|
||||||
}
|
}
|
||||||
message UserInfoResponse{
|
|
||||||
uint64 id = 1;
|
message SampleAccountRequest{
|
||||||
int32 status = 2;
|
string domain = 1;
|
||||||
string name = 3;
|
string password = 2;
|
||||||
string sex = 4;
|
string code = 3;
|
||||||
string nationality = 5;
|
string from = 4;
|
||||||
int32 documentType =6;
|
string telNum = 5;
|
||||||
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;
|
message SampleAccountResponse{
|
||||||
string status = 2;
|
bool isNowAlreadyLogin = 1;
|
||||||
|
uint32 num = 2;// 同时在线的数量
|
||||||
}
|
}
|
||||||
message RealNameRequest{
|
|
||||||
uint64 id = 1;
|
message LoginAndSqueezeOtherResponse{
|
||||||
string name = 2;
|
string needDetectImageUrl = 1;
|
||||||
string sex = 3;
|
string recentImageUrl = 2;
|
||||||
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;
|
message IsSamePersonResponse{
|
||||||
uint64 status = 2;
|
bool isPass = 1;
|
||||||
string token = 3;
|
uint32 rate = 2;//相似度
|
||||||
|
string message = 3;//相似度
|
||||||
|
}
|
||||||
|
|
||||||
|
message IsSamePersonRequest{
|
||||||
|
string needDetectImageUrl = 1;
|
||||||
|
string recentImageUrl = 2;
|
||||||
|
}
|
||||||
|
|
||||||
|
message UpdatePassportStatusRequest{
|
||||||
|
uint32 ID = 1;
|
||||||
|
uint32 status = 2;
|
||||||
|
}
|
||||||
|
|
||||||
|
message CreateChainAccountResponse {
|
||||||
|
string account = 1 ;
|
||||||
|
string men = 2 ;
|
||||||
|
string publicKey = 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 Password = 4 [json_name = "password",(validator.field) = {length_gt: 5,human_error: "70007"}]; //密码
|
||||||
|
string Avatar = 5 [json_name = "avatar"]; //头像
|
||||||
|
string EnterDate = 14 [json_name = "enterDate"];
|
||||||
|
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 address = 4;
|
||||||
string telAreaCode = 5;
|
string bankName = 5;
|
||||||
string language = 6;
|
string bankNo = 6;
|
||||||
string nickName = 7;
|
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 {
|
||||||
@ -818,3 +868,61 @@ 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
@ -9,7 +9,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: cshutdown,sign,fonDomainFilter,fonValidateFilter
|
||||||
|
params:
|
||||||
|
.accessKeyId: "Accountksl"
|
||||||
|
.secretAccessKey: "BSDY-FDF1-Fontree_account"
|
||||||
|
AccountFieeClientImpl:
|
||||||
|
protocol: tri
|
||||||
|
retries: 0
|
||||||
|
interface: com.fontree.microservices.common.micro.account.fiee
|
||||||
# filter: cshutdown,sign,fonDomainFilter,fonValidateFilter
|
# filter: cshutdown,sign,fonDomainFilter,fonValidateFilter
|
||||||
# params:
|
# params:
|
||||||
# .accessKeyId: "Accountksl"
|
# .accessKeyId: "Accountksl"
|
||||||
|
@ -24,9 +24,17 @@ 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: cshutdown,sign,fonDomainFilter,fonValidateFilter
|
||||||
|
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:
|
PaymentClientImpl:
|
||||||
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
|
||||||
|
@ -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: cshutdown,sign,fonDomainFilter,fonValidateFilter
|
||||||
|
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
|
||||||
|
51
go.mod
51
go.mod
@ -1,27 +1,11 @@
|
|||||||
module fonchain-fiee
|
module fonchain-fiee
|
||||||
|
|
||||||
go 1.23.0
|
go 1.18
|
||||||
|
|
||||||
toolchain go1.23.6
|
replace (
|
||||||
|
github.com/fonchain_enterprise/utils/aes => ../utils/aes
|
||||||
//github.com/fonchain_enterprise/utils/aes => ./docs/utils/aes
|
github.com/fonchain_enterprise/utils/objstorage => ../utils/objstorage
|
||||||
//github.com/fonchain_enterprise/utils/chain => ./docs/utils/chain
|
)
|
||||||
//github.com/fonchain_enterprise/utils/jwt => ./docs/utils/jwt
|
|
||||||
//github.com/fonchain_enterprise/utils/logger => ./docs/utils/logger
|
|
||||||
//github.com/fonchain_enterprise/utils/rand => ./docs/utils/rand
|
|
||||||
|
|
||||||
//github.com/fonchain/electronic-contract => ../../electronic-contract
|
|
||||||
//github.com/fonchain_enterprise/utils/aes => ../utils/aes
|
|
||||||
//github.com/fonchain_enterprise/utils/baidu => ../utils/baidu
|
|
||||||
//github.com/fonchain_enterprise/utils/bankQuery => ../utils/bankQuery
|
|
||||||
//github.com/fonchain_enterprise/utils/chain => ../utils/chain
|
|
||||||
//github.com/fonchain_enterprise/utils/feie => ../utils/feie
|
|
||||||
//github.com/fonchain_enterprise/utils/ipAddrQuery => ../utils/ipAddrQuery
|
|
||||||
//github.com/fonchain_enterprise/utils/jwt => ../utils/jwt
|
|
||||||
//github.com/fonchain_enterprise/utils/logger => ../utils/logger
|
|
||||||
//replace github.com/fonchain_enterprise/utils/objstorage => ../../tyfon-新/utils/objstorage
|
|
||||||
|
|
||||||
replace github.com/fonchain_enterprise/utils/objstorage => ../utils/objstorage
|
|
||||||
|
|
||||||
//
|
//
|
||||||
require (
|
require (
|
||||||
@ -31,7 +15,7 @@ require (
|
|||||||
//github.com/fonchain_enterprise/utils/jwt v0.0.0-00010101000000-000000000000
|
//github.com/fonchain_enterprise/utils/jwt v0.0.0-00010101000000-000000000000
|
||||||
//github.com/fonchain_enterprise/utils/logger v0.0.0-00010101000000-000000000000
|
//github.com/fonchain_enterprise/utils/logger v0.0.0-00010101000000-000000000000
|
||||||
github.com/gin-contrib/gzip v0.0.5
|
github.com/gin-contrib/gzip v0.0.5
|
||||||
github.com/gin-gonic/gin v1.9.1
|
github.com/gin-gonic/gin v1.9.0
|
||||||
github.com/golang/protobuf v1.5.4
|
github.com/golang/protobuf v1.5.4
|
||||||
github.com/mwitkow/go-proto-validators v0.3.2
|
github.com/mwitkow/go-proto-validators v0.3.2
|
||||||
github.com/pkg/errors v0.9.1 // indirect
|
github.com/pkg/errors v0.9.1 // indirect
|
||||||
@ -60,7 +44,7 @@ require (
|
|||||||
github.com/go-ole/go-ole v1.2.4 // indirect
|
github.com/go-ole/go-ole v1.2.4 // indirect
|
||||||
github.com/go-playground/locales v0.14.1 // indirect
|
github.com/go-playground/locales v0.14.1 // indirect
|
||||||
github.com/go-playground/universal-translator v0.18.1 // indirect
|
github.com/go-playground/universal-translator v0.18.1 // indirect
|
||||||
github.com/go-playground/validator/v10 v10.14.0 // indirect
|
github.com/go-playground/validator/v10 v10.11.2 // indirect
|
||||||
github.com/goccy/go-json v0.10.2 // indirect
|
github.com/goccy/go-json v0.10.2 // indirect
|
||||||
github.com/gogo/protobuf v1.3.2 // indirect
|
github.com/gogo/protobuf v1.3.2 // indirect
|
||||||
github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da // indirect
|
github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da // indirect
|
||||||
@ -73,7 +57,7 @@ require (
|
|||||||
github.com/leodido/go-urn v1.2.4 // indirect
|
github.com/leodido/go-urn v1.2.4 // indirect
|
||||||
github.com/magiconair/properties v1.8.6 // indirect
|
github.com/magiconair/properties v1.8.6 // indirect
|
||||||
github.com/mattn/go-colorable v0.1.13 // indirect
|
github.com/mattn/go-colorable v0.1.13 // indirect
|
||||||
github.com/mattn/go-isatty v0.0.20 // indirect
|
github.com/mattn/go-isatty v0.0.17 // indirect
|
||||||
github.com/matttproud/golang_protobuf_extensions v1.0.1 // indirect
|
github.com/matttproud/golang_protobuf_extensions v1.0.1 // indirect
|
||||||
github.com/mitchellh/copystructure v1.2.0 // indirect
|
github.com/mitchellh/copystructure v1.2.0 // indirect
|
||||||
github.com/mitchellh/mapstructure v1.5.0 // indirect
|
github.com/mitchellh/mapstructure v1.5.0 // indirect
|
||||||
@ -101,10 +85,10 @@ require (
|
|||||||
go.uber.org/atomic v1.9.0 // indirect
|
go.uber.org/atomic v1.9.0 // indirect
|
||||||
go.uber.org/multierr v1.6.0 // indirect
|
go.uber.org/multierr v1.6.0 // indirect
|
||||||
go.uber.org/zap v1.21.0
|
go.uber.org/zap v1.21.0
|
||||||
golang.org/x/crypto v0.37.0 // indirect
|
golang.org/x/crypto v0.19.0 // indirect
|
||||||
golang.org/x/net v0.39.0 // indirect
|
golang.org/x/net v0.21.0 // indirect
|
||||||
golang.org/x/sys v0.32.0 // indirect
|
golang.org/x/sys v0.18.0 // indirect
|
||||||
golang.org/x/text v0.24.0 // indirect
|
golang.org/x/text v0.14.0 // indirect
|
||||||
google.golang.org/genproto v0.0.0-20211104193956-4c6863e31247 // indirect
|
google.golang.org/genproto v0.0.0-20211104193956-4c6863e31247 // indirect
|
||||||
google.golang.org/grpc v1.47.0 // indirect
|
google.golang.org/grpc v1.47.0 // indirect
|
||||||
gopkg.in/natefinch/lumberjack.v2 v2.0.0 // indirect
|
gopkg.in/natefinch/lumberjack.v2 v2.0.0 // indirect
|
||||||
@ -112,7 +96,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.8.1
|
||||||
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,12 +113,10 @@ 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
|
||||||
github.com/andybalholm/cascadia v1.3.3 // indirect
|
github.com/andybalholm/cascadia v1.3.1 // indirect
|
||||||
github.com/aws/aws-sdk-go v1.38.20 // indirect
|
github.com/aws/aws-sdk-go v1.38.20 // indirect
|
||||||
github.com/baidubce/bce-sdk-go v0.9.123 // indirect
|
github.com/baidubce/bce-sdk-go v0.9.123 // indirect
|
||||||
github.com/buger/jsonparser v1.1.1 // indirect
|
github.com/buger/jsonparser v1.1.1 // indirect
|
||||||
@ -148,7 +132,6 @@ require (
|
|||||||
github.com/envoyproxy/go-control-plane v0.10.2-0.20220325020618-49ff273808a1 // indirect
|
github.com/envoyproxy/go-control-plane v0.10.2-0.20220325020618-49ff273808a1 // indirect
|
||||||
github.com/envoyproxy/protoc-gen-validate v0.1.0 // indirect
|
github.com/envoyproxy/protoc-gen-validate v0.1.0 // indirect
|
||||||
github.com/fsnotify/fsnotify v1.6.0 // indirect
|
github.com/fsnotify/fsnotify v1.6.0 // indirect
|
||||||
github.com/gabriel-vasile/mimetype v1.4.2 // indirect
|
|
||||||
github.com/ghodss/yaml v1.0.0 // indirect
|
github.com/ghodss/yaml v1.0.0 // indirect
|
||||||
github.com/go-co-op/gocron v1.9.0 // indirect
|
github.com/go-co-op/gocron v1.9.0 // indirect
|
||||||
github.com/go-errors/errors v1.4.2 // indirect
|
github.com/go-errors/errors v1.4.2 // indirect
|
||||||
@ -156,7 +139,7 @@ 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/go-cmp v0.5.9 // 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
|
||||||
@ -196,7 +179,7 @@ require (
|
|||||||
go.opentelemetry.io/otel/trace v1.7.0 // indirect
|
go.opentelemetry.io/otel/trace v1.7.0 // indirect
|
||||||
golang.org/x/arch v0.3.0 // indirect
|
golang.org/x/arch v0.3.0 // indirect
|
||||||
golang.org/x/oauth2 v0.0.0-20211104180415-d3ed0bb246c8 // indirect
|
golang.org/x/oauth2 v0.0.0-20211104180415-d3ed0bb246c8 // indirect
|
||||||
golang.org/x/sync v0.13.0 // indirect
|
golang.org/x/sync v0.1.0 // indirect
|
||||||
golang.org/x/time v0.3.0 // indirect
|
golang.org/x/time v0.3.0 // indirect
|
||||||
google.golang.org/appengine v1.6.6 // indirect
|
google.golang.org/appengine v1.6.6 // indirect
|
||||||
gopkg.in/yaml.v3 v3.0.1 // indirect
|
gopkg.in/yaml.v3 v3.0.1 // indirect
|
||||||
|
66
go.sum
66
go.sum
@ -48,8 +48,8 @@ github.com/HdrHistogram/hdrhistogram-go v1.1.2 h1:5IcZpTvzydCQeHzK4Ef/D5rrSqwxob
|
|||||||
github.com/HdrHistogram/hdrhistogram-go v1.1.2/go.mod h1:yDgFjdqOqDEKOvasDdhWNXYg9BVp4O+o5f6V/ehm6Oo=
|
github.com/HdrHistogram/hdrhistogram-go v1.1.2/go.mod h1:yDgFjdqOqDEKOvasDdhWNXYg9BVp4O+o5f6V/ehm6Oo=
|
||||||
github.com/Knetic/govaluate v3.0.1-0.20171022003610-9aa49832a739+incompatible/go.mod h1:r7JcOSlj0wfOMncg0iLm8Leh48TZaKVeNIfJntJ2wa0=
|
github.com/Knetic/govaluate v3.0.1-0.20171022003610-9aa49832a739+incompatible/go.mod h1:r7JcOSlj0wfOMncg0iLm8Leh48TZaKVeNIfJntJ2wa0=
|
||||||
github.com/OneOfOne/xxhash v1.2.2/go.mod h1:HSdplMjZKSmBqAxg5vPj2TmRDmfkzw+cTzAElWljhcU=
|
github.com/OneOfOne/xxhash v1.2.2/go.mod h1:HSdplMjZKSmBqAxg5vPj2TmRDmfkzw+cTzAElWljhcU=
|
||||||
github.com/PuerkitoBio/goquery v1.10.3 h1:pFYcNSqHxBD06Fpj/KsbStFRsgRATgnf3LeXiUkhzPo=
|
github.com/PuerkitoBio/goquery v1.8.1 h1:uQxhNlArOIdbrH1tr0UXwdVFgDcZDrZVdcpygAcwmWM=
|
||||||
github.com/PuerkitoBio/goquery v1.10.3/go.mod h1:tMUX0zDMHXYlAQk6p35XxQMqMweEKB7iK7iLNd4RH4Y=
|
github.com/PuerkitoBio/goquery v1.8.1/go.mod h1:Q8ICL1kNUJ2sXGoAhPGUdYDJvgQgHzJsnnd3H7Ho5jQ=
|
||||||
github.com/RoaringBitmap/roaring v1.1.0 h1:b10lZrZXaY6Q6EKIRrmOF519FIyQQ5anPgGr3niw2yY=
|
github.com/RoaringBitmap/roaring v1.1.0 h1:b10lZrZXaY6Q6EKIRrmOF519FIyQQ5anPgGr3niw2yY=
|
||||||
github.com/RoaringBitmap/roaring v1.1.0/go.mod h1:icnadbWcNyfEHlYdr+tDlOTih1Bf/h+rzPpv4sbomAA=
|
github.com/RoaringBitmap/roaring v1.1.0/go.mod h1:icnadbWcNyfEHlYdr+tDlOTih1Bf/h+rzPpv4sbomAA=
|
||||||
github.com/Shopify/sarama v1.19.0/go.mod h1:FVkBWblsNy7DGZRfXLU0O9RCGt5g3g3yEuWXgklEdEo=
|
github.com/Shopify/sarama v1.19.0/go.mod h1:FVkBWblsNy7DGZRfXLU0O9RCGt5g3g3yEuWXgklEdEo=
|
||||||
@ -76,8 +76,8 @@ github.com/aliyun/alibaba-cloud-sdk-go v1.61.18/go.mod h1:v8ESoHo4SyHmuB4b1tJqDH
|
|||||||
github.com/aliyun/aliyun-oss-go-sdk v2.2.4+incompatible/go.mod h1:T/Aws4fEfogEE9v+HPhhw+CntffsBHJ8nXQCwKr0/g8=
|
github.com/aliyun/aliyun-oss-go-sdk v2.2.4+incompatible/go.mod h1:T/Aws4fEfogEE9v+HPhhw+CntffsBHJ8nXQCwKr0/g8=
|
||||||
github.com/aliyun/aliyun-oss-go-sdk v2.2.6+incompatible h1:KXeJoM1wo9I/6xPTyt6qCxoSZnmASiAjlrr0dyTUKt8=
|
github.com/aliyun/aliyun-oss-go-sdk v2.2.6+incompatible h1:KXeJoM1wo9I/6xPTyt6qCxoSZnmASiAjlrr0dyTUKt8=
|
||||||
github.com/aliyun/aliyun-oss-go-sdk v2.2.6+incompatible/go.mod h1:T/Aws4fEfogEE9v+HPhhw+CntffsBHJ8nXQCwKr0/g8=
|
github.com/aliyun/aliyun-oss-go-sdk v2.2.6+incompatible/go.mod h1:T/Aws4fEfogEE9v+HPhhw+CntffsBHJ8nXQCwKr0/g8=
|
||||||
github.com/andybalholm/cascadia v1.3.3 h1:AG2YHrzJIm4BZ19iwJ/DAua6Btl3IwJX+VI4kktS1LM=
|
github.com/andybalholm/cascadia v1.3.1 h1:nhxRkql1kdYCc8Snf7D5/D3spOX+dBgjA6u8x004T2c=
|
||||||
github.com/andybalholm/cascadia v1.3.3/go.mod h1:xNd9bqTn98Ln4DwST8/nG+H0yuB8Hmgu1YHNnWw0GeA=
|
github.com/andybalholm/cascadia v1.3.1/go.mod h1:R4bJ1UQfqADjvDa4P6HZHLh/3OxWWEqc0Sk8XGwHqvA=
|
||||||
github.com/antihax/optional v1.0.0/go.mod h1:uupD/76wgC+ih3iEmQUL+0Ugr19nfwCT1kdvxnR2qWY=
|
github.com/antihax/optional v1.0.0/go.mod h1:uupD/76wgC+ih3iEmQUL+0Ugr19nfwCT1kdvxnR2qWY=
|
||||||
github.com/apache/dubbo-getty v1.4.8 h1:Q9WKXmVu4Dm16cMJHamegRbxpDiYaGIU+MnPGhJhNyk=
|
github.com/apache/dubbo-getty v1.4.8 h1:Q9WKXmVu4Dm16cMJHamegRbxpDiYaGIU+MnPGhJhNyk=
|
||||||
github.com/apache/dubbo-getty v1.4.8/go.mod h1:cPJlbcHUTNTpiboMQjMHhE9XBni11LiBiG8FdrDuVzk=
|
github.com/apache/dubbo-getty v1.4.8/go.mod h1:cPJlbcHUTNTpiboMQjMHhE9XBni11LiBiG8FdrDuVzk=
|
||||||
@ -241,8 +241,6 @@ github.com/fsnotify/fsnotify v1.4.9/go.mod h1:znqG4EE+3YCdAaPaxE2ZRY/06pZUdp0tY4
|
|||||||
github.com/fsnotify/fsnotify v1.5.4/go.mod h1:OVB6XrOHzAwXMpEM7uPOzcehqUV2UqJxmVXmkdnm1bU=
|
github.com/fsnotify/fsnotify v1.5.4/go.mod h1:OVB6XrOHzAwXMpEM7uPOzcehqUV2UqJxmVXmkdnm1bU=
|
||||||
github.com/fsnotify/fsnotify v1.6.0 h1:n+5WquG0fcWoWp6xPWfHdbskMCQaFnG6PfBrh1Ky4HY=
|
github.com/fsnotify/fsnotify v1.6.0 h1:n+5WquG0fcWoWp6xPWfHdbskMCQaFnG6PfBrh1Ky4HY=
|
||||||
github.com/fsnotify/fsnotify v1.6.0/go.mod h1:sl3t1tCWJFWoRz9R8WJCbQihKKwmorjAbSClcnxKAGw=
|
github.com/fsnotify/fsnotify v1.6.0/go.mod h1:sl3t1tCWJFWoRz9R8WJCbQihKKwmorjAbSClcnxKAGw=
|
||||||
github.com/gabriel-vasile/mimetype v1.4.2 h1:w5qFW6JKBz9Y393Y4q372O9A7cUSequkh1Q7OhCmWKU=
|
|
||||||
github.com/gabriel-vasile/mimetype v1.4.2/go.mod h1:zApsH/mKG4w07erKIaJPFiX0Tsq9BFQgN3qGY5GnNgA=
|
|
||||||
github.com/getsentry/raven-go v0.2.0/go.mod h1:KungGk8q33+aIAZUIVWZDr2OfAEBsO49PX4NzFV5kcQ=
|
github.com/getsentry/raven-go v0.2.0/go.mod h1:KungGk8q33+aIAZUIVWZDr2OfAEBsO49PX4NzFV5kcQ=
|
||||||
github.com/ghodss/yaml v1.0.0 h1:wQHKEahhL6wmXdzwWG11gIVCkOv05bNOh+Rxn0yngAk=
|
github.com/ghodss/yaml v1.0.0 h1:wQHKEahhL6wmXdzwWG11gIVCkOv05bNOh+Rxn0yngAk=
|
||||||
github.com/ghodss/yaml v1.0.0/go.mod h1:4dBDuWmgqj2HViK6kFavaiC9ZROes6MMH2rRYeMEF04=
|
github.com/ghodss/yaml v1.0.0/go.mod h1:4dBDuWmgqj2HViK6kFavaiC9ZROes6MMH2rRYeMEF04=
|
||||||
@ -254,8 +252,8 @@ github.com/gin-contrib/sse v0.1.0 h1:Y/yl/+YNO8GZSjAhjMsSuLt29uWRFHdHYUb5lYOV9qE
|
|||||||
github.com/gin-contrib/sse v0.1.0/go.mod h1:RHrZQHXnP2xjPF+u1gW/2HnVO7nvIa9PG3Gm+fLHvGI=
|
github.com/gin-contrib/sse v0.1.0/go.mod h1:RHrZQHXnP2xjPF+u1gW/2HnVO7nvIa9PG3Gm+fLHvGI=
|
||||||
github.com/gin-gonic/gin v1.7.4/go.mod h1:jD2toBW3GZUr5UMcdrwQA10I7RuaFOl/SGeDjXkfUtY=
|
github.com/gin-gonic/gin v1.7.4/go.mod h1:jD2toBW3GZUr5UMcdrwQA10I7RuaFOl/SGeDjXkfUtY=
|
||||||
github.com/gin-gonic/gin v1.8.1/go.mod h1:ji8BvRH1azfM+SYow9zQ6SZMvR8qOMZHmsCuWR9tTTk=
|
github.com/gin-gonic/gin v1.8.1/go.mod h1:ji8BvRH1azfM+SYow9zQ6SZMvR8qOMZHmsCuWR9tTTk=
|
||||||
github.com/gin-gonic/gin v1.9.1 h1:4idEAncQnU5cB7BeOkPtxjfCSye0AAm1R0RVIqJ+Jmg=
|
github.com/gin-gonic/gin v1.9.0 h1:OjyFBKICoexlu99ctXNR2gg+c5pKrKMuyjgARg9qeY8=
|
||||||
github.com/gin-gonic/gin v1.9.1/go.mod h1:hPrL7YrpYKXt5YId3A/Tnip5kqbEAP+KLuI3SUcPTeU=
|
github.com/gin-gonic/gin v1.9.0/go.mod h1:W1Me9+hsUSyj3CePGrd1/QrKJMSJ1Tu/0hFEH89961k=
|
||||||
github.com/go-asn1-ber/asn1-ber v1.3.1/go.mod h1:hEBeB/ic+5LoWskz+yKT7vGhhPYkProFKoKdwZRWMe0=
|
github.com/go-asn1-ber/asn1-ber v1.3.1/go.mod h1:hEBeB/ic+5LoWskz+yKT7vGhhPYkProFKoKdwZRWMe0=
|
||||||
github.com/go-co-op/gocron v1.9.0 h1:+V+DDenw3ryB7B+tK1bAIC5p0ruw4oX9IqAsdRnGIf0=
|
github.com/go-co-op/gocron v1.9.0 h1:+V+DDenw3ryB7B+tK1bAIC5p0ruw4oX9IqAsdRnGIf0=
|
||||||
github.com/go-co-op/gocron v1.9.0/go.mod h1:DbJm9kdgr1sEvWpHCA7dFFs/PGHPMil9/97EXCRPr4k=
|
github.com/go-co-op/gocron v1.9.0/go.mod h1:DbJm9kdgr1sEvWpHCA7dFFs/PGHPMil9/97EXCRPr4k=
|
||||||
@ -297,8 +295,8 @@ github.com/go-playground/universal-translator v0.18.1/go.mod h1:xekY+UJKNuX9WP91
|
|||||||
github.com/go-playground/validator/v10 v10.4.1/go.mod h1:nlOn6nFhuKACm19sB/8EGNn9GlaMV7XkbRSipzJ0Ii4=
|
github.com/go-playground/validator/v10 v10.4.1/go.mod h1:nlOn6nFhuKACm19sB/8EGNn9GlaMV7XkbRSipzJ0Ii4=
|
||||||
github.com/go-playground/validator/v10 v10.10.0/go.mod h1:74x4gJWsvQexRdW8Pn3dXSGrTK4nAUsbPlLADvpJkos=
|
github.com/go-playground/validator/v10 v10.10.0/go.mod h1:74x4gJWsvQexRdW8Pn3dXSGrTK4nAUsbPlLADvpJkos=
|
||||||
github.com/go-playground/validator/v10 v10.11.0/go.mod h1:i+3WkQ1FvaUjjxh1kSvIA4dMGDBiPU55YFDl0WbKdWU=
|
github.com/go-playground/validator/v10 v10.11.0/go.mod h1:i+3WkQ1FvaUjjxh1kSvIA4dMGDBiPU55YFDl0WbKdWU=
|
||||||
github.com/go-playground/validator/v10 v10.14.0 h1:vgvQWe3XCz3gIeFDm/HnTIbj6UGmg/+t63MyGU2n5js=
|
github.com/go-playground/validator/v10 v10.11.2 h1:q3SHpufmypg+erIExEKUmsgmhDTyhcJ38oeKGACXohU=
|
||||||
github.com/go-playground/validator/v10 v10.14.0/go.mod h1:9iXMNT7sEkjXb0I+enO7QXmzG6QCsPWY4zveKFVRSyU=
|
github.com/go-playground/validator/v10 v10.11.2/go.mod h1:NieE624vt4SCTJtD87arVLvdmjPAeV8BQlHtMnw9D7s=
|
||||||
github.com/go-redis/redis v6.15.9+incompatible h1:K0pv1D7EQUjfyoMql+r/jZqCLizCGKFlFgcHWWmHQjg=
|
github.com/go-redis/redis v6.15.9+incompatible h1:K0pv1D7EQUjfyoMql+r/jZqCLizCGKFlFgcHWWmHQjg=
|
||||||
github.com/go-redis/redis v6.15.9+incompatible/go.mod h1:NAIEuMOZ/fxfXJIrKDQDz8wamY7mA7PouImQ2Jvg6kA=
|
github.com/go-redis/redis v6.15.9+incompatible/go.mod h1:NAIEuMOZ/fxfXJIrKDQDz8wamY7mA7PouImQ2Jvg6kA=
|
||||||
github.com/go-resty/resty/v2 v2.7.0 h1:me+K9p3uhSmXtrBZ4k9jcEAfJmuC8IivWHwaLZwPrFY=
|
github.com/go-resty/resty/v2 v2.7.0 h1:me+K9p3uhSmXtrBZ4k9jcEAfJmuC8IivWHwaLZwPrFY=
|
||||||
@ -389,7 +387,6 @@ github.com/google/go-cmp v0.5.7/go.mod h1:n+brtR0CgQNWTVd5ZUFpTBC8YFBDLK/h/bpaJ8
|
|||||||
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.5.9 h1:O2Tfq5qg4qc4AmwVlvv0oLiVAGB7enBSJ2x2DqQFi38=
|
||||||
github.com/google/go-cmp v0.5.9/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY=
|
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/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=
|
||||||
github.com/google/martian/v3 v3.0.0/go.mod h1:y5Zk1BBys9G+gd6Jrk0W3cC1+ELVxBWuIGO+w/tUAp0=
|
github.com/google/martian/v3 v3.0.0/go.mod h1:y5Zk1BBys9G+gd6Jrk0W3cC1+ELVxBWuIGO+w/tUAp0=
|
||||||
@ -581,8 +578,8 @@ github.com/mattn/go-isatty v0.0.10/go.mod h1:qgIWMr58cqv1PHHyhnkY9lrL7etaEgOFcME
|
|||||||
github.com/mattn/go-isatty v0.0.12/go.mod h1:cbi8OIDigv2wuxKPP5vlRcQ1OAZbq2CE4Kysco4FUpU=
|
github.com/mattn/go-isatty v0.0.12/go.mod h1:cbi8OIDigv2wuxKPP5vlRcQ1OAZbq2CE4Kysco4FUpU=
|
||||||
github.com/mattn/go-isatty v0.0.14/go.mod h1:7GGIvUiUoEMVVmxf/4nioHXj79iQHKdU27kJ6hsGG94=
|
github.com/mattn/go-isatty v0.0.14/go.mod h1:7GGIvUiUoEMVVmxf/4nioHXj79iQHKdU27kJ6hsGG94=
|
||||||
github.com/mattn/go-isatty v0.0.16/go.mod h1:kYGgaQfpe5nmfYZH+SKPsOc2e4SrIfOl2e/yFXSvRLM=
|
github.com/mattn/go-isatty v0.0.16/go.mod h1:kYGgaQfpe5nmfYZH+SKPsOc2e4SrIfOl2e/yFXSvRLM=
|
||||||
github.com/mattn/go-isatty v0.0.20 h1:xfD0iDuEKnDkl03q4limB+vH+GxLEtL/jb4xVJSWWEY=
|
github.com/mattn/go-isatty v0.0.17 h1:BTarxUcIeDqL27Mc+vyvdWYSL28zpIhv3RoTdsLMPng=
|
||||||
github.com/mattn/go-isatty v0.0.20/go.mod h1:W+V8PltTTMOvKvAeJH7IuucS94S2C6jfK/D7dTCTo3Y=
|
github.com/mattn/go-isatty v0.0.17/go.mod h1:kYGgaQfpe5nmfYZH+SKPsOc2e4SrIfOl2e/yFXSvRLM=
|
||||||
github.com/mattn/go-runewidth v0.0.2/go.mod h1:LwmH8dsx7+W8Uxz3IHJYH5QSwggIsqBzpuz5H//U1FU=
|
github.com/mattn/go-runewidth v0.0.2/go.mod h1:LwmH8dsx7+W8Uxz3IHJYH5QSwggIsqBzpuz5H//U1FU=
|
||||||
github.com/matttproud/golang_protobuf_extensions v1.0.1 h1:4hp9jkHxhMHkqkrB3Ix0jegS5sx/RkqARlsWZ6pIwiU=
|
github.com/matttproud/golang_protobuf_extensions v1.0.1 h1:4hp9jkHxhMHkqkrB3Ix0jegS5sx/RkqARlsWZ6pIwiU=
|
||||||
github.com/matttproud/golang_protobuf_extensions v1.0.1/go.mod h1:D8He9yQNgCq6Z5Ld7szi9bcBfOoFv/3dc6xSMkL2PC0=
|
github.com/matttproud/golang_protobuf_extensions v1.0.1/go.mod h1:D8He9yQNgCq6Z5Ld7szi9bcBfOoFv/3dc6xSMkL2PC0=
|
||||||
@ -957,12 +954,8 @@ golang.org/x/crypto v0.0.0-20201002170205-7f63de1d35b0/go.mod h1:LzIPMQfyMNhhGPh
|
|||||||
golang.org/x/crypto v0.0.0-20210711020723-a769d52b0f97/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc=
|
golang.org/x/crypto v0.0.0-20210711020723-a769d52b0f97/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-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.19.0 h1:ENy+Az/9Y1vSrlrvBSyna3PITt4tiZLf7sgCjZBX7Wo=
|
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.31.0/go.mod h1:kDsLvtWBEx7MV9tJOj9bnXsPbxwJQ6csT/x4KIN4Ssk=
|
|
||||||
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=
|
||||||
golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA=
|
golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA=
|
||||||
@ -1003,10 +996,6 @@ golang.org/x/mod v0.2.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA=
|
|||||||
golang.org/x/mod v0.3.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA=
|
golang.org/x/mod v0.3.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA=
|
||||||
golang.org/x/mod v0.4.2/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA=
|
golang.org/x/mod v0.4.2/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA=
|
||||||
golang.org/x/mod v0.6.0-dev.0.20220419223038-86c51ed26bb4/go.mod h1:jJ57K6gSWd91VN4djpZkiMVwK6gcyfeH4XE8wZrZaV4=
|
golang.org/x/mod v0.6.0-dev.0.20220419223038-86c51ed26bb4/go.mod h1:jJ57K6gSWd91VN4djpZkiMVwK6gcyfeH4XE8wZrZaV4=
|
||||||
golang.org/x/mod v0.8.0/go.mod h1:iBbtSCu2XBx23ZKBPSOrRkjjQPZFPuis4dIYUhu/chs=
|
|
||||||
golang.org/x/mod v0.12.0/go.mod h1:iBbtSCu2XBx23ZKBPSOrRkjjQPZFPuis4dIYUhu/chs=
|
|
||||||
golang.org/x/mod v0.15.0/go.mod h1:hTbmBsO62+eylJbnUtE2MGJUyE7QWk4xUqPFrRgJ+7c=
|
|
||||||
golang.org/x/mod v0.17.0/go.mod h1:hTbmBsO62+eylJbnUtE2MGJUyE7QWk4xUqPFrRgJ+7c=
|
|
||||||
golang.org/x/net v0.0.0-20180530234432-1e491301e022/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
|
golang.org/x/net v0.0.0-20180530234432-1e491301e022/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
|
||||||
golang.org/x/net v0.0.0-20180724234803-3673e40ba225/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
|
golang.org/x/net v0.0.0-20180724234803-3673e40ba225/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
|
||||||
golang.org/x/net v0.0.0-20180826012351-8a410e7b638d/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
|
golang.org/x/net v0.0.0-20180826012351-8a410e7b638d/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
|
||||||
@ -1052,20 +1041,15 @@ golang.org/x/net v0.0.0-20210226172049-e18ecbb05110/go.mod h1:m0MpNAwzfU5UDzcl9v
|
|||||||
golang.org/x/net v0.0.0-20210405180319-a5a99cb37ef4/go.mod h1:p54w0d4576C0XHj96bSt6lcn1PtDYWL6XObtHCRCNQM=
|
golang.org/x/net v0.0.0-20210405180319-a5a99cb37ef4/go.mod h1:p54w0d4576C0XHj96bSt6lcn1PtDYWL6XObtHCRCNQM=
|
||||||
golang.org/x/net v0.0.0-20210428140749-89ef3d95e781/go.mod h1:OJAsFXCWl8Ukc7SiCT/9KSuxbyM7479/AVlXFRxuMCk=
|
golang.org/x/net v0.0.0-20210428140749-89ef3d95e781/go.mod h1:OJAsFXCWl8Ukc7SiCT/9KSuxbyM7479/AVlXFRxuMCk=
|
||||||
golang.org/x/net v0.0.0-20210525063256-abc453219eb5/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y=
|
golang.org/x/net v0.0.0-20210525063256-abc453219eb5/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y=
|
||||||
|
golang.org/x/net v0.0.0-20210916014120-12bc252f5db8/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y=
|
||||||
golang.org/x/net v0.0.0-20210917221730-978cfadd31cf/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y=
|
golang.org/x/net v0.0.0-20210917221730-978cfadd31cf/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y=
|
||||||
golang.org/x/net v0.0.0-20211029224645-99673261e6eb/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y=
|
golang.org/x/net v0.0.0-20211029224645-99673261e6eb/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y=
|
||||||
golang.org/x/net v0.0.0-20211105192438-b53810dc28af/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y=
|
golang.org/x/net v0.0.0-20211105192438-b53810dc28af/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y=
|
||||||
golang.org/x/net v0.0.0-20211112202133-69e39bad7dc2/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y=
|
golang.org/x/net v0.0.0-20211112202133-69e39bad7dc2/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y=
|
||||||
golang.org/x/net v0.0.0-20220722155237-a158d28d115b/go.mod h1:XRhObCWvk6IyKnWLug+ECip1KBveYUHfp+8e9klMJ9c=
|
golang.org/x/net v0.0.0-20220722155237-a158d28d115b/go.mod h1:XRhObCWvk6IyKnWLug+ECip1KBveYUHfp+8e9klMJ9c=
|
||||||
golang.org/x/net v0.6.0/go.mod h1:2Tu9+aMcznHK/AK1HMvgo6xiTLG5rD5rZLDS+rp2Bjs=
|
golang.org/x/net v0.7.0/go.mod h1:2Tu9+aMcznHK/AK1HMvgo6xiTLG5rD5rZLDS+rp2Bjs=
|
||||||
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.21.0 h1:AQyQV4dYCvJ7vGmJyKki9+PBdyvhkSd8EIx/qb0AYv4=
|
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.33.0/go.mod h1:HXLR5J+9DxmrqMwG9qjGCxZ+zKXxBru04zlTvWlWuN4=
|
|
||||||
golang.org/x/net v0.39.0 h1:ZCu7HMWDxpXpaiKdhzIfaltL9Lp31x/3fCP11bc6/fY=
|
|
||||||
golang.org/x/net v0.39.0/go.mod h1:X7NRbYVEA+ewNkCNyJ513WmMdQ3BineSwVtN2zD/d+E=
|
|
||||||
golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U=
|
golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U=
|
||||||
golang.org/x/oauth2 v0.0.0-20190226205417-e64efc72b421/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw=
|
golang.org/x/oauth2 v0.0.0-20190226205417-e64efc72b421/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw=
|
||||||
golang.org/x/oauth2 v0.0.0-20190604053449-0f29369cfe45/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw=
|
golang.org/x/oauth2 v0.0.0-20190604053449-0f29369cfe45/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw=
|
||||||
@ -1088,11 +1072,6 @@ golang.org/x/sync v0.0.0-20210220032951-036812b2e83c/go.mod h1:RxMgew5VJxzue5/jJ
|
|||||||
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 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.6.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.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=
|
||||||
golang.org/x/sys v0.0.0-20180905080454-ebe1bf3edb33/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
|
golang.org/x/sys v0.0.0-20180905080454-ebe1bf3edb33/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
|
||||||
@ -1171,24 +1150,11 @@ golang.org/x/sys v0.0.0-20220722155257-8c9f86f7a55f/go.mod h1:oPkhp1MJrh7nUepCBc
|
|||||||
golang.org/x/sys v0.0.0-20220811171246-fbc7d0a398ab/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
golang.org/x/sys v0.0.0-20220811171246-fbc7d0a398ab/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
||||||
golang.org/x/sys v0.0.0-20220908164124-27713097b956/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
golang.org/x/sys v0.0.0-20220908164124-27713097b956/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
||||||
golang.org/x/sys v0.5.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
golang.org/x/sys v0.5.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
||||||
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.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.18.0 h1:DBdB3niSjOA/O0blCZBqDefyWNYveAYMNF1Wum0DYQ4=
|
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.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.28.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA=
|
|
||||||
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/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo=
|
golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo=
|
||||||
golang.org/x/term v0.0.0-20210927222741-03fcf44c2211/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8=
|
golang.org/x/term v0.0.0-20210927222741-03fcf44c2211/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8=
|
||||||
golang.org/x/term v0.5.0/go.mod h1:jMB1sMXY+tzblOD4FWmEbocvup2/aLOaQEp7JmGp78k=
|
golang.org/x/term v0.5.0/go.mod h1:jMB1sMXY+tzblOD4FWmEbocvup2/aLOaQEp7JmGp78k=
|
||||||
golang.org/x/term v0.8.0/go.mod h1:xPskH00ivmX89bAKVGSKKtLOWNx2+17Eiy94tnKShWo=
|
|
||||||
golang.org/x/term v0.12.0/go.mod h1:owVbMEjm3cBLCHdkQu9b1opXd4ETQWc3BhuQGKgXgvU=
|
|
||||||
golang.org/x/term v0.17.0/go.mod h1:lLRBjIVuehSbZlaOtGMbcMncT+aqLLLmKrsjNrUguwk=
|
|
||||||
golang.org/x/term v0.20.0/go.mod h1:8UkIAJTvZgivsXaD6/pH6U9ecQzZ45awqEOzuCvwpFY=
|
|
||||||
golang.org/x/term v0.27.0/go.mod h1:iMsnZpn0cago0GOrHO2+Y7u7JPn5AylBrcoWkElMTSM=
|
|
||||||
golang.org/x/text v0.0.0-20170915032832-14c0d48ead0c/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=
|
golang.org/x/text v0.0.0-20170915032832-14c0d48ead0c/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=
|
||||||
golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=
|
golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=
|
||||||
golang.org/x/text v0.3.1-0.20180807135948-17ff2d5776d2/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=
|
golang.org/x/text v0.3.1-0.20180807135948-17ff2d5776d2/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=
|
||||||
@ -1199,13 +1165,8 @@ golang.org/x/text v0.3.5/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ=
|
|||||||
golang.org/x/text v0.3.6/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ=
|
golang.org/x/text v0.3.6/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ=
|
||||||
golang.org/x/text v0.3.7/go.mod h1:u+2+/6zg+i71rQMx5EYifcz6MCKuco9NR6JIITiCfzQ=
|
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.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 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.21.0/go.mod h1:4IBbMaMmOPCJ8SecivzSH54+73PCFmPWxNTLm+vZkEQ=
|
|
||||||
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=
|
||||||
golang.org/x/time v0.0.0-20190308202827-9d24e82272b4/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ=
|
golang.org/x/time v0.0.0-20190308202827-9d24e82272b4/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ=
|
||||||
@ -1272,9 +1233,6 @@ golang.org/x/tools v0.0.0-20210106214847-113979e3529a/go.mod h1:emZCQorbCU4vsT4f
|
|||||||
golang.org/x/tools v0.1.2/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk=
|
golang.org/x/tools v0.1.2/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk=
|
||||||
golang.org/x/tools v0.1.5/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk=
|
golang.org/x/tools v0.1.5/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk=
|
||||||
golang.org/x/tools v0.1.12/go.mod h1:hNGJHUnrk76NpqgfD5Aqm5Crs+Hm0VOH/i9J2+nxYbc=
|
golang.org/x/tools v0.1.12/go.mod h1:hNGJHUnrk76NpqgfD5Aqm5Crs+Hm0VOH/i9J2+nxYbc=
|
||||||
golang.org/x/tools v0.6.0/go.mod h1:Xwgl3UAJ/d3gWutnCtw505GrjyAbvKui8lOU390QaIU=
|
|
||||||
golang.org/x/tools v0.13.0/go.mod h1:HvlwmtVNQAhOuCjW7xxvovg8wbNq7LwfXh/k7wXUl58=
|
|
||||||
golang.org/x/tools v0.21.1-0.20240508182429-e35e4ccd0d2d/go.mod h1:aiJjzUbINMkxbQROHiO6hDPo2LHcIPhhQsa9DLh0yGk=
|
|
||||||
golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
|
golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
|
||||||
golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
|
golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
|
||||||
golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
|
golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
|
||||||
|
@ -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,106 @@ 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,
|
||||||
|
}
|
||||||
|
|
||||||
|
info, err := provider.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",
|
||||||
|
}
|
||||||
|
|
||||||
|
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()
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
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
|
||||||
|
}
|
@ -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 := bundleOrderRoute.Group("web")
|
||||||
|
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)
|
||||||
|
@ -55,15 +55,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) //实名审核
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
{
|
{
|
||||||
@ -71,7 +73,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,
|
||||||
})
|
})
|
||||||
|
@ -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/order"
|
"fonchain-fiee/api/order"
|
||||||
"fonchain-fiee/api/payment"
|
"fonchain-fiee/api/payment"
|
||||||
@ -14,16 +15,18 @@ 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)
|
||||||
var PaymentProvider = new(payment.PaymentCentClientImpl)
|
var PaymentProvider = new(payment.PaymentCentClientImpl)
|
||||||
|
|
||||||
func init() {
|
func init() {
|
||||||
config.SetConsumerService(BundleProvider)
|
//config.SetConsumerService(BundleProvider)
|
||||||
config.SetConsumerService(OrderProvider)
|
//config.SetConsumerService(OrderProvider)
|
||||||
config.SetConsumerService(AccountProvider)
|
config.SetConsumerService(AccountProvider)
|
||||||
config.SetConsumerService(PaymentProvider)
|
//config.SetConsumerService(PaymentProvider)
|
||||||
|
config.SetConsumerService(AccountFieeProvider)
|
||||||
|
|
||||||
if err := config.Load(); err != nil {
|
if err := config.Load(); err != nil {
|
||||||
panic(err)
|
panic(err)
|
||||||
|
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