更新租户发送短信提醒的时间

This commit is contained in:
panshuling321 2022-02-14 09:45:54 +08:00
parent bd16dc8f23
commit aa391e89bc
2 changed files with 4 additions and 4 deletions

View File

@ -38,15 +38,15 @@ public class XhpcTenantTask {
/** /**
* 每天一点自动清理过期租户 * 提前15天通知即将到期的租户
*/ */
@Scheduled(cron = "0 0 14 * * ? ") @Scheduled(cron = "0 0 14 * * ? ")
private void ExpiringTenantSmsTask(){ private void ExpiringTenantSmsTask(){
String expireTime = DateUtil.formatDateTime(com.xhpc.common.util.DateUtil.addDay(new Date(), -15)); String expireTime = DateUtil.formatDate(com.xhpc.common.util.DateUtil.addDay(new Date(), 15));
List<XhpcTenantDomain> expireDomainList = tenantMapper.selectExpiringList(expireTime); List<XhpcTenantDomain> expireDomainList = tenantMapper.selectExpiringList(expireTime);
for(XhpcTenantDomain domain: expireDomainList){ for(XhpcTenantDomain domain: expireDomainList){
// todo 发短信提醒
if (StringUtils.isEmpty(domain.getContactNumber())){ if (StringUtils.isEmpty(domain.getContactNumber())){
continue; continue;
} }

View File

@ -273,7 +273,7 @@
select select
<include refid="Base_Column_List" /> <include refid="Base_Column_List" />
from xhpc_tenant from xhpc_tenant
where is_deleted = 0 and status = 1 and expire_time is not null and expire_time <![CDATA[ <= ]]> #{expireTime} where is_deleted = 0 and status = 1 and expire_time is not null and DATE_FORMAT(expire_time,'%Y-%m-%d') <![CDATA[ = ]]> #{expireTime}
</select> </select>
</mapper> </mapper>