|  |  |  | 
|---|
|  |  |  | @PreventRepeat | 
|---|
|  |  |  | @ApiOperation("新建") | 
|---|
|  |  |  | @PostMapping("/create") | 
|---|
|  |  |  | @RequiresPermissions("company:company:create") | 
|---|
|  |  |  | @RequiresPermissions("business:company:create") | 
|---|
|  |  |  | public ApiResponse create(@RequestBody @Valid CompanyCreatOrUpdateRequest company) { | 
|---|
|  |  |  | return ApiResponse.success(companyService.create(company)); | 
|---|
|  |  |  | } | 
|---|
|  |  |  |  | 
|---|
|  |  |  | @ApiOperation("根据ID删除") | 
|---|
|  |  |  | @GetMapping("/delete/{id}") | 
|---|
|  |  |  | @RequiresPermissions("company:company:delete") | 
|---|
|  |  |  | @RequiresPermissions("business:company:delete") | 
|---|
|  |  |  | public ApiResponse deleteById(@PathVariable Integer id) { | 
|---|
|  |  |  | companyService.deleteById(id); | 
|---|
|  |  |  | return ApiResponse.success(null); | 
|---|
|  |  |  | 
|---|
|  |  |  |  | 
|---|
|  |  |  | @ApiOperation("批量删除") | 
|---|
|  |  |  | @GetMapping("/delete/batch") | 
|---|
|  |  |  | @RequiresPermissions("company:company:delete") | 
|---|
|  |  |  | @RequiresPermissions("business:company:delete") | 
|---|
|  |  |  | public ApiResponse deleteByIdInBatch(@RequestParam String ids) { | 
|---|
|  |  |  | companyService.deleteByIdInBatch(this.getIdList(ids)); | 
|---|
|  |  |  | return ApiResponse.success(null); | 
|---|
|  |  |  | 
|---|
|  |  |  |  | 
|---|
|  |  |  | @ApiOperation("根据ID修改") | 
|---|
|  |  |  | @PostMapping("/updateById") | 
|---|
|  |  |  | @RequiresPermissions("company:company:update") | 
|---|
|  |  |  | @RequiresPermissions("business:company:update") | 
|---|
|  |  |  | public ApiResponse updateById(@RequestBody Company company) { | 
|---|
|  |  |  | companyService.updateById(company); | 
|---|
|  |  |  | return ApiResponse.success(null); | 
|---|
|  |  |  | 
|---|
|  |  |  |  | 
|---|
|  |  |  | @ApiOperation("分页查询") | 
|---|
|  |  |  | @PostMapping("/page") | 
|---|
|  |  |  | @RequiresPermissions("company:company:query") | 
|---|
|  |  |  | @RequiresPermissions("business:company:query") | 
|---|
|  |  |  | public ApiResponse<PageData<Company>> findPage (@RequestBody PageWrap<Company> pageWrap) { | 
|---|
|  |  |  | return ApiResponse.success(companyService.findPage(pageWrap)); | 
|---|
|  |  |  | } | 
|---|
|  |  |  |  | 
|---|
|  |  |  | @ApiOperation("根据ID查询") | 
|---|
|  |  |  | @GetMapping("/{id}") | 
|---|
|  |  |  | @RequiresPermissions("company:company:query") | 
|---|
|  |  |  | @RequiresPermissions("business:company:query") | 
|---|
|  |  |  | public ApiResponse findById(@PathVariable Integer id) { | 
|---|
|  |  |  | return ApiResponse.success(companyService.findById(id)); | 
|---|
|  |  |  | } | 
|---|
|  |  |  | 
|---|
|  |  |  | */ | 
|---|
|  |  |  | @ApiOperation("平台查询企业信息-分页查询") | 
|---|
|  |  |  | @PostMapping("/findPlatformPage") | 
|---|
|  |  |  | @RequiresPermissions("company:company:query") | 
|---|
|  |  |  | @RequiresPermissions("business:company:query") | 
|---|
|  |  |  | public ApiResponse<PageData<Company>> findPlatformPage(@RequestBody PageWrap<Company> pageWrap){ | 
|---|
|  |  |  | return ApiResponse.success(companyService.findPlatformPage(pageWrap)); | 
|---|
|  |  |  | } | 
|---|
|  |  |  | 
|---|
|  |  |  | */ | 
|---|
|  |  |  | @ApiOperation("根据企业企业id 查询企业用户") | 
|---|
|  |  |  | @PostMapping("/findPlatformById") | 
|---|
|  |  |  | @RequiresPermissions("company:company:query") | 
|---|
|  |  |  | @RequiresPermissions("business:company:query") | 
|---|
|  |  |  | public ApiResponse<Company> findPlatformById(@RequestParam Integer companyId){ | 
|---|
|  |  |  | return ApiResponse.success(companyService.findPlatformById(companyId)); | 
|---|
|  |  |  | } | 
|---|
|  |  |  |  | 
|---|
|  |  |  | /** | 
|---|
|  |  |  | * 主键更新 | 
|---|
|  |  |  | * | 
|---|
|  |  |  | * @param company 实体对象 | 
|---|
|  |  |  | */ | 
|---|
|  |  |  | @ApiOperation("根据ID修改-编辑") | 
|---|
|  |  |  | @PostMapping("/update") | 
|---|
|  |  |  | @RequiresPermissions("business:company:update") | 
|---|
|  |  |  | public ApiResponse update(@RequestBody CompanyCreatOrUpdateRequest company){ | 
|---|
|  |  |  | companyService.updateById(company); | 
|---|
|  |  |  | return ApiResponse.success(null); | 
|---|
|  |  |  | } | 
|---|
|  |  |  | } | 
|---|