From 82e46675a98f8bb92a02bb1d9a7eb82328195c06 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=83=91=E6=98=8E=E6=A2=81?= <2429105222@qq.com> Date: Mon, 8 May 2023 19:36:13 +0800 Subject: [PATCH] =?UTF-8?q?=E8=AE=A2=E5=8D=95=E7=AE=A1=E7=90=86id=E9=97=AE?= =?UTF-8?q?=E9=A2=98=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../com/glxp/api/controller/purchase/PurOrderController.java | 2 ++ src/main/java/com/glxp/api/res/purchase/PurOrderResponse.java | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/src/main/java/com/glxp/api/controller/purchase/PurOrderController.java b/src/main/java/com/glxp/api/controller/purchase/PurOrderController.java index a7523de59..6b27cf2cd 100644 --- a/src/main/java/com/glxp/api/controller/purchase/PurOrderController.java +++ b/src/main/java/com/glxp/api/controller/purchase/PurOrderController.java @@ -1,5 +1,6 @@ package com.glxp.api.controller.purchase; +import cn.hutool.core.util.IdUtil; import com.github.pagehelper.PageInfo; import com.glxp.api.annotation.AuthRuleAnnotation; import com.glxp.api.annotation.RepeatSubmit; @@ -334,6 +335,7 @@ public class PurOrderController { public BaseResponse add() { Long userId = customerService.getUserId(); PurOrderEntity purOrderEntity = new PurOrderEntity(); + purOrderEntity.setId(IdUtil.getSnowflakeNextId()); purOrderEntity.setCreateUser(userId + ""); purOrderEntity.setCreateTime(new Date()); purOrderEntity.setUpdateTime(new Date()); diff --git a/src/main/java/com/glxp/api/res/purchase/PurOrderResponse.java b/src/main/java/com/glxp/api/res/purchase/PurOrderResponse.java index a18514b6e..1e3ce05c6 100644 --- a/src/main/java/com/glxp/api/res/purchase/PurOrderResponse.java +++ b/src/main/java/com/glxp/api/res/purchase/PurOrderResponse.java @@ -10,7 +10,7 @@ public class PurOrderResponse { /** * */ - private Integer id; + private Long id; /** * 单据号 */