Commit fb6abff7 by guojuxing

应用策略修改

parent 8d619bea
......@@ -35,7 +35,7 @@ public class ExceptionResultAop {
* @return
* @throws Throwable
*/
@Around(value = "execution(* com.gic.*.service.outer.impl.*(..))")
@Around(value = "execution(* com.gic.*.service.outer.impl..*.*(..))")
public Object around(ProceedingJoinPoint joinPoint) throws Throwable {
try {
// 执行当前方法
......
......@@ -49,7 +49,7 @@ public class UnionEnterpriseAuthAppServiceImpl implements UnionEnterpriseAuthApp
@Override
public boolean isRepeatStrategyName(Integer unionEnterpriseAuthAppId, Integer unionEnterpriseAuthId, String strategyName) {
int count = tabSysUnionEnterpriseAuthAppMapper.countRepeatStrategyName(unionEnterpriseAuthAppId, unionEnterpriseAuthId, strategyName);
if (count > 9) {
if (count > 0) {
return true;
}
return false;
......
......@@ -17,6 +17,7 @@ import com.gic.enterprise.entity.TabSysUnionEnterpriseAuthApp;
import com.gic.enterprise.entity.TabSysUnionEnterpriseAuthResDetail;
import com.gic.enterprise.qo.union.UnionEnterpriseAuthResLogQO;
import com.gic.enterprise.service.*;
import com.gic.store.service.StoreAuthorizationApiService;
import org.apache.commons.collections.CollectionUtils;
import org.apache.commons.lang3.StringUtils;
import org.springframework.beans.factory.annotation.Autowired;
......@@ -60,6 +61,8 @@ public class UnionEnterpriseAuthApiServiceImpl implements UnionEnterpriseAuthApi
private UnionEnterpriseAuthAppService unionEnterpriseAuthAppService;
@Autowired
private UnionEnterpriseAuthResLogService unionEnterpriseAuthResLogService;
@Autowired
private StoreAuthorizationApiService storeAuthorizationApiService;
@Override
public ServiceResponse<Void> saveUnionEnterprise(Integer ownEnterpriseId, Integer unionEnterpriseId) {
......@@ -96,6 +99,12 @@ public class UnionEnterpriseAuthApiServiceImpl implements UnionEnterpriseAuthApi
} else {
}
ResourceGroupDTO resourceGroupDTO = resourceResponse.getResult();
//门店通知
if (resourceGroupDTO.getStoreResource() != null) {
storeAuthorizationApiService.authStore(resourceGroupDTO.getStoreResource().intValue(), dto.getUnionEnterpriseId(), dto.getOwnEnterpriseId());
}
UnionEnterpriseAuthDTO data = EntityUtil.changeEntityNew(UnionEnterpriseAuthDTO.class, dto);
data.setUnionEnterpriseAuthId(old.getUnionEnterpriseAuthId());
unionEnterpriseAuthService.update(data);
......@@ -130,6 +139,7 @@ public class UnionEnterpriseAuthApiServiceImpl implements UnionEnterpriseAuthApi
//todo 重新授权
//门店资源
String authKey = detail.getAuthKey();
storeAuthorizationApiService.reAuthStore(authKey);
//日志
unionEnterpriseAuthResLogService.saveUnionEnterpriseAuthResLog(old.getUnionEnterpriseAuthId(),
......@@ -223,7 +233,7 @@ public class UnionEnterpriseAuthApiServiceImpl implements UnionEnterpriseAuthApi
public ServiceResponse<Void> saveOrUpdateUnionEnterpriseAuthApp(@Valid UnionEnterpriseAuthAppDTO dto) {
List<TabSysUnionEnterpriseAuthApp> appList = unionEnterpriseAuthAppService.listUnionEnterpriseAuthApp(dto.getUnionEnterpriseAuthId());
Set<String> appIdSet = new HashSet<>();
if (CollectionUtils.isNotEmpty(appIdSet)) {
if (CollectionUtils.isNotEmpty(appList)) {
appList.forEach(e -> {
String[] appIdArr = e.getAppId().split(",");
for (String appId : appIdArr) {
......@@ -304,6 +314,8 @@ public class UnionEnterpriseAuthApiServiceImpl implements UnionEnterpriseAuthApi
if (sdf.format(calendar.getTime()).compareTo(sdf.format(new Date())) >= 0) {
if (UnionEnterpriseAuthStatusEnum.TO_DO_RELIEVE.getCode().equals(temp.getStatusFlag())) {
//todo 发通知
//门店解除
storeAuthorizationApiService.cancelStoreAll(temp.getUnionEnterpriseId(), temp.getOwnEnterpriseId());
}
}
}
......
......@@ -153,4 +153,5 @@
<dubbo:reference interface="com.gic.cloud.service.IndexDescApiService" id="indexDescApiService" timeout="6000" />
<dubbo:reference interface="com.gic.member.tag.api.service.SceneCrowdGroupApiService" id="sceneCrowdGroupApiService" timeout="6000" />
<dubbo:reference interface="com.gic.store.service.StoreWidgetApiService" id="storeWidgetApiService" timeout="6000" />
<dubbo:reference interface="com.gic.store.service.StoreAuthorizationApiService" id="storeAuthorizationApiService" timeout="6000" />
</beans>
......@@ -642,6 +642,7 @@ public class UnionEnterpriseAuthController {
vo.setServiceArea(UserAeaUtils.getUserArea(CuTypeEnum.SCU.getType(), areaMap, authDataArr));
}
result.add(vo);
}
return RestResponse.success(result);
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment