Boa tarde, estou fazendo um App, onde tenho que organizar a ordem de seleção dos “tickets” a serem gerados. Por exemplo. O mesmo usuario abre 3 tickets diferentes, e eu devo colocar em ordem no meu banco de dados o atendimento como se fosse em fila, sendo os tickets aberto na 1 fila, 2 fila e 3 fila assim por diante organizados.
Entenderam?
Se puderem me ajudar!
Hi there, @contato58… when you say you have to put the service in order in your database, what do you mean? What order do you need the tickets to be in? As you probably know, each ticket will have a created date, so could you order the queue by that date? If you can elaborate a bit and/or share some screenshots of your setup, I’m sure someone will be able to help you out.
Best…
Mike
Obrigado Mike, veja meu problema.
O usuario entra no meu app com cadastro simples, nome email e telefone. Depois ele é direcionado a uma lista gerada no banco de dados com titulos de musica.
Estou tentando construir o seguinte:
O usuário seleciona o item que quer e este é enviado para uma outra lista, vou chamar de “db2” com a escolha, no entanto se ele quiser escolher pela segunda vez ou mais vezes, também sera inserida nesta “db2”.
A questão é quando um outro usuario esta escolhendo pela primeira vez, o pedido dele seja colocado numa fila de atender os pedidos junto com os outros usuarios que estao pedindo pela primeira vez.
Uma especie de agrupamento.
Dai organizando assim.
Os que pedem pela primeira vez, sao organizados por ordem de criação.
Os que pedem pela segunda vez, só serão atendidos quando os que pediram pela primeira vez forem completamente atendidos.
Os que pedirem pela terceira vez só serão atendidos depois que os que pediram pela segunda vez forem atendidos.
Será que deu pra entender?
I think I understand, and based on the details you provided, here is what comes to mind. I would probably consider having a number field on the db2
data type, and that field would store a number that represents an order’s number for a specific user. So, when User A orders for the first time, the number on the associated order is 1. When User A orders for the second time, the number on the associated order is 2, and so on. With that field in place, you could search for all orders where the number is 1, and you could answer those orders before you move on to orders where the number is 2, and so on. Does that make sense and does it sound like something that could work for you?
Sim eu pensei nisso mas não sei como executar! Acho que esse seria o caminho sim!
It should be pretty simple to implement. When you create a new thing in the db2
data type, look for the last thing in that data type that was created by the current user, and add 1 to that thing’s number field to populate the new thing’s number field.