Commit 32425046 by zhiwj

删除资源组同步好办

parent de1ee158
......@@ -27,6 +27,7 @@
<gic-wechat-business-api>4.0-SNAPSHOT</gic-wechat-business-api>
<gic-member-api>4.0-SNAPSHOT</gic-member-api>
<gic-open-platform-api>4.0-SNAPSHOT</gic-open-platform-api>
<application-center-api>4.0-SNAPSHOT</application-center-api>
</properties>
<dependencies>
......@@ -136,6 +137,11 @@
<artifactId>gic-member-api</artifactId>
<version>${gic-member-api}</version>
</dependency>
<dependency>
<groupId>com.gic</groupId>
<artifactId>application-center-api</artifactId>
<version>${application-center-api}</version>
</dependency>
</dependencies>
<build>
......
......@@ -4,6 +4,7 @@ import com.alibaba.fastjson.JSON;
import com.alibaba.fastjson.JSONObject;
import com.gic.api.base.commons.Page;
import com.gic.api.base.commons.ServiceResponse;
import com.gic.application.center.api.service.AuthorizeService;
import com.gic.auth.constant.OrderOrAppEnum;
import com.gic.auth.dto.*;
import com.gic.auth.entity.TabSysOrderAppResource;
......@@ -45,6 +46,8 @@ public class ResourceApiServiceImpl implements ResourceApiService {
private OrderAppResourceService orderAppResourceService;
@Autowired
private UserService userService;
@Autowired
private AuthorizeService authorizeService;
@Override
......@@ -108,6 +111,11 @@ public class ResourceApiServiceImpl implements ResourceApiService {
return ServiceResponse.failure(ErrorCode.OPERATION_FAILED.getCode(), "该资源组正在使用中,不能删除");
}
Integer line = resourceService.delResource(resourceId);
if (line > 0) {
// 同步好办
authorizeService.delResource(resourceId.longValue());
}
return ServiceResponse.success(line);
}
......
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