Pay attention to any pain you have when you swallow or pain you have near your chest. In addition to heartburn, signs of esophageal ulcers include:  Nausea or vomiting Abdominal pain Weight loss Vomiting blood Contact your doctor for a physical exam if you have any signs of an esophageal ulcer. The doctor will do a physical and run tests to look inside your esophagus. You'll also need a blood test to determine if if you have an esophageal infection. To see inside your esophagus, the doctor may take an x-ray or do an upper endoscopy. During the endoscopy, they'll insert a thin tube with a camera down your esophagus to look for ulcers. If your esophageal ulcer was caused by an infection, you'll need to take prescription antibiotics. For an ulcer caused by acid reflux, work with your doctor to manage your stomach acid production. The doctor may recommend:  Proton pump inhibitors Antacids H-2-receptor blockers It will take several weeks for the medication to treat the cause of your esophageal ulcer. You'll need to check back in with your doctor after a few weeks or months to ensure that the ulcer healed. The doctor might want to do another upper endoscopy to look at the site of the ulcer. These can inflame and irritate your esophageal ulcer as it heals. If you don't want to completely quit smoking while your ulcer heals, you may just want to stop until the ulcer is completely healed. Smoking and drinking may slow down your recovery time. If your esophageal ulcer was caused by excess stomach acid, pay attention to the foods that give you heartburn or nausea. Try to limit eating these foods so you don't develop another ulcer or make yours worse:  Spicy foods Fried foods Caffeine Tomatoes, onions, and garlic Citrus Mint Eat a balanced diet of whole grains, lean proteins, fruits, and vegetables while you're recovering from an esophageal ulcer. To prevent acid reflux from causing another ulcer, eat slower and don't lie down for at least 3 hours after eating. You might find that it's easier to eat several small meals...

TL;DR in Chinese:
检查是否有食管溃疡的症状。 接受检查，以诊断食管溃疡。 服用药物治疗溃疡引起的反酸或感染。 几周后找医生复查。 不要喝酒或抽烟。 记食物日记，以避免引起胃酸倒流的食物。 调整饮食习惯，防止胃酸倒流。