Commit ee977b5d by huluobin

# 更新

parent 47b93f14
......@@ -32,6 +32,13 @@ swagger: http://134.175.167.230:5555/doc.html
└── shared //dto
```
## 业务流程
### 预约
用户端预约-> 店员端开单 ->
## 如何开发
......
package com.gogirl.interfaces.user.customer;
import com.baomidou.mybatisplus.core.toolkit.IdWorker;
import com.gogirl.application.common.xcx.GogirlTokenService;
import com.gogirl.application.user.customer.CustomerService;
import com.gogirl.domain.common.xcx.GogirlToken;
import com.gogirl.domain.user.customer.Customer;
import com.gogirl.infrastructure.common.annotation.AuthIgnore;
import com.gogirl.infrastructure.common.annotation.LoginIgnore;
import com.gogirl.infrastructure.common.base.JsonResult;
import com.gogirl.infrastructure.common.exception.RRException;
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.user.CustomerQuery;
import io.swagger.annotations.Api;
......@@ -30,7 +33,22 @@ public class CustomerController {
private CustomerService customerService;
@Resource
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
@AuthIgnore
......
......@@ -67,7 +67,7 @@ spring:
max-idle: 200
min-idle: 0
timeout: 60000ms
# password: 'gogirl2020test.'
password: 'gogirl2020test.'
#项目属性
......
......@@ -71,6 +71,7 @@ import com.gogirl.shared.product.excel.ImportPurchaseSkuExcel;
import lombok.extern.slf4j.Slf4j;
import org.assertj.core.util.Lists;
import org.junit.runner.RunWith;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.test.context.SpringBootTest;
import org.springframework.data.redis.core.RedisTemplate;
import org.springframework.scheduling.annotation.EnableAsync;
......@@ -219,6 +220,11 @@ public class Test {
orderPayMapper.delete(new LambdaQueryWrapper<OrderPay>().eq(OrderPay::getAmount, 0));
}
@Autowired
GogirlTokenService gogirlTokenService;
@org.junit.Test
public void customerPay() {
......@@ -237,19 +243,18 @@ public class Test {
@Resource
RedisTemplate<String, String> redisTemplate;
@Resource
GogirlTokenService gogirlTokenService;
@Resource
CustomerMapper customerMapper;
@org.junit.Test
public void values() {
Customer customer = customerMapper.selectById(20432);
Customer customer = customerMapper.selectById(23240);
GogirlToken gogirlToken = GogirlToken.builder()
.token(20432 + "_" + IdWorker.getIdStr().substring(6))
.token(23240 + "_" + IdWorker.getIdStr().substring(6))
.createTime(new Date())
.openid(customer.getOpenid1())
.customerId(20432)
.customerId(23240)
.build();
gogirlTokenService.save(gogirlToken);
System.out.println(gogirlToken.getToken());
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment