BranchesController.java 813 B

12345678910111213141516171819202122232425262728
  1. package com.ygj.yuemum.controller.admin;
  2. import com.ygj.yuemum.domain.admin.Branches;
  3. import com.ygj.yuemum.service.admin.BranchesService;
  4. import org.springframework.beans.factory.annotation.Autowired;
  5. import org.springframework.web.bind.annotation.GetMapping;
  6. import org.springframework.web.bind.annotation.RestController;
  7. import java.util.List;
  8. @RestController
  9. public class BranchesController {
  10. @Autowired
  11. private BranchesService branchesService;
  12. @GetMapping("/getBranches")
  13. public List<Branches> getBranches() {
  14. List<Branches> branches = branchesService.getBranches();
  15. return branches;
  16. }
  17. @GetMapping("/getMktBranches")
  18. public List<Branches> getMktBranches() {
  19. List<Branches> branches = branchesService.getMktBranches();
  20. return branches;
  21. }
  22. }