增加赋值
This commit is contained in:
@ -32,6 +32,7 @@ public interface OrderConvert {
|
|||||||
@Mapping(source = "rentCarOrderReq.isAutoDeduct", target = "isAutoDeduct"),
|
@Mapping(source = "rentCarOrderReq.isAutoDeduct", target = "isAutoDeduct"),
|
||||||
@Mapping(source = "rentCarOrderReq.isDepositFree", target = "isDepositFree"),
|
@Mapping(source = "rentCarOrderReq.isDepositFree", target = "isDepositFree"),
|
||||||
@Mapping(source = "rentCarOrderReq.batteryType", target = "batteryType"),
|
@Mapping(source = "rentCarOrderReq.batteryType", target = "batteryType"),
|
||||||
|
@Mapping(source = "userInfoDTO.userId", target = "customerId"),
|
||||||
@Mapping(source = "userInfoDTO.userName", target = "customerName"),
|
@Mapping(source = "userInfoDTO.userName", target = "customerName"),
|
||||||
@Mapping(source = "userInfoDTO.mobileNumber", target = "customerPhone"),
|
@Mapping(source = "userInfoDTO.mobileNumber", target = "customerPhone"),
|
||||||
@Mapping(source = "rentCarRuleDTO.rentalType", target = "rentalType"),
|
@Mapping(source = "rentCarRuleDTO.rentalType", target = "rentalType"),
|
||||||
|
|||||||
@ -60,9 +60,6 @@ public class OrderServiceImpl implements OrderService {
|
|||||||
|
|
||||||
SimpleUserInfoDTO userInfoDTO = jwtUtil.getUserInfoFromToken();
|
SimpleUserInfoDTO userInfoDTO = jwtUtil.getUserInfoFromToken();
|
||||||
|
|
||||||
String redisLockKey = RedisKeyConstants.ORDER_SUB_KEY + userInfoDTO.getUserId();
|
|
||||||
if(redisUtil.getRedisLock(redisLockKey, "租车下单")) {
|
|
||||||
try{
|
|
||||||
//获取门店信息
|
//获取门店信息
|
||||||
CompanyStoreDTO companyStoreDTO = storeInteg.getStoreById(Integer.valueOf(rentCarOrderReq.getStoreId().toString()));
|
CompanyStoreDTO companyStoreDTO = storeInteg.getStoreById(Integer.valueOf(rentCarOrderReq.getStoreId().toString()));
|
||||||
|
|
||||||
@ -75,6 +72,10 @@ public class OrderServiceImpl implements OrderService {
|
|||||||
rentBatteyRuleDTO = carInteg.getRentBatteyRuleByBatteyRuleId(rentCarOrderReq.getRentBatteyRuleId());
|
rentBatteyRuleDTO = carInteg.getRentBatteyRuleByBatteyRuleId(rentCarOrderReq.getRentBatteyRuleId());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
String redisLockKey = RedisKeyConstants.ORDER_SUB_KEY + userInfoDTO.getUserId();
|
||||||
|
if(redisUtil.getRedisLock(redisLockKey, "租车下单")) {
|
||||||
|
try{
|
||||||
|
|
||||||
//TODO 这里保存订单要做事物处理
|
//TODO 这里保存订单要做事物处理
|
||||||
//生成订单主表
|
//生成订单主表
|
||||||
OrderMainPO orderMainPO = OrderConvert.INSTANCE.subOrderToPo(rentCarOrderReq, userInfoDTO, rentCarRuleDTO);
|
OrderMainPO orderMainPO = OrderConvert.INSTANCE.subOrderToPo(rentCarOrderReq, userInfoDTO, rentCarRuleDTO);
|
||||||
|
|||||||
Reference in New Issue
Block a user