Toggle navigation
Toggle navigation
This project
Loading...
Sign in
jiujian
/
client-customer-order-api
Go to a project
Toggle navigation
Toggle navigation pinning
Projects
Groups
Snippets
Help
Project
Activity
Repository
Pipelines
Graphs
Issues
0
Merge Requests
0
Wiki
Network
Create a new issue
Builds
Commits
Authored by
wangyingyang
2024-12-03 15:58:17 +0800
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
b3b6bc2fd4d8c1fdb5a1a01cbfe01847a59a2ac4
b3b6bc2f
1 parent
1240bc56
fix
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
344 additions
and
3 deletions
src/main/java/com/infoloop/tianting/model/dto/OrderDbDTO.java
src/main/java/com/infoloop/tianting/service/client/OrderServiceRpcClient.java
src/main/java/com/infoloop/tianting/task/ScheduledTask.java
src/main/proto/TiantingClientResourceTagService.proto
src/main/java/com/infoloop/tianting/model/dto/OrderDbDTO.java
View file @
b3b6bc2
...
...
@@ -59,6 +59,7 @@ public class OrderDbDTO {
private
Integer
pn
;
private
Integer
pz
;
private
String
keyword
;
private
List
<
Integer
>
stallIds
;
}
@Data
...
...
src/main/java/com/infoloop/tianting/service/client/OrderServiceRpcClient.java
View file @
b3b6bc2
...
...
@@ -56,6 +56,7 @@ public class OrderServiceRpcClient {
private
final
MenuServiceRpcClient
menuServiceRpcClient
;
private
final
SkuServiceRpcClient
skuServiceRpcClient
;
private
final
OperatorServiceRpcClient
operatorServiceRpcClient
;
private
final
EnterpriseResourceServiceRpcClient
enterpriseResourceServiceRpcClient
;
public
List
<
SingleClientCustomerOrderRpcResponse
>
getOrdersByCustomerId
(
Integer
customerId
)
{
return
orderServiceRpcBlockingStub
.
getClientCustomerOrdersByCustomerId
(
...
...
@@ -206,8 +207,6 @@ public class OrderServiceRpcClient {
public
QueryClientCustomerOrdersByPaginationRpcResponse
queryClientCustomerOrdersByPagination
(
QueryOrderByPaginationDto
queryOrderDto
)
{
final
var
operatorLoginInfo
=
LoginContextHolder
.
getLoginInfo
();
final
var
operator
=
operatorServiceRpcClient
.
getCOperatorById
(
operatorLoginInfo
.
getId
());
final
var
request
=
QueryClientCustomerOrdersByPaginationRpcRequest
.
newBuilder
()
.
setKeyword
(
queryOrderDto
.
getKeyword
())
.
setPageNo
(
queryOrderDto
.
getPn
())
...
...
@@ -215,7 +214,7 @@ public class OrderServiceRpcClient {
.
setStatus
(
queryOrderDto
.
getStatus
())
.
setEnterpriseId
(
queryOrderDto
.
getEnterpriseId
())
.
setClientId
(
queryOrderDto
.
getClientId
())
.
addAllStallIds
(
List
.
of
(
operator
.
getStallId
()
))
.
addAllStallIds
(
queryOrderDto
.
getStallIds
(
))
.
build
();
return
orderServiceRpcBlockingStub
.
queryClientCustomerOrdersByPagination
(
request
);
}
...
...
src/main/java/com/infoloop/tianting/task/ScheduledTask.java
0 → 100644
View file @
b3b6bc2
package
com
.
infoloop
.
tianting
.
task
;
import
org.springframework.scheduling.annotation.EnableScheduling
;
import
org.springframework.scheduling.annotation.Scheduled
;
import
org.springframework.stereotype.Component
;
@Component
@EnableScheduling
public
class
ScheduledTask
{
// 每5秒执行一次的定时任务
// @Scheduled(fixedRate = 5000)
// public void task1() {
// System.out.println("定时任务1:每5秒执行一次,当前时间:" + System.currentTimeMillis());
// }
// 每天凌晨2点执行一次的定时任务
@Scheduled
(
cron
=
"0 0 2 * * *"
)
public
void
taskForUpdateOrderStatus
()
{
System
.
out
.
println
(
"定时任务2:每天凌晨2点执行一次,当前时间:"
+
System
.
currentTimeMillis
());
}
}
\ No newline at end of file
src/main/proto/TiantingClientResourceTagService.proto
0 → 100644
View file @
b3b6bc2
syntax
=
"proto3"
;
option
java_multiple_files
=
true
;
option
java_package
=
"com.infoloop.tianting.clientresourcetagservice"
;
option
java_outer_classname
=
"TiantingClientResourceTagServiceProto"
;
option
objc_class_prefix
=
"OP"
;
package
com
.
infoloop.tianting.clientresourcetagservice
;
service
ClientResourceTagServiceRpc
{
rpc
GetTagById
(
SingleResourceTagGetRequest
)
returns
(
SingleResourceTagGetResponse
)
{}
rpc
GetTagsByIds
(
ResourceTagsGetByIdsRequest
)
returns
(
ResourceTagsGetByIdsResponse
)
{}
rpc
GetAllTags
(
ResourceTagsGetAllRequest
)
returns
(
ResourceTagsGetAllResponse
)
{}
rpc
CreateTag
(
SingleResourceTagCreationRequest
)
returns
(
SingleResourceTagCreationResponse
)
{}
rpc
DeleteTags
(
ResourceTagBulkDeletionRequest
)
returns
(
ResourceTagBulkDeletionResponse
)
{}
rpc
GetUserResources
(
UserTagsAndResourcesGetRequest
)
returns
(
UserTagsAndResourcesGetResponse
)
{}
rpc
GetTagsByUserId
(
ResourceTagsGetByUserIdRequest
)
returns
(
ResourceTagsGetByUserIdResponse
)
{}
rpc
GetTagsByUserIds
(
ResourceTagsGetByUserIdsRequest
)
returns
(
ResourceTagsGetByUserIdsResponse
)
{}
rpc
GetTagsByWarehouseId
(
ResourceTagsGetByWarehouseIdRequest
)
returns
(
ResourceTagsGetByWarehouseIdResponse
)
{}
rpc
GetTagResources
(
SingleTagResourcesGetRequest
)
returns
(
SingleTagResourcesResponse
)
{}
rpc
UpdateTagResources
(
SingleTagUpdateRequest
)
returns
(
SingleTagUpdateResponse
)
{}
rpc
GetUsersByTagId
(
UsersGetByTagIdRequest
)
returns
(
UsersGetByTagIdResponse
)
{}
rpc
UpdateUserTags
(
UserTagsUpdateRequest
)
returns
(
UserTagsUpdateResponse
)
{}
rpc
CreateTags
(
TagsCreationRequest
)
returns
(
TagsCreationResponse
)
{}
// 根据ids 删除标签关联表
rpc
DeleteTagResourcesByIds
(
DeleteTagResourcesByIdsRequest
)
returns
(
DeleteTagResourcesByIdsResponse
)
{}
// 根据标签ids获取数据数据标签返回门店、仓库及关联Id
rpc
GetResourceTagRefByTagIds
(
GetResourceTagRefByTagIdsRequest
)
returns
(
GetResourceTagRefByTagIdsResponse
)
{}
// 根据数据标签获取绑定关系
rpc
GetTagsByStallIds
(
ResourceTagsGetByStallIdsRequest
)
returns
(
ResourceTagsGetByStallIdsResponse
)
{}
// 根据门店id获取账号表Id 无企业id
rpc
GetOperatorIdsByStallIds
(
ResourceOperatorIdsGetByStallIdsRequest
)
returns
(
ResourceOperatorIdsGetByStallIdsResponse
)
{}
}
message
GetResourceTagRefByTagIdsResponse
{
repeated
SingleResourceTagAndRefResponse
tags
=
1
;
}
message
SingleResourceTagAndRefResponse
{
SingleResourceTagResponse
tag
=
1
;
repeated
SingleResourceTagRefResponse
refs
=
2
;
}
message
SingleResourceTagRefResponse
{
int32
enterpriseId
=
1
;
int32
clientId
=
2
;
int32
id
=
3
;
int32
labelId
=
4
;
TagResourceType
entityType
=
5
;
int32
entityId
=
6
;
}
message
SingleResourceTagGetRequest
{
int32
enterpriseId
=
1
;
int32
clientId
=
2
;
int32
id
=
3
;
}
message
ResourceTagsGetByIdsRequest
{
int32
enterpriseId
=
1
;
int32
clientId
=
2
;
repeated
int32
ids
=
3
;
bool
includeDeleted
=
4
;
}
message
ResourceTagsGetAllRequest
{
int32
enterpriseId
=
1
;
int32
clientId
=
2
;
bool
includeDeleted
=
3
;
}
message
ResourceTagBulkDeletionRequest
{
int32
enterpriseId
=
1
;
int32
clientId
=
2
;
repeated
int32
ids
=
3
;
int32
deleter
=
4
;
int32
deletionSource
=
5
;
}
enum
ResourceTagType
{
DEFAULT_RESOURCE_TAG_TYPE
=
0
;
CREATE_RESOURCE_TAG_TYPE
=
1
;
}
enum
ResourceTagStatus
{
UNKNOWN_RESOURCE_TAG_STATUS
=
0
;
}
message
SingleResourceTagResponse
{
int32
id
=
1
;
int32
enterpriseId
=
2
;
int32
clientId
=
3
;
ResourceTagType
type
=
4
;
ResourceTagStatus
status
=
5
;
string
code
=
6
;
string
name
=
7
;
string
note
=
19
;
int32
creationSource
=
20
;
int32
createdBy
=
21
;
int64
createdAt
=
22
;
int32
updateSource
=
23
;
int32
updatedBy
=
24
;
int64
updatedAt
=
25
;
}
message
SingleResourceLabelEntityRefsResponse
{
int32
id
=
1
;
int32
labelId
=
2
;
TagResourceType
entityType
=
3
;
int32
entityId
=
4
;
int32
creationSource
=
5
;
int32
createdBy
=
6
;
int64
createdAt
=
7
;
}
message
SingleResourceTagGetResponse
{
SingleResourceTagResponse
response
=
1
;
}
message
ResourceTagsGetByIdsResponse
{
repeated
SingleResourceTagResponse
responses
=
1
;
}
message
ResourceTagsGetAllResponse
{
repeated
SingleResourceTagResponse
responses
=
1
;
}
message
SingleTagResourcesGetRequest
{
int32
enterpriseId
=
1
;
int32
clientId
=
2
;
int32
id
=
3
;
}
enum
TagResourceType
{
// 0 is used internally
UNKNOWN_RESOURCE_TYPE
=
0
;
WAREHOUSE
=
1
;
STALL
=
2
;
}
message
TagResource
{
TagResourceType
type
=
1
;
int32
id
=
2
;
}
message
SingleTagResourcesResponse
{
repeated
TagResource
resources
=
1
;
}
message
SingleResourceTagCreationRequest
{
int32
enterpriseId
=
1
;
int32
clientId
=
2
;
ResourceTagType
type
=
3
;
string
code
=
4
;
string
name
=
5
;
string
note
=
8
;
int32
creator
=
20
;
int32
creationSource
=
21
;
}
enum
SingleResourceTagCreationFailure
{
UNKNOWN_RESOURCE_TAG_CREATION_FAILURE
=
0
;
}
message
SingleResourceTagCreationResponse
{
bool
isCreated
=
1
;
SingleResourceTagCreationFailure
errorNo
=
2
;
SingleResourceTagResponse
response
=
3
;
}
message
SingleTagUpdateRequest
{
int32
enterpriseId
=
1
;
int32
clientId
=
2
;
int32
id
=
3
;
repeated
int32
warehousesToAdd
=
7
;
repeated
int32
warehousesToRemove
=
8
;
string
name
=
15
;
int32
updater
=
20
;
int32
updateSource
=
21
;
repeated
int32
StallToAdd
=
9
;
repeated
int32
StallToRemove
=
10
;
}
message
SingleTagUpdateResponse
{
bool
isUpdated
=
1
;
}
message
ResourceTagBulkDeletionResponse
{
bool
isUpdated
=
1
;
}
message
UserTagsAndResourcesGetRequest
{
int32
enterpriseId
=
1
;
int32
clientId
=
2
;
int32
userId
=
3
;
}
message
UserTagsAndResourcesGetResponse
{
repeated
SingleResourceTagResponse
tags
=
1
;
repeated
int32
operators
=
2
;
repeated
int32
warehouseIds
=
3
;
repeated
int32
stallIds
=
4
;
}
message
ResourceTagsGetByUserIdRequest
{
int32
enterpriseId
=
1
;
int32
clientId
=
2
;
int32
userId
=
3
;
}
message
ResourceTagsGetByUserIdResponse
{
repeated
SingleResourceTagResponse
tags
=
1
;
}
message
UsersGetByTagIdRequest
{
int32
enterpriseId
=
1
;
int32
clientId
=
2
;
int32
tagId
=
3
;
}
message
UsersGetByTagIdResponse
{
repeated
int32
userIds
=
1
;
}
message
UserTagsUpdateRequest
{
int32
enterpriseId
=
1
;
int32
clientId
=
2
;
int32
userId
=
3
;
repeated
int32
tagIds
=
4
;
int32
updateSource
=
5
;
int32
updater
=
6
;
}
message
DeleteTagResourcesByIdsRequest
{
int32
enterpriseId
=
1
;
int32
clientId
=
2
;
repeated
int32
refIds
=
4
;
}
message
GetResourceTagRefByTagIdsRequest
{
int32
enterpriseId
=
1
;
int32
clientId
=
2
;
repeated
int32
tagIds
=
4
;
}
message
DeleteTagResourcesByIdsResponse
{
bool
isDeleted
=
1
;
}
message
UserTagsUpdateResponse
{
bool
isUpdated
=
1
;
}
message
ResourceTagsGetByUserIdsRequest
{
int32
enterpriseId
=
1
;
int32
clientId
=
2
;
repeated
int32
userIds
=
3
;
}
message
ResourceTagsGetByWarehouseIdRequest
{
int32
enterpriseId
=
1
;
int32
clientId
=
2
;
int32
warehouseId
=
3
;
}
message
ResourceTagsGetByStallIdsRequest
{
int32
enterpriseId
=
1
;
int32
clientId
=
2
;
repeated
int32
stallIds
=
3
;
}
message
ResourceOperatorIdsGetByStallIdsRequest
{
repeated
int32
stallIds
=
1
;
}
message
ResourceTagsGetByStallIdsResponse
{
repeated
SingleResourceTagResponse
tags
=
1
;
}
message
ResourceOperatorIdsGetByStallIdsResponse
{
repeated
SingleResourceLabelEntityRefsResponse
labelEntityRefs
=
1
;
}
message
TagsByUserResponse
{
int32
userId
=
1
;
repeated
SingleResourceTagResponse
tags
=
2
;
}
message
ResourceTagsGetByUserIdsResponse
{
repeated
TagsByUserResponse
userTags
=
1
;
}
message
ResourceTagsGetByWarehouseIdResponse
{
repeated
SingleResourceTagResponse
tags
=
1
;
}
message
TagsCreationRequest
{
repeated
ResourceTagCreationRequest
creations
=
1
;
int32
creator
=
2
;
int32
creationSource
=
3
;
}
message
ResourceTagCreationRequest
{
int32
enterpriseId
=
1
;
int32
clientId
=
2
;
ResourceTagType
type
=
3
;
string
code
=
4
;
string
name
=
5
;
string
note
=
8
;
}
message
TagsCreationResponse
{
repeated
int32
ids
=
1
;
bool
isCreated
=
2
;
}
\ No newline at end of file
Please
register
or
login
to post a comment