更新租户发送短信提醒的时间
This commit is contained in:
parent
bd16dc8f23
commit
aa391e89bc
@ -38,15 +38,15 @@ public class XhpcTenantTask {
|
||||
|
||||
|
||||
/**
|
||||
* 每天一点自动清理过期租户
|
||||
* 提前15天通知即将到期的租户
|
||||
*/
|
||||
@Scheduled(cron = "0 0 14 * * ? ")
|
||||
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);
|
||||
for(XhpcTenantDomain domain: expireDomainList){
|
||||
// todo 发短信提醒
|
||||
|
||||
if (StringUtils.isEmpty(domain.getContactNumber())){
|
||||
continue;
|
||||
}
|
||||
|
||||
@ -273,7 +273,7 @@
|
||||
select
|
||||
<include refid="Base_Column_List" />
|
||||
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>
|
||||
|
||||
</mapper>
|
||||
Loading…
x
Reference in New Issue
Block a user