The treatment of gastroenteritis needs to be based on the cause. If the infection is caused by bacteria, cephalosporins can be used for treatment; if it is caused by a viral infection, cephalosporins are generally not recommended for treatment. For gastroenteritis caused by bacterial infections, common bacteria include Campylobacter, Shigella, Vibrio cholerae, etc. Antibiotics such as levofloxacin, safranin and cephalosporins can be used, together with drugs to protect the gastrointestinal mucosa and antidiarrheal drugs. Viral infections cause gastroenteritis, common viruses include rotavirus, norovirus, astrovirus and enteric adenovirus, etc. Application of antibiotics may cause diarrhea or promote the growth of drug-resistant bacteria, and are generally not recommended. In addition, gastroenteritis caused by parasitic infections is also generally not recommended to be treated with cephalosporins, but rather with antiparasitic drugs such as artemisinin, quinine, and trichostatin. For patients with gastroenteritis, medication should be administered under the guidance of a physician. If necessary, oral rehydration salts or intravenous rehydration can be used to replenish electrolytes to ensure fluid balance and avoid dehydration. During the treatment period, the diet should be light, avoid spicy stimulation, hydrate more and keep warm to avoid aggravating the symptoms.