增加支付/缴费/提现
This commit is contained in:
parent
d8ea64c8a6
commit
9f4d4792aa
30
src/main/java/cn/com/tenlion/systemcard/util/PayUtil.java
Normal file
30
src/main/java/cn/com/tenlion/systemcard/util/PayUtil.java
Normal file
@ -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) {
|
||||
// 可以提现
|
||||
}
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue
Block a user