Skip to content

Commit

Permalink
modify CalculateConsumption
Browse files Browse the repository at this point in the history
  • Loading branch information
zzh-thu committed Feb 1, 2025
1 parent 3bec6d9 commit ca84d15
Show file tree
Hide file tree
Showing 9 changed files with 1,370 additions and 1,246 deletions.
1 change: 1 addition & 0 deletions city/economy/v2/org_service.proto
Original file line number Diff line number Diff line change
Expand Up @@ -344,6 +344,7 @@ message CalculateConsumptionRequest {
repeated int32 firm_ids = 1; // 多个公司ID
int32 agent_id = 2; // 代理ID
repeated int32 demands = 3; // 对应每个公司的需求量
optional bool consumption_accumulation = 4; // 是否累加消费,默认为true
}

message CalculateConsumptionResponse {
Expand Down
815 changes: 434 additions & 381 deletions cpp/city/economy/v2/org_service.pb.cc

Large diffs are not rendered by default.

46 changes: 45 additions & 1 deletion cpp/city/economy/v2/org_service.pb.h

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions docs/docs.md
Original file line number Diff line number Diff line change
Expand Up @@ -2612,6 +2612,7 @@ Organization
| firm_ids | [int32](#int32) | repeated | 多个公司ID |
| agent_id | [int32](#int32) | | 代理ID |
| demands | [int32](#int32) | repeated | 对应每个公司的需求量 |
| consumption_accumulation | [bool](#bool) | optional | 是否累加消费,默认为true |



Expand Down
7 changes: 7 additions & 0 deletions es/city/economy/v2/org_service_pb.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1431,6 +1431,13 @@ export declare class CalculateConsumptionRequest extends Message<CalculateConsum
*/
demands: number[];

/**
* 是否累加消费,默认为true
*
* @generated from field: optional bool consumption_accumulation = 4;
*/
consumptionAccumulation?: boolean;

constructor(data?: PartialMessage<CalculateConsumptionRequest>);

static readonly runtime: typeof proto3;
Expand Down
1 change: 1 addition & 0 deletions es/city/economy/v2/org_service_pb.js
Original file line number Diff line number Diff line change
Expand Up @@ -580,6 +580,7 @@ export const CalculateConsumptionRequest = /*@__PURE__*/ proto3.makeMessageType(
{ no: 1, name: "firm_ids", kind: "scalar", T: 5 /* ScalarType.INT32 */, repeated: true },
{ no: 2, name: "agent_id", kind: "scalar", T: 5 /* ScalarType.INT32 */ },
{ no: 3, name: "demands", kind: "scalar", T: 5 /* ScalarType.INT32 */, repeated: true },
{ no: 4, name: "consumption_accumulation", kind: "scalar", T: 8 /* ScalarType.BOOL */, opt: true },
],
);

Expand Down
Loading

0 comments on commit ca84d15

Please sign in to comment.