Search in sources :

Example 1 with TpcMqTopic

use of com.paascloud.provider.model.domain.TpcMqTopic 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)

Aggregations

LoginAuthDto (com.paascloud.base.dto.LoginAuthDto)1 LogAnnotation (com.paascloud.core.annotation.LogAnnotation)1 TpcMqTopic (com.paascloud.provider.model.domain.TpcMqTopic)1 ApiOperation (io.swagger.annotations.ApiOperation)1 PostMapping (org.springframework.web.bind.annotation.PostMapping)1