|  | @@ -1,47 +1,38 @@
 | 
	
		
			
				|  |  |  package com.ym.mec.auth.web.controller;
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  | -import com.ym.mec.auth.service.TenantInfoService;
 | 
	
		
			
				|  |  | -import com.ym.mec.common.page.QueryInfo;
 | 
	
		
			
				|  |  | -import io.swagger.annotations.Api;
 | 
	
		
			
				|  |  | -import io.swagger.annotations.ApiImplicitParam;
 | 
	
		
			
				|  |  | -import io.swagger.annotations.ApiImplicitParams;
 | 
	
		
			
				|  |  | -import io.swagger.annotations.ApiOperation;
 | 
	
		
			
				|  |  | -
 | 
	
		
			
				|  |  | -import java.util.Date;
 | 
	
		
			
				|  |  | -
 | 
	
		
			
				|  |  | -import org.apache.commons.lang3.StringUtils;
 | 
	
		
			
				|  |  | -import org.springframework.beans.factory.annotation.Autowired;
 | 
	
		
			
				|  |  | -import org.springframework.beans.factory.annotation.Value;
 | 
	
		
			
				|  |  | -import org.springframework.http.MediaType;
 | 
	
		
			
				|  |  | -import org.springframework.security.access.prepost.PreAuthorize;
 | 
	
		
			
				|  |  | -import org.springframework.security.crypto.bcrypt.BCryptPasswordEncoder;
 | 
	
		
			
				|  |  | -import org.springframework.web.bind.annotation.GetMapping;
 | 
	
		
			
				|  |  | -import org.springframework.web.bind.annotation.PathVariable;
 | 
	
		
			
				|  |  | -import org.springframework.web.bind.annotation.PostMapping;
 | 
	
		
			
				|  |  | -import org.springframework.web.bind.annotation.RequestBody;
 | 
	
		
			
				|  |  | -import org.springframework.web.bind.annotation.RequestMapping;
 | 
	
		
			
				|  |  | -import org.springframework.web.bind.annotation.RestController;
 | 
	
		
			
				|  |  | -
 | 
	
		
			
				|  |  |  import com.ym.mec.auth.api.entity.SysUser;
 | 
	
		
			
				|  |  |  import com.ym.mec.auth.service.SysRoleService;
 | 
	
		
			
				|  |  |  import com.ym.mec.auth.service.SysUserRoleService;
 | 
	
		
			
				|  |  |  import com.ym.mec.auth.service.SysUserService;
 | 
	
		
			
				|  |  | +import com.ym.mec.auth.service.TenantInfoService;
 | 
	
		
			
				|  |  |  import com.ym.mec.auth.web.controller.queryInfo.SysUserQueryInfo;
 | 
	
		
			
				|  |  |  import com.ym.mec.common.controller.BaseController;
 | 
	
		
			
				|  |  |  import com.ym.mec.common.entity.HttpResponseResult;
 | 
	
		
			
				|  |  |  import com.ym.mec.common.entity.ImResult;
 | 
	
		
			
				|  |  |  import com.ym.mec.common.entity.ImUserModel;
 | 
	
		
			
				|  |  |  import com.ym.mec.common.exception.BizException;
 | 
	
		
			
				|  |  | +import com.ym.mec.common.page.QueryInfo;
 | 
	
		
			
				|  |  |  import com.ym.mec.common.security.AuthUser;
 | 
	
		
			
				|  |  |  import com.ym.mec.common.security.SecurityConstants;
 | 
	
		
			
				|  |  |  import com.ym.mec.common.security.SecurityUtils;
 | 
	
		
			
				|  |  |  import com.ym.mec.common.service.IdGeneratorService;
 | 
	
		
			
				|  |  |  import com.ym.mec.im.ImFeignService;
 | 
	
		
			
				|  |  | -import com.ym.mec.thirdparty.eseal.ESealPlugin;
 | 
	
		
			
				|  |  |  import com.ym.mec.thirdparty.user.realname.RealnameAuthenticationPluginContext;
 | 
	
		
			
				|  |  |  import com.ym.mec.thirdparty.user.realname.provider.LinkfaceRealnameAuthenticationPlugin;
 | 
	
		
			
				|  |  |  import com.ym.mec.util.date.DateUtil;
 | 
	
		
			
				|  |  | -import com.ym.mec.web.WebFeignService;
 | 
	
		
			
				|  |  | +import io.swagger.annotations.Api;
 | 
	
		
			
				|  |  | +import io.swagger.annotations.ApiImplicitParam;
 | 
	
		
			
				|  |  | +import io.swagger.annotations.ApiImplicitParams;
 | 
	
		
			
				|  |  | +import io.swagger.annotations.ApiOperation;
 | 
	
		
			
				|  |  | +import org.apache.commons.lang3.StringUtils;
 | 
	
		
			
				|  |  | +import org.springframework.beans.factory.annotation.Autowired;
 | 
	
		
			
				|  |  | +import org.springframework.beans.factory.annotation.Value;
 | 
	
		
			
				|  |  | +import org.springframework.http.MediaType;
 | 
	
		
			
				|  |  | +import org.springframework.security.access.prepost.PreAuthorize;
 | 
	
		
			
				|  |  | +import org.springframework.security.crypto.bcrypt.BCryptPasswordEncoder;
 | 
	
		
			
				|  |  | +import org.springframework.web.bind.annotation.*;
 | 
	
		
			
				|  |  | +
 | 
	
		
			
				|  |  | +import java.util.Date;
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  |  @RestController()
 | 
	
		
			
				|  |  |  @RequestMapping("user")
 | 
	
	
		
			
				|  | @@ -59,8 +50,6 @@ public class UserController extends BaseController {
 | 
	
		
			
				|  |  |  	@Autowired
 | 
	
		
			
				|  |  |  	private IdGeneratorService smsCodeService;
 | 
	
		
			
				|  |  |  	@Autowired
 | 
	
		
			
				|  |  | -	private WebFeignService webFeignService;
 | 
	
		
			
				|  |  | -	@Autowired
 | 
	
		
			
				|  |  |  	private TenantInfoService tenantInfoService;
 | 
	
		
			
				|  |  |  	@Value("${message.debugMode}")
 | 
	
		
			
				|  |  |  	private boolean debugMode;
 | 
	
	
		
			
				|  | @@ -364,4 +353,18 @@ public class UserController extends BaseController {
 | 
	
		
			
				|  |  |      public Object queryClientByPhone(String phone) {
 | 
	
		
			
				|  |  |          return succeed(sysUserService.queryClientByPhone(phone));
 | 
	
		
			
				|  |  |      }
 | 
	
		
			
				|  |  | +
 | 
	
		
			
				|  |  | +	@ApiOperation(value = "用户注销")
 | 
	
		
			
				|  |  | +	@PostMapping(value = "/destroy")
 | 
	
		
			
				|  |  | +	public Object destroy() {
 | 
	
		
			
				|  |  | +		AuthUser user = SecurityUtils.getUser();
 | 
	
		
			
				|  |  | +		if (user != null) {
 | 
	
		
			
				|  |  | +			SysUser sysUser = sysUserService.get(user.getUserId());
 | 
	
		
			
				|  |  | +			sysUser.setPhone("Z" + sysUser.getPhone());
 | 
	
		
			
				|  |  | +			sysUser.setUpdateTime(new Date());
 | 
	
		
			
				|  |  | +			sysUserService.update(sysUser);
 | 
	
		
			
				|  |  | +			return succeed();
 | 
	
		
			
				|  |  | +		}
 | 
	
		
			
				|  |  | +		return failed("请登录");
 | 
	
		
			
				|  |  | +	}
 | 
	
		
			
				|  |  |  }
 |