use of org.springframework.web.bind.annotation.PostMapping in project paascloud-master by paascloud.
the class UacMenuCommonController method checkUacMenuActionCode.
/**
* 检测菜单编码是否已存在
*
* @param uacMenuCheckCodeDto the uac menu check code dto
*
* @return the wrapper
*/
@PostMapping(value = "/checkMenuCode")
@ApiOperation(httpMethod = "POST", value = "检测菜单编码是否已存在")
public Wrapper<Boolean> checkUacMenuActionCode(@ApiParam(name = "uacMenuCheckCodeDto", value = "id与url") @RequestBody UacMenuCheckCodeDto uacMenuCheckCodeDto) {
logger.info("校验菜单编码唯一性 uacMenuCheckCodeDto={}", uacMenuCheckCodeDto);
Long id = uacMenuCheckCodeDto.getMenuId();
String menuCode = uacMenuCheckCodeDto.getMenuCode();
Example example = new Example(UacMenu.class);
Example.Criteria criteria = example.createCriteria();
if (id != null) {
criteria.andNotEqualTo("id", id);
}
criteria.andEqualTo("menuCode", menuCode);
int result = uacMenuService.selectCountByExample(example);
return WrapMapper.ok(result < 1);
}
use of org.springframework.web.bind.annotation.PostMapping in project paascloud-master by paascloud.
the class EmailController method checkRestEmailCode.
/**
* 校验短信验证码.
*
* @param sendEmailMessage the send email message
*
* @return the wrapper
*/
@PostMapping(value = "/checkRestEmailCode")
@ApiOperation(httpMethod = "POST", value = "校验充值密码邮件验证码")
public Wrapper checkRestEmailCode(@ApiParam(value = "验证信息") @RequestBody SendEmailMessage sendEmailMessage) {
logger.info("校验短信验证码, checkRestEmailCode={}", sendEmailMessage);
LoginAuthDto loginAuthDto = this.getLoginAuthDto();
emailService.checkEmailCode(sendEmailMessage, loginAuthDto.getLoginName());
return WrapMapper.ok();
}
use of org.springframework.web.bind.annotation.PostMapping in project paascloud-master by paascloud.
the class UacActionCommonController method checkActionCode.
/**
* 检测权限编码是否已存在
*
* @param uacActionCheckCodeDto the uac action check code dto
*
* @return the wrapper
*/
@PostMapping(value = "/checkActionCode")
@ApiOperation(httpMethod = "POST", value = "检测权限编码是否已存在")
public Wrapper<Boolean> checkActionCode(@ApiParam(name = "uacActionCheckCodeDto", value = "id与url") @RequestBody UacActionCheckCodeDto uacActionCheckCodeDto) {
logger.info("校验权限编码唯一性 uacActionCheckCodeDto={}", uacActionCheckCodeDto);
Long id = uacActionCheckCodeDto.getActionId();
String actionCode = uacActionCheckCodeDto.getActionCode();
Example example = new Example(UacAction.class);
Example.Criteria criteria = example.createCriteria();
if (id != null) {
criteria.andNotEqualTo("id", id);
}
criteria.andEqualTo("actionCode", actionCode);
int result = uacActionService.selectCountByExample(example);
return WrapMapper.ok(result < 1);
}
use of org.springframework.web.bind.annotation.PostMapping in project paascloud-master by paascloud.
the class UacActionCommonController method checkActionUrl.
/**
* 检测权限URL唯一性
*
* @param uacActionCheckUrlDto the uac action check url dto
*
* @return the wrapper
*/
@PostMapping(value = "/checkUrl")
@ApiOperation(httpMethod = "POST", value = "检测权限URL唯一性")
public Wrapper<Boolean> checkActionUrl(@ApiParam(name = "uacActionCheckUrlDto", value = "id与url") @RequestBody UacActionCheckUrlDto uacActionCheckUrlDto) {
logger.info("检测权限URL唯一性 uacActionCheckUrlDto={}", uacActionCheckUrlDto);
Long id = uacActionCheckUrlDto.getActionId();
String url = uacActionCheckUrlDto.getUrl();
Example example = new Example(UacAction.class);
Example.Criteria criteria = example.createCriteria();
if (id != null) {
criteria.andNotEqualTo("id", id);
}
criteria.andEqualTo("url", url);
int result = uacActionService.selectCountByExample(example);
return WrapMapper.ok(result < 1);
}
use of org.springframework.web.bind.annotation.PostMapping in project paascloud-master by paascloud.
the class UacTokenMainController method queryUacActionListWithPage.
/**
* 分页查询角色信息.
*
* @param token the token
*
* @return the wrapper
*/
@PostMapping(value = "/queryListWithPage")
@ApiOperation(httpMethod = "POST", value = "查询在线用户列表")
public Wrapper queryUacActionListWithPage(@ApiParam(name = "token") @RequestBody TokenMainQueryDto token) {
logger.info("查询在线用户列表. token={}", token);
PageInfo pageInfo = uacUserTokenService.listTokenWithPage(token);
return WrapMapper.ok(pageInfo);
}
Aggregations