package com.steerinfo.dil.controller; import com.steerinfo.dil.service.impl.TmsTruckEnFactoryResultService; import com.steerinfo.dil.service.impl.TmsTruckLeaveFactoryService; import com.steerinfo.dil.util.BaseRESTfulController; import com.steerinfo.framework.controller.RESTfulResult; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.web.bind.annotation.PostMapping; import org.springframework.web.bind.annotation.RequestBody; import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RestController; import java.util.Map; /** * @author luobang * @create 2021-10-29 17:52 */ @RestController @RequestMapping("/${api.version}/tmsTruck") public class TmsTruckLeaveFactoryController extends BaseRESTfulController { @Autowired TmsTruckLeaveFactoryService tmsTruckLeaveFactoryService; @PostMapping("/leaveFactory") public RESTfulResult addLeaveFactory(@RequestBody(required = true) Map map){ Integer integer=tmsTruckLeaveFactoryService.updateLeaveFactory(map); if (integer!=1){ return failed(); } return success(); } }