|
@@ -25,7 +25,6 @@ import com.dragonsoft.duceap.base.entity.http.ResponseStatus;
|
|
|
import com.dragonsoft.duceap.base.entity.search.SearchDTO;
|
|
|
import com.dragonsoft.duceap.base.entity.uploader.FileHolder;
|
|
|
import com.dragonsoft.duceap.base.enums.BooleanEnum;
|
|
|
-import com.dragonsoft.duceap.cache.annotaion.BatchCachePut;
|
|
|
import com.dragonsoft.duceap.core.context.ContextUtils;
|
|
|
import com.dragonsoft.duceap.core.search.Searchable;
|
|
|
import com.dragonsoft.duceap.mybaitsplus.core.services.BaseMybatisService;
|
|
@@ -49,7 +48,7 @@ import java.util.stream.Collectors;
|
|
|
* @author huangzqa
|
|
|
* @date 2020/10/27
|
|
|
*/
|
|
|
-@CacheConfig(cacheNames = "DCUC-APP")
|
|
|
+@CacheConfig(cacheNames = "DCUC-APP:app")
|
|
|
@Service
|
|
|
public class ApplyInfoServiceImpl extends BaseMybatisService<ApplyInfo, String> implements IApplyInfoService {
|
|
|
|
|
@@ -75,7 +74,7 @@ public class ApplyInfoServiceImpl extends BaseMybatisService<ApplyInfo, String>
|
|
|
@Autowired
|
|
|
private IPermissionNotificationFacade permissionNotificationFacade;
|
|
|
|
|
|
- @Cacheable(key = "targetClass + methodName+#p0")
|
|
|
+ @Cacheable(key = "targetClass +#p0")
|
|
|
@Override
|
|
|
public ApplyInfo applyDetail(String id) {
|
|
|
return applyInfoMapper.selectById(id);
|
|
@@ -175,7 +174,7 @@ public class ApplyInfoServiceImpl extends BaseMybatisService<ApplyInfo, String>
|
|
|
return applyInfo;
|
|
|
}
|
|
|
|
|
|
- @CacheEvict(key = "targetClass +#p0")
|
|
|
+ @CacheEvict(value = "DCUC-APP:app", allEntries = true)
|
|
|
@Transactional(rollbackFor = Exception.class)
|
|
|
@Override
|
|
|
public void del(String id) {
|
|
@@ -195,7 +194,7 @@ public class ApplyInfoServiceImpl extends BaseMybatisService<ApplyInfo, String>
|
|
|
return applyInfoMapper.getNewSort();
|
|
|
}
|
|
|
|
|
|
- @CacheEvict(key = "targetClass +#p0")
|
|
|
+ @CacheEvict(value = "DCUC-APP:app", allEntries = true)
|
|
|
@Transactional(rollbackFor = Exception.class)
|
|
|
@Override
|
|
|
public String startOrStop(String id) {
|
|
@@ -219,7 +218,7 @@ public class ApplyInfoServiceImpl extends BaseMybatisService<ApplyInfo, String>
|
|
|
return message;
|
|
|
}
|
|
|
|
|
|
- @CacheEvict(key = "targetClass +#p0")
|
|
|
+ @CacheEvict(value = "DCUC-APP:app", allEntries = true)
|
|
|
@Transactional(rollbackFor = Exception.class)
|
|
|
@Override
|
|
|
public void sortApp(String id, String target) {
|
|
@@ -258,6 +257,7 @@ public class ApplyInfoServiceImpl extends BaseMybatisService<ApplyInfo, String>
|
|
|
return id;
|
|
|
}
|
|
|
|
|
|
+ @Cacheable(key = "targetClass + methodName+#p0")
|
|
|
@Override
|
|
|
public String convertIdsToNames(String projectIds) {
|
|
|
|
|
@@ -304,11 +304,11 @@ public class ApplyInfoServiceImpl extends BaseMybatisService<ApplyInfo, String>
|
|
|
@Override
|
|
|
public ApplyInfo getAppByAppUrl(String applyUrl) {
|
|
|
LambdaQueryWrapper<ApplyInfo> queryWrapper = Wrappers.lambdaQuery();
|
|
|
- queryWrapper.eq(ApplyInfo::getApplyUrl,applyUrl);
|
|
|
+ queryWrapper.eq(ApplyInfo::getApplyUrl, applyUrl);
|
|
|
List<ApplyInfo> applyInfos = applyInfoMapper.selectList(queryWrapper);
|
|
|
- if(CollectionUtils.isNotEmpty(applyInfos)){
|
|
|
+ if (CollectionUtils.isNotEmpty(applyInfos)) {
|
|
|
return applyInfos.get(0);
|
|
|
- }else{
|
|
|
+ } else {
|
|
|
return null;
|
|
|
}
|
|
|
|
|
@@ -318,8 +318,8 @@ public class ApplyInfoServiceImpl extends BaseMybatisService<ApplyInfo, String>
|
|
|
@Override
|
|
|
public List<ApplyInfo> getIdsByCodes(List<String> appCodes) {
|
|
|
LambdaQueryWrapper<ApplyInfo> queryWrapper = Wrappers.lambdaQuery();
|
|
|
- queryWrapper.select(ApplyInfo::getId,ApplyInfo::getApplyCode)
|
|
|
- .in(ApplyInfo::getApplyCode,appCodes);
|
|
|
+ queryWrapper.select(ApplyInfo::getId, ApplyInfo::getApplyCode)
|
|
|
+ .in(ApplyInfo::getApplyCode, appCodes);
|
|
|
return applyInfoMapper.selectList(queryWrapper);
|
|
|
}
|
|
|
|
|
@@ -360,7 +360,7 @@ public class ApplyInfoServiceImpl extends BaseMybatisService<ApplyInfo, String>
|
|
|
return ResponseStatus.success();
|
|
|
}
|
|
|
|
|
|
- @BatchCachePut
|
|
|
+ @CacheEvict(value = "DCUC-APP:app", allEntries = true)
|
|
|
@Transactional(rollbackFor = Exception.class)
|
|
|
@Override
|
|
|
public void updateOrgInfos(String orgId, String orgName) {
|
|
@@ -394,7 +394,7 @@ public class ApplyInfoServiceImpl extends BaseMybatisService<ApplyInfo, String>
|
|
|
return applyInfoMapper.selectList(queryWrapper);
|
|
|
}
|
|
|
|
|
|
- @BatchCachePut()
|
|
|
+ @CacheEvict(value = "DCUC-APP:app", allEntries = true)
|
|
|
@Transactional(rollbackFor = Exception.class)
|
|
|
@Override
|
|
|
public void saveDutyMan(String dutyProject, String userId, String mobileWork) {
|