From 9f4d4792aa6a44a370bdf07fb1d401631c6f54b1 Mon Sep 17 00:00:00 2001 From: cuibaocheng Date: Thu, 2 Sep 2021 10:34:16 +0800 Subject: [PATCH] =?UTF-8?q?=E5=A2=9E=E5=8A=A0=E6=94=AF=E4=BB=98/=E7=BC=B4?= =?UTF-8?q?=E8=B4=B9/=E6=8F=90=E7=8E=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../com/tenlion/systemcard/util/PayUtil.java | 30 +++++++++++++++++++ 1 file changed, 30 insertions(+) create mode 100644 src/main/java/cn/com/tenlion/systemcard/util/PayUtil.java diff --git a/src/main/java/cn/com/tenlion/systemcard/util/PayUtil.java b/src/main/java/cn/com/tenlion/systemcard/util/PayUtil.java new file mode 100644 index 0000000..72f7812 --- /dev/null +++ b/src/main/java/cn/com/tenlion/systemcard/util/PayUtil.java @@ -0,0 +1,30 @@ +package cn.com.tenlion.systemcard.util; + +import cn.com.tenlion.projectconfig.util.ProjectConfigUtil; +import ink.wgink.interfaces.consts.ISystemConstant; +import org.joda.time.DateTime; +import org.joda.time.Days; +import org.joda.time.format.DateTimeFormat; + +public class PayUtil { + + /** + * 将double的价格转为int + * @param d + * @return + */ + public static Integer buiderMoney(Double d) { + return (int)(d * 100); + } + + public static void main(String[] args) { + String registerTime = "2021-08-31 08:09:09"; + DateTime registerDateTime = DateTime.parse(registerTime, DateTimeFormat.forPattern(ISystemConstant.DATE_FORMATTER_YYYY_MM_DD_HH_MM_SS)); + // DateTime withdrawDateTime = registerDateTime.plusDays(3); + int lastDay = Days.daysBetween(registerDateTime , DateTime.now()).getDays(); + System.out.println(lastDay); + if(lastDay > 0) { + // 可以提现 + } + } +}