稽核区域配置
This commit is contained in:
@@ -9,10 +9,8 @@ import org.springframework.context.annotation.Configuration;
|
||||
import org.springframework.context.annotation.Profile;
|
||||
import springfox.documentation.RequestHandler;
|
||||
import springfox.documentation.builders.ApiInfoBuilder;
|
||||
import springfox.documentation.builders.ParameterBuilder;
|
||||
import springfox.documentation.builders.PathSelectors;
|
||||
import springfox.documentation.builders.RequestHandlerSelectors;
|
||||
import springfox.documentation.schema.ModelRef;
|
||||
import springfox.documentation.service.ApiInfo;
|
||||
import springfox.documentation.service.Parameter;
|
||||
import springfox.documentation.spi.DocumentationType;
|
||||
@@ -54,16 +52,13 @@ public class Swagger2Config {
|
||||
.groupName(groupName)
|
||||
.select()
|
||||
.apis(this.scanBasePackage(packages))
|
||||
.paths(PathSelectors.regex(".*/inspection/setting/.*|.*getRegionUserAndSubRegion"))
|
||||
.build()
|
||||
.globalOperationParameters(pars);
|
||||
}
|
||||
|
||||
private List<Parameter> getParameters() {
|
||||
List<Parameter> pars = new ArrayList<>();
|
||||
pars.add(new ParameterBuilder().name("accessToken").description("令牌").required(true)
|
||||
.modelRef(new ModelRef("string"))
|
||||
.defaultValue("{{accessToken}}")
|
||||
.parameterType("query").build());
|
||||
return pars;
|
||||
}
|
||||
|
||||
|
||||
@@ -1,15 +1,22 @@
|
||||
package com.cool.store.controller;
|
||||
|
||||
import com.cool.store.context.CurrentUserHolder;
|
||||
import com.cool.store.dto.inspection.setting.AddInspectionSettingDTO;
|
||||
import com.cool.store.dto.inspection.setting.CheckInspectionSettingDTO;
|
||||
import com.cool.store.dto.inspection.setting.DeleteInspectionSettingDTO;
|
||||
import com.cool.store.dto.inspection.setting.UpdateInspectionSettingDTO;
|
||||
import com.cool.store.response.ResponseResult;
|
||||
import com.cool.store.service.InspectionSettingService;
|
||||
import com.cool.store.vo.inspection.setting.InspectionSettingCheckVO;
|
||||
import com.cool.store.vo.inspection.setting.InspectionSettingDetailVO;
|
||||
import com.cool.store.vo.inspection.setting.InspectionSettingPageVO;
|
||||
import com.github.pagehelper.PageInfo;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
@@ -23,46 +30,49 @@ import java.util.List;
|
||||
@Api(tags = "稽核区域设置")
|
||||
public class InspectionSettingController {
|
||||
|
||||
@Resource
|
||||
private InspectionSettingService inspectionSettingService;
|
||||
|
||||
@ApiOperation("稽核区域设置列表")
|
||||
@GetMapping("/inspection/setting/page")
|
||||
public ResponseResult<InspectionSettingPageVO> getInspectionSettingPage(@RequestParam("pageNum")Integer pageNum, @RequestParam("pageSize")Integer pageSize){
|
||||
return ResponseResult.success();
|
||||
public ResponseResult<PageInfo<InspectionSettingPageVO>> getInspectionSettingPage(@RequestParam("pageNum")Integer pageNum, @RequestParam("pageSize")Integer pageSize){
|
||||
return ResponseResult.success(inspectionSettingService.getInspectionSettingPage(pageNum, pageSize));
|
||||
}
|
||||
|
||||
@ApiOperation("稽核区域设置详情")
|
||||
@GetMapping("/inspection/setting/detail")
|
||||
public ResponseResult<InspectionSettingPageVO> getInspectionSettingDetail(@RequestParam("inspectionSettingId")Long inspectionSettingId){
|
||||
return ResponseResult.success();
|
||||
public ResponseResult<InspectionSettingDetailVO> getInspectionSettingDetail(@RequestParam("inspectionSettingId")Long inspectionSettingId){
|
||||
return ResponseResult.success(inspectionSettingService.getInspectionSettingDetail(inspectionSettingId));
|
||||
}
|
||||
|
||||
@ApiOperation("新增稽核区域设置")
|
||||
@PostMapping("/inspection/setting/add")
|
||||
public ResponseResult<Long> addInspectionSetting(@RequestBody AddInspectionSettingDTO param){
|
||||
return ResponseResult.success();
|
||||
return ResponseResult.success(inspectionSettingService.addInspectionSetting(CurrentUserHolder.getUserId(), param));
|
||||
}
|
||||
|
||||
@ApiOperation("编辑稽核区域设置")
|
||||
@PostMapping("/inspection/setting/update")
|
||||
public ResponseResult<Integer> updateInspectionSetting(@RequestBody UpdateInspectionSettingDTO param){
|
||||
return ResponseResult.success();
|
||||
return ResponseResult.success(inspectionSettingService.updateInspectionSetting(CurrentUserHolder.getUserId(), param));
|
||||
}
|
||||
|
||||
@ApiOperation("删除稽核区域设置")
|
||||
@DeleteMapping("/inspection/setting/delete")
|
||||
@PostMapping("/inspection/setting/delete")
|
||||
public ResponseResult<Integer> deleteInspectionSetting(@RequestBody DeleteInspectionSettingDTO param){
|
||||
return ResponseResult.success();
|
||||
return ResponseResult.success(inspectionSettingService.deleteInspectionSetting(CurrentUserHolder.getUserId(), param.getInspectionSettingId()));
|
||||
}
|
||||
|
||||
@ApiOperation("校验稽核区域设置")
|
||||
@PostMapping("/inspection/setting/check")
|
||||
public ResponseResult<List<InspectionSettingCheckVO>> checkInspectionSetting(@RequestBody CheckInspectionSettingDTO param){
|
||||
return ResponseResult.success(inspectionSettingService.checkInspectionSetting(param));
|
||||
}
|
||||
|
||||
@ApiOperation("查询已经关联的稽核人")
|
||||
@DeleteMapping("/inspection/setting/bind/users")
|
||||
@GetMapping("/inspection/setting/bind/users")
|
||||
public ResponseResult<List<String>> getBingUser(){
|
||||
return ResponseResult.success();
|
||||
}
|
||||
|
||||
@ApiOperation("查询已经配置的归属地")
|
||||
@DeleteMapping("/inspection/setting/bind/open/area")
|
||||
public ResponseResult<List<Long>> getBingOpenArea(){
|
||||
return ResponseResult.success();
|
||||
return ResponseResult.success(inspectionSettingService.getBingUser());
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -4,6 +4,7 @@ import com.cool.store.response.ResponseResult;
|
||||
import com.cool.store.service.RegionService;
|
||||
import com.cool.store.service.ZoneService;
|
||||
import com.cool.store.vo.region.RegionBaseInfoVO;
|
||||
import com.cool.store.vo.region.RegionUserAndSubRegionVO;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiImplicitParam;
|
||||
import io.swagger.annotations.ApiImplicitParams;
|
||||
@@ -34,7 +35,7 @@ public class RegionController {
|
||||
@Resource
|
||||
private RegionService regionService;
|
||||
@Resource
|
||||
ZoneService zoneService;
|
||||
private ZoneService zoneService;
|
||||
|
||||
@GetMapping("/getRegionList")
|
||||
public ResponseResult<List<RegionBaseInfoVO>> getRegionBaseInfoList(){
|
||||
@@ -52,4 +53,10 @@ public class RegionController {
|
||||
return ResponseResult.success(zoneService.queryAllBingZoneRegionList(type));
|
||||
}
|
||||
|
||||
@ApiOperation("获取部门下的人和部门")
|
||||
@GetMapping("/getRegionUserAndSubRegion")
|
||||
public ResponseResult<RegionUserAndSubRegionVO> getRegionUserAndSubRegion(@RequestParam(value = "regionId")String regionId){
|
||||
return ResponseResult.success(regionService.getRegionUserAndSubRegion(regionId));
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user