|
@@ -1,6 +1,6 @@
|
|
|
package com.dragoninfo.dcuc.auth.gm.service.impl;
|
|
|
|
|
|
-import com.dragoninfo.dcuc.auth.auth.entity.AppFunInfo;
|
|
|
+import com.dragoninfo.dcuc.auth.gm.business.IGmBusiness;
|
|
|
import com.dragoninfo.dcuc.auth.gm.entity.AppFunInfoGm;
|
|
|
import com.dragoninfo.dcuc.auth.gm.repository.AppFunInfoGmRepository;
|
|
|
import com.dragoninfo.dcuc.auth.gm.service.IAppFunInfoGmService;
|
|
@@ -25,6 +25,9 @@ public class AppFunInfoGmServiceImpl implements IAppFunInfoGmService {
|
|
|
@Autowired
|
|
|
private AppFunInfoGmRepository appFunInfoGmRepository;
|
|
|
|
|
|
+ @Autowired
|
|
|
+ private IGmBusiness gmBusiness;
|
|
|
+
|
|
|
@Override
|
|
|
public void save(AppFunInfoGm appFunInfoGm) {
|
|
|
appFunInfoGmRepository.save(appFunInfoGm);
|
|
@@ -51,28 +54,39 @@ public class AppFunInfoGmServiceImpl implements IAppFunInfoGmService {
|
|
|
}
|
|
|
|
|
|
@Override
|
|
|
- public List<AppFunInfoGm> findByAppIdAndIsActive(String appId) {
|
|
|
- return appFunInfoGmRepository.findByAppIdAndIsActive(appId);
|
|
|
+ public void findByAppIdAndIsActive(String appId) {
|
|
|
+ List<AppFunInfoGm> appFunInfoGmList = appFunInfoGmRepository.findByAppIdAndIsActive(appId);
|
|
|
+ for (AppFunInfoGm appFunInfoGm : appFunInfoGmList) {
|
|
|
+ gmBusiness.checkAppFunInfo(appFunInfoGm);
|
|
|
+ }
|
|
|
}
|
|
|
|
|
|
@Override
|
|
|
- public List<AppFunInfoGm> getRoot(String appId) {
|
|
|
- return appFunInfoGmRepository.getRoot(appId);
|
|
|
+ public void getRoot(String appId) {
|
|
|
+ List<AppFunInfoGm> appFunInfoGmList = appFunInfoGmRepository.getRoot(appId);
|
|
|
+ for (AppFunInfoGm appFunInfoGm : appFunInfoGmList) {
|
|
|
+ gmBusiness.checkAppFunInfo(appFunInfoGm);
|
|
|
+ }
|
|
|
}
|
|
|
|
|
|
@Override
|
|
|
- public List<AppFunInfoGm> getById(String id) {
|
|
|
- return appFunInfoGmRepository.getById(id);
|
|
|
+ public void getById(String id) {
|
|
|
+ AppFunInfoGm appFunInfoGm = appFunInfoGmRepository.getById(id);
|
|
|
+ gmBusiness.checkAppFunInfo(appFunInfoGm);
|
|
|
}
|
|
|
|
|
|
@Override
|
|
|
- public List<AppFunInfo> getByCodes(String codes) {
|
|
|
- return appFunInfoGmRepository.getByCodes(codes);
|
|
|
+ public void getByCodes(String codes) {
|
|
|
+ List<AppFunInfoGm> appFunInfoList = appFunInfoGmRepository.getByCodes(codes);
|
|
|
+ for (AppFunInfoGm appFunInfoGm : appFunInfoList) {
|
|
|
+ gmBusiness.checkAppFunInfo(appFunInfoGm);
|
|
|
+ }
|
|
|
}
|
|
|
|
|
|
@Override
|
|
|
- public AppFunInfoGm getByCode(String code) {
|
|
|
- return appFunInfoGmRepository.getByCode(code);
|
|
|
+ public void getByCode(String code) {
|
|
|
+ AppFunInfoGm appFunInfoGm = appFunInfoGmRepository.getByCode(code);
|
|
|
+ gmBusiness.checkAppFunInfo(appFunInfoGm);
|
|
|
}
|
|
|
|
|
|
@Override
|
|
@@ -80,12 +94,4 @@ public class AppFunInfoGmServiceImpl implements IAppFunInfoGmService {
|
|
|
appFunInfoGmRepository.deleteAllInBatch();
|
|
|
}
|
|
|
|
|
|
- @Override
|
|
|
- public void saveOrUpdate(AppFunInfoGm appFunInfoGm) {
|
|
|
- if (appFunInfoGm.getId() == null) {
|
|
|
- appFunInfoGmRepository.save(appFunInfoGm);
|
|
|
- } else {
|
|
|
- appFunInfoGmRepository.update(appFunInfoGm);
|
|
|
- }
|
|
|
- }
|
|
|
}
|