mirror of
https://gitee.com/dromara/MaxKey.git
synced 2026-05-14 04:22:08 +08:00
Unnecessary path variable definition [WEB_ANNOTATION_NAMES]
This commit is contained in:
@@ -40,7 +40,7 @@ public class AuthorizeCredentialEndpoint extends AuthorizeBaseEndpoint{
|
||||
|
||||
@GetMapping("/get/{appId}")
|
||||
public Message<Accounts> get(
|
||||
@PathVariable("appId") String appId,
|
||||
@PathVariable String appId,
|
||||
@CurrentUser UserInfo currentUser){
|
||||
Apps app = getApp(appId);
|
||||
Accounts account = getAccounts(app,currentUser);
|
||||
|
||||
@@ -53,7 +53,7 @@ public class AuthorizeEndpoint extends AuthorizeBaseEndpoint{
|
||||
//all single sign on url
|
||||
@Operation(summary = "认证总地址接口", description = "参数应用ID,分发到不同应用的认证地址",method="GET")
|
||||
@GetMapping("/authz/{id}")
|
||||
public ModelAndView authorize(HttpServletRequest request,@PathVariable("id") String id){
|
||||
public ModelAndView authorize(HttpServletRequest request,@PathVariable String id){
|
||||
Apps app = getApp(id);
|
||||
WebContext.setAttribute(WebConstants.SINGLE_SIGN_ON_APP_ID, app.getId());
|
||||
ModelAndView modelAndView = WebContext.redirect(app.getLoginUrl());
|
||||
|
||||
@@ -50,7 +50,7 @@ public class AuthorizeProtectedEndpoint{
|
||||
|
||||
@GetMapping("/authz/protected")
|
||||
public ModelAndView authorizeProtected(
|
||||
@RequestParam("password") String password,
|
||||
@RequestParam String password,
|
||||
@RequestParam("redirect_uri") String redirectUri,
|
||||
@CurrentUser UserInfo currentUser){
|
||||
if( currentUser.getAppLoginPassword().equals(PasswordReciprocal.getInstance().encode(password))){
|
||||
|
||||
@@ -38,7 +38,7 @@ public class OnlineSessionEndpoint {
|
||||
|
||||
@Operation(summary = "在线ticket验证接口", description = "")
|
||||
@GetMapping(value="/validate")
|
||||
public String ticketValidate(@RequestParam(value ="ticket",required = true) String ticket) {
|
||||
public String ticketValidate(@RequestParam(required = true) String ticket) {
|
||||
Session session = sessionManager.get(ticket);
|
||||
return session == null ? "" : session.getId();
|
||||
}
|
||||
|
||||
@@ -69,7 +69,7 @@ public class CasAuthorizeEndpoint extends CasBaseAuthorizeEndpoint{
|
||||
|
||||
@Operation(summary = "CAS页面跳转应用ID认证接口", description = "传递参数应用ID",method="GET")
|
||||
@GetMapping(CasConstants.ENDPOINT.ENDPOINT_BASE + "/{id}")
|
||||
public ModelAndView authorize( @PathVariable("id") String id,
|
||||
public ModelAndView authorize( @PathVariable String id,
|
||||
HttpServletRequest request,
|
||||
HttpServletResponse response
|
||||
){
|
||||
|
||||
@@ -112,7 +112,7 @@ public class CasRestV1Endpoint extends CasBaseAuthorizeEndpoint{
|
||||
public ResponseEntity<String> requestServiceTicket(
|
||||
HttpServletRequest request,
|
||||
HttpServletResponse response,
|
||||
@PathVariable("ticketGrantingTicket") String ticketGrantingTicket,
|
||||
@PathVariable String ticketGrantingTicket,
|
||||
@RequestParam(value=CasConstants.PARAMETER.SERVICE) String casService,
|
||||
@RequestParam(value=CasConstants.PARAMETER.RENEW,required=false) String renew,
|
||||
@RequestParam(value=CasConstants.PARAMETER.REST_USERNAME,required=false) String username,
|
||||
@@ -135,7 +135,7 @@ public class CasRestV1Endpoint extends CasBaseAuthorizeEndpoint{
|
||||
@Operation(summary = "CAS REST认证接口", description = "检查TGT状态",method="GET")
|
||||
@GetMapping(value=CasConstants.ENDPOINT.ENDPOINT_REST_TICKET_V1 + "/{ticketGrantingTicket}")
|
||||
public ResponseEntity<String> verifyTicketGrantingTicketStatus(
|
||||
@PathVariable("ticketGrantingTicket") String ticketGrantingTicket,
|
||||
@PathVariable String ticketGrantingTicket,
|
||||
HttpServletRequest request,
|
||||
HttpServletResponse response){
|
||||
try {
|
||||
@@ -153,7 +153,7 @@ public class CasRestV1Endpoint extends CasBaseAuthorizeEndpoint{
|
||||
@Operation(summary = "CAS REST认证接口", description = "注销TGT状态",method="DELETE")
|
||||
@DeleteMapping(value=CasConstants.ENDPOINT.ENDPOINT_REST_TICKET_V1+"/{ticketGrantingTicket}")
|
||||
public ResponseEntity<String> destroyTicketGrantingTicket(
|
||||
@PathVariable("ticketGrantingTicket") String ticketGrantingTicket,
|
||||
@PathVariable String ticketGrantingTicket,
|
||||
HttpServletRequest request,
|
||||
HttpServletResponse response){
|
||||
try {
|
||||
|
||||
@@ -53,7 +53,7 @@ public class ExtendApiAuthorizeEndpoint extends AuthorizeBaseEndpoint{
|
||||
@GetMapping("/authz/api/{id}")
|
||||
public ModelAndView authorize(
|
||||
HttpServletRequest request,
|
||||
@PathVariable("id") String id,
|
||||
@PathVariable String id,
|
||||
@CurrentUser UserInfo currentUser){
|
||||
|
||||
ModelAndView modelAndView = new ModelAndView("authorize/redirect_sso_submit");
|
||||
|
||||
@@ -71,7 +71,7 @@ public class JwtAuthorizeEndpoint extends AuthorizeBaseEndpoint{
|
||||
public ModelAndView authorize(
|
||||
HttpServletRequest request,
|
||||
HttpServletResponse response,
|
||||
@PathVariable("id") String id,
|
||||
@PathVariable String id,
|
||||
@CurrentUser UserInfo currentUser){
|
||||
ModelAndView modelAndView=new ModelAndView();
|
||||
Apps application = getApp(id);
|
||||
@@ -110,7 +110,7 @@ public class JwtAuthorizeEndpoint extends AuthorizeBaseEndpoint{
|
||||
public String metadata(HttpServletRequest request,
|
||||
HttpServletResponse response,
|
||||
@PathVariable("appid") String appId,
|
||||
@PathVariable("mediaType") String mediaType) {
|
||||
@PathVariable String mediaType) {
|
||||
AppsJwtDetails jwtDetails = jwtDetailsService.getAppDetails(appId , true);
|
||||
if(jwtDetails != null) {
|
||||
String jwkSetString = "";
|
||||
|
||||
@@ -121,7 +121,7 @@ public class AuthorizationEndpoint extends AbstractEndpoint {
|
||||
public ModelAndView authorize(
|
||||
HttpServletRequest request,
|
||||
HttpServletResponse response,
|
||||
@PathVariable("id") String id){
|
||||
@PathVariable String id){
|
||||
ClientDetails clientDetails =getClientDetailsService().loadClientByClientId(id,true);
|
||||
_logger.debug("clientDetails {}",clientDetails);
|
||||
String authorizationUrl = "";
|
||||
|
||||
@@ -48,8 +48,8 @@ public class OauthJwksEndpoint extends AbstractEndpoint {
|
||||
method={RequestMethod.POST, RequestMethod.GET})
|
||||
@ResponseBody
|
||||
public String keysMetadataByParam(HttpServletRequest request , HttpServletResponse response,
|
||||
@RequestParam(value="inst_id",required = false) String inst_id,
|
||||
@RequestParam(value="client_id",required = false) String client_id) {
|
||||
@RequestParam(required = false) String inst_id,
|
||||
@RequestParam(required = false) String client_id) {
|
||||
return buildMetadata(request,response,inst_id,client_id,ContentType.JSON);
|
||||
}
|
||||
|
||||
@@ -58,8 +58,8 @@ public class OauthJwksEndpoint extends AbstractEndpoint {
|
||||
method={RequestMethod.POST, RequestMethod.GET})
|
||||
@ResponseBody
|
||||
public String keysMetadatabyPath(HttpServletRequest request , HttpServletResponse response,
|
||||
@PathVariable(value="instId") String instId,
|
||||
@PathVariable(value="clientId") String clientId) {
|
||||
@PathVariable String instId,
|
||||
@PathVariable String clientId) {
|
||||
return buildMetadata(request,response,instId,clientId,ContentType.JSON);
|
||||
}
|
||||
|
||||
@@ -69,8 +69,8 @@ public class OauthJwksEndpoint extends AbstractEndpoint {
|
||||
method={RequestMethod.POST, RequestMethod.GET})
|
||||
@ResponseBody
|
||||
public String metadata(HttpServletRequest request , HttpServletResponse response,
|
||||
@PathVariable(value="clientId") String clientId,
|
||||
@PathVariable(value="mediaType") String mediaType) {
|
||||
@PathVariable String clientId,
|
||||
@PathVariable String mediaType) {
|
||||
return buildMetadata(request,response,null,clientId,mediaType);
|
||||
}
|
||||
|
||||
|
||||
@@ -49,8 +49,8 @@ public class OauthAuthorizationServerEndpoint extends AbstractEndpoint {
|
||||
method={RequestMethod.POST, RequestMethod.GET})
|
||||
@ResponseBody
|
||||
public OauthServerConfiguration configurationByParam(
|
||||
@RequestParam(value = "inst_id", required = false) String inst_id,
|
||||
@RequestParam(value = "client_id", required = false) String client_id) {
|
||||
@RequestParam(required = false) String inst_id,
|
||||
@RequestParam(required = false) String client_id) {
|
||||
return configurationMetadata( inst_id,client_id,"RequestParam");
|
||||
}
|
||||
|
||||
@@ -60,8 +60,8 @@ public class OauthAuthorizationServerEndpoint extends AbstractEndpoint {
|
||||
method={RequestMethod.POST, RequestMethod.GET})
|
||||
@ResponseBody
|
||||
public OauthServerConfiguration configurationByPath(
|
||||
@PathVariable("instId") String instId,
|
||||
@PathVariable(value = "clientId", required = false) String clientId) {
|
||||
@PathVariable String instId,
|
||||
@PathVariable(required = false) String clientId) {
|
||||
return configurationMetadata(instId,clientId,"PathVariable");
|
||||
}
|
||||
|
||||
|
||||
@@ -45,8 +45,8 @@ public class OpenidConfigurationEndpoint extends AbstractEndpoint {
|
||||
method={RequestMethod.POST, RequestMethod.GET})
|
||||
@ResponseBody
|
||||
public OpenidConfiguration configurationByParam(
|
||||
@RequestParam(value = "inst_id", required = false) String inst_id,
|
||||
@RequestParam(value = "client_id", required = false) String client_id) {
|
||||
@RequestParam(required = false) String inst_id,
|
||||
@RequestParam(required = false) String client_id) {
|
||||
_logger.debug("Configuration By Param");
|
||||
return configurationMetadata(inst_id,client_id,"RequestParam");
|
||||
}
|
||||
@@ -57,8 +57,8 @@ public class OpenidConfigurationEndpoint extends AbstractEndpoint {
|
||||
method={RequestMethod.POST, RequestMethod.GET})
|
||||
@ResponseBody
|
||||
public OpenidConfiguration configurationByPath(
|
||||
@PathVariable("instId") String instId ,
|
||||
@PathVariable(value = "clientId") String clientId) {
|
||||
@PathVariable String instId ,
|
||||
@PathVariable String clientId) {
|
||||
_logger.debug("Configuration By Path");
|
||||
return configurationMetadata(instId,clientId,"PathVariable");
|
||||
}
|
||||
|
||||
@@ -67,7 +67,7 @@ public class TokenBasedAuthorizeEndpoint extends AuthorizeBaseEndpoint{
|
||||
public ModelAndView authorize(
|
||||
HttpServletRequest request,
|
||||
HttpServletResponse response,
|
||||
@PathVariable("id") String id,
|
||||
@PathVariable String id,
|
||||
@CurrentUser UserInfo currentUser){
|
||||
ModelAndView modelAndView=new ModelAndView();
|
||||
|
||||
|
||||
@@ -66,7 +66,7 @@ public class ImageCaptchaEndpoint {
|
||||
@GetMapping(value={"/captcha"}, produces = {MediaType.APPLICATION_JSON_VALUE})
|
||||
public Message<ImageCaptcha> captchaHandleRequest(
|
||||
@RequestParam(value="captcha",required=false,defaultValue="text") String captchaType,
|
||||
@RequestParam(value="state",required=false,defaultValue="state") String state) {
|
||||
@RequestParam(required=false,defaultValue="state") String state) {
|
||||
try {
|
||||
String kaptchaText = captchaProducer.createText();
|
||||
String kaptchaValue = kaptchaText;
|
||||
|
||||
@@ -43,14 +43,14 @@ public class PasskeyAutoConfiguration {
|
||||
|
||||
@Bean
|
||||
@ConditionalOnMissingBean
|
||||
public PasskeyService passkeyService(PasskeyProperties passkeyProperties) {
|
||||
PasskeyService passkeyService(PasskeyProperties passkeyProperties) {
|
||||
_logger.debug("Creating PasskeyService bean with properties: {}", passkeyProperties.isEnabled());
|
||||
return new PasskeyServiceImpl();
|
||||
}
|
||||
|
||||
@Bean
|
||||
@ConditionalOnMissingBean
|
||||
public PasskeyManager passkeyManager() {
|
||||
PasskeyManager passkeyManager() {
|
||||
_logger.debug("Creating PasskeyManager bean");
|
||||
return new PasskeyManager();
|
||||
}
|
||||
|
||||
@@ -42,7 +42,7 @@ public class WebAuthnConfig {
|
||||
* 用于处理 WebAuthn 注册和认证的核心组件
|
||||
*/
|
||||
@Bean
|
||||
public WebAuthnManager webAuthnManager() {
|
||||
WebAuthnManager webAuthnManager() {
|
||||
return WebAuthnManager.createNonStrictWebAuthnManager();
|
||||
}
|
||||
|
||||
@@ -51,7 +51,7 @@ public class WebAuthnConfig {
|
||||
* 用于 WebAuthn 数据的序列化和反序列化
|
||||
*/
|
||||
@Bean
|
||||
public ObjectConverter objectConverter() {
|
||||
ObjectConverter objectConverter() {
|
||||
return new ObjectConverter();
|
||||
}
|
||||
|
||||
@@ -60,7 +60,7 @@ public class WebAuthnConfig {
|
||||
* 定义支持的算法类型
|
||||
*/
|
||||
@Bean
|
||||
public List<PublicKeyCredentialParameters> publicKeyCredentialParameters() {
|
||||
List<PublicKeyCredentialParameters> publicKeyCredentialParameters() {
|
||||
return Arrays.asList(
|
||||
new PublicKeyCredentialParameters(PublicKeyCredentialType.PUBLIC_KEY, COSEAlgorithmIdentifier.ES256),
|
||||
new PublicKeyCredentialParameters(PublicKeyCredentialType.PUBLIC_KEY, COSEAlgorithmIdentifier.RS256),
|
||||
|
||||
@@ -68,7 +68,7 @@ public class LoginSessionController {
|
||||
*/
|
||||
@GetMapping(value = { "/fetch" })
|
||||
public Message<JpaPageResults<HistoryLogin>> fetch(
|
||||
@ModelAttribute("historyLogin") HistoryLogin historyLogin,
|
||||
@ModelAttribute HistoryLogin historyLogin,
|
||||
@CurrentUser UserInfo currentUser) {
|
||||
logger.debug("history/session/fetch {}" , historyLogin);
|
||||
historyLogin.setUserId(currentUser.getId());
|
||||
@@ -79,7 +79,7 @@ public class LoginSessionController {
|
||||
}
|
||||
|
||||
@DeleteMapping(value="/terminate")
|
||||
public Message<HistoryLogin> terminate(@RequestParam("ids") List<String> ids,@CurrentUser UserInfo currentUser) {
|
||||
public Message<HistoryLogin> terminate(@RequestParam List<String> ids,@CurrentUser UserInfo currentUser) {
|
||||
logger.debug("ids {}",ids);
|
||||
boolean isTerminated = false;
|
||||
try {
|
||||
|
||||
@@ -67,7 +67,7 @@ public class AppListController {
|
||||
*/
|
||||
@GetMapping(value = { "/appList" }, produces = {MediaType.APPLICATION_JSON_VALUE})
|
||||
public Message<List<UserApps>> appList(
|
||||
@RequestParam(value = "gridList", required = false) String gridList,
|
||||
@RequestParam(required = false) String gridList,
|
||||
@CurrentUser UserInfo currentUser) {
|
||||
userInfoService.updateGridList(gridList,currentUser);
|
||||
UserApps userApps = new UserApps();
|
||||
@@ -83,8 +83,8 @@ public class AppListController {
|
||||
|
||||
@GetMapping(value = { "/account/get" })
|
||||
public Message<Accounts> getAccount(
|
||||
@RequestParam("credential") String credential,
|
||||
@RequestParam("appId") String appId,
|
||||
@RequestParam String credential,
|
||||
@RequestParam String appId,
|
||||
@CurrentUser UserInfo currentUser) {
|
||||
Accounts account = null ;
|
||||
|
||||
@@ -106,7 +106,7 @@ public class AppListController {
|
||||
|
||||
@PutMapping(value = { "/account/update" })
|
||||
public Message<Accounts> updateAccount(
|
||||
@RequestParam("credential") String credential,
|
||||
@RequestParam String credential,
|
||||
@ModelAttribute Accounts account,
|
||||
@CurrentUser UserInfo currentUser) {
|
||||
Accounts appUsers = new Accounts();
|
||||
|
||||
@@ -161,7 +161,7 @@ public class LoginEntryPoint {
|
||||
|
||||
|
||||
@RequestMapping(value={"/sendotp/{mobile}"}, produces = {MediaType.APPLICATION_JSON_VALUE})
|
||||
public Message<AuthJwt> produceOtp(@PathVariable("mobile") String mobile) {
|
||||
public Message<AuthJwt> produceOtp(@PathVariable String mobile) {
|
||||
UserInfo userInfo=userInfoService.findByEmailMobile(mobile);
|
||||
if(userInfo != null) {
|
||||
smsAuthnService.getByInstId(WebContext.getInst().getId()).produce(userInfo);
|
||||
|
||||
@@ -113,7 +113,7 @@ public class LogoutEndpoint {
|
||||
@Operation(summary = "单点注销接口", description = "redirect_uri跳转地址",method="GET")
|
||||
@GetMapping({"/force/logout"})
|
||||
public ModelAndView forceLogout(HttpServletRequest request,
|
||||
@RequestParam(value = "redirect_uri",required = false) String redirect_uri){
|
||||
@RequestParam(required = false) String redirect_uri){
|
||||
//invalidate http session
|
||||
logger.debug("/force/logout http Session id {}",request.getSession().getId());
|
||||
request.getSession().invalidate();
|
||||
|
||||
@@ -124,7 +124,7 @@ public class OneTimePasswordController {
|
||||
}
|
||||
|
||||
@GetMapping("/verify")
|
||||
public Message<String> verify(@RequestParam("otpCode") String otpCode, @CurrentUser UserInfo currentUser) {
|
||||
public Message<String> verify(@RequestParam String otpCode, @CurrentUser UserInfo currentUser) {
|
||||
// 从当前用户信息中获取共享密钥
|
||||
UserInfo user = userInfoService.get(currentUser.getId());
|
||||
// 计算当前时间对应的动态密码
|
||||
|
||||
@@ -56,12 +56,12 @@ public class SafeController {
|
||||
public Message<?> setting(
|
||||
HttpServletRequest request,
|
||||
HttpServletResponse response,
|
||||
@RequestParam("authnType") String authnType,
|
||||
@RequestParam("mobile") String mobile,
|
||||
@RequestParam("mobileVerify") String mobileVerify,
|
||||
@RequestParam("email") String email,
|
||||
@RequestParam("emailVerify") String emailVerify,
|
||||
@RequestParam("theme") String theme,
|
||||
@RequestParam String authnType,
|
||||
@RequestParam String mobile,
|
||||
@RequestParam String mobileVerify,
|
||||
@RequestParam String email,
|
||||
@RequestParam String emailVerify,
|
||||
@RequestParam String theme,
|
||||
@CurrentUser UserInfo currentUser) {
|
||||
currentUser.setAuthnType(Integer.parseInt(authnType));
|
||||
userInfoService.updateAuthnType(currentUser);
|
||||
|
||||
@@ -55,7 +55,7 @@ public class SocialSignOnListController {
|
||||
|
||||
@ResponseBody
|
||||
@RequestMapping(value={"/delete"}, produces = {MediaType.APPLICATION_JSON_VALUE})
|
||||
public Message<?> delete(@RequestParam("ids") List<String> ids,@CurrentUser UserInfo currentUser) {
|
||||
public Message<?> delete(@RequestParam List<String> ids,@CurrentUser UserInfo currentUser) {
|
||||
logger.debug("-delete ids : {} " , ids);
|
||||
if (socialsAssociatesService.deleteBatch(ids)) {
|
||||
return new Message<Apps>(Message.SUCCESS);
|
||||
|
||||
@@ -59,7 +59,7 @@ public class LoginAppsHistoryController {
|
||||
@RequestMapping(value={"/loginAppsHistory/fetch"})
|
||||
@ResponseBody
|
||||
public Message<?> fetch(
|
||||
@ModelAttribute("historyLoginApp") HistoryLoginApps historyLoginApp,
|
||||
@ModelAttribute HistoryLoginApps historyLoginApp,
|
||||
@CurrentUser UserInfo currentUser){
|
||||
logger.debug("historys/loginAppsHistory/fetch/ {}",historyLoginApp);
|
||||
historyLoginApp.setId(null);
|
||||
|
||||
@@ -59,7 +59,7 @@ public class LoginHistoryController {
|
||||
@RequestMapping(value={"/loginHistory/fetch"})
|
||||
@ResponseBody
|
||||
public Message<?> fetch(
|
||||
@ModelAttribute("historyLogin") HistoryLogin historyLogin,
|
||||
@ModelAttribute HistoryLogin historyLogin,
|
||||
@CurrentUser UserInfo currentUser
|
||||
){
|
||||
logger.debug("historys/loginHistory/fetch/ {}",historyLogin);
|
||||
|
||||
@@ -113,7 +113,7 @@ public class AccessController {
|
||||
}
|
||||
|
||||
@DeleteMapping(value={"/delete"}, produces = {MediaType.APPLICATION_JSON_VALUE})
|
||||
public Message<Access> delete(@RequestParam("ids") List<String> ids,@CurrentUser UserInfo currentUser) {
|
||||
public Message<Access> delete(@RequestParam List<String> ids,@CurrentUser UserInfo currentUser) {
|
||||
logger.debug("-delete ids : {}" , ids);
|
||||
if (accessService.deleteBatch(ids)) {
|
||||
return new Message<>(Message.SUCCESS);
|
||||
|
||||
@@ -71,7 +71,7 @@ public class SessionController {
|
||||
@RequestMapping(value = { "/fetch" })
|
||||
@ResponseBody
|
||||
public Message<?> fetch(
|
||||
@ModelAttribute("historyLogin") HistoryLogin historyLogin,
|
||||
@ModelAttribute HistoryLogin historyLogin,
|
||||
@CurrentUser UserInfo currentUser) {
|
||||
logger.debug("history/session/fetch {}" , historyLogin);
|
||||
historyLogin.setInstId(currentUser.getInstId());
|
||||
@@ -84,7 +84,7 @@ public class SessionController {
|
||||
|
||||
@ResponseBody
|
||||
@RequestMapping(value="/terminate")
|
||||
public Message<?> terminate(@RequestParam("ids") String ids,@CurrentUser UserInfo currentUser) {
|
||||
public Message<?> terminate(@RequestParam String ids,@CurrentUser UserInfo currentUser) {
|
||||
logger.debug(ids);
|
||||
boolean isTerminated = false;
|
||||
try {
|
||||
|
||||
@@ -83,7 +83,7 @@ public class ApplicationsController extends BaseAppContorller {
|
||||
}
|
||||
|
||||
@GetMapping(value = { "/get/{id}" }, produces = {MediaType.APPLICATION_JSON_VALUE})
|
||||
public Message<Apps> get(@PathVariable("id") String id) {
|
||||
public Message<Apps> get(@PathVariable String id) {
|
||||
Apps apps = appsService.get(id);
|
||||
decoderSecret(apps);
|
||||
apps.transIconBase64();
|
||||
@@ -115,7 +115,7 @@ public class ApplicationsController extends BaseAppContorller {
|
||||
}
|
||||
|
||||
@DeleteMapping(value={"/delete"}, produces = {MediaType.APPLICATION_JSON_VALUE})
|
||||
public Message<Apps> delete(@RequestParam("ids") List<String> ids,@CurrentUser UserInfo currentUser) {
|
||||
public Message<Apps> delete(@RequestParam List<String> ids,@CurrentUser UserInfo currentUser) {
|
||||
logger.debug("-delete ids : {} " , ids);
|
||||
if (appsService.deleteBatch(ids)) {
|
||||
return new Message<>(Message.SUCCESS);
|
||||
@@ -135,7 +135,7 @@ public class ApplicationsController extends BaseAppContorller {
|
||||
}
|
||||
|
||||
@GetMapping({ "/generate/secret/{type}" })
|
||||
public Message<String> generateSecret(@PathVariable("type") String type,@RequestParam(name="id",required=false) String id) throws JOSEException {
|
||||
public Message<String> generateSecret(@PathVariable String type,@RequestParam(required=false) String id) throws JOSEException {
|
||||
String secret="";
|
||||
type=type.toLowerCase();
|
||||
if(type.equals("des")){
|
||||
|
||||
@@ -51,7 +51,7 @@ public class CasDetailsController extends BaseAppContorller {
|
||||
}
|
||||
|
||||
@GetMapping(value = { "/get/{id}" }, produces = {MediaType.APPLICATION_JSON_VALUE})
|
||||
public Message<AppsCasDetails> get(@PathVariable("id") String id) {
|
||||
public Message<AppsCasDetails> get(@PathVariable String id) {
|
||||
AppsCasDetails casDetails=casDetailsService.getAppDetails(id , false);
|
||||
super.decoderSecret(casDetails);
|
||||
casDetails.transIconBase64();
|
||||
@@ -83,7 +83,7 @@ public class CasDetailsController extends BaseAppContorller {
|
||||
}
|
||||
|
||||
@DeleteMapping(value={"/delete"}, produces = {MediaType.APPLICATION_JSON_VALUE})
|
||||
public Message<AppsCasDetails> delete(@RequestParam("ids") List<String> ids,@CurrentUser UserInfo currentUser) {
|
||||
public Message<AppsCasDetails> delete(@RequestParam List<String> ids,@CurrentUser UserInfo currentUser) {
|
||||
logger.debug("-delete ids : {} " , ids);
|
||||
if (casDetailsService.deleteBatch(ids)&&appsService.deleteBatch(ids)) {
|
||||
return new Message<>(Message.SUCCESS);
|
||||
|
||||
@@ -48,7 +48,7 @@ public class ExtendApiDetailsController extends BaseAppContorller {
|
||||
}
|
||||
|
||||
@GetMapping(value = { "/get/{id}" }, produces = {MediaType.APPLICATION_JSON_VALUE})
|
||||
public Message<AppsExtendApiDetails> get(@PathVariable("id") String id) {
|
||||
public Message<AppsExtendApiDetails> get(@PathVariable String id) {
|
||||
Apps application= appsService.get(id);
|
||||
super.decoderSecret(application);
|
||||
AppsExtendApiDetails extendApiDetails=new AppsExtendApiDetails();
|
||||
@@ -87,7 +87,7 @@ public class ExtendApiDetailsController extends BaseAppContorller {
|
||||
}
|
||||
|
||||
@DeleteMapping(value={"/delete"}, produces = {MediaType.APPLICATION_JSON_VALUE})
|
||||
public Message<AppsExtendApiDetails> delete(@RequestParam("ids") List<String> ids,@CurrentUser UserInfo currentUser) {
|
||||
public Message<AppsExtendApiDetails> delete(@RequestParam List<String> ids,@CurrentUser UserInfo currentUser) {
|
||||
logger.debug("-delete ids : {} " , ids);
|
||||
if (appsService.deleteBatch(ids)) {
|
||||
return new Message<>(Message.SUCCESS);
|
||||
|
||||
@@ -56,7 +56,7 @@ public class FormBasedDetailsController extends BaseAppContorller {
|
||||
}
|
||||
|
||||
@RequestMapping(value = { "/get/{id}" }, produces = {MediaType.APPLICATION_JSON_VALUE})
|
||||
public Message<?> get(@PathVariable("id") String id) {
|
||||
public Message<?> get(@PathVariable String id) {
|
||||
AppsFormBasedDetails formBasedDetails=formBasedDetailsService.getAppDetails(id , false);
|
||||
decoderSecret(formBasedDetails);
|
||||
decoderSharedPassword(formBasedDetails);
|
||||
@@ -100,7 +100,7 @@ public class FormBasedDetailsController extends BaseAppContorller {
|
||||
@ResponseBody
|
||||
@RequestMapping(value={"/delete"}, produces = {MediaType.APPLICATION_JSON_VALUE})
|
||||
public Message<?> delete(
|
||||
@RequestParam("ids") List<String> ids,
|
||||
@RequestParam List<String> ids,
|
||||
@CurrentUser UserInfo currentUser) {
|
||||
logger.debug("-delete ids : {} " , ids);
|
||||
if (formBasedDetailsService.deleteBatch(ids)
|
||||
|
||||
@@ -57,7 +57,7 @@ public class JwtDetailsController extends BaseAppContorller {
|
||||
}
|
||||
|
||||
@RequestMapping(value = { "/get/{id}" }, produces = {MediaType.APPLICATION_JSON_VALUE})
|
||||
public Message<?> get(@PathVariable("id") String id) {
|
||||
public Message<?> get(@PathVariable String id) {
|
||||
AppsJwtDetails jwtDetails=jwtDetailsService.getAppDetails(id , false);
|
||||
decoderSecret(jwtDetails);
|
||||
jwtDetails.transIconBase64();
|
||||
@@ -94,7 +94,7 @@ public class JwtDetailsController extends BaseAppContorller {
|
||||
|
||||
@ResponseBody
|
||||
@RequestMapping(value={"/delete"}, produces = {MediaType.APPLICATION_JSON_VALUE})
|
||||
public Message<?> delete(@RequestParam("ids") List<String> ids,@CurrentUser UserInfo currentUser) {
|
||||
public Message<?> delete(@RequestParam List<String> ids,@CurrentUser UserInfo currentUser) {
|
||||
logger.debug("-delete ids : {} " , ids);
|
||||
if (jwtDetailsService.deleteBatch(ids)&&appsService.deleteBatch(ids)) {
|
||||
return new Message<AppsJwtDetails>(Message.SUCCESS);
|
||||
|
||||
@@ -61,7 +61,7 @@ public class OAuth20DetailsController extends BaseAppContorller {
|
||||
}
|
||||
|
||||
@RequestMapping(value = { "/get/{id}" }, produces = {MediaType.APPLICATION_JSON_VALUE})
|
||||
public Message<?> get(@PathVariable("id") String id) {
|
||||
public Message<?> get(@PathVariable String id) {
|
||||
BaseClientDetails baseClientDetails=(BaseClientDetails)oauth20JdbcClientDetailsService.loadClientByClientId(id,false);
|
||||
Apps application=appsService.get(id);//
|
||||
decoderSecret(application);
|
||||
@@ -124,7 +124,7 @@ public class OAuth20DetailsController extends BaseAppContorller {
|
||||
@ResponseBody
|
||||
@RequestMapping(value={"/delete"}, produces = {MediaType.APPLICATION_JSON_VALUE})
|
||||
public Message<?> delete(
|
||||
@RequestParam("ids") List<String> ids,
|
||||
@RequestParam List<String> ids,
|
||||
@CurrentUser UserInfo currentUser) {
|
||||
logger.debug("-delete ids : {} " , ids);
|
||||
for (String id : ids){
|
||||
|
||||
@@ -80,7 +80,7 @@ public class SAML20DetailsController extends BaseAppContorller {
|
||||
}
|
||||
|
||||
@RequestMapping(value = { "/get/{id}" }, produces = {MediaType.APPLICATION_JSON_VALUE})
|
||||
public Message<?> get(@PathVariable("id") String id) {
|
||||
public Message<?> get(@PathVariable String id) {
|
||||
AppsSAML20Details saml20Details=saml20DetailsService.getAppDetails(id , false);
|
||||
decoderSecret(saml20Details);
|
||||
saml20Details.transIconBase64();
|
||||
@@ -132,7 +132,7 @@ public class SAML20DetailsController extends BaseAppContorller {
|
||||
@ResponseBody
|
||||
@RequestMapping(value={"/delete"}, produces = {MediaType.APPLICATION_JSON_VALUE})
|
||||
public Message<?> delete(
|
||||
@RequestParam("ids") List<String> ids,
|
||||
@RequestParam List<String> ids,
|
||||
@CurrentUser UserInfo currentUser) {
|
||||
logger.debug("-delete ids : {} " , ids);
|
||||
if (saml20DetailsService.deleteBatch(ids)&&appsService.deleteBatch(ids)) {
|
||||
|
||||
@@ -60,7 +60,7 @@ public class TokenBasedDetailsController extends BaseAppContorller {
|
||||
}
|
||||
|
||||
@RequestMapping(value = { "/get/{id}" }, produces = {MediaType.APPLICATION_JSON_VALUE})
|
||||
public Message<?> get(@PathVariable("id") String id) {
|
||||
public Message<?> get(@PathVariable String id) {
|
||||
AppsTokenBasedDetails tokenBasedDetails=tokenBasedDetailsService.getAppDetails(id , false);
|
||||
decoderSecret(tokenBasedDetails);
|
||||
String algorithmKey=passwordReciprocal.decoder(tokenBasedDetails.getAlgorithmKey());
|
||||
@@ -108,7 +108,7 @@ public class TokenBasedDetailsController extends BaseAppContorller {
|
||||
@ResponseBody
|
||||
@RequestMapping(value={"/delete"}, produces = {MediaType.APPLICATION_JSON_VALUE})
|
||||
public Message<?> delete(
|
||||
@RequestParam("ids") List<String> ids,
|
||||
@RequestParam List<String> ids,
|
||||
@CurrentUser UserInfo currentUser) {
|
||||
logger.debug("-delete ids : {} " , ids);
|
||||
if (tokenBasedDetailsService.deleteBatch(ids)&&appsService.deleteBatch(ids)) {
|
||||
|
||||
@@ -66,7 +66,7 @@ public class AccountsStrategyController {
|
||||
}
|
||||
|
||||
@GetMapping(value = { "/get/{id}" }, produces = {MediaType.APPLICATION_JSON_VALUE})
|
||||
public Message<AccountsStrategy> get(@PathVariable("id") String id) {
|
||||
public Message<AccountsStrategy> get(@PathVariable String id) {
|
||||
AccountsStrategy accountsStrategy = accountsStrategyService.get(id);
|
||||
return new Message<>(accountsStrategy);
|
||||
}
|
||||
@@ -95,7 +95,7 @@ public class AccountsStrategyController {
|
||||
}
|
||||
|
||||
@DeleteMapping(value={"/delete"}, produces = {MediaType.APPLICATION_JSON_VALUE})
|
||||
public Message<AccountsStrategy> delete(@RequestParam("ids") List<String> ids,@CurrentUser UserInfo currentUser) {
|
||||
public Message<AccountsStrategy> delete(@RequestParam List<String> ids,@CurrentUser UserInfo currentUser) {
|
||||
logger.debug("-delete ids : {} " , ids);
|
||||
if (accountsStrategyService.deleteBatch(ids)) {
|
||||
return new Message<>(Message.SUCCESS);
|
||||
|
||||
@@ -59,7 +59,7 @@ public class AdaptersController {
|
||||
}
|
||||
|
||||
@GetMapping(value = { "/get/{id}" }, produces = {MediaType.APPLICATION_JSON_VALUE})
|
||||
public Message<AppsAdapters> get(@PathVariable("id") String id) {
|
||||
public Message<AppsAdapters> get(@PathVariable String id) {
|
||||
AppsAdapters appsAdapter=appsAdaptersService.get(id);
|
||||
return new Message<>(appsAdapter);
|
||||
}
|
||||
@@ -86,7 +86,7 @@ public class AdaptersController {
|
||||
}
|
||||
|
||||
@DeleteMapping(value={"/delete"}, produces = {MediaType.APPLICATION_JSON_VALUE})
|
||||
public Message<AppsAdapters> delete(@RequestParam("ids") List<String> ids,@CurrentUser UserInfo currentUser) {
|
||||
public Message<AppsAdapters> delete(@RequestParam List<String> ids,@CurrentUser UserInfo currentUser) {
|
||||
logger.debug("-delete ids : {} " , ids);
|
||||
if (appsAdaptersService.deleteBatch(ids)) {
|
||||
return new Message<>(Message.SUCCESS);
|
||||
|
||||
@@ -49,7 +49,7 @@ public class ConnectorsController {
|
||||
}
|
||||
|
||||
@GetMapping(value = { "/get/{id}" }, produces = {MediaType.APPLICATION_JSON_VALUE})
|
||||
public Message<Connectors> get(@PathVariable("id") String id) {
|
||||
public Message<Connectors> get(@PathVariable String id) {
|
||||
Connectors connector = connectorsService.get(id);
|
||||
if(StringUtils.isNotBlank(connector.getCredentials())) {
|
||||
connector.setCredentials(PasswordReciprocal.getInstance().decoder(connector.getCredentials()));
|
||||
@@ -84,7 +84,7 @@ public class ConnectorsController {
|
||||
}
|
||||
|
||||
@DeleteMapping(value={"/delete"}, produces = {MediaType.APPLICATION_JSON_VALUE})
|
||||
public Message<Connectors> delete(@RequestParam("ids") List<String> ids,@CurrentUser UserInfo currentUser) {
|
||||
public Message<Connectors> delete(@RequestParam List<String> ids,@CurrentUser UserInfo currentUser) {
|
||||
logger.debug("-delete ids : {} " , ids);
|
||||
if (connectorsService.deleteBatch(ids)) {
|
||||
return new Message<>(Message.SUCCESS);
|
||||
|
||||
@@ -69,7 +69,7 @@ public class SocialsProviderController {
|
||||
}
|
||||
|
||||
@RequestMapping(value = { "/get/{id}" }, produces = {MediaType.APPLICATION_JSON_VALUE})
|
||||
public Message<?> get(@PathVariable("id") String id) {
|
||||
public Message<?> get(@PathVariable String id) {
|
||||
SocialsProvider socialsProvider=socialsProviderService.get(id);
|
||||
socialsProvider.setClientSecret(PasswordReciprocal.getInstance().decoder(socialsProvider.getClientSecret()));
|
||||
return new Message<SocialsProvider>(socialsProvider);
|
||||
@@ -104,7 +104,7 @@ public class SocialsProviderController {
|
||||
|
||||
@ResponseBody
|
||||
@RequestMapping(value={"/delete"}, produces = {MediaType.APPLICATION_JSON_VALUE})
|
||||
public Message<?> delete(@RequestParam("ids") List<String> ids,@CurrentUser UserInfo currentUser) {
|
||||
public Message<?> delete(@RequestParam List<String> ids,@CurrentUser UserInfo currentUser) {
|
||||
logger.debug("-delete ids : {} " , ids);
|
||||
if (socialsProviderService.deleteBatch(ids)) {
|
||||
return new Message<SocialsProvider>(Message.SUCCESS);
|
||||
|
||||
@@ -61,7 +61,7 @@ public class SynchronizersController {
|
||||
}
|
||||
|
||||
@RequestMapping(value = {"/get/{id}"}, produces = {MediaType.APPLICATION_JSON_VALUE})
|
||||
public Message<?> get(@PathVariable("id") String id) {
|
||||
public Message<?> get(@PathVariable String id) {
|
||||
Synchronizers synchronizers = synchronizersService.get(id);
|
||||
synchronizers.setCredentials(PasswordReciprocal.getInstance().decoder(synchronizers.getCredentials()));
|
||||
return new Message<>(synchronizers);
|
||||
@@ -97,7 +97,7 @@ public class SynchronizersController {
|
||||
|
||||
@ResponseBody
|
||||
@RequestMapping(value = {"/delete"}, produces = {MediaType.APPLICATION_JSON_VALUE})
|
||||
public Message<?> delete(@RequestParam("ids") List<String> ids) {
|
||||
public Message<?> delete(@RequestParam List<String> ids) {
|
||||
logger.debug("-delete ids : {} ", ids);
|
||||
if (synchronizersService.deleteBatch(ids)) {
|
||||
return new Message<Connectors>(Message.SUCCESS);
|
||||
@@ -108,7 +108,7 @@ public class SynchronizersController {
|
||||
|
||||
@ResponseBody
|
||||
@RequestMapping(value = {"/synchr"})
|
||||
public Message<?> synchr(@RequestParam("id") String id) {
|
||||
public Message<?> synchr(@RequestParam String id) {
|
||||
logger.debug("-sync ids : {}", id);
|
||||
|
||||
List<String> ids = StrUtils.string2List(id, ",");
|
||||
|
||||
@@ -91,7 +91,7 @@ public class AccountsController {
|
||||
}
|
||||
|
||||
@GetMapping(value = { "/get/{id}" }, produces = {MediaType.APPLICATION_JSON_VALUE})
|
||||
public Message<Accounts> get(@PathVariable("id") String id) {
|
||||
public Message<Accounts> get(@PathVariable String id) {
|
||||
Accounts account=accountsService.get(id);
|
||||
account.setRelatedPassword(PasswordReciprocal.getInstance().decoder(account.getRelatedPassword()));
|
||||
return new Message<>(account);
|
||||
@@ -159,7 +159,7 @@ public class AccountsController {
|
||||
}
|
||||
|
||||
@DeleteMapping(value={"/delete"}, produces = {MediaType.APPLICATION_JSON_VALUE})
|
||||
public Message<Accounts> delete(@RequestParam("ids") List<String> ids,@CurrentUser UserInfo currentUser) {
|
||||
public Message<Accounts> delete(@RequestParam List<String> ids,@CurrentUser UserInfo currentUser) {
|
||||
_logger.debug("-delete ids : {} " , ids);
|
||||
|
||||
if (accountsService.deleteBatch(ids)) {
|
||||
|
||||
@@ -55,7 +55,7 @@ public class ConnectorHistoryController {
|
||||
@GetMapping({"/connectorHistory/fetch"})
|
||||
@ResponseBody
|
||||
public Message<?> fetch(
|
||||
@ModelAttribute("historyConnector") HistoryConnector historyConnector,
|
||||
@ModelAttribute HistoryConnector historyConnector,
|
||||
@CurrentUser UserInfo currentUser){
|
||||
logger.debug("historys/historyConnector/fetch/ {}",historyConnector);
|
||||
historyConnector.setInstId(currentUser.getInstId());
|
||||
|
||||
@@ -55,7 +55,7 @@ public class LoginAppsHistoryController {
|
||||
@GetMapping({"/loginAppsHistory/fetch"})
|
||||
@ResponseBody
|
||||
public Message<?> fetch(
|
||||
@ModelAttribute("historyLoginApp") HistoryLoginApps historyLoginApp,
|
||||
@ModelAttribute HistoryLoginApps historyLoginApp,
|
||||
@CurrentUser UserInfo currentUser){
|
||||
logger.debug("historys/loginAppsHistory/fetch/ {}",historyLoginApp);
|
||||
historyLoginApp.setId(null);
|
||||
|
||||
@@ -55,7 +55,7 @@ public class LoginHistoryController {
|
||||
@GetMapping({"/loginHistory/fetch"})
|
||||
@ResponseBody
|
||||
public Message<?> fetch(
|
||||
@ModelAttribute("historyLogin") HistoryLogin historyLogin,
|
||||
@ModelAttribute HistoryLogin historyLogin,
|
||||
@CurrentUser UserInfo currentUser
|
||||
){
|
||||
logger.debug("historys/loginHistory/fetch/ {}",historyLogin);
|
||||
|
||||
@@ -55,7 +55,7 @@ public class SynchronizerHistoryController {
|
||||
@GetMapping({"/synchronizerHistory/fetch"})
|
||||
@ResponseBody
|
||||
public Message<?> fetch(
|
||||
@ModelAttribute("historySynchronizer") HistorySynchronizer historySynchronizer,
|
||||
@ModelAttribute HistorySynchronizer historySynchronizer,
|
||||
@CurrentUser UserInfo currentUser){
|
||||
logger.debug("historys/synchronizerHistory/fetch/ {}",historySynchronizer);
|
||||
historySynchronizer.setInstId(currentUser.getInstId());
|
||||
|
||||
@@ -55,7 +55,7 @@ public class SystemLogsController {
|
||||
*/
|
||||
@GetMapping({"/systemLogs/fetch"})
|
||||
@ResponseBody
|
||||
public Message<?> fetch(@ModelAttribute("historyLog") HistorySystemLogs historyLog,
|
||||
public Message<?> fetch(@ModelAttribute HistorySystemLogs historyLog,
|
||||
@CurrentUser UserInfo currentUser){
|
||||
logger.debug("historys/historyLog/fetch {} ",historyLog);
|
||||
historyLog.setInstId(currentUser.getInstId());
|
||||
|
||||
@@ -189,7 +189,7 @@ public class GroupMemberController {
|
||||
|
||||
@ResponseBody
|
||||
@RequestMapping(value={"/delete"}, produces = {MediaType.APPLICATION_JSON_VALUE})
|
||||
public Message<?> delete(@RequestParam("ids") List<String> ids,@CurrentUser UserInfo currentUser) {
|
||||
public Message<?> delete(@RequestParam List<String> ids,@CurrentUser UserInfo currentUser) {
|
||||
logger.debug("-delete ids : {}" , ids);
|
||||
if (service.deleteBatch(ids)) {
|
||||
return new Message<GroupMember>(Message.SUCCESS);
|
||||
|
||||
@@ -81,7 +81,7 @@ public class GroupsController {
|
||||
}
|
||||
|
||||
@RequestMapping(value = { "/get/{id}" }, produces = {MediaType.APPLICATION_JSON_VALUE})
|
||||
public Message<?> get(@PathVariable("id") String id,@CurrentUser UserInfo currentUser) {
|
||||
public Message<?> get(@PathVariable String id,@CurrentUser UserInfo currentUser) {
|
||||
Groups group =service.get(id);
|
||||
return new Message<Groups>(group);
|
||||
}
|
||||
@@ -133,7 +133,7 @@ public class GroupsController {
|
||||
|
||||
@ResponseBody
|
||||
@RequestMapping(value={"/delete"}, produces = {MediaType.APPLICATION_JSON_VALUE})
|
||||
public Message<?> delete(@RequestParam("ids") List<String> ids,@CurrentUser UserInfo currentUser) {
|
||||
public Message<?> delete(@RequestParam List<String> ids,@CurrentUser UserInfo currentUser) {
|
||||
logger.debug("-delete ids : {}" , ids);
|
||||
ids.removeAll(Arrays.asList("ROLE_ALL_USER","ROLE_ADMINISTRATORS","-1"));
|
||||
if (service.deleteBatch(ids)) {
|
||||
|
||||
@@ -92,7 +92,7 @@ public class OrganizationsController {
|
||||
}
|
||||
|
||||
@RequestMapping(value = { "/get/{id}" }, produces = {MediaType.APPLICATION_JSON_VALUE})
|
||||
public Message<?> get(@PathVariable("id") String id) {
|
||||
public Message<?> get(@PathVariable String id) {
|
||||
Organizations org=organizationsService.get(id);
|
||||
return new Message<Organizations>(org);
|
||||
}
|
||||
@@ -135,7 +135,7 @@ public class OrganizationsController {
|
||||
|
||||
@ResponseBody
|
||||
@RequestMapping(value={"/delete"}, produces = {MediaType.APPLICATION_JSON_VALUE})
|
||||
public Message<?> delete(@RequestParam("ids") List<String> ids,@CurrentUser UserInfo currentUser) {
|
||||
public Message<?> delete(@RequestParam List<String> ids,@CurrentUser UserInfo currentUser) {
|
||||
logger.debug("-delete ids : {} " , ids);
|
||||
if (ids != null && ids.contains(Organizations.ROOT_ORG_ID)) {
|
||||
return new Message<Organizations>(Message.FAIL, "根组织不允许删除");
|
||||
@@ -196,7 +196,7 @@ public class OrganizationsController {
|
||||
|
||||
@RequestMapping(value = "/import")
|
||||
public Message<?> importingOrganizations(
|
||||
@ModelAttribute("excelImportFile")ExcelImport excelImportFile,
|
||||
@ModelAttribute ExcelImport excelImportFile,
|
||||
@CurrentUser UserInfo currentUser) {
|
||||
if (excelImportFile.isExcelNotEmpty() ) {
|
||||
try {
|
||||
|
||||
@@ -107,14 +107,14 @@ public class UserInfoController {
|
||||
}
|
||||
|
||||
@RequestMapping(value = { "/get/{id}" }, produces = {MediaType.APPLICATION_JSON_VALUE})
|
||||
public Message<?> get(@PathVariable("id") String id) {
|
||||
public Message<?> get(@PathVariable String id) {
|
||||
UserInfo userInfo=userInfoService.get(id);
|
||||
userInfo.trans();
|
||||
return new Message<UserInfo>(userInfo);
|
||||
}
|
||||
|
||||
@RequestMapping(value = { "/getByUsername/{username}" }, produces = {MediaType.APPLICATION_JSON_VALUE})
|
||||
public Message<?> getByUsername(@PathVariable("username") String username) {
|
||||
public Message<?> getByUsername(@PathVariable String username) {
|
||||
UserInfo userInfo=userInfoService.findByUsername(username);
|
||||
userInfo.trans();
|
||||
return new Message<UserInfo>(userInfo);
|
||||
@@ -173,7 +173,7 @@ public class UserInfoController {
|
||||
|
||||
@ResponseBody
|
||||
@RequestMapping(value={"/delete"}, produces = {MediaType.APPLICATION_JSON_VALUE})
|
||||
public Message<?> delete(@RequestParam("ids") List<String> ids,@CurrentUser UserInfo currentUser) {
|
||||
public Message<?> delete(@RequestParam List<String> ids,@CurrentUser UserInfo currentUser) {
|
||||
logger.debug("-delete ids : {} " , ids);
|
||||
|
||||
if (userInfoService.deleteBatch(ids)) {
|
||||
@@ -273,7 +273,7 @@ public class UserInfoController {
|
||||
|
||||
@RequestMapping(value = "/import")
|
||||
public Message<?> importingUsers(
|
||||
@ModelAttribute("excelImportFile")ExcelImport excelImportFile,
|
||||
@ModelAttribute ExcelImport excelImportFile,
|
||||
@CurrentUser UserInfo currentUser) {
|
||||
if (excelImportFile.isExcelNotEmpty() ) {
|
||||
try {
|
||||
|
||||
@@ -79,7 +79,7 @@ public class ResourcesController {
|
||||
}
|
||||
|
||||
@RequestMapping(value = { "/get/{id}" }, produces = {MediaType.APPLICATION_JSON_VALUE})
|
||||
public Message<?> get(@PathVariable("id") String id) {
|
||||
public Message<?> get(@PathVariable String id) {
|
||||
Resources resource=resourcesService.get(id);
|
||||
return new Message<Resources>(resource);
|
||||
}
|
||||
@@ -122,7 +122,7 @@ public class ResourcesController {
|
||||
|
||||
@ResponseBody
|
||||
@RequestMapping(value={"/delete"}, produces = {MediaType.APPLICATION_JSON_VALUE})
|
||||
public Message<?> delete(@RequestParam("ids") List<String> ids,@CurrentUser UserInfo currentUser) {
|
||||
public Message<?> delete(@RequestParam List<String> ids,@CurrentUser UserInfo currentUser) {
|
||||
logger.debug("-delete ids : {} " , ids);
|
||||
if (resourcesService.deleteBatch(ids)) {
|
||||
systemLog.insert(
|
||||
|
||||
@@ -185,7 +185,7 @@ public class RoleMemberController {
|
||||
|
||||
@ResponseBody
|
||||
@RequestMapping(value={"/delete"}, produces = {MediaType.APPLICATION_JSON_VALUE})
|
||||
public Message<RoleMember> delete(@RequestParam("ids") List<String> ids,@CurrentUser UserInfo currentUser) {
|
||||
public Message<RoleMember> delete(@RequestParam List<String> ids,@CurrentUser UserInfo currentUser) {
|
||||
_logger.debug("-delete ids : {}" , ids);
|
||||
if (roleMemberService.deleteBatch(ids)) {
|
||||
return new Message<>(Message.SUCCESS);
|
||||
|
||||
@@ -82,7 +82,7 @@ public class RolesController {
|
||||
}
|
||||
|
||||
@GetMapping(value = { "/get/{id}" }, produces = {MediaType.APPLICATION_JSON_VALUE})
|
||||
public Message<Roles> get(@PathVariable("id") String id,@CurrentUser UserInfo currentUser) {
|
||||
public Message<Roles> get(@PathVariable String id,@CurrentUser UserInfo currentUser) {
|
||||
Roles role=rolesService.get(id);
|
||||
return new Message<>(role);
|
||||
}
|
||||
@@ -133,7 +133,7 @@ public class RolesController {
|
||||
}
|
||||
|
||||
@DeleteMapping(value={"/delete"}, produces = {MediaType.APPLICATION_JSON_VALUE})
|
||||
public Message<Roles> delete(@RequestParam("ids") List<String> ids,@CurrentUser UserInfo currentUser) {
|
||||
public Message<Roles> delete(@RequestParam List<String> ids,@CurrentUser UserInfo currentUser) {
|
||||
_logger.debug("-delete ids : {}" , ids);
|
||||
ids.removeAll(Arrays.asList("ROLE_ALL_USER","ROLE_ADMINISTRATORS","-1"));
|
||||
if (rolesService.deleteBatch(ids)) {
|
||||
|
||||
Reference in New Issue
Block a user