|
@@ -10,6 +10,7 @@ import com.dragoninfo.dcuc.authweb.util.VersionUtils;
|
|
|
import com.dragoninfo.dcuc.common.entity.ApiResult;
|
|
|
import com.dragoninfo.dcuc.common.entity.ApiSearchReq;
|
|
|
import com.dragoninfo.dcuc.common.utils.SearchableUtil;
|
|
|
+import com.dragoninfo.dcuc.user.user.enumresources.YesNotEnum;
|
|
|
import com.dragonsoft.duceap.base.enums.BooleanEnum;
|
|
|
import com.dragonsoft.duceap.commons.util.string.StringUtils;
|
|
|
import com.dragonsoft.duceap.core.search.Searchable;
|
|
@@ -21,10 +22,7 @@ import io.swagger.annotations.ApiOperation;
|
|
|
import org.springframework.beans.BeanUtils;
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
import org.springframework.data.domain.Page;
|
|
|
-import org.springframework.web.bind.annotation.PostMapping;
|
|
|
-import org.springframework.web.bind.annotation.RequestBody;
|
|
|
-import org.springframework.web.bind.annotation.RequestMapping;
|
|
|
-import org.springframework.web.bind.annotation.RestController;
|
|
|
+import org.springframework.web.bind.annotation.*;
|
|
|
|
|
|
import javax.servlet.http.HttpServletRequest;
|
|
|
import java.util.ArrayList;
|
|
@@ -99,4 +97,21 @@ public class AuthServiceController {
|
|
|
});
|
|
|
return ApiResult.setSuccessPage(serviceAuthResultDTOS.getTotalElements(), voList);
|
|
|
}
|
|
|
+
|
|
|
+ @ApiOperation(value = "服务授权撤销")
|
|
|
+ @ApiImplicitParams({@ApiImplicitParam(name = "appCode", value = "应用编码"),
|
|
|
+ @ApiImplicitParam(name = "serviceCode", value = "服务编码")
|
|
|
+ })
|
|
|
+ @DeleteMapping("service/{appCode}/{serviceCode}")
|
|
|
+ public ApiResult delService(@PathVariable String appCode, @PathVariable String serviceCode) {
|
|
|
+ try {
|
|
|
+ ServiceAuthResultDTO authDto = serviceAuthResultFacade.getDetailByAppAndService(appCode,serviceCode);
|
|
|
+ serviceAuthResultFacade.delServiceAuthResult(authDto.getId());
|
|
|
+ return ApiResult.setSuccess();
|
|
|
+ } catch (Exception e){
|
|
|
+ e.printStackTrace();
|
|
|
+ return ApiResult.setFailMessage("服务授权撤销失败");
|
|
|
+ }
|
|
|
+
|
|
|
+ }
|
|
|
}
|