yonge 3 年之前
父节点
当前提交
5c18d306f3
共有 1 个文件被更改,包括 36 次插入0 次删除
  1. 36 0
      mec-web/src/main/java/com/ym/mec/web/controller/TenantConfigController.java

+ 36 - 0
mec-web/src/main/java/com/ym/mec/web/controller/TenantConfigController.java

@@ -0,0 +1,36 @@
+package com.ym.mec.web.controller;
+
+import io.swagger.annotations.Api;
+import io.swagger.annotations.ApiOperation;
+
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.security.access.prepost.PreAuthorize;
+import org.springframework.web.bind.annotation.GetMapping;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RestController;
+
+import com.ym.mec.biz.dal.entity.TenantConfig;
+import com.ym.mec.biz.service.TenantConfigService;
+import com.ym.mec.common.controller.BaseController;
+import com.ym.mec.common.page.WrapperUtil;
+import com.ym.mec.common.tenant.TenantContextHolder;
+
+@RequestMapping("tenantConfig")
+@Api(tags = "机构配置管理")
+@RestController
+public class TenantConfigController extends BaseController {
+
+	@Autowired
+	private TenantConfigService tenantConfigService;
+
+	@ApiOperation("修改机构启用停用状态")
+	@GetMapping(value = "/get")
+	@PreAuthorize("@pcs.hasPermissions('tenantConfig/get')")
+	public Object get() {
+		// 查询云教室扣费标准
+		TenantConfig tenantConfig = tenantConfigService.getOne(new WrapperUtil<TenantConfig>().hasEq("tenant_id_", TenantContextHolder.getTenantId())
+				.queryWrapper());
+
+		return succeed(tenantConfig);
+	}
+}