|
@@ -73,8 +73,10 @@ import com.zhongzheng.modules.inform.vo.InformRemindBusinessVo;
|
|
|
import com.zhongzheng.modules.inform.vo.InformRemindVo;
|
|
|
import com.zhongzheng.modules.order.domain.OrderGoods;
|
|
|
import com.zhongzheng.modules.order.service.IOrderGoodsService;
|
|
|
+import com.zhongzheng.modules.system.domain.SysConfig;
|
|
|
import com.zhongzheng.modules.system.domain.SysTask;
|
|
|
import com.zhongzheng.modules.system.domain.SysTenant;
|
|
|
+import com.zhongzheng.modules.system.service.ISysConfigService;
|
|
|
import com.zhongzheng.modules.system.service.ISysTaskService;
|
|
|
import com.zhongzheng.modules.system.service.ISysTenantService;
|
|
|
import com.zhongzheng.modules.system.vo.SysTaskVo;
|
|
@@ -194,6 +196,8 @@ public class UserSubscribeServiceImpl extends ServiceImpl<UserSubscribeMapper, U
|
|
|
@Autowired
|
|
|
private ISysTenantService iSysTenantService;
|
|
|
@Autowired
|
|
|
+ private ISysConfigService iSysConfigService;
|
|
|
+ @Autowired
|
|
|
private ISysTaskService iSysTaskService;
|
|
|
|
|
|
@Value("${aliyun.sms.cancellationReminder}")
|
|
@@ -2275,7 +2279,13 @@ public class UserSubscribeServiceImpl extends ServiceImpl<UserSubscribeMapper, U
|
|
|
.last("limit 1"));
|
|
|
if (ObjectUtils.isNotNull(siteTime)){
|
|
|
Long examTime = siteTime.getExamTime();
|
|
|
- Long applyEndTime = getApplyEndTime(examTime, 7);
|
|
|
+ String tenantId = ServletUtils.getRequest().getHeader("TenantId");
|
|
|
+ SysConfig config = iSysConfigService.getSysConfigByKeyTenant("subscribe.astrict", Long.valueOf(tenantId));
|
|
|
+ Integer day = 7;
|
|
|
+ if (ObjectUtil.isNotNull(config)){
|
|
|
+ day = Integer.valueOf(config.getConfigValue());
|
|
|
+ }
|
|
|
+ Long applyEndTime = getApplyEndTime(examTime, day);
|
|
|
if (DateUtils.getNowTime() >= applyEndTime){
|
|
|
throw new CustomException("该考试场次已停止预约,请选择其他场次");
|
|
|
}
|