|
|
@@ -1,5 +1,6 @@
|
|
|
package com.jzg.organization.controller;
|
|
|
|
|
|
+import cn.hutool.core.util.StrUtil;
|
|
|
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
|
|
import com.jzg.commons.annotation.IgnoreTenant;
|
|
|
import com.jzg.commons.aop.OperatorTrajectory;
|
|
|
@@ -20,6 +21,8 @@ import com.jzg.organization.service.SysUserJzgInfoSalesmanService;
|
|
|
import com.jzg.organization.service.SysUserService;
|
|
|
import io.swagger.v3.oas.annotations.Operation;
|
|
|
import jakarta.annotation.Resource;
|
|
|
+import org.slf4j.Logger;
|
|
|
+import org.slf4j.LoggerFactory;
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
import org.springframework.web.bind.annotation.*;
|
|
|
|
|
|
@@ -34,6 +37,9 @@ import java.util.Map;
|
|
|
@RestController
|
|
|
@RequestMapping("/userInfo")
|
|
|
public class UserController extends BaseController {
|
|
|
+
|
|
|
+ private static final Logger log = LoggerFactory.getLogger(UserController.class);
|
|
|
+
|
|
|
@Resource
|
|
|
private SysUserService sysUserService;
|
|
|
@Autowired
|
|
|
@@ -86,7 +92,7 @@ public class UserController extends BaseController {
|
|
|
@OperatorTrajectory(moduleName = "业务管理/业务员管理/删除成员",type = "D",OperationDict = OperationTypeEnum.DELETE,mapperClass = SysUserJzgInfoMapper.class,entityClass = SysUserVo.class,primary = "ids")
|
|
|
@Operation(summary = "删除业务员接口", description = "删除业务员接口")
|
|
|
@PostMapping(value = "/delete")
|
|
|
- public HttpResult deleteUser(@RequestBody IsDeleteVo isDeleteVo) {
|
|
|
+ public HttpResult<Boolean> deleteUser(@RequestBody IsDeleteVo isDeleteVo) {
|
|
|
return sysUserService.deleteUserInfo(isDeleteVo);
|
|
|
}
|
|
|
|
|
|
@@ -214,8 +220,12 @@ public class UserController extends BaseController {
|
|
|
@IgnoreTenant
|
|
|
@Operation(summary = "获取用户的租户列表",description = "获取用户的租户列表")
|
|
|
@PostMapping(value = "/getTenantList")
|
|
|
- public HttpResult<List<SysTennatVo>> getTenantList(){
|
|
|
- return HttpResult.ok(sysUserService.getTenantList(getUserName()));
|
|
|
+ public HttpResult<List<SysTennatVo>> getTenantList(@RequestParam(required = false)String username){
|
|
|
+ log.info("获取用户的租户列表: username=[{}]",username);
|
|
|
+ if(StrUtil.isBlank(username)){
|
|
|
+ username = getUserName();
|
|
|
+ }
|
|
|
+ return HttpResult.ok(sysUserService.getTenantList(username));
|
|
|
}
|
|
|
|
|
|
@GetMapping("/setTenantList/{systemCode}")
|