wangyingyang

fix

...@@ -59,6 +59,7 @@ public class OrderDbDTO { ...@@ -59,6 +59,7 @@ public class OrderDbDTO {
59 private Integer pn; 59 private Integer pn;
60 private Integer pz; 60 private Integer pz;
61 private String keyword; 61 private String keyword;
62 + private List<Integer> stallIds;
62 } 63 }
63 64
64 @Data 65 @Data
......
...@@ -56,6 +56,7 @@ public class OrderServiceRpcClient { ...@@ -56,6 +56,7 @@ public class OrderServiceRpcClient {
56 private final MenuServiceRpcClient menuServiceRpcClient; 56 private final MenuServiceRpcClient menuServiceRpcClient;
57 private final SkuServiceRpcClient skuServiceRpcClient; 57 private final SkuServiceRpcClient skuServiceRpcClient;
58 private final OperatorServiceRpcClient operatorServiceRpcClient; 58 private final OperatorServiceRpcClient operatorServiceRpcClient;
59 + private final EnterpriseResourceServiceRpcClient enterpriseResourceServiceRpcClient;
59 60
60 public List<SingleClientCustomerOrderRpcResponse> getOrdersByCustomerId(Integer customerId) { 61 public List<SingleClientCustomerOrderRpcResponse> getOrdersByCustomerId(Integer customerId) {
61 return orderServiceRpcBlockingStub.getClientCustomerOrdersByCustomerId( 62 return orderServiceRpcBlockingStub.getClientCustomerOrdersByCustomerId(
...@@ -206,8 +207,6 @@ public class OrderServiceRpcClient { ...@@ -206,8 +207,6 @@ public class OrderServiceRpcClient {
206 207
207 public QueryClientCustomerOrdersByPaginationRpcResponse queryClientCustomerOrdersByPagination( 208 public QueryClientCustomerOrdersByPaginationRpcResponse queryClientCustomerOrdersByPagination(
208 QueryOrderByPaginationDto queryOrderDto) { 209 QueryOrderByPaginationDto queryOrderDto) {
209 - final var operatorLoginInfo = LoginContextHolder.getLoginInfo();
210 - final var operator = operatorServiceRpcClient.getCOperatorById(operatorLoginInfo.getId());
211 final var request = QueryClientCustomerOrdersByPaginationRpcRequest.newBuilder() 210 final var request = QueryClientCustomerOrdersByPaginationRpcRequest.newBuilder()
212 .setKeyword(queryOrderDto.getKeyword()) 211 .setKeyword(queryOrderDto.getKeyword())
213 .setPageNo(queryOrderDto.getPn()) 212 .setPageNo(queryOrderDto.getPn())
...@@ -215,7 +214,7 @@ public class OrderServiceRpcClient { ...@@ -215,7 +214,7 @@ public class OrderServiceRpcClient {
215 .setStatus(queryOrderDto.getStatus()) 214 .setStatus(queryOrderDto.getStatus())
216 .setEnterpriseId(queryOrderDto.getEnterpriseId()) 215 .setEnterpriseId(queryOrderDto.getEnterpriseId())
217 .setClientId(queryOrderDto.getClientId()) 216 .setClientId(queryOrderDto.getClientId())
218 - .addAllStallIds(List.of(operator.getStallId())) 217 + .addAllStallIds(queryOrderDto.getStallIds())
219 .build(); 218 .build();
220 return orderServiceRpcBlockingStub.queryClientCustomerOrdersByPagination(request); 219 return orderServiceRpcBlockingStub.queryClientCustomerOrdersByPagination(request);
221 } 220 }
......
1 +package com.infoloop.tianting.task;
2 +
3 +import org.springframework.scheduling.annotation.EnableScheduling;
4 +import org.springframework.scheduling.annotation.Scheduled;
5 +import org.springframework.stereotype.Component;
6 +
7 +@Component
8 +@EnableScheduling
9 +public class ScheduledTask {
10 +
11 + // 每5秒执行一次的定时任务
12 +// @Scheduled(fixedRate = 5000)
13 +// public void task1() {
14 +// System.out.println("定时任务1:每5秒执行一次,当前时间:" + System.currentTimeMillis());
15 +// }
16 +
17 + // 每天凌晨2点执行一次的定时任务
18 + @Scheduled(cron = "0 0 2 * * *")
19 + public void taskForUpdateOrderStatus() {
20 + System.out.println("定时任务2:每天凌晨2点执行一次,当前时间:" + System.currentTimeMillis());
21 + }
22 +}
...\ No newline at end of file ...\ No newline at end of file
1 +syntax = "proto3";
2 +
3 +option java_multiple_files = true;
4 +option java_package = "com.infoloop.tianting.clientresourcetagservice";
5 +option java_outer_classname = "TiantingClientResourceTagServiceProto";
6 +option objc_class_prefix = "OP";
7 +
8 +package com.infoloop.tianting.clientresourcetagservice;
9 +
10 +service ClientResourceTagServiceRpc {
11 + rpc GetTagById (SingleResourceTagGetRequest) returns (SingleResourceTagGetResponse) {}
12 + rpc GetTagsByIds (ResourceTagsGetByIdsRequest) returns (ResourceTagsGetByIdsResponse) {}
13 + rpc GetAllTags (ResourceTagsGetAllRequest) returns (ResourceTagsGetAllResponse) {}
14 + rpc CreateTag (SingleResourceTagCreationRequest) returns (SingleResourceTagCreationResponse) {}
15 + rpc DeleteTags (ResourceTagBulkDeletionRequest) returns (ResourceTagBulkDeletionResponse) {}
16 + rpc GetUserResources (UserTagsAndResourcesGetRequest) returns (UserTagsAndResourcesGetResponse) {}
17 + rpc GetTagsByUserId (ResourceTagsGetByUserIdRequest) returns (ResourceTagsGetByUserIdResponse) {}
18 + rpc GetTagsByUserIds (ResourceTagsGetByUserIdsRequest) returns (ResourceTagsGetByUserIdsResponse) {}
19 + rpc GetTagsByWarehouseId (ResourceTagsGetByWarehouseIdRequest) returns (ResourceTagsGetByWarehouseIdResponse) {}
20 + rpc GetTagResources (SingleTagResourcesGetRequest) returns (SingleTagResourcesResponse) {}
21 + rpc UpdateTagResources (SingleTagUpdateRequest) returns (SingleTagUpdateResponse) {}
22 + rpc GetUsersByTagId (UsersGetByTagIdRequest) returns (UsersGetByTagIdResponse) {}
23 + rpc UpdateUserTags (UserTagsUpdateRequest) returns (UserTagsUpdateResponse) {}
24 + rpc CreateTags (TagsCreationRequest) returns (TagsCreationResponse) {}
25 + // 根据ids 删除标签关联表
26 + rpc DeleteTagResourcesByIds (DeleteTagResourcesByIdsRequest) returns (DeleteTagResourcesByIdsResponse) {}
27 +
28 + // 根据标签ids获取数据数据标签返回门店、仓库及关联Id
29 + rpc GetResourceTagRefByTagIds (GetResourceTagRefByTagIdsRequest) returns (GetResourceTagRefByTagIdsResponse) {}
30 +
31 + // 根据数据标签获取绑定关系
32 + rpc GetTagsByStallIds (ResourceTagsGetByStallIdsRequest) returns (ResourceTagsGetByStallIdsResponse) {}
33 +
34 + // 根据门店id获取账号表Id 无企业id
35 + rpc GetOperatorIdsByStallIds (ResourceOperatorIdsGetByStallIdsRequest) returns (ResourceOperatorIdsGetByStallIdsResponse) {}
36 +
37 +}
38 +
39 +message GetResourceTagRefByTagIdsResponse {
40 + repeated SingleResourceTagAndRefResponse tags = 1;
41 +}
42 +
43 +message SingleResourceTagAndRefResponse {
44 + SingleResourceTagResponse tag = 1;
45 + repeated SingleResourceTagRefResponse refs = 2;
46 +}
47 +
48 +message SingleResourceTagRefResponse {
49 + int32 enterpriseId = 1;
50 + int32 clientId = 2;
51 + int32 id = 3;
52 + int32 labelId = 4;
53 + TagResourceType entityType = 5;
54 + int32 entityId = 6;
55 +}
56 +
57 +
58 +message SingleResourceTagGetRequest {
59 + int32 enterpriseId = 1;
60 + int32 clientId = 2;
61 + int32 id = 3;
62 +}
63 +
64 +message ResourceTagsGetByIdsRequest {
65 + int32 enterpriseId = 1;
66 + int32 clientId = 2;
67 + repeated int32 ids = 3;
68 + bool includeDeleted = 4;
69 +}
70 +
71 +message ResourceTagsGetAllRequest {
72 + int32 enterpriseId = 1;
73 + int32 clientId = 2;
74 + bool includeDeleted = 3;
75 +}
76 +
77 +message ResourceTagBulkDeletionRequest {
78 + int32 enterpriseId = 1;
79 + int32 clientId = 2;
80 + repeated int32 ids = 3;
81 + int32 deleter = 4;
82 + int32 deletionSource = 5;
83 +}
84 +
85 +enum ResourceTagType {
86 + DEFAULT_RESOURCE_TAG_TYPE = 0;
87 + CREATE_RESOURCE_TAG_TYPE = 1;
88 +}
89 +
90 +enum ResourceTagStatus {
91 + UNKNOWN_RESOURCE_TAG_STATUS = 0;
92 +}
93 +
94 +message SingleResourceTagResponse {
95 + int32 id = 1;
96 + int32 enterpriseId = 2;
97 + int32 clientId = 3;
98 + ResourceTagType type = 4;
99 + ResourceTagStatus status = 5;
100 + string code = 6;
101 + string name = 7;
102 + string note = 19;
103 + int32 creationSource = 20;
104 + int32 createdBy = 21;
105 + int64 createdAt = 22;
106 + int32 updateSource = 23;
107 + int32 updatedBy = 24;
108 + int64 updatedAt = 25;
109 +}
110 +
111 +message SingleResourceLabelEntityRefsResponse {
112 + int32 id = 1;
113 + int32 labelId = 2;
114 + TagResourceType entityType = 3;
115 + int32 entityId = 4;
116 + int32 creationSource = 5;
117 + int32 createdBy = 6;
118 + int64 createdAt = 7;
119 +}
120 +
121 +message SingleResourceTagGetResponse {
122 + SingleResourceTagResponse response = 1;
123 +}
124 +
125 +message ResourceTagsGetByIdsResponse {
126 + repeated SingleResourceTagResponse responses = 1;
127 +}
128 +
129 +message ResourceTagsGetAllResponse {
130 + repeated SingleResourceTagResponse responses = 1;
131 +}
132 +
133 +message SingleTagResourcesGetRequest {
134 + int32 enterpriseId = 1;
135 + int32 clientId = 2;
136 + int32 id = 3;
137 +}
138 +
139 +enum TagResourceType {
140 + // 0 is used internally
141 + UNKNOWN_RESOURCE_TYPE = 0;
142 + WAREHOUSE = 1;
143 + STALL = 2;
144 +}
145 +
146 +message TagResource {
147 + TagResourceType type = 1;
148 + int32 id = 2;
149 +}
150 +
151 +message SingleTagResourcesResponse {
152 + repeated TagResource resources = 1;
153 +}
154 +
155 +message SingleResourceTagCreationRequest {
156 + int32 enterpriseId = 1;
157 + int32 clientId = 2;
158 + ResourceTagType type = 3;
159 + string code = 4;
160 + string name = 5;
161 + string note = 8;
162 + int32 creator = 20;
163 + int32 creationSource = 21;
164 +}
165 +
166 +enum SingleResourceTagCreationFailure {
167 + UNKNOWN_RESOURCE_TAG_CREATION_FAILURE = 0;
168 +}
169 +
170 +message SingleResourceTagCreationResponse {
171 + bool isCreated = 1;
172 + SingleResourceTagCreationFailure errorNo = 2;
173 + SingleResourceTagResponse response = 3;
174 +}
175 +
176 +message SingleTagUpdateRequest {
177 + int32 enterpriseId = 1;
178 + int32 clientId = 2;
179 + int32 id = 3;
180 + repeated int32 warehousesToAdd = 7;
181 + repeated int32 warehousesToRemove = 8;
182 + string name = 15;
183 + int32 updater = 20;
184 + int32 updateSource = 21;
185 + repeated int32 StallToAdd = 9;
186 + repeated int32 StallToRemove = 10;
187 +}
188 +
189 +message SingleTagUpdateResponse {
190 + bool isUpdated = 1;
191 +}
192 +
193 +message ResourceTagBulkDeletionResponse {
194 + bool isUpdated = 1;
195 +}
196 +
197 +message UserTagsAndResourcesGetRequest {
198 + int32 enterpriseId = 1;
199 + int32 clientId = 2;
200 + int32 userId = 3;
201 +}
202 +
203 +message UserTagsAndResourcesGetResponse {
204 + repeated SingleResourceTagResponse tags = 1;
205 + repeated int32 operators = 2;
206 + repeated int32 warehouseIds = 3;
207 + repeated int32 stallIds = 4;
208 +}
209 +
210 +message ResourceTagsGetByUserIdRequest {
211 + int32 enterpriseId = 1;
212 + int32 clientId = 2;
213 + int32 userId = 3;
214 +}
215 +
216 +message ResourceTagsGetByUserIdResponse {
217 + repeated SingleResourceTagResponse tags = 1;
218 +}
219 +
220 +message UsersGetByTagIdRequest {
221 + int32 enterpriseId = 1;
222 + int32 clientId = 2;
223 + int32 tagId = 3;
224 +}
225 +
226 +message UsersGetByTagIdResponse {
227 + repeated int32 userIds = 1;
228 +}
229 +
230 +message UserTagsUpdateRequest {
231 + int32 enterpriseId = 1;
232 + int32 clientId = 2;
233 + int32 userId = 3;
234 + repeated int32 tagIds = 4;
235 + int32 updateSource = 5;
236 + int32 updater = 6;
237 +}
238 +
239 +message DeleteTagResourcesByIdsRequest {
240 + int32 enterpriseId = 1;
241 + int32 clientId = 2;
242 + repeated int32 refIds = 4;
243 +}
244 +
245 +message GetResourceTagRefByTagIdsRequest {
246 + int32 enterpriseId = 1;
247 + int32 clientId = 2;
248 + repeated int32 tagIds = 4;
249 +}
250 +
251 +message DeleteTagResourcesByIdsResponse {
252 + bool isDeleted = 1;
253 +}
254 +
255 +
256 +message UserTagsUpdateResponse {
257 + bool isUpdated = 1;
258 +}
259 +
260 +message ResourceTagsGetByUserIdsRequest {
261 + int32 enterpriseId = 1;
262 + int32 clientId = 2;
263 + repeated int32 userIds = 3;
264 +}
265 +
266 +message ResourceTagsGetByWarehouseIdRequest {
267 + int32 enterpriseId = 1;
268 + int32 clientId = 2;
269 + int32 warehouseId = 3;
270 +}
271 +
272 +message ResourceTagsGetByStallIdsRequest {
273 + int32 enterpriseId = 1;
274 + int32 clientId = 2;
275 + repeated int32 stallIds = 3;
276 +}
277 +message ResourceOperatorIdsGetByStallIdsRequest {
278 + repeated int32 stallIds = 1;
279 +}
280 +message ResourceTagsGetByStallIdsResponse {
281 + repeated SingleResourceTagResponse tags = 1;
282 +}
283 +
284 +message ResourceOperatorIdsGetByStallIdsResponse {
285 + repeated SingleResourceLabelEntityRefsResponse labelEntityRefs = 1;
286 +}
287 +
288 +message TagsByUserResponse {
289 + int32 userId = 1;
290 + repeated SingleResourceTagResponse tags = 2;
291 +}
292 +
293 +message ResourceTagsGetByUserIdsResponse {
294 + repeated TagsByUserResponse userTags = 1;
295 +}
296 +
297 +message ResourceTagsGetByWarehouseIdResponse {
298 + repeated SingleResourceTagResponse tags = 1;
299 +}
300 +
301 +message TagsCreationRequest {
302 + repeated ResourceTagCreationRequest creations = 1;
303 + int32 creator = 2;
304 + int32 creationSource = 3;
305 +}
306 +
307 +message ResourceTagCreationRequest {
308 + int32 enterpriseId = 1;
309 + int32 clientId = 2;
310 + ResourceTagType type = 3;
311 + string code = 4;
312 + string name = 5;
313 + string note = 8;
314 +}
315 +
316 +message TagsCreationResponse {
317 + repeated int32 ids = 1;
318 + bool isCreated = 2;
319 +}
...\ No newline at end of file ...\ No newline at end of file