Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
G
gogirl-miniapp-backend
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
huluobin
gogirl-miniapp-backend
Commits
ee977b5d
Commit
ee977b5d
authored
Mar 31, 2021
by
huluobin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
# 更新
parent
47b93f14
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
37 additions
and
7 deletions
+37
-7
README.md
README.md
+7
-0
CustomerController.java
...m/gogirl/interfaces/user/customer/CustomerController.java
+19
-1
application-prod.yml
src/main/resources/application-prod.yml
+1
-1
Test.java
src/test/java/com/gogirl/Test.java
+10
-5
No files found.
README.md
View file @
ee977b5d
...
@@ -32,6 +32,13 @@ swagger: http://134.175.167.230:5555/doc.html
...
@@ -32,6 +32,13 @@ swagger: http://134.175.167.230:5555/doc.html
└── shared //dto
└── shared //dto
```
```
## 业务流程
### 预约
用户端预约-> 店员端开单 ->
## 如何开发
## 如何开发
...
...
src/main/java/com/gogirl/interfaces/user/customer/CustomerController.java
View file @
ee977b5d
package
com
.
gogirl
.
interfaces
.
user
.
customer
;
package
com
.
gogirl
.
interfaces
.
user
.
customer
;
import
com.baomidou.mybatisplus.core.toolkit.IdWorker
;
import
com.gogirl.application.common.xcx.GogirlTokenService
;
import
com.gogirl.application.common.xcx.GogirlTokenService
;
import
com.gogirl.application.user.customer.CustomerService
;
import
com.gogirl.application.user.customer.CustomerService
;
import
com.gogirl.domain.common.xcx.GogirlToken
;
import
com.gogirl.domain.user.customer.Customer
;
import
com.gogirl.domain.user.customer.Customer
;
import
com.gogirl.infrastructure.common.annotation.AuthIgnore
;
import
com.gogirl.infrastructure.common.annotation.AuthIgnore
;
import
com.gogirl.infrastructure.common.annotation.LoginIgnore
;
import
com.gogirl.infrastructure.common.annotation.LoginIgnore
;
import
com.gogirl.infrastructure.common.base.JsonResult
;
import
com.gogirl.infrastructure.common.base.JsonResult
;
import
com.gogirl.infrastructure.common.exception.RRException
;
import
com.gogirl.infrastructure.common.exception.RRException
;
import
com.gogirl.infrastructure.common.util.StringUtils
;
import
com.gogirl.infrastructure.common.util.StringUtils
;
import
com.gogirl.infrastructure.mapper.user.customer.CustomerMapper
;
import
com.gogirl.shared.member.CustomerOrderDetail
;
import
com.gogirl.shared.member.CustomerOrderDetail
;
import
com.gogirl.shared.user.CustomerQuery
;
import
com.gogirl.shared.user.CustomerQuery
;
import
io.swagger.annotations.Api
;
import
io.swagger.annotations.Api
;
...
@@ -30,7 +33,22 @@ public class CustomerController {
...
@@ -30,7 +33,22 @@ public class CustomerController {
private
CustomerService
customerService
;
private
CustomerService
customerService
;
@Resource
@Resource
private
GogirlTokenService
gogirlTokenService
;
private
GogirlTokenService
gogirlTokenService
;
@Resource
CustomerMapper
customerMapper
;
@GetMapping
(
"no_mockLogin"
)
public
JsonResult
<
Void
>
mockLogin
(
@RequestParam
String
pwd
,
@RequestParam
Integer
customerId
)
{
Customer
customer
=
customerMapper
.
selectById
(
customerId
);
GogirlToken
gogirlToken
=
GogirlToken
.
builder
()
.
token
(
customerId
+
"_"
+
IdWorker
.
getIdStr
().
substring
(
6
))
.
createTime
(
new
Date
())
.
openid
(
customer
.
getOpenid1
())
.
customerId
(
customerId
)
.
build
();
gogirlTokenService
.
save
(
gogirlToken
);
return
JsonResult
.
success
();
}
@LoginIgnore
@LoginIgnore
@AuthIgnore
@AuthIgnore
...
...
src/main/resources/application-prod.yml
View file @
ee977b5d
...
@@ -67,7 +67,7 @@ spring:
...
@@ -67,7 +67,7 @@ spring:
max-idle
:
200
max-idle
:
200
min-idle
:
0
min-idle
:
0
timeout
:
60000ms
timeout
:
60000ms
#
password: 'gogirl2020test.'
password
:
'
gogirl2020test.'
#项目属性
#项目属性
...
...
src/test/java/com/gogirl/Test.java
View file @
ee977b5d
...
@@ -71,6 +71,7 @@ import com.gogirl.shared.product.excel.ImportPurchaseSkuExcel;
...
@@ -71,6 +71,7 @@ import com.gogirl.shared.product.excel.ImportPurchaseSkuExcel;
import
lombok.extern.slf4j.Slf4j
;
import
lombok.extern.slf4j.Slf4j
;
import
org.assertj.core.util.Lists
;
import
org.assertj.core.util.Lists
;
import
org.junit.runner.RunWith
;
import
org.junit.runner.RunWith
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.boot.test.context.SpringBootTest
;
import
org.springframework.boot.test.context.SpringBootTest
;
import
org.springframework.data.redis.core.RedisTemplate
;
import
org.springframework.data.redis.core.RedisTemplate
;
import
org.springframework.scheduling.annotation.EnableAsync
;
import
org.springframework.scheduling.annotation.EnableAsync
;
...
@@ -219,6 +220,11 @@ public class Test {
...
@@ -219,6 +220,11 @@ public class Test {
orderPayMapper
.
delete
(
new
LambdaQueryWrapper
<
OrderPay
>().
eq
(
OrderPay:
:
getAmount
,
0
));
orderPayMapper
.
delete
(
new
LambdaQueryWrapper
<
OrderPay
>().
eq
(
OrderPay:
:
getAmount
,
0
));
}
}
@Autowired
GogirlTokenService
gogirlTokenService
;
@org
.
junit
.
Test
@org
.
junit
.
Test
public
void
customerPay
()
{
public
void
customerPay
()
{
...
@@ -237,19 +243,18 @@ public class Test {
...
@@ -237,19 +243,18 @@ public class Test {
@Resource
@Resource
RedisTemplate
<
String
,
String
>
redisTemplate
;
RedisTemplate
<
String
,
String
>
redisTemplate
;
@Resource
GogirlTokenService
gogirlTokenService
;
@Resource
@Resource
CustomerMapper
customerMapper
;
CustomerMapper
customerMapper
;
@org
.
junit
.
Test
@org
.
junit
.
Test
public
void
values
()
{
public
void
values
()
{
Customer
customer
=
customerMapper
.
selectById
(
2
0432
);
Customer
customer
=
customerMapper
.
selectById
(
2
3240
);
GogirlToken
gogirlToken
=
GogirlToken
.
builder
()
GogirlToken
gogirlToken
=
GogirlToken
.
builder
()
.
token
(
2
0432
+
"_"
+
IdWorker
.
getIdStr
().
substring
(
6
))
.
token
(
2
3240
+
"_"
+
IdWorker
.
getIdStr
().
substring
(
6
))
.
createTime
(
new
Date
())
.
createTime
(
new
Date
())
.
openid
(
customer
.
getOpenid1
())
.
openid
(
customer
.
getOpenid1
())
.
customerId
(
2
0432
)
.
customerId
(
2
3240
)
.
build
();
.
build
();
gogirlTokenService
.
save
(
gogirlToken
);
gogirlTokenService
.
save
(
gogirlToken
);
System
.
out
.
println
(
gogirlToken
.
getToken
());
System
.
out
.
println
(
gogirlToken
.
getToken
());
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment