commit
b0241c68f2
|
@ -9,6 +9,7 @@
|
|||
<file url="file://$PROJECT_DIR$/bwie-common/src/main/resources" charset="UTF-8" />
|
||||
<file url="file://$PROJECT_DIR$/bwie-gateway/src/main/java" charset="UTF-8" />
|
||||
<file url="file://$PROJECT_DIR$/bwie-gateway/src/main/resources" charset="UTF-8" />
|
||||
<file url="file://$PROJECT_DIR$/bwie-models/bwie-list/src/main/java" charset="UTF-8" />
|
||||
<file url="file://$PROJECT_DIR$/bwie-models/bwie-user/src/main/java" charset="UTF-8" />
|
||||
<file url="file://$PROJECT_DIR$/bwie-models/src/main/java" charset="UTF-8" />
|
||||
<file url="file://$PROJECT_DIR$/bwie-models/src/main/resources" charset="UTF-8" />
|
||||
|
|
|
@ -1,7 +1,11 @@
|
|||
package com.bwie.list.service.impl;
|
||||
|
||||
import com.alibaba.fastjson.JSON;
|
||||
import com.bwie.common.constants.TokenConstants;
|
||||
import com.bwie.common.pojo.User;
|
||||
import com.bwie.common.pojo.vo.VOLogMake;
|
||||
import com.bwie.common.result.Result;
|
||||
import com.bwie.common.utils.JwtUtils;
|
||||
import com.bwie.list.mapper.ParkingMapper;
|
||||
import com.bwie.list.service.ParkingService;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
|
@ -23,13 +27,13 @@ public class ParkingServiceImpl implements ParkingService {
|
|||
public Result makeAppointment(VOLogMake voLogMake) {
|
||||
|
||||
//1.获取用户信息
|
||||
// String token = request.getHeader("token");
|
||||
// String userKey = JwtUtils.getUserKey(token);
|
||||
// String s = redisTemplate.opsForValue().get(TokenConstants.LOGIN_TOKEN_KEY + userKey);
|
||||
// User user = JSON.parseObject(s, User.class);
|
||||
// if (user != null) {
|
||||
// voLogMake.setUserId(user.getUserId());
|
||||
// }
|
||||
String token = request.getHeader("token");
|
||||
String userKey = JwtUtils.getUserKey(token);
|
||||
String s = redisTemplate.opsForValue().get(TokenConstants.LOGIN_TOKEN_KEY + userKey);
|
||||
User user = JSON.parseObject(s, User.class);
|
||||
if (user != null) {
|
||||
voLogMake.setUserId(user.getUserId());
|
||||
}
|
||||
//2.添加预约信息
|
||||
System.out.println("开始添加");
|
||||
Integer i = parkingMapper.makeAppointment(voLogMake);
|
||||
|
|
Loading…
Reference in New Issue