use of org.springframework.web.bind.annotation.PostMapping in project paascloud-master by paascloud.
the class UacLogMainController method queryLogListWithPage.
/**
* 查询日志列表.
*
* @param uacLogQueryDtoPage the uac log query dto page
*
* @return the wrapper
*/
@PostMapping(value = "/queryListWithPage")
@ApiOperation(httpMethod = "POST", value = "查询日志列表")
public Wrapper queryLogListWithPage(@ApiParam(name = "uacLogQueryDtoPage", value = "日志查询条件") @RequestBody UacLogMainDto uacLogQueryDtoPage) {
logger.info("查询日志处理列表 uacLogQueryDtoPage={}", uacLogQueryDtoPage);
PageInfo pageInfo = uacLogService.queryLogListWithPage(uacLogQueryDtoPage);
return WrapMapper.ok(pageInfo);
}
use of org.springframework.web.bind.annotation.PostMapping in project paascloud-master by paascloud.
the class MallUserController method updateInformation.
/**
* 更新用户信息.
*
* @param userInfoDto the user info dto
*
* @return the wrapper
*/
@PostMapping(value = "/updateInformation")
@ApiOperation(httpMethod = "POST", value = "更新用户信息")
public Wrapper<UserInfoDto> updateInformation(@RequestBody UserInfoDto userInfoDto) {
logger.info("updateInformation - 更新用户基本信息 userInfoDto={}", userInfoDto);
UacUser uacUser = new ModelMapper().map(userInfoDto, UacUser.class);
uacUserService.updateUser(uacUser);
return WrapMapper.ok();
}
use of org.springframework.web.bind.annotation.PostMapping in project paascloud-master by paascloud.
the class MallUserController method getInformation.
/**
* 获取用户信息.
*
* @return the information
*/
@PostMapping(value = "/getInformation")
@ApiOperation(httpMethod = "POST", value = "获取用户信息")
public Wrapper<UserInfoDto> getInformation() {
LoginAuthDto loginAuthDto = getLoginAuthDto();
Long userId = loginAuthDto.getUserId();
logger.info("queryUserInfo - 查询用户基本信息 userId={}", userId);
UacUser uacUser = uacUserService.queryByUserId(userId);
if (uacUser == null) {
return WrapMapper.error("找不到当前用户");
}
UserInfoDto userInfoDto = new UserInfoDto();
BeanUtils.copyProperties(uacUser, userInfoDto);
return WrapMapper.ok(userInfoDto);
}
use of org.springframework.web.bind.annotation.PostMapping in project paascloud-master by paascloud.
the class TpcMqTopicController method modifyTopicStatusById.
/**
* 修改topic状态.
*
* @param updateStatusDto the update status dto
*
* @return the wrapper
*/
@PostMapping(value = "/modifyStatusById")
@ApiOperation(httpMethod = "POST", value = "修改topic状态")
@LogAnnotation
public Wrapper modifyTopicStatusById(@ApiParam(value = "修改topic状态") @RequestBody UpdateStatusDto updateStatusDto) {
logger.info("修改topic状态 updateStatusDto={}", updateStatusDto);
Long roleId = updateStatusDto.getId();
LoginAuthDto loginAuthDto = getLoginAuthDto();
TpcMqTopic topic = new TpcMqTopic();
topic.setId(roleId);
topic.setStatus(updateStatusDto.getStatus());
topic.setUpdateInfo(loginAuthDto);
int result = tpcMqTopicService.update(topic);
return super.handleResult(result);
}
use of org.springframework.web.bind.annotation.PostMapping in project paascloud-master by paascloud.
the class UacMenuCommonController method checkUacMenuUrl.
/**
* 检测菜单URL唯一性
*
* @param uacMenuCheckUrlDto the uac menu check url dto
*
* @return the wrapper
*/
@PostMapping(value = "/checkMenuUrl")
@ApiOperation(httpMethod = "POST", value = "检测菜单URL唯一性")
public Wrapper<Boolean> checkUacMenuUrl(@ApiParam(name = "uacMenuCheckUrlDto", value = "id与url") @RequestBody UacMenuCheckUrlDto uacMenuCheckUrlDto) {
logger.info("检测菜单URL唯一性 uacMenuCheckUrlDto={}", uacMenuCheckUrlDto);
Long id = uacMenuCheckUrlDto.getMenuId();
String url = uacMenuCheckUrlDto.getUrl();
Example example = new Example(UacMenu.class);
Example.Criteria criteria = example.createCriteria();
if (id != null) {
criteria.andNotEqualTo("id", id);
}
criteria.andEqualTo("url", url);
int result = uacMenuService.selectCountByExample(example);
return WrapMapper.ok(result < 1);
}
Aggregations