|
@@ -69,8 +69,24 @@ public class SysPublicParamServiceImpl extends ServiceImpl<SysPublicParamMapper,
|
|
|
@Override
|
|
|
public Results<String> getWeekParam() {
|
|
|
LocalDateTime now = LocalDateTime.now();
|
|
|
- LocalDateTime end = now.plusDays(1).plusNanos(-1);
|
|
|
- LocalDateTime start = now.withHour(20).withMinute(0).withSecond(0).withNano(0);
|
|
|
+ LocalDateTime end = now.plusDays(1).withHour(0).withMinute(0).withSecond(0).plusNanos(-1);
|
|
|
+ SysPublicParam startParam = getOne(Wrappers.<SysPublicParam>lambdaQuery().eq(SysPublicParam::getPublicKey,CHAO_XIANG_PARAM_PRE+"START"));
|
|
|
+ Integer hour = 20;
|
|
|
+ Integer min = 0;
|
|
|
+ Integer second = 0;
|
|
|
+ if (startParam ==null&&startParam.getPublicValue()!=null){
|
|
|
+ String[] params = startParam.getPublicValue().split(":");
|
|
|
+ if (params.length>0){
|
|
|
+ hour = Integer.valueOf(params[0]);
|
|
|
+ }
|
|
|
+ if (params.length>1){
|
|
|
+ min = Integer.valueOf(params[1]);
|
|
|
+ }
|
|
|
+ if (params.length>2){
|
|
|
+ second = Integer.valueOf(params[2]);
|
|
|
+ }
|
|
|
+ }
|
|
|
+ LocalDateTime start = now.withHour(hour).withMinute(min).withSecond(second).withNano(0);
|
|
|
if (now.isBefore(end)&&now.isAfter(start)){
|
|
|
int i = LocalDateTime.now().getDayOfWeek().getValue();
|
|
|
SysPublicParam publicParam = getOne(Wrappers.<SysPublicParam>lambdaQuery().eq(SysPublicParam::getPublicKey,CHAO_XIANG_PARAM_PRE+i));
|