[AppleScript] 纯文本查看 复制代码
@RequestMapping("/submitOrder")
public Result submitOrder(Long seckillId){
String userId =
SecurityContextHolder.getContext().getAuthentication().getName();
if("anonymousUser".equals(userId)){//如果未登录
return new Result(false, "用户未登录");
}
try {
seckillOrderService.submitOrder(seckillId, userId);
return new Result(true, "提交成功");
}catch (RuntimeException e) {
e.printStackTrace();
return new Result(false, e.getMessage());
} catch (Exception e) {
e.printStackTrace();
return new Result(false, "提交失败");
}
}