AdminPlaceController.java 2.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960
  1. // package com.bofeng.controller;
  2. //
  3. // import com.bofeng.Consts;
  4. // import com.bofeng.entity.Place;
  5. // import com.bofeng.service.PlaceService;
  6. // import com.google.common.base.Strings;
  7. // import com.yvan.Model;
  8. // import com.yvan.ModelOps;
  9. // import com.yvan.mvc.Pd;
  10. // import lombok.val;
  11. // import org.apache.shiro.authz.annotation.RequiresPermissions;
  12. // import org.springframework.beans.factory.annotation.Autowired;
  13. // import org.springframework.web.bind.annotation.GetMapping;
  14. // import org.springframework.web.bind.annotation.PostMapping;
  15. // import org.springframework.web.bind.annotation.RequestBody;
  16. // import org.springframework.web.bind.annotation.RestController;
  17. // import org.springframework.web.servlet.ModelAndView;
  18. //
  19. // import java.util.List;
  20. //
  21. // @RestController
  22. // @RequiresPermissions(Consts.USER_TYPE_ADMIN)
  23. // public class AdminPlaceController {
  24. //
  25. // @Autowired
  26. // private PlaceService placeService;
  27. //
  28. // // @GetMapping("/admin/place.html")
  29. // // public ModelAndView placeView() {
  30. // // return new ModelAndView("/admin/place.ftl");
  31. // // }
  32. //
  33. // @GetMapping("/admin/place.json")
  34. // public Model<List<Place>> getPlace() {
  35. // return Model.newSuccess(placeService.selectAll());
  36. // }
  37. //
  38. // @PostMapping("/admin/place_addnew.json")
  39. // public ModelOps placeAddNew(@RequestBody Place place) {
  40. // val msg = placeService.insert(place);
  41. // if (Strings.isNullOrEmpty(msg)) {
  42. // return ModelOps.newSuccess();
  43. // }
  44. // return ModelOps.newFail(msg);
  45. // }
  46. //
  47. // @PostMapping("/admin/place_edit")
  48. // public ModelOps placeEdit(@RequestBody Place place) {
  49. // val msg = placeService.updateById(place);
  50. // if (Strings.isNullOrEmpty(msg)) {
  51. // return ModelOps.newSuccess();
  52. // }
  53. // return ModelOps.newFail(msg);
  54. // }
  55. //
  56. // @PostMapping("/admin/place_delete.json")
  57. // public ModelOps placeDelete(@Pd(name = "placeId", desc = "") Long placeId) {
  58. // return ModelOps.newSuccess(placeService.deleteById(placeId));
  59. // }
  60. // }