97 lines
2.2 KiB
Protocol Buffer
97 lines
2.2 KiB
Protocol Buffer
syntax = "proto3";
|
|
package mixservice.mixv1;
|
|
option go_package = "./mix/mixv1;mixv1";
|
|
|
|
service Crontab {
|
|
// 更改上游定时任务状态
|
|
rpc FinishCrontab(FinishCrontabReq) returns (FinishCrontabResp) {}
|
|
// 上游定时任务详情
|
|
rpc GetCrontabDetail(GetCrontabDetailReq) returns (GetCrontabDetailResp) {}
|
|
// 更新定时任务审批状态
|
|
rpc UpdateCrontabApprovalStatus(UpdateCrontabApprovalStatusReq) returns (UpdateCrontabApprovalStatusResp) {}
|
|
}
|
|
|
|
message FinishCrontabReq{
|
|
int32 crontab_id = 1;
|
|
}
|
|
message FinishCrontabResp{}
|
|
|
|
enum CrontabMode {
|
|
CrontabModeImmediately = 0;
|
|
CrontabModeOnce = 1;
|
|
CrontabModeRepeat = 2;
|
|
}
|
|
|
|
enum CrontabStatus {
|
|
CrontabStatusWaiting = 0;
|
|
CrontabStatusExecuted = 1;
|
|
CrontabStatusSuspend = -1;
|
|
CrontabStatusTermination = -2;
|
|
}
|
|
|
|
enum CrontabApprovalStatus {
|
|
CrontabApprovalStatusPassed = 0; // 已通过
|
|
CrontabApprovalStatusWaiting = 1; // 待审核
|
|
CrontabApprovalStatusRefused = 2; // 已驳回
|
|
}
|
|
|
|
message GetCrontabDetailReq{
|
|
int32 crontab_id = 1;
|
|
bool with_crontab = 2;
|
|
}
|
|
message GetCrontabDetailResp{
|
|
CrontabDetail data = 1;
|
|
}
|
|
|
|
message CrontabDetail {
|
|
int32 id = 1;
|
|
string type = 2;
|
|
string title = 3;
|
|
CrontabMode mode = 4;
|
|
int32 planned_time = 5;
|
|
string rule = 6;
|
|
CrontabStatus status = 7;
|
|
int32 create_time = 8;
|
|
int32 exec_time = 9;
|
|
int32 handdler = 10;
|
|
CrontabApprovalStatus approval_status = 11; // 审批状态 0.已通过 1.待审核 2.已驳回
|
|
|
|
CrontabOursInfo ours = 12;
|
|
CrontabSupplierInfo supplier = 13;
|
|
CrontabResellerBatchInfo reseller_batch = 14;
|
|
}
|
|
|
|
message CrontabOursInfo {
|
|
int32 crontab_id = 1;
|
|
int32 ours_product_id = 2;
|
|
int32 ours_status = 3;
|
|
string exec_event = 4;
|
|
string ids = 5;
|
|
string reason = 6;
|
|
double discount = 7;
|
|
double price = 8;
|
|
}
|
|
|
|
message CrontabSupplierInfo {
|
|
int32 crontab_id = 1;
|
|
string exec_event = 2;
|
|
string smode = 3;
|
|
int32 pp_id = 4;
|
|
string reason = 5;
|
|
string platform_product_ids = 6;
|
|
}
|
|
|
|
message CrontabResellerBatchInfo {
|
|
int32 crontab_id = 1;
|
|
int32 reseller_id = 2;
|
|
string reason = 3;
|
|
string exec_event = 4;
|
|
string ours_product_ids = 5;
|
|
}
|
|
|
|
message UpdateCrontabApprovalStatusReq {
|
|
int32 crontab_id = 1;
|
|
CrontabApprovalStatus approval_status = 2;
|
|
}
|
|
message UpdateCrontabApprovalStatusResp {}
|