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