use of com.paascloud.provider.model.domain.TpcMqConsumer in project paascloud-master by paascloud.
the class TpcMqConsumerServiceImpl method updateStatus.
private void updateStatus(final String consumerGroup, final int status) {
TpcMqConsumer tpcMqConsumer = tpcMqConsumerMapper.getByCid(consumerGroup);
if (tpcMqConsumer.getStatus() != null && tpcMqConsumer.getStatus() != status) {
TpcMqConsumer update = new TpcMqConsumer();
update.setStatus(status);
update.setId(tpcMqConsumer.getId());
tpcMqConsumerMapper.updateByPrimaryKeySelective(update);
}
}
use of com.paascloud.provider.model.domain.TpcMqConsumer 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);
}
Aggregations