Search in sources :

Example 61 with CacheEvict

use of org.springframework.cache.annotation.CacheEvict in project fw-cloud-framework by liuweijw.

the class DictServiceImpl method delById.

@Override
@Transactional
@CacheEvict(allEntries = true)
public boolean delById(Integer id) {
    if (null == id || id <= 0)
        return Boolean.FALSE;
    QDict qDict = QDict.dict;
    long num = // 0 正常 1删除
    this.queryFactory.update(qDict).set(qDict.statu, 1).where(qDict.id.eq(id.intValue())).execute();
    return num > 0;
}
Also used : QDict(com.github.liuweijw.business.admin.domain.QDict) CacheEvict(org.springframework.cache.annotation.CacheEvict) Transactional(org.springframework.transaction.annotation.Transactional)

Example 62 with CacheEvict

use of org.springframework.cache.annotation.CacheEvict in project fw-cloud-framework by liuweijw.

the class MenuServiceImpl method delById.

@Override
@Transactional
@CacheEvict(allEntries = true)
public boolean delById(Integer menuId) {
    QMenu qMenu = QMenu.menu;
    long num = this.queryFactory.delete(qMenu).where(qMenu.menuId.eq(menuId.intValue())).execute();
    return num > 0;
}
Also used : QMenu(com.github.liuweijw.business.admin.domain.QMenu) CacheEvict(org.springframework.cache.annotation.CacheEvict) Transactional(org.springframework.transaction.annotation.Transactional)

Example 63 with CacheEvict

use of org.springframework.cache.annotation.CacheEvict in project fw-cloud-framework by liuweijw.

the class RoleServiceImpl method delById.

@Override
@Transactional
@CacheEvict(allEntries = true)
public boolean delById(Integer roleId) {
    if (null == roleId || roleId <= 0)
        return Boolean.FALSE;
    QRole qRole = QRole.role;
    long num = this.queryFactory.update(qRole).set(qRole.statu, // 0 正常 1删除
    1).where(qRole.roleId.eq(roleId.intValue())).execute();
    return num > 0;
}
Also used : QRole(com.github.liuweijw.business.admin.domain.QRole) CacheEvict(org.springframework.cache.annotation.CacheEvict) Transactional(org.springframework.transaction.annotation.Transactional)

Example 64 with CacheEvict

use of org.springframework.cache.annotation.CacheEvict in project fw-cloud-framework by liuweijw.

the class UserServiceImpl method delByUserId.

@Override
@Transactional
@CacheEvict(allEntries = true)
public Boolean delByUserId(Integer userId) {
    if (null == userId || userId <= 0)
        return Boolean.FALSE;
    QUser qUser = QUser.user;
    long num = // 0 正常 1删除
    this.queryFactory.update(qUser).set(qUser.statu, 1).where(qUser.userId.eq(userId.intValue())).execute();
    return num > 0;
}
Also used : QUser(com.github.liuweijw.business.admin.domain.QUser) CacheEvict(org.springframework.cache.annotation.CacheEvict) Transactional(org.springframework.transaction.annotation.Transactional)

Aggregations

CacheEvict (org.springframework.cache.annotation.CacheEvict)64 Transactional (org.springframework.transaction.annotation.Transactional)17 ApsSystemException (com.agiletec.aps.system.exception.ApsSystemException)14 Date (java.util.Date)8 ArrayList (java.util.ArrayList)6 CacheInfoEvict (org.entando.entando.aps.system.services.cache.CacheInfoEvict)5 DataValidationException (org.thingsboard.server.dao.exception.DataValidationException)5 EntityView (org.thingsboard.server.common.data.EntityView)4 QUser (com.github.liuweijw.business.admin.domain.QUser)3 MetacatRequestContext (com.netflix.metacat.common.MetacatRequestContext)3 ConnectorRequestContext (com.netflix.metacat.common.server.connectors.ConnectorRequestContext)3 ConnectorTableService (com.netflix.metacat.common.server.connectors.ConnectorTableService)3 ExecutionException (java.util.concurrent.ExecutionException)3 ConstraintViolationException (org.hibernate.exception.ConstraintViolationException)3 QMenu (com.github.liuweijw.business.admin.domain.QMenu)2 QRole (com.github.liuweijw.business.admin.domain.QRole)2 QUserRole (com.github.liuweijw.business.admin.domain.QUserRole)2 Role (com.github.liuweijw.business.admin.domain.Role)2 User (com.github.liuweijw.business.admin.domain.User)2 UserRole (com.github.liuweijw.business.admin.domain.UserRole)2