Search in sources :

Example 76 with PostMapping

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);
}
Also used : PageInfo(com.github.pagehelper.PageInfo) PostMapping(org.springframework.web.bind.annotation.PostMapping) ApiOperation(io.swagger.annotations.ApiOperation)

Example 77 with PostMapping

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();
}
Also used : UacUser(com.paascloud.provider.model.domain.UacUser) ModelMapper(org.modelmapper.ModelMapper) PostMapping(org.springframework.web.bind.annotation.PostMapping) ApiOperation(io.swagger.annotations.ApiOperation)

Example 78 with PostMapping

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);
}
Also used : UacUser(com.paascloud.provider.model.domain.UacUser) UserInfoDto(com.paascloud.provider.model.dto.user.UserInfoDto) LoginAuthDto(com.paascloud.base.dto.LoginAuthDto) PostMapping(org.springframework.web.bind.annotation.PostMapping) ApiOperation(io.swagger.annotations.ApiOperation)

Example 79 with PostMapping

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);
}
Also used : TpcMqTopic(com.paascloud.provider.model.domain.TpcMqTopic) LoginAuthDto(com.paascloud.base.dto.LoginAuthDto) LogAnnotation(com.paascloud.core.annotation.LogAnnotation) PostMapping(org.springframework.web.bind.annotation.PostMapping) ApiOperation(io.swagger.annotations.ApiOperation)

Example 80 with PostMapping

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);
}
Also used : Example(tk.mybatis.mapper.entity.Example) PostMapping(org.springframework.web.bind.annotation.PostMapping) ApiOperation(io.swagger.annotations.ApiOperation)

Aggregations

PostMapping (org.springframework.web.bind.annotation.PostMapping)83 ApiOperation (io.swagger.annotations.ApiOperation)21 Profile (com.erudika.scoold.core.Profile)20 Post (com.erudika.scoold.core.Post)9 Example (tk.mybatis.mapper.entity.Example)8 HashMap (java.util.HashMap)7 Service (org.apereo.cas.authentication.principal.Service)6 ResponseEntity (org.springframework.http.ResponseEntity)6 ResponseBody (org.springframework.web.bind.annotation.ResponseBody)6 LoginAuthDto (com.paascloud.base.dto.LoginAuthDto)5 AuthenticationResult (org.apereo.cas.authentication.AuthenticationResult)5 RegisteredService (org.apereo.cas.services.RegisteredService)5 User (amu.zhcet.data.user.User)4 Report (com.erudika.scoold.core.Report)4 IOException (java.io.IOException)4 Map (java.util.Map)4 Credential (org.apereo.cas.authentication.Credential)4 Reply (com.erudika.scoold.core.Reply)3 Log (io.github.tesla.ops.common.Log)3 LinkedHashMap (java.util.LinkedHashMap)3