public async Task <object> Put(int id, [FromBody] ExchangeLikeViewModel model) { MessageBase2 result = new MessageBase2(); await _exchangeService.LikeAsync(id, model.UserId); return(result); }
public async Task <object> Put(int id, [FromBody] ExchangeLikeViewModel model) { MessageBase2 result = new MessageBase2(); if (!await this._cooperationService.LikeAsync(id, model.UserId)) { result.Success = Permanent.FAILED; result.Error = (int)StatusCodeEnum.FORBIDDEN; result.ErrorMsg = "已到达参与上线"; } return(result); }