Search in sources :

Example 1 with QUrlInfo

use of com.github.liuweijw.business.wechat.domain.QUrlInfo in project fw-cloud-framework by liuweijw.

the class UrlInfoServiceImpl method clearAllExpire.

@Override
@Transactional
public long clearAllExpire() {
    QUrlInfo qUrlInfo = QUrlInfo.urlInfo;
    // 删除十分钟前的历史数据
    long beforeTime = System.currentTimeMillis() - 600000;
    return this.queryFactory.delete(qUrlInfo).where(qUrlInfo.time.longValue().lt(beforeTime)).execute();
}
Also used : QUrlInfo(com.github.liuweijw.business.wechat.domain.QUrlInfo) Transactional(org.springframework.transaction.annotation.Transactional)

Example 2 with QUrlInfo

use of com.github.liuweijw.business.wechat.domain.QUrlInfo in project fw-cloud-framework by liuweijw.

the class UrlInfoServiceImpl method findByUuid.

@Override
public UrlInfo findByUuid(String uuid) {
    if (StringHelper.isBlank(uuid))
        return null;
    QUrlInfo qUrlInfo = QUrlInfo.urlInfo;
    UrlInfo dbUrlInfo = this.queryFactory.selectFrom(qUrlInfo).where(qUrlInfo.uuid.eq(uuid)).fetchFirst();
    return dbUrlInfo;
}
Also used : QUrlInfo(com.github.liuweijw.business.wechat.domain.QUrlInfo) QUrlInfo(com.github.liuweijw.business.wechat.domain.QUrlInfo) UrlInfo(com.github.liuweijw.business.wechat.domain.UrlInfo)

Aggregations

QUrlInfo (com.github.liuweijw.business.wechat.domain.QUrlInfo)2 UrlInfo (com.github.liuweijw.business.wechat.domain.UrlInfo)1 Transactional (org.springframework.transaction.annotation.Transactional)1