|
@@ -2,9 +2,11 @@ package com.dragoninfo.dcuc.auth.auth.service.impl;
|
|
|
|
|
|
|
|
|
|
import cn.hutool.core.util.StrUtil;
|
|
import cn.hutool.core.util.StrUtil;
|
|
|
|
+import com.dragoninfo.dcuc.app.entity.ApplyInfo;
|
|
import com.dragoninfo.dcuc.app.entity.ServiceResource;
|
|
import com.dragoninfo.dcuc.app.entity.ServiceResource;
|
|
import com.dragoninfo.dcuc.app.facade.IApplyInfoFacade;
|
|
import com.dragoninfo.dcuc.app.facade.IApplyInfoFacade;
|
|
import com.dragoninfo.dcuc.app.facade.IResourceFacade;
|
|
import com.dragoninfo.dcuc.app.facade.IResourceFacade;
|
|
|
|
+import com.dragoninfo.dcuc.app.facade.IServiceResourceFacade;
|
|
import com.dragoninfo.dcuc.auth.auth.async.PermssionServiceUpdateEventBus;
|
|
import com.dragoninfo.dcuc.auth.auth.async.PermssionServiceUpdateEventBus;
|
|
import com.dragoninfo.dcuc.auth.auth.bpo.ServiceAuthResultBPO;
|
|
import com.dragoninfo.dcuc.auth.auth.bpo.ServiceAuthResultBPO;
|
|
import com.dragoninfo.dcuc.auth.auth.dto.AppServiceCodeDto;
|
|
import com.dragoninfo.dcuc.auth.auth.dto.AppServiceCodeDto;
|
|
@@ -32,6 +34,7 @@ import org.springframework.beans.factory.annotation.Autowired;
|
|
import org.springframework.data.domain.Page;
|
|
import org.springframework.data.domain.Page;
|
|
import org.springframework.data.domain.PageImpl;
|
|
import org.springframework.data.domain.PageImpl;
|
|
import org.springframework.data.domain.Pageable;
|
|
import org.springframework.data.domain.Pageable;
|
|
|
|
+import org.springframework.data.domain.Sort;
|
|
import org.springframework.data.redis.core.RedisTemplate;
|
|
import org.springframework.data.redis.core.RedisTemplate;
|
|
import org.springframework.stereotype.Service;
|
|
import org.springframework.stereotype.Service;
|
|
import org.springframework.transaction.annotation.Transactional;
|
|
import org.springframework.transaction.annotation.Transactional;
|
|
@@ -66,6 +69,9 @@ public class ServiceAuthResultServiceImpl implements IServiceAuthResultService {
|
|
@Autowired
|
|
@Autowired
|
|
private PermssionServiceUpdateEventBus permssionServiceUpdateEventBus;
|
|
private PermssionServiceUpdateEventBus permssionServiceUpdateEventBus;
|
|
|
|
|
|
|
|
+ @Autowired
|
|
|
|
+ private IServiceResourceFacade serviceResourceFacade;
|
|
|
|
+
|
|
@Override
|
|
@Override
|
|
public ServiceAuthResult saveAuthResult(ServiceAuthResult serviceAuthResult) {
|
|
public ServiceAuthResult saveAuthResult(ServiceAuthResult serviceAuthResult) {
|
|
serviceAuthResult.setCreateTime(new Date());
|
|
serviceAuthResult.setCreateTime(new Date());
|
|
@@ -261,6 +267,12 @@ public class ServiceAuthResultServiceImpl implements IServiceAuthResultService {
|
|
try{
|
|
try{
|
|
ServiceAuthResult result=new ServiceAuthResult();
|
|
ServiceAuthResult result=new ServiceAuthResult();
|
|
BeanUtils.copyProperties(dto,result);
|
|
BeanUtils.copyProperties(dto,result);
|
|
|
|
+ ApplyInfo app = applyInfoFacade.applyDetail(dto.getAppId());
|
|
|
|
+ result.setAppId(app.getId());
|
|
|
|
+ result.setAppCode(app.getApplyCode());
|
|
|
|
+ result.setDeleted(BooleanEnum.FALSE.value);
|
|
|
|
+ ServiceResource serviceResource = serviceResourceFacade.detailByCode(dto.getServiceCode());
|
|
|
|
+ result.setServiceId(serviceResource.getId());
|
|
this.saveAuthResult(result);
|
|
this.saveAuthResult(result);
|
|
}catch (Exception e){
|
|
}catch (Exception e){
|
|
log.error("save ServiceAuthResult error :",e);
|
|
log.error("save ServiceAuthResult error :",e);
|
|
@@ -290,7 +302,13 @@ public class ServiceAuthResultServiceImpl implements IServiceAuthResultService {
|
|
@Override
|
|
@Override
|
|
public ResponseDTO updateServiceAuthResult(ServiceAuthResultDTO dto){
|
|
public ResponseDTO updateServiceAuthResult(ServiceAuthResultDTO dto){
|
|
ServiceAuthResult result=serviceAuthResultBPO.get(dto.getId());
|
|
ServiceAuthResult result=serviceAuthResultBPO.get(dto.getId());
|
|
- BeanUtils.copyProperties(result,dto);
|
|
|
|
|
|
+ //BeanUtils.copyProperties(result,dto);
|
|
|
|
+ ApplyInfo app = applyInfoFacade.applyDetail(dto.getAppId());
|
|
|
|
+ result.setAppId(app.getId());
|
|
|
|
+ result.setAppCode(app.getApplyCode());
|
|
|
|
+ result.setDeleted(BooleanEnum.FALSE.value);
|
|
|
|
+ ServiceResource serviceResource = serviceResourceFacade.detailByCode(dto.getServiceCode());
|
|
|
|
+ result.setServiceId(serviceResource.getId());
|
|
result.setUpdateTime(new Date());
|
|
result.setUpdateTime(new Date());
|
|
serviceAuthResultBPO.update(result);
|
|
serviceAuthResultBPO.update(result);
|
|
return ResponseDTO.success("修改成功",null);
|
|
return ResponseDTO.success("修改成功",null);
|