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-11-13 15:31:51 +0800
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
a45f9cf304f3e5c8e3d7217abb743b6211043d1e
a45f9cf3
1 parent
4dd114c8
add contract no customer
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
14 additions
and
2 deletions
src/main/java/com/infoloop/tianting/service/client/ClientCustomerServiceRpcClient.java
src/main/java/com/infoloop/tianting/service/impl/LoginServiceImpl.java
src/main/proto/MenuService.proto
src/main/java/com/infoloop/tianting/service/client/ClientCustomerServiceRpcClient.java
View file @
a45f9cf
...
...
@@ -6,6 +6,8 @@ import com.infoloop.tianting.clientcustomerservice.ClientCustomerLabelRefCreatio
import
com.infoloop.tianting.clientcustomerservice.ClientCustomerServiceRpcGrpc
;
import
com.infoloop.tianting.clientcustomerservice.DeleteClientCustomerLabelRefsByIdsRpcRequest
;
import
com.infoloop.tianting.clientcustomerservice.DeleteClientCustomerLabelRefsRpcResponse
;
import
com.infoloop.tianting.clientcustomerservice.GetClientCustomerByContactNoRpcRequest
;
import
com.infoloop.tianting.clientcustomerservice.GetClientCustomerByContactNoRpcResponse
;
import
com.infoloop.tianting.clientcustomerservice.GetClientCustomerByHISCustomerIdRpcRequest
;
import
com.infoloop.tianting.clientcustomerservice.GetClientCustomerByHISCustomerIdRpcResponse
;
import
com.infoloop.tianting.clientcustomerservice.GetClientCustomerByIdRpcRequest
;
...
...
@@ -43,6 +45,12 @@ public class ClientCustomerServiceRpcClient {
return
clientCustomerServiceRpcBlockingStub
.
getClientCustomerByHISCustomerId
(
request
);
}
public
GetClientCustomerByContactNoRpcResponse
getClientCustomerByContactNo
(
String
contractNo
)
{
final
var
request
=
GetClientCustomerByContactNoRpcRequest
.
newBuilder
()
.
setContractNo
(
contractNo
).
build
();
return
clientCustomerServiceRpcBlockingStub
.
getClientCustomerByContactNo
(
request
);
}
public
GetClientCustomerByIdRpcResponse
getClientCustomerById
(
Integer
id
)
{
final
var
request
=
GetClientCustomerByIdRpcRequest
.
newBuilder
().
setId
(
id
).
build
();
return
clientCustomerServiceRpcBlockingStub
.
getClientCustomerById
(
request
);
...
...
src/main/java/com/infoloop/tianting/service/impl/LoginServiceImpl.java
View file @
a45f9cf
...
...
@@ -41,10 +41,13 @@ public class LoginServiceImpl implements LoginService {
return
StpUtil
.
getTokenInfo
();
}
else
if
(
loginDto
.
isShouldLoginWithHisCustomerId
()){
final
var
customer
=
clientCustomerServiceRpcClient
.
getClientCustomerByHISCustomerId
(
var
customer
=
clientCustomerServiceRpcClient
.
getClientCustomerByHISCustomerId
(
loginDto
.
getHisCustomerId
()).
getResponse
();
if
(
customer
.
getId
()
==
0
)
{
throw
ClientEndExceptions
.
AuthenticationFailure
.
build
(
ErrorCodeEnum
.
UNAUTHORIZED
.
name
());
customer
=
clientCustomerServiceRpcClient
.
getClientCustomerByContactNo
(
loginDto
.
getHisCustomerId
()).
getResponse
();
if
(
customer
.
getId
()
==
0
)
{
throw
ClientEndExceptions
.
AuthenticationFailure
.
build
(
ErrorCodeEnum
.
UNAUTHORIZED
.
name
());
}
}
StpUtil
.
login
(
customer
.
getId
(),
SaLoginModel
.
create
()
.
setExtra
(
CommonConstants
.
ENTERPRISE_ID
,
customer
.
getEnterpriseId
())
...
...
src/main/proto/MenuService.proto
View file @
a45f9cf
...
...
@@ -107,6 +107,7 @@ enum DishSelectRuleEnum {
CHOOSE_ONE_OF_DISHES
=
0
;
//菜品品类M选1
ADD_OR_REMOVE
=
1
;
//随意增减
FIXED_QUANTITY
=
2
;
//固定数量
DISHES_CATEGORY_CHOOSE_ONE
=
3
;
//菜品品类选1
}
enum
ModeOfPaymentEnum
{
...
...
Please
register
or
login
to post a comment