|
@@ -2,15 +2,19 @@ package com.bizmatics.controller.web;
|
|
|
|
|
|
|
|
|
import com.bizmatics.common.core.bean.ApiResult;
|
|
|
+import com.bizmatics.common.core.bean.CommonPage;
|
|
|
+import com.bizmatics.model.SysTenant;
|
|
|
import com.bizmatics.model.SysTenantConfig;
|
|
|
import com.bizmatics.model.vo.SysTenantConfigVo;
|
|
|
+import com.bizmatics.model.vo.SysTenantOneVo;
|
|
|
+import com.bizmatics.service.PatrolInspectionDeviceService;
|
|
|
import com.bizmatics.service.SysTenantConfigService;
|
|
|
+import com.bizmatics.service.SysTenantService;
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
-import org.springframework.web.bind.annotation.GetMapping;
|
|
|
-import org.springframework.web.bind.annotation.RequestMapping;
|
|
|
-import org.springframework.web.bind.annotation.RequestParam;
|
|
|
-import org.springframework.web.bind.annotation.RestController;
|
|
|
+import org.springframework.web.bind.annotation.*;
|
|
|
+import org.springframework.web.multipart.MultipartFile;
|
|
|
|
|
|
+import javax.servlet.http.HttpServletRequest;
|
|
|
import java.util.List;
|
|
|
|
|
|
/**
|
|
@@ -25,6 +29,12 @@ public class SysTenantConfigController {
|
|
|
@Autowired
|
|
|
private SysTenantConfigService sysTenantConfigService;
|
|
|
|
|
|
+ @Autowired
|
|
|
+ private SysTenantService sysTenantService;
|
|
|
+
|
|
|
+ @Autowired
|
|
|
+ private PatrolInspectionDeviceService patrolInspectionDeviceService;
|
|
|
+
|
|
|
/**
|
|
|
* 登录页-样式配置查询
|
|
|
*
|
|
@@ -45,5 +55,62 @@ public class SysTenantConfigController {
|
|
|
public ApiResult<List<SysTenantConfig>> getMiddleConfig() {
|
|
|
return ApiResult.success(sysTenantConfigService.getMiddleConfig());
|
|
|
}
|
|
|
+
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 租户管理-系统配置-主列表查询
|
|
|
+ * @param sysTenantOneVo
|
|
|
+ * @return
|
|
|
+ */
|
|
|
+ @PostMapping("getTenantData")
|
|
|
+ public ApiResult<CommonPage<SysTenant>> getTenantData(@RequestBody SysTenantOneVo sysTenantOneVo) {
|
|
|
+ return ApiResult.success(sysTenantService.getTenantData(sysTenantOneVo));
|
|
|
+ }
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 租户管理-系统配置-租户配置查询
|
|
|
+ * @param tenantId 租户ID
|
|
|
+ * @return
|
|
|
+ */
|
|
|
+ @GetMapping("/getMiddleConfigList")
|
|
|
+ public ApiResult<List<SysTenantConfig>> getMiddleConfigList(@RequestParam Integer tenantId) {
|
|
|
+ return ApiResult.success(sysTenantConfigService.getMiddleConfigList(tenantId));
|
|
|
+ }
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 租户管理-系统配置-租户配置新增
|
|
|
+ * @param sysTenantConfig
|
|
|
+ * @return
|
|
|
+ */
|
|
|
+ @PostMapping("addMiddleConfig")
|
|
|
+ public ApiResult<Void> addMiddleConfig(@RequestBody SysTenantConfig sysTenantConfig) {
|
|
|
+ sysTenantConfigService.addMiddleConfig(sysTenantConfig);
|
|
|
+ return ApiResult.success();
|
|
|
+ }
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 租户管理-系统配置-租户配置修改
|
|
|
+ * @param sysTenantConfig
|
|
|
+ * @return
|
|
|
+ */
|
|
|
+ @PostMapping("updaMiddleConfig")
|
|
|
+ public ApiResult<Void> updaMiddleConfig(@RequestBody SysTenantConfig sysTenantConfig) {
|
|
|
+ sysTenantConfigService.updaMiddleConfig(sysTenantConfig);
|
|
|
+ return ApiResult.success();
|
|
|
+ }
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 租户管理-系统配置-图片上传
|
|
|
+ * @param file 图片
|
|
|
+ * @param request
|
|
|
+ * @return
|
|
|
+ */
|
|
|
+ @PostMapping("pictureUpload")
|
|
|
+ public ApiResult<String> c(@RequestParam(value = "file", required = false) MultipartFile file, HttpServletRequest request
|
|
|
+ ) {
|
|
|
+ return ApiResult.success(patrolInspectionDeviceService.pictureUpload(file, request));
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
}
|
|
|
|