public async Task <IActionResult> BindHealthManager([FromBody] UpdateConsumerBindMangerRequestDto request) { var managerBiz = new HealthManagerBiz(); var response = await managerBiz.BindHealthManager(request); return(Success(response)); }
/// <summary> /// 会员绑定健康管理师 /// </summary> /// <param name="consumerGuid"></param> /// <returns></returns> public async Task <bool> BindHealthManager(UpdateConsumerBindMangerRequestDto request) { var sql = @"update t_consumer set `health_manager_guid` = @ManagerGuid, `manager_bind_date` = CURRENT_TIMESTAMP where consumer_guid = @ConsumerGuid"; using (var conn = MySqlHelper.GetConnection()) { var result = await conn.ExecuteAsync(sql, new { request.ConsumerGuid, request.ManagerGuid }); return(result > 0); } }