From 12839311c5a9df96529ae45b9d15db254ad9e3ec Mon Sep 17 00:00:00 2001 From: e Date: Sun, 15 Sep 2019 16:43:28 +0800 Subject: [PATCH] =?UTF-8?q?=E6=9B=B4=E6=96=B0=E7=BC=96=E7=A0=81=E6=96=B9?= =?UTF-8?q?=E5=BC=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/main/java/com/zzjee/wmutil/wmUtil.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/main/java/com/zzjee/wmutil/wmUtil.java b/src/main/java/com/zzjee/wmutil/wmUtil.java index 14c0d786..7077721b 100644 --- a/src/main/java/com/zzjee/wmutil/wmUtil.java +++ b/src/main/java/com/zzjee/wmutil/wmUtil.java @@ -56,7 +56,7 @@ public class wmUtil { SystemService systemService =ApplicationContextUtil.getContext().getBean(SystemService.class); Map countMap = systemService - .findOneForJdbc("SELECT count(*)+1 as count FROM wm_im_notice_h t where TO_DAYS(t.create_date) = TO_DAYS(NOW());"); + .findOneForJdbc("SELECT right(ifnull(max(notice_id),0),4)+1 as count FROM wm_im_notice_h t where TO_DAYS(t.create_date) = TO_DAYS(NOW());"); if (StringUtil.isEmpty(orderType)){ orderType = "01"; } @@ -107,7 +107,7 @@ public class wmUtil { public static String getNextomNoticeId(String orderType){ SystemService systemService =ApplicationContextUtil.getContext().getBean(SystemService.class); Map countMap = systemService - .findOneForJdbc("SELECT count(*)+1 as count FROM wm_om_notice_h t where TO_DAYS(t.create_date) = TO_DAYS(NOW());"); + .findOneForJdbc("SELECT right(ifnull(max(om_notice_id),0),4)+1 count FROM wm_om_notice_h t where TO_DAYS(t.create_date) = TO_DAYS(NOW());"); String noticeid = null; if (StringUtil.isEmpty(orderType)){ orderType = "11";