Commit d0cf3625 authored by 332784038@qq.com's avatar 332784038@qq.com

Merge branch 'release-fix' into release

parents ed6f5ec1 a47c2b86
......@@ -160,6 +160,16 @@ public class OrderController {
}
@PostMapping("/copy/{copyOrderId}")
@ApiOperation("复制订单")
@DynamicRateLimiter(base = "#Headers['Authorization']", permits = 1)
@Idempotent(timeout = 5)
public CommonResult<Long> copyOrder(@PathVariable Long copyOrderId) {
Long orderId = orderService.copyOrder(copyOrderId, null);
return success(orderId);
}
@PutMapping("/update")
@ApiOperation("更新订单")
@Idempotent(timeout = 5)
......
......@@ -158,6 +158,28 @@ public class MyOrderController {
return success(orderService.createOrder(createReqVO, memberUserDO).getOrderId());
}
@PostMapping("/copy/{copyOrderId}")
@DynamicRateLimiter(base = "#Headers['Authorization']", permits = 1)
@ApiOperation(value = "复制订单", notes = "发货人只取当前用户信息,收货人取当前用户的客户信息")
@Idempotent(timeout = 15)
@PreAuthenticated
public CommonResult<Long> copyOrder(@PathVariable Long copyOrderId) {
LoginUser loginUser = SecurityFrameworkUtils.getLoginUser();
Integer userType = loginUser.getUserType();
if (userType != 1){
return error(UNAUTHORIZED);
}
Long userId = loginUser.getId();
MemberUserDO memberUserDO = memberUserService.info(userId);
if (Objects.isNull(memberUserDO) ||
memberUserDO.getStatus() == 1 ||
memberUserDO.getDeleted()) {
return error(MEMBER_NOT_EXISTS);
}
Long orderId = orderService.copyOrder(copyOrderId, memberUserDO);
return success(orderId);
}
@PostMapping("/checkKycStatus")
@ApiOperation("检查kyc状态")
public CommonResult<Boolean> checkKycStatus(OrderKycReqVO kycReqVO) {
......
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