|
|
@@ -1,23 +1,28 @@
|
|
|
package com.jzg.controller;
|
|
|
|
|
|
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
|
|
+import com.jzg.annotation.Log;
|
|
|
import com.jzg.core.page.HttpResult;
|
|
|
+import com.jzg.entity.enums.BusinessType;
|
|
|
import com.jzg.entity.vo.SysRoleVo;
|
|
|
import com.jzg.entity.vo.SysSystemVo;
|
|
|
import com.jzg.service.SysSystemService;
|
|
|
import io.swagger.v3.oas.annotations.Operation;
|
|
|
import io.swagger.v3.oas.annotations.tags.Tag;
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
+import org.springframework.validation.annotation.Validated;
|
|
|
import org.springframework.web.bind.annotation.*;
|
|
|
|
|
|
+import java.util.List;
|
|
|
+
|
|
|
/**
|
|
|
* 租户管理接口
|
|
|
*
|
|
|
* @author dongxin
|
|
|
*/
|
|
|
-@Tag(name="租户接口")
|
|
|
+@Tag(name="租户管理")
|
|
|
@RestController
|
|
|
-@RequestMapping("/sys/system")
|
|
|
+@RequestMapping("/system")
|
|
|
public class SysSystemController {
|
|
|
|
|
|
@Autowired
|
|
|
@@ -28,11 +33,44 @@ public class SysSystemController {
|
|
|
* @param sysSystemVo
|
|
|
* @return
|
|
|
*/
|
|
|
- @PostMapping("page")
|
|
|
- @Operation(summary = "租户分页列表")
|
|
|
- public HttpResult page(@RequestBody SysSystemVo sysSystemVo){
|
|
|
+ @PostMapping("/sysList")
|
|
|
+ @Operation(summary = "租户列表")
|
|
|
+ public HttpResult sysList(@RequestBody SysSystemVo sysSystemVo){
|
|
|
Page page = sysSystemVo.getPage();
|
|
|
return HttpResult.ok(sysSystemService.queryPage(page,sysSystemVo));
|
|
|
}
|
|
|
|
|
|
+ /**
|
|
|
+ * 根据ID获取租户详情
|
|
|
+ * @param id
|
|
|
+ * @return
|
|
|
+ */
|
|
|
+ @GetMapping(value = { "/sysGet"})
|
|
|
+ @Operation(summary = "根据id获取租户详情")
|
|
|
+ public HttpResult sysGet(@RequestBody String id) {
|
|
|
+ return HttpResult.ok(sysSystemService.queryById(id));
|
|
|
+ }
|
|
|
+
|
|
|
+// @Log(title = "租户管理", businessType = BusinessType.INSERT)
|
|
|
+// @PostMapping
|
|
|
+// public HttpResult add(@Validated @RequestBody SysSystemVo sysSystemVo) {
|
|
|
+//
|
|
|
+//
|
|
|
+// deptService.checkDeptDataScope(user.getDeptId());
|
|
|
+// if (!userService.checkUserNameUnique(user)) {
|
|
|
+// return R.fail("新增用户'" + user.getUserName() + "'失败,登录账号已存在");
|
|
|
+// } else if (StringUtils.isNotEmpty(user.getPhonenumber()) && !userService.checkPhoneUnique(user)) {
|
|
|
+// return R.fail("新增用户'" + user.getUserName() + "'失败,手机号码已存在");
|
|
|
+// } else if (StringUtils.isNotEmpty(user.getEmail()) && !userService.checkEmailUnique(user)) {
|
|
|
+// return R.fail("新增用户'" + user.getUserName() + "'失败,邮箱账号已存在");
|
|
|
+// }
|
|
|
+// if (TenantHelper.isEnable()) {
|
|
|
+// if (!tenantService.checkAccountBalance(TenantHelper.getTenantId())) {
|
|
|
+// return R.fail("当前租户下用户名额不足,请联系管理员");
|
|
|
+// }
|
|
|
+// }
|
|
|
+// user.setPassword(BCrypt.hashpw(user.getPassword()));
|
|
|
+// return toAjax(userService.insertUser(user));
|
|
|
+// }
|
|
|
+
|
|
|
}
|