Merge remote-tracking branch 'origin/test' into test
This commit is contained in:
commit
04bc369859
|
|
@ -98,10 +98,18 @@ public class AppCashController {
|
|||
|
||||
Calendar calendar = Calendar.getInstance();
|
||||
int hour = calendar.get(Calendar.HOUR_OF_DAY);
|
||||
if (hour < 8 || hour > 18) {
|
||||
return Result.error("提现时间为每天8:00-18:00");
|
||||
CommonInfo info = commonInfoService.findOne(930);
|
||||
if (info == null) {
|
||||
return Result.error("当前时间段未开启提现功能");
|
||||
}
|
||||
String[] timeScope = info.getValue().split("~");
|
||||
String today = DateUtil.today();
|
||||
Date beginTime = DateUtil.parseDateTime(today + " " + timeScope[0]);
|
||||
Date endTime = DateUtil.parseDateTime(today + " " + timeScope[1]);
|
||||
boolean in = DateUtil.isIn(new Date(), beginTime, endTime);
|
||||
if (!in) {
|
||||
return Result.error(StrUtil.format("提现时间为每天{}", info.getValue()));
|
||||
}
|
||||
|
||||
double money = Double.parseDouble(commonInfoService.findOne(929).getValue());
|
||||
Double v = cashOutService.queryUserTodayCashAmount(userId);
|
||||
if (v == null) {
|
||||
|
|
@ -151,5 +159,17 @@ public class AppCashController {
|
|||
return userMoneyDetailsService.queryUserMoneyDetails(page, limit, null, userId, classify, type, moneyType, 0);
|
||||
}
|
||||
|
||||
public static void main(String[] args) {
|
||||
String[] timeScope = "16:01:02~18:01:02".split("~");
|
||||
String today = DateUtil.today();
|
||||
Date beginTime = DateUtil.parseDateTime(today + " " + timeScope[0]);
|
||||
Date endTime = DateUtil.parseDateTime(today + " " + timeScope[1]);
|
||||
boolean in = DateUtil.isIn(new Date(), beginTime, endTime);
|
||||
if (in) {
|
||||
System.out.println("在活动时间内");
|
||||
} else {
|
||||
System.err.println("外");
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue