| | |
| | | import com.stylefeng.guns.modular.system.model.TYard; |
| | | import com.stylefeng.guns.modular.system.model.TYardVo; |
| | | import com.stylefeng.guns.modular.system.service.TYardService; |
| | | import com.stylefeng.guns.modular.system.utils.UserInfoUtil; |
| | | import com.stylefeng.guns.modular.system.utils.tips.SuccessTip; |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiImplicitParam; |
| | |
| | | @ApiImplicitParam(name = "city", value = "country/state/city/zipcode", required = false, dataType = "String", paramType = "query"), |
| | | @ApiImplicitParam(name = "pageNumber", value = "pageNumber", required = true, dataType = "int", paramType = "query"), |
| | | @ApiImplicitParam(name = "pageSize", value = "pageSize", required = true, dataType = "int", paramType = "query"), |
| | | @ApiImplicitParam(name = "companyId", value = "companyId", required = true, dataType = "int", paramType = "query"), |
| | | }) |
| | | @GetMapping(value = "/list") |
| | | @ResponseBody |
| | | public Object list(String name, String city, int pageNumber, int pageSize) { |
| | | public Object list(String name, String city, int pageNumber, int pageSize,int companyId) { |
| | | Page<TYardVo> tYardPage = new Page<>(pageNumber, pageSize); |
| | | List<TYardVo> tYardVoPage = yardService.getList(name,city,tYardPage); |
| | | List<TYardVo> tYardVoPage = yardService.getList(name,city,tYardPage,companyId); |
| | | tYardPage.setRecords(tYardVoPage); |
| | | return new SuccessTip(tYardPage); |
| | | } |
| | |
| | | @PostMapping(value = "/addYard") |
| | | @ResponseBody |
| | | public Object addYard(@RequestBody TYard tYard) { |
| | | tYard.setCompanyId(UserInfoUtil.getId()); |
| | | tYard.setCreateTime(new Date()); |
| | | yardService.insert(tYard); |
| | | return new SuccessTip(); |
| | |
| | | return new SuccessTip(); |
| | | } |
| | | |
| | | @ApiOperation(value = "卡车公司-场地详情", notes = "卡车公司-场地详情") |
| | | @ApiImplicitParams({ |
| | | @ApiImplicitParam(name = "Authorization", value = "用户token(Bearer +token)", required = true, dataType = "String", paramType = "header", defaultValue = "Bearer eyJhbGciOiJIUzUxMiJ9....."), |
| | | @ApiImplicitParam(name = "id", value = "id", required = true, dataType = "int", paramType = "query"), |
| | | }) |
| | | @GetMapping(value = "/yardInfo") |
| | | @ResponseBody |
| | | public Object yardInfo(int id) { |
| | | TYard tYard = yardService.selectById(id); |
| | | return new SuccessTip(tYard); |
| | | } |
| | | |
| | | |
| | | public static void main(String[] args) { |
| | | |