MobileRepairController.java 1.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546
  1. package platform.modules.mobile;
  2. import org.springframework.beans.factory.annotation.Autowired;
  3. import org.springframework.stereotype.Controller;
  4. import org.springframework.ui.ModelMap;
  5. import org.springframework.web.bind.annotation.GetMapping;
  6. import org.springframework.web.bind.annotation.PostMapping;
  7. import org.springframework.web.bind.annotation.RequestBody;
  8. import org.springframework.web.bind.annotation.RequestMapping;
  9. import org.springframework.web.bind.annotation.ResponseBody;
  10. import platform.common.base.controller.BaseController;
  11. import platform.modules.build.entity.Maintenance;
  12. import platform.modules.build.service.MaintenanceService;
  13. import platform.modules.sys.web.ResponseMessage;
  14. @Controller
  15. @RequestMapping(value = "/mobile/repair")
  16. public class MobileRepairController extends BaseController {
  17. @Autowired
  18. MaintenanceService maintenanceService;
  19. @GetMapping(value = "/addRepair")
  20. public String waterElePage(){
  21. return BASE_MOBIl_PATH+"repair";
  22. }
  23. @PostMapping(value = "/applyRepairInfo")
  24. @ResponseBody
  25. public ResponseMessage applyRepairInfo(@RequestBody Maintenance maintenance){
  26. Boolean boolean1 = maintenanceService.saveMaintenance(maintenance);
  27. if(boolean1){
  28. return ResponseMessage.success("申报成功 ");
  29. }else{
  30. return ResponseMessage.error("申报失败");
  31. }
  32. }
  33. }