Search in sources :

Example 21 with LogAnnotation

use of com.paascloud.core.annotation.LogAnnotation in project paascloud-master by paascloud.

the class TpcMqProducerController method modifyProducerStatusById.

/**
 * 修改生产者状态.
 *
 * @param updateStatusDto the update status dto
 *
 * @return the wrapper
 */
@PostMapping(value = "/modifyStatusById")
@ApiOperation(httpMethod = "POST", value = "修改生产者状态")
@LogAnnotation
public Wrapper modifyProducerStatusById(@ApiParam(value = "修改producer状态") @RequestBody UpdateStatusDto updateStatusDto) {
    logger.info("修改producer状态 updateStatusDto={}", updateStatusDto);
    Long roleId = updateStatusDto.getId();
    LoginAuthDto loginAuthDto = getLoginAuthDto();
    TpcMqProducer producer = new TpcMqProducer();
    producer.setId(roleId);
    producer.setStatus(updateStatusDto.getStatus());
    producer.setUpdateInfo(loginAuthDto);
    int result = tpcMqProducerService.update(producer);
    return super.handleResult(result);
}
Also used : TpcMqProducer(com.paascloud.provider.model.domain.TpcMqProducer) LoginAuthDto(com.paascloud.base.dto.LoginAuthDto) LogAnnotation(com.paascloud.core.annotation.LogAnnotation) ApiOperation(io.swagger.annotations.ApiOperation)

Example 22 with LogAnnotation

use of com.paascloud.core.annotation.LogAnnotation 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 23 with LogAnnotation

use of com.paascloud.core.annotation.LogAnnotation in project paascloud-master by paascloud.

the class TpcMqConsumerController method modifyConsumerStatusById.

/**
 * 更改消费者状态.
 *
 * @param updateStatusDto the update status dto
 *
 * @return the wrapper
 */
@PostMapping(value = "/modifyStatusById")
@ApiOperation(httpMethod = "POST", value = "更改消费者状态")
@LogAnnotation
public Wrapper modifyConsumerStatusById(@ApiParam(value = "更改消费者状态") @RequestBody UpdateStatusDto updateStatusDto) {
    logger.info("修改consumer状态 updateStatusDto={}", updateStatusDto);
    Long consumerId = updateStatusDto.getId();
    LoginAuthDto loginAuthDto = getLoginAuthDto();
    TpcMqConsumer consumer = new TpcMqConsumer();
    consumer.setId(consumerId);
    consumer.setStatus(updateStatusDto.getStatus());
    consumer.setUpdateInfo(loginAuthDto);
    int result = tpcMqConsumerService.update(consumer);
    return super.handleResult(result);
}
Also used : TpcMqConsumer(com.paascloud.provider.model.domain.TpcMqConsumer) LoginAuthDto(com.paascloud.base.dto.LoginAuthDto) LogAnnotation(com.paascloud.core.annotation.LogAnnotation) ApiOperation(io.swagger.annotations.ApiOperation)

Example 24 with LogAnnotation

use of com.paascloud.core.annotation.LogAnnotation in project paascloud-master by paascloud.

the class UacActionMainController method modifyActionStatus.

/**
 * 根据权限Id修改角色状态.
 *
 * @param modifyStatusDto the modify status dto
 *
 * @return the wrapper
 */
@PostMapping(value = "/modifyStatus")
@ApiOperation(httpMethod = "POST", value = "根据权限Id修改角色状态")
@LogAnnotation
public Wrapper modifyActionStatus(@ApiParam(name = "modifyActionStatus", value = "修改权限状态") @RequestBody ModifyStatusDto modifyStatusDto) {
    logger.info("根据角色Id修改权限状态 modifyStatusDto={}", modifyStatusDto);
    Long actionId = modifyStatusDto.getId();
    Preconditions.checkArgument(actionId != null, "权限ID不能为空");
    UacAction uacRole = new UacAction();
    uacRole.setId(actionId);
    uacRole.setStatus(modifyStatusDto.getStatus());
    uacRole.setUpdateInfo(getLoginAuthDto());
    int result = uacActionService.update(uacRole);
    return super.handleResult(result);
}
Also used : UacAction(com.paascloud.provider.model.domain.UacAction) LogAnnotation(com.paascloud.core.annotation.LogAnnotation) ApiOperation(io.swagger.annotations.ApiOperation)

Aggregations

LogAnnotation (com.paascloud.core.annotation.LogAnnotation)24 LoginAuthDto (com.paascloud.base.dto.LoginAuthDto)22 ApiOperation (io.swagger.annotations.ApiOperation)22 ValidateAnnotation (com.paascloud.core.annotation.ValidateAnnotation)2 PostMapping (org.springframework.web.bind.annotation.PostMapping)2 OperationLogDto (com.paascloud.core.annotation.OperationLogDto)1 MdcProductCategory (com.paascloud.provider.model.domain.MdcProductCategory)1 TpcMqConsumer (com.paascloud.provider.model.domain.TpcMqConsumer)1 TpcMqProducer (com.paascloud.provider.model.domain.TpcMqProducer)1 TpcMqTag (com.paascloud.provider.model.domain.TpcMqTag)1 TpcMqTopic (com.paascloud.provider.model.domain.TpcMqTopic)1 UacAction (com.paascloud.provider.model.domain.UacAction)1 UacGroup (com.paascloud.provider.model.domain.UacGroup)1 UacMenu (com.paascloud.provider.model.domain.UacMenu)1 UacRole (com.paascloud.provider.model.domain.UacRole)1 UacRoleUser (com.paascloud.provider.model.domain.UacRoleUser)1 UacUser (com.paascloud.provider.model.domain.UacUser)1 UacBizException (com.paascloud.provider.model.exceptions.UacBizException)1 UserAgent (eu.bitwalker.useragentutils.UserAgent)1 Method (java.lang.reflect.Method)1